LoginSignup
1
1

More than 5 years have passed since last update.

terraformでAPIGatewayのステージが自動更新されない時

Posted at

起きた現象

terraformを編集してもステージが過去のデプロイ経歴から復元されて、
新しいものが反映されない。。。

対処法

使わない変数を設定して、
新しく編集するたびに値が変わるようにする

resource "aws_api_gateway_deployment" "MyDemoDeployment" {
  depends_on = ["module.functions"]
  rest_api_id = "${aws_api_gateway_rest_api.chatops-api-blt.id}"
  stage_name  = "${terraform.env}_chatops_apigateway_stage"
  variables = {
    "check_change_hash1" = "${md5(file("変更するファイルのパス.tf"))}"
    "check_change_hash2" = "${md5(file("変更するファイルのパス.tf"))}"
  }
}
1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1