-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
d/aws_opensearch_serverless_collection: fix autoflex failure #41105
Conversation
Community NoteVoting for Prioritization
For Submitters
|
4552572
to
270edad
Compare
3eba8d3
to
0a7e42f
Compare
The `created_date` and `last_modified_date` attributes are string types, while the AWS data structure represents these fields in Unix time as `int64` pointers. The mismatch between types resulted in AutoFlex diagnostic errors being printed to stdout, despite the custom handling being present on the Read method to covert Unix time to an RFC3339 formatted string. This change adds an option to ignore these fields during the flatten operation to prevent errant error logs. ``` 2025-01-27T11:41:39.949-0500 [ERROR] aws.autoflex: AutoFlex Flatten; incompatible types: autoflex.source.type="*int64" tf_rpc=ReadDataSource tf_provider_addr=registry.terraform.io/hashicorp/aws tf_req_id=440f6267-4953-4dbb-2934-fc20eece0f95 tf_mux_provider="*proto5server.Server" autoflex.target.path=CreatedDate to=basetypes.StringType from=int64 tf_data_source_type=aws_opensearchserverless_collection autoflex.source.path=CreatedDate autoflex.target.type=github.com/hashicorp/terraform-plugin-framework/types/basetypes.StringValue ``` ```console % make testacc PKG=opensearchserverless TESTS="TestAccOpenSearchServerlessCollectionDataSource_" make: Verifying source code with gofmt... ==> Checking that code complies with gofmt requirements... TF_ACC=1 go1.23.3 test ./internal/service/opensearchserverless/... -v -count 1 -parallel 20 -run='TestAccOpenSearchServerlessCollectionDataSource_' -timeout 360m -vet=off 2025/01/27 13:26:29 Initializing Terraform AWS Provider... --- PASS: TestAccOpenSearchServerlessCollectionDataSource_name (285.96s) --- PASS: TestAccOpenSearchServerlessCollectionDataSource_basic (286.01s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/opensearchserverless 293.610s ```
0a7e42f
to
ae0283b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
This functionality has been released in v5.85.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you! |
Description
The
created_date
andlast_modified_date
attributes are string types, while the AWS data structure represents these fields in Unix time asint64
pointers. The mismatch between types resulted in AutoFlex diagnostic errors being printed to stdout, despite the custom handling being present on the Read method to covert Unix time to an RFC3339 formatted string. This change adds an option to ignore these fields during the flatten operation to prevent errant error logs.Output from Acceptance Testing