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

resource/aws_xray_sampling_rule fix rule name max length #18667

Merged

Conversation

czubocha
Copy link

@czubocha czubocha commented Apr 8, 2021

The maximum length of the X-Ray rule name is 32 chars according to AWS documentation. Currently, the validation is set to a maximum of 128 which causes 400 HTTP status code to be returned from AWS when provided name is longer than 32.

Error: error creating XRay Sampling Rule: ValidationException: 
	status code: 400, request id: xxxxx

Community Note

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

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccXXX'
TF_ACC=1 go test ./aws -v -count 1 -parallel 20 -run=TestAccAWSXraySamplingRule_ -timeout 180m
=== RUN   TestAccAWSXraySamplingRule_basic
=== PAUSE TestAccAWSXraySamplingRule_basic
=== RUN   TestAccAWSXraySamplingRule_update
=== PAUSE TestAccAWSXraySamplingRule_update
=== RUN   TestAccAWSXraySamplingRule_tags
=== PAUSE TestAccAWSXraySamplingRule_tags
=== RUN   TestAccAWSXraySamplingRule_disappears
=== PAUSE TestAccAWSXraySamplingRule_disappears
=== CONT  TestAccAWSXraySamplingRule_basic
=== CONT  TestAccAWSXraySamplingRule_disappears
=== CONT  TestAccAWSXraySamplingRule_tags
=== CONT  TestAccAWSXraySamplingRule_update
--- PASS: TestAccAWSXraySamplingRule_disappears (16.97s)
--- PASS: TestAccAWSXraySamplingRule_basic (21.84s)
--- PASS: TestAccAWSXraySamplingRule_update (34.63s)
--- PASS: TestAccAWSXraySamplingRule_tags (48.29s)
PASS
ok      github.com/terraform-providers/terraform-provider-aws/aws       50.320s

@czubocha czubocha requested a review from a team as a code owner April 8, 2021 17:17
@ghost ghost added size/XS Managed by automation to categorize the size of a PR. service/xray Issues and PRs that pertain to the xray service. labels Apr 8, 2021
@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Apr 8, 2021
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 @czubocha 👋

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 CONTRIBUTING 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! 😃

@anGie44 anGie44 added bug Addresses a defect in current functionality. and removed needs-triage Waiting for first response or review from a maintainer. labels Apr 8, 2021
@anGie44 anGie44 self-assigned this Apr 8, 2021
Copy link
Contributor

@anGie44 anGie44 left a comment

Choose a reason for hiding this comment

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

Looks great @czubocha , thank you for this fix 🚀 !

Output of acceptance tests (Commercial):

--- PASS: TestAccAWSXraySamplingRule_disappears (11.37s)
--- PASS: TestAccAWSXraySamplingRule_basic (16.03s)
--- PASS: TestAccAWSXraySamplingRule_update (25.02s)
--- PASS: TestAccAWSXraySamplingRule_tags (34.49s)

@anGie44 anGie44 added this to the v3.36.0 milestone Apr 8, 2021
@anGie44 anGie44 merged commit 0f94f25 into hashicorp:main Apr 8, 2021
@czubocha czubocha deleted the b-aws_xray_sampling_rule-validation branch April 8, 2021 17:55
@ghost
Copy link

ghost commented Apr 9, 2021

This has been released in version 3.36.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 for triage. Thanks!

@ghost
Copy link

ghost commented May 9, 2021

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!

@ghost ghost locked as resolved and limited conversation to collaborators May 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Addresses a defect in current functionality. service/xray Issues and PRs that pertain to the xray service. size/XS Managed by automation to categorize the size of a PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants