-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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_vpc_security_group_ingress_rule: New resource #27680
r/aws_vpc_security_group_ingress_rule: New resource #27680
Conversation
This reverts commit bc87de3.
This reverts commit 2e2c566.
Acceptance test output: % make testacc TESTARGS='-run=TestAccVPCSecurityGroupIngressRule_' PKG=ec2 ACCTEST_PARALLELISM=3 ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 3 -run=TestAccVPCSecurityGroupIngressRule_ -timeout 180m === RUN TestAccVPCSecurityGroupIngressRule_basic === PAUSE TestAccVPCSecurityGroupIngressRule_basic === CONT TestAccVPCSecurityGroupIngressRule_basic --- PASS: TestAccVPCSecurityGroupIngressRule_basic (25.91s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/ec2 32.122s
…gressRule_disappears'. Acceptance test output: % make testacc TESTARGS='-run=TestAccVPCSecurityGroupIngressRule_disappears' PKG=ec2 ACCTEST_PARALLELISM=3 ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 3 -run=TestAccVPCSecurityGroupIngressRule_disappears -timeout 180m === RUN TestAccVPCSecurityGroupIngressRule_disappears === PAUSE TestAccVPCSecurityGroupIngressRule_disappears === CONT TestAccVPCSecurityGroupIngressRule_disappears vpc_security_group_ingress_rule_test.go:57: Step 1/1 error: Check failed: 1 error occurred: * Check 2/2 error: 1 error occurred: * deleting EC2 Security Group Ingress Rule (sgr-0136373b64661c07b) InvalidGroupId.Malformed: The security-group ID '' is malformed status code: 400, request id: e06dfcd3-fdd5-4e91-a435-3032977080a6 --- FAIL: TestAccVPCSecurityGroupIngressRule_disappears (16.31s) FAIL FAIL github.com/hashicorp/terraform-provider-aws/internal/service/ec2 21.007s FAIL make: *** [testacc] Error 1
…gressRule_tags'. Acceptance test output: % make testacc TESTARGS='-run=TestAccVPCSecurityGroupIngressRule_tags' PKG=ec2 ACCTEST_PARALLELISM=3 ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 3 -run=TestAccVPCSecurityGroupIngressRule_tags -timeout 180m === RUN TestAccVPCSecurityGroupIngressRule_tags === PAUSE TestAccVPCSecurityGroupIngressRule_tags === CONT TestAccVPCSecurityGroupIngressRule_tags vpc_security_group_ingress_rule_test.go:82: Step 3/4 error: Error running apply: exit status 1 Error: Provider returned invalid result object after apply After the apply operation, the provider still indicated an unknown value for aws_vpc_security_group_ingress_rule.test.tags_all. All values must be known after apply, so this is always a bug in the provider and should be reported in the provider's own repository. Terraform will still save the other known object values in the state. --- FAIL: TestAccVPCSecurityGroupIngressRule_tags (31.14s) FAIL FAIL github.com/hashicorp/terraform-provider-aws/internal/service/ec2 35.800s FAIL make: *** [testacc] Error 1
Acceptance test output: % make testacc TESTARGS='-run=TestAccVPCSecurityGroupIngressRule_tags' PKG=ec2 ACCTEST_PARALLELISM=3 ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 3 -run=TestAccVPCSecurityGroupIngressRule_tags -timeout 180m === RUN TestAccVPCSecurityGroupIngressRule_tags === PAUSE TestAccVPCSecurityGroupIngressRule_tags === CONT TestAccVPCSecurityGroupIngressRule_tags --- PASS: TestAccVPCSecurityGroupIngressRule_tags (51.94s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/ec2 56.599s
…vel attributes. Acceptance test output: % make testacc TESTARGS='-run=TestAccVPCSecurityGroupIngressRule_disappears' PKG=ec2 ACCTEST_PARALLELISM=3 ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 3 -run=TestAccVPCSecurityGroupIngressRule_disappears -timeout 180m === RUN TestAccVPCSecurityGroupIngressRule_disappears === PAUSE TestAccVPCSecurityGroupIngressRule_disappears === CONT TestAccVPCSecurityGroupIngressRule_disappears --- PASS: TestAccVPCSecurityGroupIngressRule_disappears (22.55s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/ec2 27.430s
…ttribute. Acceptance test output: % make testacc TESTARGS='-run=TestAccVPCSecurityGroupIngressRule_basic' 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=TestAccVPCSecurityGroupIngressRule_basic -timeout 180m === RUN TestAccVPCSecurityGroupIngressRule_basic === PAUSE TestAccVPCSecurityGroupIngressRule_basic === CONT TestAccVPCSecurityGroupIngressRule_basic --- PASS: TestAccVPCSecurityGroupIngressRule_basic (27.05s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/ec2 34.422s
…gressRule_description'. Acceptance test output: % make testacc TESTARGS='-run=TestAccVPCSecurityGroupIngressRule_description' 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=TestAccVPCSecurityGroupIngressRule_description -timeout 180m === RUN TestAccVPCSecurityGroupIngressRule_description === PAUSE TestAccVPCSecurityGroupIngressRule_description === CONT TestAccVPCSecurityGroupIngressRule_description --- PASS: TestAccVPCSecurityGroupIngressRule_description (41.28s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/ec2 48.448s
Community NoteVoting for Prioritization
For Submitters
|
Acceptance test output: % make testacc TESTARGS='-run=TestAccMeta' PKG=meta ACCTEST_PARALLELISM=3 ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/meta/... -v -count 1 -parallel 3 -run=TestAccMeta -timeout 180m === RUN TestAccMetaARNDataSource_basic === PAUSE TestAccMetaARNDataSource_basic === RUN TestAccMetaARNDataSource_s3Bucket === PAUSE TestAccMetaARNDataSource_s3Bucket === RUN TestAccMetaBillingServiceAccountDataSource_basic === PAUSE TestAccMetaBillingServiceAccountDataSource_basic === RUN TestAccMetaDefaultTagsDataSource_basic === PAUSE TestAccMetaDefaultTagsDataSource_basic === RUN TestAccMetaDefaultTagsDataSource_empty === PAUSE TestAccMetaDefaultTagsDataSource_empty === RUN TestAccMetaDefaultTagsDataSource_multiple === PAUSE TestAccMetaDefaultTagsDataSource_multiple === RUN TestAccMetaDefaultTagsDataSource_ignore === PAUSE TestAccMetaDefaultTagsDataSource_ignore === RUN TestAccMetaIPRangesDataSource_basic === PAUSE TestAccMetaIPRangesDataSource_basic === RUN TestAccMetaIPRangesDataSource_none === PAUSE TestAccMetaIPRangesDataSource_none === RUN TestAccMetaIPRangesDataSource_url === PAUSE TestAccMetaIPRangesDataSource_url === RUN TestAccMetaIPRangesDataSource_uppercase === PAUSE TestAccMetaIPRangesDataSource_uppercase === RUN TestAccMetaPartitionDataSource_basic === PAUSE TestAccMetaPartitionDataSource_basic === RUN TestAccMetaRegionDataSource_basic === PAUSE TestAccMetaRegionDataSource_basic === RUN TestAccMetaRegionDataSource_endpoint === PAUSE TestAccMetaRegionDataSource_endpoint === RUN TestAccMetaRegionDataSource_endpointAndName === PAUSE TestAccMetaRegionDataSource_endpointAndName === RUN TestAccMetaRegionDataSource_name === PAUSE TestAccMetaRegionDataSource_name === RUN TestAccMetaRegionsDataSource_basic === PAUSE TestAccMetaRegionsDataSource_basic === RUN TestAccMetaRegionsDataSource_filter === PAUSE TestAccMetaRegionsDataSource_filter === RUN TestAccMetaRegionsDataSource_allRegions === PAUSE TestAccMetaRegionsDataSource_allRegions === RUN TestAccMetaRegionsDataSource_nonExistentRegion === PAUSE TestAccMetaRegionsDataSource_nonExistentRegion === RUN TestAccMetaService_basic === PAUSE TestAccMetaService_basic === RUN TestAccMetaService_byReverseDNSName === PAUSE TestAccMetaService_byReverseDNSName === RUN TestAccMetaService_byDNSName === PAUSE TestAccMetaService_byDNSName === RUN TestAccMetaService_byParts === PAUSE TestAccMetaService_byParts === RUN TestAccMetaService_unsupported === PAUSE TestAccMetaService_unsupported === CONT TestAccMetaARNDataSource_basic === CONT TestAccMetaRegionDataSource_endpoint === CONT TestAccMetaIPRangesDataSource_basic --- PASS: TestAccMetaARNDataSource_basic (13.07s) === CONT TestAccMetaRegionsDataSource_nonExistentRegion --- PASS: TestAccMetaRegionDataSource_endpoint (13.73s) === CONT TestAccMetaService_unsupported --- PASS: TestAccMetaIPRangesDataSource_basic (14.74s) === CONT TestAccMetaService_byParts --- PASS: TestAccMetaRegionsDataSource_nonExistentRegion (12.05s) --- PASS: TestAccMetaService_unsupported (11.39s) === CONT TestAccMetaService_byDNSName === CONT TestAccMetaService_byReverseDNSName --- PASS: TestAccMetaService_byParts (11.10s) === CONT TestAccMetaService_basic --- PASS: TestAccMetaService_byReverseDNSName (12.47s) === CONT TestAccMetaRegionsDataSource_basic --- PASS: TestAccMetaService_byDNSName (13.12s) === CONT TestAccMetaRegionsDataSource_allRegions --- PASS: TestAccMetaService_basic (12.60s) === CONT TestAccMetaRegionsDataSource_filter --- PASS: TestAccMetaRegionsDataSource_basic (11.34s) === CONT TestAccMetaRegionDataSource_name --- PASS: TestAccMetaRegionsDataSource_filter (11.86s) --- PASS: TestAccMetaRegionsDataSource_allRegions (12.06s) === CONT TestAccMetaRegionDataSource_basic === CONT TestAccMetaIPRangesDataSource_uppercase --- PASS: TestAccMetaRegionDataSource_name (12.12s) === CONT TestAccMetaPartitionDataSource_basic --- PASS: TestAccMetaRegionDataSource_basic (11.49s) === CONT TestAccMetaIPRangesDataSource_url --- PASS: TestAccMetaIPRangesDataSource_uppercase (13.27s) === CONT TestAccMetaRegionDataSource_endpointAndName --- PASS: TestAccMetaPartitionDataSource_basic (11.60s) === CONT TestAccMetaDefaultTagsDataSource_empty --- PASS: TestAccMetaIPRangesDataSource_url (12.91s) === CONT TestAccMetaDefaultTagsDataSource_ignore --- PASS: TestAccMetaRegionDataSource_endpointAndName (12.54s) === CONT TestAccMetaDefaultTagsDataSource_multiple --- PASS: TestAccMetaDefaultTagsDataSource_empty (16.11s) === CONT TestAccMetaBillingServiceAccountDataSource_basic === CONT TestAccMetaDefaultTagsDataSource_basic --- PASS: TestAccMetaDefaultTagsDataSource_multiple (12.69s) --- PASS: TestAccMetaDefaultTagsDataSource_ignore (26.22s) === CONT TestAccMetaARNDataSource_s3Bucket --- PASS: TestAccMetaDefaultTagsDataSource_basic (12.19s) === CONT TestAccMetaIPRangesDataSource_none --- PASS: TestAccMetaBillingServiceAccountDataSource_basic (16.25s) --- PASS: TestAccMetaARNDataSource_s3Bucket (11.97s) --- PASS: TestAccMetaIPRangesDataSource_none (13.46s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/meta 119.065s
Acceptance test output: % make testacc TESTARGS='-run=TestAccSTSCallerIdentityDataSource_' PKG=sts ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/sts/... -v -count 1 -parallel 20 -run=TestAccSTSCallerIdentityDataSource_ -timeout 180m === RUN TestAccSTSCallerIdentityDataSource_basic === PAUSE TestAccSTSCallerIdentityDataSource_basic === CONT TestAccSTSCallerIdentityDataSource_basic --- PASS: TestAccSTSCallerIdentityDataSource_basic (12.94s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/sts 19.792s
Acceptance test output: % make testacc TESTARGS='-run=TestAccGlobalAcceleratorAcceleratorDataSource_' PKG=globalaccelerator ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/globalaccelerator/... -v -count 1 -parallel 20 -run=TestAccGlobalAcceleratorAcceleratorDataSource_ -timeout 180m === RUN TestAccGlobalAcceleratorAcceleratorDataSource_basic === PAUSE TestAccGlobalAcceleratorAcceleratorDataSource_basic === CONT TestAccGlobalAcceleratorAcceleratorDataSource_basic --- PASS: TestAccGlobalAcceleratorAcceleratorDataSource_basic (93.39s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/globalaccelerator 97.845s
Acceptance test output: % make testacc TESTARGS='-run=TestAccSimpleDBDomain_' PKG=simpledb ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/simpledb/... -v -count 1 -parallel 20 -run=TestAccSimpleDBDomain_ -timeout 180m === RUN TestAccSimpleDBDomain_basic === PAUSE TestAccSimpleDBDomain_basic === RUN TestAccSimpleDBDomain_disappears === PAUSE TestAccSimpleDBDomain_disappears === RUN TestAccSimpleDBDomain_MigrateFromPluginSDK === PAUSE TestAccSimpleDBDomain_MigrateFromPluginSDK === CONT TestAccSimpleDBDomain_basic === CONT TestAccSimpleDBDomain_MigrateFromPluginSDK === CONT TestAccSimpleDBDomain_disappears --- PASS: TestAccSimpleDBDomain_disappears (18.87s) --- PASS: TestAccSimpleDBDomain_basic (22.58s) --- PASS: TestAccSimpleDBDomain_MigrateFromPluginSDK (65.78s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/simpledb 70.205s
Acceptance test output: % make testacc TESTARGS='-run=TestAccMediaLive_serial/MultiplexProgram' PKG=medialive ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/medialive/... -v -count 1 -parallel 20 -run=TestAccMediaLive_serial/MultiplexProgram -timeout 180m === RUN TestAccMediaLive_serial === RUN TestAccMediaLive_serial/MultiplexProgram === RUN TestAccMediaLive_serial/MultiplexProgram/disappears === RUN TestAccMediaLive_serial/MultiplexProgram/basic === RUN TestAccMediaLive_serial/MultiplexProgram/update --- PASS: TestAccMediaLive_serial (204.94s) --- PASS: TestAccMediaLive_serial/MultiplexProgram (204.94s) --- PASS: TestAccMediaLive_serial/MultiplexProgram/disappears (62.01s) --- PASS: TestAccMediaLive_serial/MultiplexProgram/basic (60.79s) --- PASS: TestAccMediaLive_serial/MultiplexProgram/update (82.15s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/medialive 209.580s
… attribute. Acceptance test output: % make testacc TESTARGS='-run=TestAccSTSCallerIdentityDataSource_' PKG=sts ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/sts/... -v -count 1 -parallel 20 -run=TestAccSTSCallerIdentityDataSource_ -timeout 180m === RUN TestAccSTSCallerIdentityDataSource_basic === PAUSE TestAccSTSCallerIdentityDataSource_basic === CONT TestAccSTSCallerIdentityDataSource_basic --- PASS: TestAccSTSCallerIdentityDataSource_basic (12.26s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/sts 16.702s
Acceptance test output: make testacc TESTARGS='-run=TestAccVPCSecurityGroupIngressRule_updateTagsKnownAtApply' PKG=ec2 ACCTEST_PARALLELISM=3 ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/ec2/... -v -count 1 -parallel 3 -run=TestAccVPCSecurityGroupIngressRule_updateTagsKnownAtApply -timeout 180m === RUN TestAccVPCSecurityGroupIngressRule_updateTagsKnownAtApply === PAUSE TestAccVPCSecurityGroupIngressRule_updateTagsKnownAtApply === CONT TestAccVPCSecurityGroupIngressRule_updateTagsKnownAtApply --- PASS: TestAccVPCSecurityGroupIngressRule_updateTagsKnownAtApply (45.74s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/ec2 51.425s
Acceptance test output: % make testacc TESTARGS='-run=TestAccSimpleDBDomain_' PKG=simpledb ==> Checking that code complies with gofmt requirements... TF_ACC=1 go test ./internal/service/simpledb/... -v -count 1 -parallel 20 -run=TestAccSimpleDBDomain_ -timeout 180m === RUN TestAccSimpleDBDomain_basic === PAUSE TestAccSimpleDBDomain_basic === RUN TestAccSimpleDBDomain_disappears === PAUSE TestAccSimpleDBDomain_disappears === RUN TestAccSimpleDBDomain_MigrateFromPluginSDK === PAUSE TestAccSimpleDBDomain_MigrateFromPluginSDK === CONT TestAccSimpleDBDomain_basic === CONT TestAccSimpleDBDomain_MigrateFromPluginSDK === CONT TestAccSimpleDBDomain_disappears --- PASS: TestAccSimpleDBDomain_disappears (19.91s) --- PASS: TestAccSimpleDBDomain_basic (24.53s) --- PASS: TestAccSimpleDBDomain_MigrateFromPluginSDK (59.62s) PASS ok github.com/hashicorp/terraform-provider-aws/internal/service/simpledb 68.487s
…' and 'aws_vpc_security_group_egress_rule'. Acceptance test output: % make testacc TESTARGS='-run=TestAccVPCSecurityGroupIngressRule_basic\|TestAccVPCSecurityGroupEgressRule_basic' 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=TestAccVPCSecurityGroupIngressRule_basic\|TestAccVPCSecurityGroupEgressRule_basic -timeout 180m === RUN TestAccVPCSecurityGroupEgressRule_basic === PAUSE TestAccVPCSecurityGroupEgressRule_basic === RUN TestAccVPCSecurityGroupIngressRule_basic === PAUSE TestAccVPCSecurityGroupIngressRule_basic === CONT TestAccVPCSecurityGroupEgressRule_basic === CONT TestAccVPCSecurityGroupIngressRule_basic === CONT TestAccVPCSecurityGroupEgressRule_basic vpc_security_group_egress_rule_test.go:23: Step 1/2 error: Error running pre-apply refresh: exit status 1 Error: Invalid resource type on terraform_plugin_test.tf line 19, in resource "aws_vpc_security_group_egress_rule" "test": 19: resource "aws_vpc_security_group_egress_rule" "test" { The provider hashicorp/aws does not support resource type "aws_vpc_security_group_egress_rule". === CONT TestAccVPCSecurityGroupIngressRule_basic vpc_security_group_ingress_rule_test.go:87: Step 1/2 error: Error running pre-apply refresh: exit status 1 Error: Invalid resource type on terraform_plugin_test.tf line 19, in resource "aws_vpc_security_group_ingress_rule" "test": 19: resource "aws_vpc_security_group_ingress_rule" "test" { The provider hashicorp/aws does not support resource type "aws_vpc_security_group_ingress_rule". --- FAIL: TestAccVPCSecurityGroupIngressRule_basic (5.47s) --- FAIL: TestAccVPCSecurityGroupEgressRule_basic (5.49s) FAIL FAIL github.com/hashicorp/terraform-provider-aws/internal/service/ec2 13.577s FAIL make: *** [testacc] Error 1
…_rule' and 'aws_vpc_security_group_egress_rule'.
internal/service/ec2/vpc_security_group_ingress_rule.go:140:33: mnd: Magic number: 65535, in <argument> detected (gomnd) int64validator.Between(-1, 65535),
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
Introduces new resources
aws_vpc_security_group_ingress_rule
andaws_vpc_security_group_egress_rule
.This resource maps directly to the EC2
SecurityGroupRule
resource and attempts to resolve many of the problems with the currentaws_security_group_rule
resource (and theaws_security_group
resource's nestedegress
andingress
attributes) which does not map 1-to-1 ontoSecurityGroupRule
.Relations
Relates #20104.
This PR will be merged with no externally visible effects:
We still need to consider how to introduce these new resources and what (if any) deprecation strategy we announce.