Closed
Description
Describe the Bug
With terraform v1.6, following error occurs in terraform plan
:
╷
│ Warning: Deprecated Parameters
│
│ on backend.tf line 4, in terraform:
│ 4: backend "s3" {
│
│ The following parameters have been deprecated. Replace them as follows:
│ * role_arn -> assume_role.role_arn
│
╵
╷
│ Error: Cannot assume IAM Role
│
│ IAM Role ARN not set
╵
module
module "terraform_state_backend" {
source = "cloudposse/tfstate-backend/aws"
version = "v1.1.1"
namespace = "piyo-dx"
stage = "development-tenant"
name = "azuread"
attributes = ["tfstate"]
terraform_backend_config_file_path = "."
terraform_backend_config_file_name = "backend.tf"
}
Generated backend.tf
terraform {
required_version = ">= 1.0.0"
backend "s3" {
region = "ap-northeast-1"
bucket = "piyo-dx-development-tenant-azuread-tfstate"
key = "terraform.tfstate"
dynamodb_table = "piyo-dx-development-tenant-azuread-tfstate-lock"
profile = ""
role_arn = ""
encrypt = "true"
}
}
Expected Behavior
terraform plan
success.
Steps to Reproduce
With terraform v1.6 and following configuration:
module "terraform_state_backend" {
source = "cloudposse/tfstate-backend/aws"
version = "v1.1.1"
namespace = "hogehoge"
stage = "development"
name = "fugafuga"
attributes = ["tfstate"]
terraform_backend_config_file_path = "."
terraform_backend_config_file_name = "backend.tf"
}
Screenshots

Environment
- OS: Mac os 14
- terraform version: v1.6.0
- module: v1.1.1
Additional Context
backend syntax was changed from v1.6 ( https://github.com/hashicorp/terraform/releases/tag/v1.6.0 ).
It seems like that role_arn
need to be nested.
P.S.
Thank you as always for this module. Our work has become simpler and more beautiful.