[Terraform]aws providerバージョンアップ手順

LINEで送る
Pocket

https://registry.terraform.io/providers/hashicorp/aws/latest

  • backend.tfでバージョンを指定
provider "aws" {
  region  = "ap-northeast-1"
  profile = "hoge"
}

terraform {
  required_version = ">= 0.15"
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "3.50.0"
    }
  }
  backend "s3" {
    bucket  = "hoge"
    key     = "terraform.tfstate"
    region  = "ap-northeast-1"
    profile = "hoge"
  }
}

  • terraform init
terraform init -upgrade
  • .terraform.lock.hclの差分修正とpushして完

Was this helpful?

0 / 0

コメントを残す 0

Your email address will not be published. Required fields are marked *