-
Notifications
You must be signed in to change notification settings - Fork 9.2k
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_rule: Add security_group_rule_id
attribute
#27828
Conversation
Acceptance test output: % make testacc TESTARGS='-run=TestAccVPCSecurityGroupRule_' PKG=ec2 ACCTEST_PARALLELISM=2 ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 2 -run=TestAccVPCSecurityGroupRule_ -timeout 180m === RUN TestAccVPCSecurityGroupRule_Ingress_vpc === PAUSE TestAccVPCSecurityGroupRule_Ingress_vpc === RUN TestAccVPCSecurityGroupRule_IngressSourceWithAccount_id === PAUSE TestAccVPCSecurityGroupRule_IngressSourceWithAccount_id === RUN TestAccVPCSecurityGroupRule_Ingress_protocol === PAUSE TestAccVPCSecurityGroupRule_Ingress_protocol === RUN TestAccVPCSecurityGroupRule_Ingress_icmpv6 === PAUSE TestAccVPCSecurityGroupRule_Ingress_icmpv6 === RUN TestAccVPCSecurityGroupRule_Ingress_ipv6 === PAUSE TestAccVPCSecurityGroupRule_Ingress_ipv6 === RUN TestAccVPCSecurityGroupRule_egress === PAUSE TestAccVPCSecurityGroupRule_egress === RUN TestAccVPCSecurityGroupRule_selfReference === PAUSE TestAccVPCSecurityGroupRule_selfReference === RUN TestAccVPCSecurityGroupRule_expectInvalidTypeError === PAUSE TestAccVPCSecurityGroupRule_expectInvalidTypeError === RUN TestAccVPCSecurityGroupRule_expectInvalidCIDR === PAUSE TestAccVPCSecurityGroupRule_expectInvalidCIDR === RUN TestAccVPCSecurityGroupRule_PartialMatching_basic === PAUSE TestAccVPCSecurityGroupRule_PartialMatching_basic === RUN TestAccVPCSecurityGroupRule_PartialMatching_source === PAUSE TestAccVPCSecurityGroupRule_PartialMatching_source === RUN TestAccVPCSecurityGroupRule_issue5310 === PAUSE TestAccVPCSecurityGroupRule_issue5310 === RUN TestAccVPCSecurityGroupRule_race === PAUSE TestAccVPCSecurityGroupRule_race === RUN TestAccVPCSecurityGroupRule_selfSource === PAUSE TestAccVPCSecurityGroupRule_selfSource === RUN TestAccVPCSecurityGroupRule_prefixListEgress === PAUSE TestAccVPCSecurityGroupRule_prefixListEgress === RUN TestAccVPCSecurityGroupRule_prefixListEmptyString === PAUSE TestAccVPCSecurityGroupRule_prefixListEmptyString === RUN TestAccVPCSecurityGroupRule_ingressDescription === PAUSE TestAccVPCSecurityGroupRule_ingressDescription === RUN TestAccVPCSecurityGroupRule_egressDescription === PAUSE TestAccVPCSecurityGroupRule_egressDescription === RUN TestAccVPCSecurityGroupRule_IngressDescription_updates === PAUSE TestAccVPCSecurityGroupRule_IngressDescription_updates === RUN TestAccVPCSecurityGroupRule_EgressDescription_updates === PAUSE TestAccVPCSecurityGroupRule_EgressDescription_updates === RUN TestAccVPCSecurityGroupRule_Description_allPorts === PAUSE TestAccVPCSecurityGroupRule_Description_allPorts === RUN TestAccVPCSecurityGroupRule_DescriptionAllPorts_nonZeroPorts === PAUSE TestAccVPCSecurityGroupRule_DescriptionAllPorts_nonZeroPorts === RUN TestAccVPCSecurityGroupRule_MultipleRuleSearching_allProtocolCrash === PAUSE TestAccVPCSecurityGroupRule_MultipleRuleSearching_allProtocolCrash === RUN TestAccVPCSecurityGroupRule_multiDescription === PAUSE TestAccVPCSecurityGroupRule_multiDescription === RUN TestAccVPCSecurityGroupRule_Ingress_multipleIPv6 === PAUSE TestAccVPCSecurityGroupRule_Ingress_multipleIPv6 === RUN TestAccVPCSecurityGroupRule_Ingress_multiplePrefixLists === PAUSE TestAccVPCSecurityGroupRule_Ingress_multiplePrefixLists === RUN TestAccVPCSecurityGroupRule_Ingress_peeredVPC === PAUSE TestAccVPCSecurityGroupRule_Ingress_peeredVPC === RUN TestAccVPCSecurityGroupRule_Ingress_ipv4AndIPv6 === PAUSE TestAccVPCSecurityGroupRule_Ingress_ipv4AndIPv6 === RUN TestAccVPCSecurityGroupRule_Ingress_prefixListAndSelf === PAUSE TestAccVPCSecurityGroupRule_Ingress_prefixListAndSelf === RUN TestAccVPCSecurityGroupRule_Ingress_prefixListAndSource === PAUSE TestAccVPCSecurityGroupRule_Ingress_prefixListAndSource === RUN TestAccVPCSecurityGroupRule_protocolChange === PAUSE TestAccVPCSecurityGroupRule_protocolChange === CONT TestAccVPCSecurityGroupRule_Ingress_vpc === CONT TestAccVPCSecurityGroupRule_ingressDescription --- PASS: TestAccVPCSecurityGroupRule_ingressDescription (22.71s) === CONT TestAccVPCSecurityGroupRule_Ingress_multipleIPv6 --- PASS: TestAccVPCSecurityGroupRule_Ingress_vpc (22.71s) === CONT TestAccVPCSecurityGroupRule_protocolChange --- PASS: TestAccVPCSecurityGroupRule_Ingress_multipleIPv6 (26.67s) === CONT TestAccVPCSecurityGroupRule_Ingress_prefixListAndSource --- PASS: TestAccVPCSecurityGroupRule_Ingress_prefixListAndSource (32.71s) === CONT TestAccVPCSecurityGroupRule_Ingress_prefixListAndSelf --- PASS: TestAccVPCSecurityGroupRule_protocolChange (61.08s) === CONT TestAccVPCSecurityGroupRule_Ingress_ipv4AndIPv6 --- PASS: TestAccVPCSecurityGroupRule_Ingress_ipv4AndIPv6 (27.32s) === CONT TestAccVPCSecurityGroupRule_Ingress_peeredVPC acctest.go:645: skipping test because at least one environment variable of [AWS_ALTERNATE_PROFILE AWS_ALTERNATE_ACCESS_KEY_ID] must be set. Usage: credentials for running acceptance testing in alternate AWS account. --- SKIP: TestAccVPCSecurityGroupRule_Ingress_peeredVPC (0.00s) === CONT TestAccVPCSecurityGroupRule_Ingress_multiplePrefixLists --- PASS: TestAccVPCSecurityGroupRule_Ingress_prefixListAndSelf (33.21s) === CONT TestAccVPCSecurityGroupRule_expectInvalidCIDR --- PASS: TestAccVPCSecurityGroupRule_expectInvalidCIDR (1.93s) === CONT TestAccVPCSecurityGroupRule_prefixListEmptyString --- PASS: TestAccVPCSecurityGroupRule_prefixListEmptyString (1.21s) === CONT TestAccVPCSecurityGroupRule_prefixListEgress --- PASS: TestAccVPCSecurityGroupRule_Ingress_multiplePrefixLists (32.78s) === CONT TestAccVPCSecurityGroupRule_selfSource --- PASS: TestAccVPCSecurityGroupRule_prefixListEgress (36.99s) === CONT TestAccVPCSecurityGroupRule_race vpc_security_group_rule_test.go:563: Step 1/1 error: Error running apply: exit status 1 Error: error reading EC2 VPC (vpc-0fb98da55d5243ad1) Attribute (enableDnsHostnames): couldn't find resource with aws_vpc.test, on terraform_plugin_test.tf line 2, in resource "aws_vpc" "test": 2: resource "aws_vpc" "test" { --- FAIL: TestAccVPCSecurityGroupRule_race (9.81s) === CONT TestAccVPCSecurityGroupRule_issue5310 --- PASS: TestAccVPCSecurityGroupRule_selfSource (26.77s) === CONT TestAccVPCSecurityGroupRule_PartialMatching_source --- PASS: TestAccVPCSecurityGroupRule_issue5310 (22.47s) === CONT TestAccVPCSecurityGroupRule_PartialMatching_basic --- PASS: TestAccVPCSecurityGroupRule_PartialMatching_source (30.24s) === CONT TestAccVPCSecurityGroupRule_Description_allPorts --- PASS: TestAccVPCSecurityGroupRule_PartialMatching_basic (33.87s) === CONT TestAccVPCSecurityGroupRule_multiDescription --- PASS: TestAccVPCSecurityGroupRule_Description_allPorts (35.43s) === CONT TestAccVPCSecurityGroupRule_MultipleRuleSearching_allProtocolCrash --- PASS: TestAccVPCSecurityGroupRule_MultipleRuleSearching_allProtocolCrash (25.71s) === CONT TestAccVPCSecurityGroupRule_DescriptionAllPorts_nonZeroPorts --- PASS: TestAccVPCSecurityGroupRule_multiDescription (74.93s) === CONT TestAccVPCSecurityGroupRule_selfReference --- PASS: TestAccVPCSecurityGroupRule_DescriptionAllPorts_nonZeroPorts (35.07s) === CONT TestAccVPCSecurityGroupRule_expectInvalidTypeError --- PASS: TestAccVPCSecurityGroupRule_expectInvalidTypeError (1.19s) === CONT TestAccVPCSecurityGroupRule_Ingress_protocol --- PASS: TestAccVPCSecurityGroupRule_selfReference (26.55s) === CONT TestAccVPCSecurityGroupRule_Ingress_icmpv6 --- PASS: TestAccVPCSecurityGroupRule_Ingress_protocol (26.31s) === CONT TestAccVPCSecurityGroupRule_IngressSourceWithAccount_id --- PASS: TestAccVPCSecurityGroupRule_IngressSourceWithAccount_id (23.58s) === CONT TestAccVPCSecurityGroupRule_egress --- PASS: TestAccVPCSecurityGroupRule_Ingress_icmpv6 (26.44s) === CONT TestAccVPCSecurityGroupRule_IngressDescription_updates --- PASS: TestAccVPCSecurityGroupRule_egress (21.40s) === CONT TestAccVPCSecurityGroupRule_EgressDescription_updates --- PASS: TestAccVPCSecurityGroupRule_IngressDescription_updates (33.75s) === CONT TestAccVPCSecurityGroupRule_egressDescription --- PASS: TestAccVPCSecurityGroupRule_EgressDescription_updates (34.50s) === CONT TestAccVPCSecurityGroupRule_Ingress_ipv6 --- PASS: TestAccVPCSecurityGroupRule_egressDescription (21.59s) --- PASS: TestAccVPCSecurityGroupRule_Ingress_ipv6 (25.15s) FAIL FAIL github.com/hashicorp/terraform-provider-aws/internal/service/ec2 433.715s FAIL make: *** [testacc] Error 1
Community NoteVoting for Prioritization
For Submitters
|
This functionality has been released in v4.40.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 pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Description
Adds the
security_group_rule_id
attribute to theaws_security_group_rule
resource.If the resource has a single source or destination then the EC2
IpPermission
structure represented by this resource maps 1-to-1 with an EC2SecurityGroupRule
structure and thesecurity_group_rule_id
attribute receives the AWS Security Group Rule resource ID. In other cases there is not a 1-to-1 mapping and the attribute will be empty (""
).Relations
Relates #20104.
Output from Acceptance Testing