Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No compatibility with terraform v1.6 #146

Open
bigwheel opened this issue Oct 4, 2023 · 1 comment
Open

No compatibility with terraform v1.6 #146

bigwheel opened this issue Oct 4, 2023 · 1 comment
Labels
bug 🐛 An issue with the system

Comments

@bigwheel
Copy link

bigwheel commented Oct 4, 2023

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

スクリーンショット 2023-10-05 8 37 41

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.

@bigwheel bigwheel added the bug 🐛 An issue with the system label Oct 4, 2023
@bigwheel
Copy link
Author

bigwheel commented Oct 5, 2023

AndreMiras added a commit to mynotif/mynotif-backend that referenced this issue Apr 22, 2024
Also update Terraform backend provider version to fix deprecated
role_arn field, refs:
cloudposse/terraform-aws-tfstate-backend#146

Also update the `devops/aws/redeploy/apprunner` make target to specify
the region and change redeployment command, the errors were:
```
The service arn provided in the request does not belong to the current region
No configurations provided in the UpdateService request.
```
AndreMiras added a commit to mynotif/mynotif-backend that referenced this issue Apr 23, 2024
Also update Terraform backend provider version to fix deprecated
role_arn field, refs:
cloudposse/terraform-aws-tfstate-backend#146

Also update the `devops/aws/redeploy/apprunner` make target to specify
the region and change redeployment command, the errors were:
```
The service arn provided in the request does not belong to the current region
No configurations provided in the UpdateService request.
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
Development

No branches or pull requests

1 participant