Skip to content
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

Add failure code and failure message to batch get collection #38995

Merged
merged 13 commits into from
Sep 25, 2024

Conversation

mumoumit
Copy link
Contributor

@mumoumit mumoumit commented Aug 22, 2024

Description

Added failureCode and failureMessage field to CollectionDetail.

Relations

Closes #39474

References

Output from Acceptance Testing

% make testacc TESTS=TestAccOpenSearchServerlessCollection PKG=opensearchserverless
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.22.6 test ./internal/service/opensearchserverless/... -v -count 1 -parallel 20 -run='TestAccOpenSearchServerlessCollection'  -timeout 360m
=== RUN   TestAccOpenSearchServerlessCollectionDataSource_basic
=== PAUSE TestAccOpenSearchServerlessCollectionDataSource_basic
=== RUN   TestAccOpenSearchServerlessCollectionDataSource_name
=== PAUSE TestAccOpenSearchServerlessCollectionDataSource_name
=== RUN   TestAccOpenSearchServerlessCollection_basic
=== PAUSE TestAccOpenSearchServerlessCollection_basic
=== RUN   TestAccOpenSearchServerlessCollection_standbyReplicas
=== PAUSE TestAccOpenSearchServerlessCollection_standbyReplicas
=== RUN   TestAccOpenSearchServerlessCollection_tags
=== PAUSE TestAccOpenSearchServerlessCollection_tags
=== RUN   TestAccOpenSearchServerlessCollection_update
=== PAUSE TestAccOpenSearchServerlessCollection_update
=== RUN   TestAccOpenSearchServerlessCollection_disappears
=== PAUSE TestAccOpenSearchServerlessCollection_disappears
=== CONT  TestAccOpenSearchServerlessCollectionDataSource_basic
=== CONT  TestAccOpenSearchServerlessCollection_tags
=== CONT  TestAccOpenSearchServerlessCollection_disappears
=== CONT  TestAccOpenSearchServerlessCollection_basic
=== CONT  TestAccOpenSearchServerlessCollectionDataSource_name
=== CONT  TestAccOpenSearchServerlessCollection_standbyReplicas
=== CONT  TestAccOpenSearchServerlessCollection_update
2024-08-22T15:25:06.702Z [ERROR] aws.autoflex: Flattening incompatible types: tf_rpc=ApplyResourceChange tf_provider_addr=registry.terraform.io/hashicorp/aws tf_resource_type=aws_opensearchserverless_security_policy autoflex.source.path=Policy autoflex.source.type=github.com/aws/aws-sdk-go-v2/service/opensearchserverless/internal/document.Interface tf_req_id=b34770e4-1bab-3d06-db62-329a95cad6a5 autoflex.target.type=github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes.Normalized tf_mux_provider="*proto5server.Server" autoflex.target.path=Policy
2024-08-22T15:25:06.742Z [ERROR] aws.autoflex: Flattening incompatible types: autoflex.target.type=github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes.Normalized tf_provider_addr=registry.terraform.io/hashicorp/aws autoflex.target.path=Policy autoflex.source.type=github.com/aws/aws-sdk-go-v2/service/opensearchserverless/internal/document.Interface autoflex.source.path=Policy tf_rpc=ApplyResourceChange tf_resource_type=aws_opensearchserverless_security_policy tf_mux_provider="*proto5server.Server" tf_req_id=a347ddda-a4fe-01f7-24f4-46bf4eac33e6
2024-08-22T15:25:06.772Z [ERROR] aws.autoflex: Flattening incompatible types: tf_req_id=d62632ae-9356-9bbc-1219-66f3642b2009 autoflex.target.type=github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes.Normalized autoflex.target.path=Policy tf_resource_type=aws_opensearchserverless_security_policy tf_rpc=ApplyResourceChange autoflex.source.type=github.com/aws/aws-sdk-go-v2/service/opensearchserverless/internal/document.Interface tf_mux_provider="*proto5server.Server" tf_provider_addr=registry.terraform.io/hashicorp/aws autoflex.source.path=Policy
2024-08-22T15:25:06.860Z [ERROR] aws.autoflex: Flattening incompatible types: tf_mux_provider="*proto5server.Server" autoflex.source.path=Policy tf_provider_addr=registry.terraform.io/hashicorp/aws autoflex.source.type=github.com/aws/aws-sdk-go-v2/service/opensearchserverless/internal/document.Interface autoflex.target.type=github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes.Normalized autoflex.target.path=Policy tf_rpc=ApplyResourceChange tf_resource_type=aws_opensearchserverless_security_policy tf_req_id=33d91382-5294-fb31-2fc6-9952a27aaeae
2024-08-22T15:25:06.928Z [ERROR] aws.autoflex: Flattening incompatible types: tf_req_id=70014327-4416-0406-8472-b67407502246 autoflex.target.path=Policy tf_provider_addr=registry.terraform.io/hashicorp/aws autoflex.source.path=Policy tf_rpc=ApplyResourceChange autoflex.target.type=github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes.Normalized autoflex.source.type=github.com/aws/aws-sdk-go-v2/service/opensearchserverless/internal/document.Interface tf_mux_provider="*proto5server.Server" tf_resource_type=aws_opensearchserverless_security_policy
2024-08-22T15:25:07.061Z [ERROR] aws.autoflex: Flattening incompatible types: tf_req_id=170b4f2e-b456-d906-4444-cec9f5fa2c3c autoflex.source.path=Policy autoflex.target.type=github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes.Normalized tf_mux_provider="*proto5server.Server" tf_provider_addr=registry.terraform.io/hashicorp/aws tf_resource_type=aws_opensearchserverless_security_policy autoflex.target.path=Policy tf_rpc=ApplyResourceChange autoflex.source.type=github.com/aws/aws-sdk-go-v2/service/opensearchserverless/internal/document.Interface
2024-08-22T15:25:07.195Z [ERROR] aws.autoflex: Flattening incompatible types: tf_mux_provider="*proto5server.Server" tf_provider_addr=registry.terraform.io/hashicorp/aws autoflex.source.type=github.com/aws/aws-sdk-go-v2/service/opensearchserverless/internal/document.Interface autoflex.target.type=github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes.Normalized tf_req_id=a937c79c-95f1-5a1d-97b2-cd2ce5a367d2 autoflex.target.path=Policy tf_rpc=ApplyResourceChange tf_resource_type=aws_opensearchserverless_security_policy autoflex.source.path=Policy
2024-08-22T15:29:13.754Z [ERROR] aws.autoflex: Flattening incompatible types: tf_req_id=be375317-c972-544b-b779-c6fde505c144 tf_resource_type=aws_opensearchserverless_security_policy tf_rpc=ReadResource tf_mux_provider="*proto5server.Server" autoflex.source.type=github.com/aws/aws-sdk-go-v2/service/opensearchserverless/internal/document.Interface tf_provider_addr=registry.terraform.io/hashicorp/aws autoflex.target.path=Policy autoflex.target.type=github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes.Normalized autoflex.source.path=Policy
2024-08-22T15:29:13.802Z [ERROR] aws.autoflex: Flattening incompatible types: tf_provider_addr=registry.terraform.io/hashicorp/aws tf_mux_provider="*proto5server.Server" autoflex.source.type=github.com/aws/aws-sdk-go-v2/service/opensearchserverless/internal/document.Interface tf_rpc=ReadResource tf_resource_type=aws_opensearchserverless_security_policy autoflex.source.path=Policy autoflex.target.type=github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes.Normalized tf_req_id=a2ce6d32-e532-2ce5-61a1-546ad4649514 autoflex.target.path=Policy
2024-08-22T15:29:13.815Z [ERROR] aws.autoflex: Flattening incompatible types: tf_rpc=ReadResource autoflex.source.type=github.com/aws/aws-sdk-go-v2/service/opensearchserverless/internal/document.Interface autoflex.target.path=Policy autoflex.source.path=Policy tf_req_id=d1f722f2-6e91-f9b1-dd52-b5efae2124ec autoflex.target.type=github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes.Normalized tf_provider_addr=registry.terraform.io/hashicorp/aws tf_resource_type=aws_opensearchserverless_security_policy tf_mux_provider="*proto5server.Server"
2024-08-22T15:29:14.315Z [ERROR] aws.autoflex: Flattening incompatible types: autoflex.target.path=Policy tf_resource_type=aws_opensearchserverless_security_policy autoflex.source.type=github.com/aws/aws-sdk-go-v2/service/opensearchserverless/internal/document.Interface tf_mux_provider="*proto5server.Server" tf_rpc=ReadResource autoflex.target.type=github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes.Normalized autoflex.source.path=Policy tf_provider_addr=registry.terraform.io/hashicorp/aws tf_req_id=25016680-bf1a-1cea-7a61-04251b56b5b9
2024-08-22T15:29:14.394Z [ERROR] aws.autoflex: Flattening incompatible types: tf_resource_type=aws_opensearchserverless_security_policy tf_rpc=ReadResource autoflex.source.type=github.com/aws/aws-sdk-go-v2/service/opensearchserverless/internal/document.Interface tf_provider_addr=registry.terraform.io/hashicorp/aws autoflex.target.type=github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes.Normalized autoflex.target.path=Policy autoflex.source.path=Policy tf_req_id=cab326b2-ccb4-4717-033a-f42d299754c8 tf_mux_provider="*proto5server.Server"
2024-08-22T15:29:16.127Z [ERROR] aws.autoflex: Flattening incompatible types: autoflex.target.path=Policy tf_provider_addr=registry.terraform.io/hashicorp/aws autoflex.source.path=Policy tf_mux_provider="*proto5server.Server" tf_resource_type=aws_opensearchserverless_security_policy autoflex.source.type=github.com/aws/aws-sdk-go-v2/service/opensearchserverless/internal/document.Interface autoflex.target.type=github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes.Normalized tf_req_id=28833507-fe91-da52-d04e-bc467c618102 tf_rpc=ReadResource
2024-08-22T15:29:22.355Z [ERROR] aws.autoflex: Flattening incompatible types: tf_resource_type=aws_opensearchserverless_security_policy autoflex.source.path=Policy tf_provider_addr=registry.terraform.io/hashicorp/aws tf_req_id=d9db1288-9fad-08ce-5507-6d14f76cf4f3 autoflex.target.path=Policy tf_mux_provider="*proto5server.Server" autoflex.source.type=github.com/aws/aws-sdk-go-v2/service/opensearchserverless/internal/document.Interface tf_rpc=ReadResource autoflex.target.type=github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes.Normalized
2024-08-22T15:29:23.501Z [ERROR] aws.autoflex: Flattening incompatible types: tf_rpc=ReadResource tf_req_id=56e5ba07-e519-e7a4-0cfc-08d53c7cea8a tf_mux_provider="*proto5server.Server" autoflex.source.path=Policy tf_provider_addr=registry.terraform.io/hashicorp/aws autoflex.source.type=github.com/aws/aws-sdk-go-v2/service/opensearchserverless/internal/document.Interface autoflex.target.path=Policy tf_resource_type=aws_opensearchserverless_security_policy autoflex.target.type=github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes.Normalized
2024-08-22T15:29:25.750Z [ERROR] aws.autoflex: Flattening incompatible types: autoflex.target.type=github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes.Normalized tf_provider_addr=registry.terraform.io/hashicorp/aws tf_req_id=160a19dd-836b-e213-3d91-c6a7bc02a3bf tf_mux_provider="*proto5server.Server" autoflex.target.path=Policy autoflex.source.type=github.com/aws/aws-sdk-go-v2/service/opensearchserverless/internal/document.Interface tf_resource_type=aws_opensearchserverless_security_policy autoflex.source.path=Policy tf_rpc=ReadResource
2024-08-22T15:29:31.872Z [ERROR] aws.autoflex: Flattening incompatible types: autoflex.target.path=Policy autoflex.source.path=Policy autoflex.target.type=github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes.Normalized tf_provider_addr=registry.terraform.io/hashicorp/aws tf_req_id=83c55ae0-289a-ea4f-2bd0-6a708086b858 tf_rpc=ReadResource autoflex.source.type=github.com/aws/aws-sdk-go-v2/service/opensearchserverless/internal/document.Interface tf_resource_type=aws_opensearchserverless_security_policy tf_mux_provider="*proto5server.Server"
2024-08-22T15:29:34.025Z [ERROR] aws.autoflex: Flattening incompatible types: autoflex.source.type=github.com/aws/aws-sdk-go-v2/service/opensearchserverless/internal/document.Interface tf_req_id=4b448f18-c579-dd73-4826-098d1d00bee8 tf_rpc=ReadResource autoflex.target.type=github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes.Normalized tf_provider_addr=registry.terraform.io/hashicorp/aws autoflex.target.path=Policy tf_resource_type=aws_opensearchserverless_security_policy autoflex.source.path=Policy tf_mux_provider="*proto5server.Server"
2024-08-22T15:29:39.978Z [ERROR] aws.autoflex: Flattening incompatible types: tf_mux_provider="*proto5server.Server" tf_provider_addr=registry.terraform.io/hashicorp/aws tf_rpc=ReadResource autoflex.target.type=github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes.Normalized autoflex.target.path=Policy autoflex.source.type=github.com/aws/aws-sdk-go-v2/service/opensearchserverless/internal/document.Interface tf_req_id=f2aa3764-1f93-683c-863f-bd6f470469b7 autoflex.source.path=Policy tf_resource_type=aws_opensearchserverless_security_policy
2024-08-22T15:29:43.787Z [ERROR] aws.autoflex: Flattening incompatible types: tf_provider_addr=registry.terraform.io/hashicorp/aws autoflex.source.type=github.com/aws/aws-sdk-go-v2/service/opensearchserverless/internal/document.Interface autoflex.source.path=Policy tf_mux_provider="*proto5server.Server" autoflex.target.type=github.com/hashicorp/terraform-plugin-framework-jsontypes/jsontypes.Normalized tf_rpc=ReadResource tf_resource_type=aws_opensearchserverless_security_policy autoflex.target.path=Policy tf_req_id=cd9486f9-ef11-0c6d-ca85-d893671df849
--- PASS: TestAccOpenSearchServerlessCollection_disappears (285.42s)
--- PASS: TestAccOpenSearchServerlessCollectionDataSource_basic (286.27s)
--- PASS: TestAccOpenSearchServerlessCollectionDataSource_name (286.38s)
--- PASS: TestAccOpenSearchServerlessCollection_standbyReplicas (288.37s)
--- PASS: TestAccOpenSearchServerlessCollection_basic (288.42s)
--- PASS: TestAccOpenSearchServerlessCollection_update (293.64s)
--- PASS: TestAccOpenSearchServerlessCollection_tags (311.29s)
PASS

...

@mumoumit mumoumit requested a review from a team as a code owner August 22, 2024 16:04
Copy link

Community Note

Voting for Prioritization

  • Please vote on this pull request by adding a 👍 reaction to the original post to help the community and maintainers prioritize this pull request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added service/opensearchserverless Issues and PRs that pertain to the opensearchserverless service. needs-triage Waiting for first response or review from a maintainer. labels Aug 22, 2024
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome @mumoumit 👋

It looks like this is your first Pull Request submission to the Terraform AWS Provider! If you haven’t already done so please make sure you have checked out our CONTRIBUTOR guide and FAQ to make sure your contribution is adhering to best practice and has all the necessary elements in place for a successful approval.

Also take a look at our FAQ which details how we prioritize Pull Requests for inclusion.

Thanks again, and welcome to the community! 😃

@justinretzolk justinretzolk added enhancement Requests to existing resources that expand the functionality or scope. and removed needs-triage Waiting for first response or review from a maintainer. labels Aug 22, 2024
Copy link
Contributor

@johnsonaj johnsonaj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

% make testacc TESTARGS='-run=TestAccOpenSearchServerless' PKG=opensearchserverless

make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.23.1 test ./internal/service/opensearchserverless/... -v -count 1 -parallel 20  -run=TestAccOpenSearchServerless -timeout 360m
--- PASS: TestAccOpenSearchServerlessLifecyclePolicyDataSource_basic (26.14s)
--- PASS: TestAccOpenSearchServerlessSecurityPolicy_disappears (27.18s)
--- PASS: TestAccOpenSearchServerlessSecurityConfigDataSource_basic (27.34s)
--- PASS: TestAccOpenSearchServerlessLifecyclePolicy_disappears (27.45s)
--- PASS: TestAccOpenSearchServerlessAccessPolicyDataSource_basic (27.47s)
--- PASS: TestAccOpenSearchServerlessLifecyclePolicy_basic (31.70s)
--- PASS: TestAccOpenSearchServerlessSecurityPolicy_basic (34.33s)
--- PASS: TestAccOpenSearchServerlessLifecyclePolicy_update (39.46s)
--- PASS: TestAccOpenSearchServerlessSecurityPolicy_update (40.45s)
--- PASS: TestAccOpenSearchServerlessSecurityPolicy_string (40.63s)
--- PASS: TestAccOpenSearchServerlessSecurityPolicyDataSource_basic (18.43s)
--- PASS: TestAccOpenSearchServerlessSecurityConfig_disappears (19.15s)
--- PASS: TestAccOpenSearchServerlessSecurityPolicy_stringUpdate (48.50s)
--- PASS: TestAccOpenSearchServerlessSecurityConfig_basic (19.04s)
--- PASS: TestAccOpenSearchServerlessAccessPolicy_disappears (15.86s)
--- PASS: TestAccOpenSearchServerlessSecurityConfig_update (25.89s)
--- PASS: TestAccOpenSearchServerlessAccessPolicy_basic (18.04s)
--- PASS: TestAccOpenSearchServerlessAccessPolicy_update (35.68s)
--- PASS: TestAccOpenSearchServerlessVPCEndpointDataSource_basic (282.70s)
--- PASS: TestAccOpenSearchServerlessVPCEndpoint_basic (284.31s)
--- PASS: TestAccOpenSearchServerlessVPCEndpoint_disappears (324.82s)
--- PASS: TestAccOpenSearchServerlessCollection_basic (351.03s)
--- PASS: TestAccOpenSearchServerlessCollectionDataSource_name (351.20s)
--- PASS: TestAccOpenSearchServerlessCollection_update (357.74s)
--- PASS: TestAccOpenSearchServerlessCollection_disappears (386.21s)
--- PASS: TestAccOpenSearchServerlessVPCEndpoint_securityGroups (386.68s)
--- PASS: TestAccOpenSearchServerlessCollection_standbyReplicas (388.91s)
--- PASS: TestAccOpenSearchServerlessCollectionDataSource_basic (396.01s)
--- PASS: TestAccOpenSearchServerlessCollection_tags (404.35s)
--- PASS: TestAccOpenSearchServerlessVPCEndpoint_update (611.76s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/opensearchserverless	618.415s

@github-actions github-actions bot added documentation Introduces or discusses updates to documentation. generators Relates to code generators. labels Sep 25, 2024
@johnsonaj
Copy link
Contributor

@mumoumit thank you for the contribution! 🎉

I removed the failure_code and failure_reason attributes from the resource since they would never actually be set if a failure occurred.

@johnsonaj johnsonaj merged commit a1ffaea into hashicorp:main Sep 25, 2024
44 checks passed
@github-actions github-actions bot added this to the v5.69.0 milestone Sep 25, 2024
Copy link

This functionality has been released in v5.69.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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. generators Relates to code generators. service/opensearchserverless Issues and PRs that pertain to the opensearchserverless service.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants