株式会社ヴァンデミックシステム

Blog

<スポンサーリンク>

まず、0.12から0.13へのアップグレード。
2つのファイルで0.13系を指定しておく。

.terraform-version

0.13.2

main.tf

terraform {
  required_version = "= 0.13.2"
  backend "s3" {
    bucket  = "vamdemic-terraform"
    region  = "ap-northeast-1"
    profile = "terraformer"
    key     = "terraform/monitor/vamdemic-main/terraform.tfstate"
    encrypt = true
  }
}
terraform init
terraform 0.13upgrade

ここから0.14へ上げられないので、いったんterraform applyする。
tfstateファイルの形式が変わったらしいので。

その後以下のように変更
.terraform-version

0.14.9

main.tf

terraform {
  required_version = "= 0.14.9"
  backend "s3" {
    bucket  = "vamdemic-terraform"
    region  = "ap-northeast-1"
    profile = "terraformer"
    key     = "terraform/monitor/vamdemic-main/terraform.tfstate"
    encrypt = true
  }
}
 terraform init -upgrade
terraform apply

これできれいになっていると思う

<スポンサーリンク>

コメントを残す

Allowed tags:  you may use these HTML tags and attributes: <a href="">, <strong>, <em>, <h1>, <h2>, <h3>
Please note:  all comments go through moderation.

*

日本語が含まれない投稿は無視されますのでご注意ください。(スパム対策)