We consume the cloudzero-aws module for the cross-account IAM role and supply
our own CUR, so we set cur_bucket_name and leave create_cur at its default.
With the AWS provider on v6, every plan picks up two deprecation warnings out of
terraform/cloudzero-aws/cur.tf:
Warning: Deprecated attribute
on .terraform/modules/cloudzero/terraform/cloudzero-aws/cur.tf line 162, in resource "aws_cur_report_definition" "cloudzero":
162: s3_region = data.aws_region.current.name
The attribute "name" is deprecated. Refer to the provider documentation for
details.
There are two references, both to data.aws_region.current.name:
- line 162, the
s3_region argument on aws_cur_report_definition.cloudzero
- line 171, the
us-east-1 precondition
The AWS provider renamed that attribute to region in v6, so .region looks
like a drop-in replacement. versions.tf declares aws >= 5.0, which permits
v6, so anyone already on the v6 line sees this.
The part that makes it a little awkward from outside the module is that the
warnings appear even when create_cur is false. Terraform still evaluates the
attribute reference for deprecation regardless of the resource's count, so a
consumer who only wants the IAM role and brings their own CUR bucket gets both
warnings on every plan, and there is no way to suppress them from the calling
module. It is cosmetic, but it trains people to skim past plan warnings, which
we would rather avoid.
Thanks!
We consume the
cloudzero-awsmodule for the cross-account IAM role and supplyour own CUR, so we set
cur_bucket_nameand leavecreate_curat its default.With the AWS provider on v6, every plan picks up two deprecation warnings out of
terraform/cloudzero-aws/cur.tf:There are two references, both to
data.aws_region.current.name:s3_regionargument onaws_cur_report_definition.cloudzerous-east-1preconditionThe AWS provider renamed that attribute to
regionin v6, so.regionlookslike a drop-in replacement.
versions.tfdeclaresaws >= 5.0, which permitsv6, so anyone already on the v6 line sees this.
The part that makes it a little awkward from outside the module is that the
warnings appear even when
create_curis false. Terraform still evaluates theattribute reference for deprecation regardless of the resource's
count, so aconsumer who only wants the IAM role and brings their own CUR bucket gets both
warnings on every plan, and there is no way to suppress them from the calling
module. It is cosmetic, but it trains people to skim past plan warnings, which
we would rather avoid.
Thanks!