-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
r/aws_security_group: Support ampersand in rule description #9528
r/aws_security_group: Support ampersand in rule description #9528
Conversation
…he official API documentation is not accurate. Making an request that includes an invalid character (e.g. %) reveals the actual pattern to be: a-zA-Z0-9. _-:/()#,@[]+=&;{}!$*
As there was no assistance on this matter, I opened a support ticket with AWS and they have now corrected the API documentation. I rebased this PR on the latest master. @bflad I think this is good to be merged now. |
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.
Looks good to me, @stefansundin 🚀 Thanks for this fix and working with AWS to ensure the API documentation was updated to match reality.
Output from acceptance testing:
--- PASS: TestAccAWSSecurityGroupRule_ExpectInvalidTypeError (4.39s)
--- PASS: TestAccAWSSecurityGroupRule_ExpectInvalidCIDR (6.05s)
--- PASS: TestAccAWSSecurityGroupRule_Ingress_VPC (22.71s)
--- PASS: TestAccAWSSecurityGroupRule_Issue5310 (24.65s)
--- PASS: TestAccAWSSecurityGroupRule_EgressDescription (25.59s)
--- PASS: TestAccAWSSecurityGroupRule_Egress (26.07s)
--- PASS: TestAccAWSSecurityGroupRule_Ingress_Protocol (29.01s)
--- PASS: TestAccAWSSecurityGroupRule_Ingress_Ipv6 (29.61s)
--- PASS: TestAccAWSSecurityGroupRule_MultiIngress (30.80s)
--- PASS: TestAccAWSSecurityGroupRule_Ingress_Classic (32.44s)
--- PASS: TestAccAWSSecurityGroupRule_Description_AllPorts (32.90s)
--- PASS: TestAccAWSSecurityGroupRule_SelfReference (33.67s)
--- PASS: TestAccAWSSecurityGroupRule_MultipleRuleSearching_AllProtocolCrash (27.50s)
--- PASS: TestAccAWSSecurityGroupRule_PartialMatching_Source (39.47s)
--- PASS: TestAccAWSSecurityGroupRule_Description_AllPorts_NonZeroPorts (36.77s)
--- PASS: TestAccAWSSecurityGroupRule_IngressDescription (44.12s)
--- PASS: TestAccAWSSecurityGroupRule_PartialMatching_basic (47.17s)
--- PASS: TestAccAWSSecurityGroupRule_SelfSource (51.75s)
--- PASS: TestAccAWSSecurityGroup_namePrefix (13.82s)
--- PASS: TestAccAWSSecurityGroup_basic (33.31s)
--- PASS: TestAccAWSSecurityGroupRule_IngressDescription_updates (63.09s)
--- PASS: TestAccAWSSecurityGroupRule_PrefixListEgress (68.45s)
--- PASS: TestAccAWSSecurityGroup_IPRangeAndSecurityGroupWithSameRules (44.10s)
--- PASS: TestAccAWSSecurityGroup_IPRangesWithSameRules (51.92s)
--- PASS: TestAccAWSSecurityGroup_sourceSecurityGroup (57.09s)
--- PASS: TestAccAWSSecurityGroup_ipv6 (44.63s)
--- PASS: TestAccAWSSecurityGroup_vpcProtoNumIngress (28.98s)
--- PASS: TestAccAWSSecurityGroup_self (47.37s)
--- PASS: TestAccAWSSecurityGroup_invalidCIDRBlock (4.10s)
--- PASS: TestAccAWSSecurityGroup_defaultEgressClassic (15.20s)
--- PASS: TestAccAWSSecurityGroup_generatedName (31.57s)
--- PASS: TestAccAWSSecurityGroup_drift (19.16s)
--- PASS: TestAccAWSSecurityGroup_vpc (56.41s)
--- PASS: TestAccAWSSecurityGroup_ingressConfigMode (75.06s)
--- PASS: TestAccAWSSecurityGroupRule_EgressDescription_updates (109.86s)
--- PASS: TestAccAWSSecurityGroup_vpcNegOneIngress (59.83s)
--- PASS: TestAccAWSSecurityGroup_multiIngress (51.68s)
--- PASS: TestAccAWSSecurityGroup_change (51.87s)
--- PASS: TestAccAWSSecurityGroup_ruleGathering (85.11s)
--- PASS: TestAccAWSSecurityGroup_egressConfigMode (91.98s)
--- PASS: TestAccAWSSecurityGroup_ingressWithCidrAndSGsClassic (20.33s)
--- PASS: TestAccAWSSecurityGroup_driftComplex (43.27s)
--- PASS: TestAccAWSSecurityGroupRule_MultiDescription (126.10s)
--- PASS: TestAccAWSSecurityGroup_failWithDiffMismatch (37.42s)
--- PASS: TestAccAWSSecurityGroup_egressWithPrefixList (48.98s)
--- PASS: TestAccAWSSecurityGroup_ingressWithCidrAndSGsVPC (51.62s)
--- PASS: TestAccAWSSecurityGroup_ingressWithPrefixList (46.90s)
--- PASS: TestAccAWSSecurityGroup_CIDRandGroups (56.23s)
--- PASS: TestAccAWSSecurityGroup_ruleLimitCidrBlockExceededAppend (42.03s)
--- PASS: TestAccAWSSecurityGroup_tags (61.81s)
--- PASS: TestAccAWSSecurityGroup_allowAll (133.28s)
--- PASS: TestAccAWSSecurityGroup_ipv4andipv6Egress (54.33s)
--- PASS: TestAccAWSSecurityGroup_ruleLimitExceededAppend (54.51s)
--- PASS: TestAccAWSSecurityGroup_ruleDescription (105.04s)
--- PASS: TestAccAWSSecurityGroup_ruleLimitExceededAllNew (51.53s)
--- PASS: TestAccAWSSecurityGroup_rulesDropOnError (52.22s)
--- PASS: TestAccAWSSecurityGroup_ruleLimitExceededPrepend (61.32s)
--- PASS: TestAccAWSSecurityGroupRule_Race (196.68s)
--- PASS: TestAccAWSSecurityGroup_defaultEgressVPC (116.28s)
--- PASS: TestAccAWSSecurityGroup_forceRevokeRulesTrue (661.37s)
--- PASS: TestAccAWSSecurityGroup_forceRevokeRulesFalse (664.65s)
This has been released in version 2.42.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! |
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! |
The official API documentation is not accurate (here and here). User guides have their code on GitHub, but I wasn't able to find the API reference on GitHub. I'm sure some HashiCorp employees have better communications channels and can report this upstream.
If you try to use a character that is actually not allowed (e.g.
%
), then the error response will reveal the pattern that they are actually using, which is:a-zA-Z0-9. _-:/()#,@[]+=&;{}!$*
.Screenshot from console:
Searching for
._-:/()#,@[]+=;{}!$*
on https://docs.aws.amazon.com/sdk-for-go/api/service/ec2/ reveals two other locations where this regex is documented. Perhaps these two also support&
? It is worth asking the AWS people.Community Note
Closes #2278
Release note for CHANGELOG:
Output from acceptance testing: