Terraform-provider-aws: error setting enabled_cloudwatch_logs_exports: Invalid address to set: []string{"enabled_cloudwatch_logs_exports"}

Created on 21 Jun 2018  ·  5Comments  ·  Source: hashicorp/terraform-provider-aws

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

 Terraform v0.11.7
+ provider.aws v1.24.0

Affected Resource(s)

data "aws_rds_cluster" "main_cluster" {
  cluster_identifier = "main-cluster"
}

Terraform Configuration Files

data "aws_rds_cluster" "main_cluster" {
  cluster_identifier = "main-cluster"
}

Debug Output

https://gist.github.com/martinzak-salsita/195f97370feeec7133b7810e424608e2

Expected Behavior

We expect terraform to refresh state of cluster and continue with planing.

Actual Behavior

Error: Error refreshing state: 1 error(s) occurred:

* data.aws_rds_cluster.main_cluster: 1 error(s) occurred:

* data.aws_rds_cluster.main_cluster: data.aws_rds_cluster.main_cluster: error setting enabled_cloudwatch_logs_exports: Invalid address to set: []string{"enabled_cloudwatch_logs_exports"}

Steps to Reproduce

  1. terraform init
  2. terraform apply

Important Factoids

Updated from provider from 1.23.0 to 1.24.0. Configuration works with the older version.

References

Thank you!

bug regression servicrds

Most helpful comment

Yikes! Sorry about the unexpected behavior @martinzak-salsita and thanks so much for reporting this. This is indeed a regression between 1.23.0 and 1.24.0.

This is one of the cases where we hardcode the data source attributes separate from the resource attributes, but use the resource read function to set all the attributes, which was updated to include the new CloudWatch logs support. Generally doing this is for simplicity as the read logic is almost exactly the same, however we can run into trouble like this. We prefer to not do this (use the resource read function in the data source) for new data sources but we have not gone back and fixed up all the existing ones.

I'll submit the pull request to fix this immediately. 😅

All 5 comments

Yikes! Sorry about the unexpected behavior @martinzak-salsita and thanks so much for reporting this. This is indeed a regression between 1.23.0 and 1.24.0.

This is one of the cases where we hardcode the data source attributes separate from the resource attributes, but use the resource read function to set all the attributes, which was updated to include the new CloudWatch logs support. Generally doing this is for simplicity as the read logic is almost exactly the same, however we can run into trouble like this. We prefer to not do this (use the resource read function in the data source) for new data sources but we have not gone back and fixed up all the existing ones.

I'll submit the pull request to fix this immediately. 😅

Bug fix PR submitted: #4927

The fix has been merged into master and will release with version 1.25.0 of the AWS provider, likely middle of next week. Sorry for the trouble!

This has been released in version 1.25.0 of the AWS provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

Was this page helpful?
0 / 5 - 0 ratings