Closed AliAllomani closed 10 months ago
Voting for Prioritization
Volunteering to Work on This Issue
Other tests show AWS API returns value for resourceShareAssociations
in the response in addition to nextToken
, in this case the error doesn't occur
2023-10-19T15:33:19.550+0200 [DEBUG] provider.terraform-provider-aws_v5.21.0_x5: HTTP Request Sent: http.request.header.content_type=application/json tf_aws.sdk=aws-sdk-go tf_resource_type=aws_ram_principal_association tf_req_id=9bb55ae1-d2f9-9907-1ae3-e0bfd2bcd8fb tf_rpc=ReadResource @module=aws http.request.header.x_amz_date=20231019T133319Z http.user_agent="APN/1.0 HashiCorp/1.0 Terraform/1.2.2 (+https://www.terraform.io) terraform-provider-aws/5.21.0 (+https://registry.terraform.io/providers/hashicorp/aws) aws-sdk-go/1.45.24 (go1.20.8; darwin; arm64)" rpc.system=aws-api tf_provider_addr=registry.terraform.io/hashicorp/aws @caller=github.com/hashicorp/aws-sdk-go-base/v2/awsv1shim/v2@v2.0.0-beta.38/logger.go:109 http.flavor=1.1 http.request.header.authorization="AWS4-HMAC-SHA256 Credential=XXXXX/20231019/eu-west-3/ram/aws4_request, SignedHeaders=content-length;content-type;host;x-amz-date;x-amz-security-token, Signature=*****" http.request.header.x_amz_security_token=***** http.request_content_length=225 rpc.method=GetResourceShareAssociations rpc.service=RAM tf_mux_provider=*schema.GRPCProviderServer aws.region=eu-west-3 http.method=POST http.request.body="{"associationType":"PRINCIPAL","principal":"arn:aws:organizations::XXXX:ou/o-XXXX/ou-XXXX","resourceShareArns":["arn:aws:ram:eu-west-3:XXXX:resource-share/1e6dd8c4-7979-4d13-80d2-6f2a417a1e0c"]}
2023-10-19T15:33:19.903+0200 [DEBUG] provider.terraform-provider-aws_v5.21.0_x5: HTTP Response Received: http.duration=350 http.response.header.access_control_allow_methods=POST http.response.header.access_control_max_age=86400 rpc.method=GetResourceShareAssociations http.response.header.x_amzn_trace_id=Root=1-6531301f-48dac16a335322af7afe8de3 tf_req_id=9bb55ae1-d2f9-9907-1ae3-e0bfd2bcd8fb tf_resource_type=aws_ram_principal_association tf_rpc=ReadResource http.response.body="{"nextToken":"<TRUNCATED>","resourceShareAssociations":[{"associatedEntity":"arn:aws:organizations::XXXX:ou/o-XXXX/ou-XXXX","associationType":"PRINCIPAL","creationTime":1.686139318672E9,"external":false,"lastUpdatedTime":1.686139339385E9,"resourceShareArn":"arn:aws:ram:eu-west-3:XXXX:resource-share/1e6dd8c4-7979-4d13-80d2-6f2a417a1e0c","resourceShareName":"r53r_share_infra_ew3_prod_ram_01","status":"ASSOCIATED"}]}
This functionality has been released in v5.32.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!
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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Terraform Core Version
1.2.2
AWS Provider Version
5.21.0
Affected Resource(s)
Expected Behavior
Resource defenition of RAM principal association should be able to read and update the defined associations, even when a large number of associations exist
Terraform provider / AWS SDK should respect
nextToken
when provided in the response and proceed with the next request withNextToken
in the requestActual Behavior
Terraform plan fails with the error
From the debug logs, it seems that the API response includes
nextToken
param in the first reponse whileresourceShareAssociations
is an empty arrayThe issue has been detected in Paris region (eu-west-3) only
Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
Steps to Reproduce
Debug Output
Behaviour from Terraform
Behaviour from AWS CLI
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
No