aws-samples / aws-cudos-framework-deployment

Command Line Interface tool for Cloud Intelligence Dashboards deployment
https://catalog.workshops.aws/awscid
MIT No Attribution
372 stars 138 forks source link

Fix wrong Terraform attribute for AWS Region #868

Closed eriweb closed 4 days ago

eriweb commented 4 days ago

Issue #, if available:

Description of changes: As per the AWS Provider documentation at https://registry.terraform.io/providers/hashicorp/aws/5.55.0/docs/data-sources/region#attribute-reference, there is no attribute called region. Using the module as is results with errors like this:

 Error: Unsupported attribute
│ 
│   on .terraform/modules/cur_source/terraform-modules/cur-setup-source/main.tf line 127, in data "aws_iam_policy_document" "bucket_policy":
│  127:       values   = ["arn:${data.aws_partition.this.partition}:cur:${data.aws_region.this.region}:${data.aws_caller_identity.this.account_id}:definition/*"]
│ 
│ This object has no argument, nested block, or exported attribute named
│ "region".

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

iakov-aws commented 4 days ago

Thank you!