Terraform v0.11.7
+ provider.aws v1.24.0
data "aws_rds_cluster" "main_cluster" {
cluster_identifier = "main-cluster"
}
data "aws_rds_cluster" "main_cluster" {
cluster_identifier = "main-cluster"
}
https://gist.github.com/martinzak-salsita/195f97370feeec7133b7810e424608e2
We expect terraform to refresh state of cluster and continue with planing.
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"}
terraform initterraform applyUpdated from provider from 1.23.0 to 1.24.0. Configuration works with the older version.
Thank you!
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!
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. 😅