-
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_ec2_network_insights_path - new resource #23330
r/aws_ec2_network_insights_path - new resource #23330
Conversation
be9e9a4
to
0a26bcd
Compare
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.
Welcome @george-richardson 👋
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! 😃
bfcffdb
to
d5e8433
Compare
I believe I have fixed all the linter checks now. |
Adds a new resource `aws_ec2_network_insights_path` to partially address 16715. Adds tests, sweeper and find functions for the new resource type. Adds documentation for the new resource type.
d5e8433
to
b510ec1
Compare
Rebased onto main and fixed conflicts. Fixed fmt check. |
…rkInsightsPathIdNotFound'.
…ppears' and 'TestAccNetworkInsightsPath_tags'.
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.
LGTM 🚀.
Commercial
% make testacc TESTS=TestAccNetworkInsightsPath_ 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='TestAccNetworkInsightsPath_' -timeout 180m
=== RUN TestAccNetworkInsightsPath_basic
=== PAUSE TestAccNetworkInsightsPath_basic
=== RUN TestAccNetworkInsightsPath_disappears
=== PAUSE TestAccNetworkInsightsPath_disappears
=== RUN TestAccNetworkInsightsPath_tags
=== PAUSE TestAccNetworkInsightsPath_tags
=== RUN TestAccNetworkInsightsPath_sourceIP
=== PAUSE TestAccNetworkInsightsPath_sourceIP
=== RUN TestAccNetworkInsightsPath_destinationIP
=== PAUSE TestAccNetworkInsightsPath_destinationIP
=== RUN TestAccNetworkInsightsPath_destinationPort
=== PAUSE TestAccNetworkInsightsPath_destinationPort
=== CONT TestAccNetworkInsightsPath_basic
=== CONT TestAccNetworkInsightsPath_sourceIP
=== CONT TestAccNetworkInsightsPath_tags
--- PASS: TestAccNetworkInsightsPath_basic (56.15s)
=== CONT TestAccNetworkInsightsPath_destinationPort
--- PASS: TestAccNetworkInsightsPath_sourceIP (106.17s)
=== CONT TestAccNetworkInsightsPath_destinationIP
--- PASS: TestAccNetworkInsightsPath_tags (158.94s)
=== CONT TestAccNetworkInsightsPath_disappears
--- PASS: TestAccNetworkInsightsPath_destinationPort (117.13s)
--- PASS: TestAccNetworkInsightsPath_disappears (28.15s)
--- PASS: TestAccNetworkInsightsPath_destinationIP (90.69s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/ec2 200.594s
GovCloud
% make testacc TESTS=TestAccNetworkInsightsPath_ 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='TestAccNetworkInsightsPath_' -timeout 180m
=== RUN TestAccNetworkInsightsPath_basic
=== PAUSE TestAccNetworkInsightsPath_basic
=== RUN TestAccNetworkInsightsPath_disappears
=== PAUSE TestAccNetworkInsightsPath_disappears
=== RUN TestAccNetworkInsightsPath_tags
=== PAUSE TestAccNetworkInsightsPath_tags
=== RUN TestAccNetworkInsightsPath_sourceIP
=== PAUSE TestAccNetworkInsightsPath_sourceIP
=== RUN TestAccNetworkInsightsPath_destinationIP
=== PAUSE TestAccNetworkInsightsPath_destinationIP
=== RUN TestAccNetworkInsightsPath_destinationPort
=== PAUSE TestAccNetworkInsightsPath_destinationPort
=== CONT TestAccNetworkInsightsPath_basic
=== CONT TestAccNetworkInsightsPath_sourceIP
=== CONT TestAccNetworkInsightsPath_destinationPort
=== CONT TestAccNetworkInsightsPath_sourceIP
acctest.go:1046: skipping test for aws-us-gov/us-gov-west-1: Error running apply: exit status 1
Error: error creating EC2 Network Insights Path: UnsupportedOperation: The functionality you requested is not available in this region.
status code: 400, request id: 0490355d-cd6d-453e-bc56-8b3c44b34bb4
with aws_ec2_network_insights_path.test,
on terraform_plugin_test.tf line 35, in resource "aws_ec2_network_insights_path" "test":
35: resource "aws_ec2_network_insights_path" "test" {
=== CONT TestAccNetworkInsightsPath_basic
acctest.go:1046: skipping test for aws-us-gov/us-gov-west-1: Error running apply: exit status 1
Error: error creating EC2 Network Insights Path: UnsupportedOperation: The functionality you requested is not available in this region.
status code: 400, request id: 42cc78aa-3662-4f9f-83bb-60c5daaed876
with aws_ec2_network_insights_path.test,
on terraform_plugin_test.tf line 35, in resource "aws_ec2_network_insights_path" "test":
35: resource "aws_ec2_network_insights_path" "test" {
--- SKIP: TestAccNetworkInsightsPath_sourceIP (21.99s)
=== CONT TestAccNetworkInsightsPath_tags
=== CONT TestAccNetworkInsightsPath_destinationPort
acctest.go:1046: skipping test for aws-us-gov/us-gov-west-1: Error running apply: exit status 1
Error: error creating EC2 Network Insights Path: UnsupportedOperation: The functionality you requested is not available in this region.
status code: 400, request id: 5b695f8b-89fa-4f65-bb89-f96d4bd69977
with aws_ec2_network_insights_path.test,
on terraform_plugin_test.tf line 35, in resource "aws_ec2_network_insights_path" "test":
35: resource "aws_ec2_network_insights_path" "test" {
--- SKIP: TestAccNetworkInsightsPath_basic (24.02s)
=== CONT TestAccNetworkInsightsPath_disappears
--- SKIP: TestAccNetworkInsightsPath_destinationPort (27.59s)
=== CONT TestAccNetworkInsightsPath_destinationIP
=== CONT TestAccNetworkInsightsPath_tags
acctest.go:1046: skipping test for aws-us-gov/us-gov-west-1: Error running apply: exit status 1
Error: error creating EC2 Network Insights Path: UnsupportedOperation: The functionality you requested is not available in this region.
status code: 400, request id: e5148bc2-9661-4931-ad71-c6d8ed9d38de
with aws_ec2_network_insights_path.test,
on terraform_plugin_test.tf line 35, in resource "aws_ec2_network_insights_path" "test":
35: resource "aws_ec2_network_insights_path" "test" {
=== CONT TestAccNetworkInsightsPath_disappears
acctest.go:1046: skipping test for aws-us-gov/us-gov-west-1: Error running apply: exit status 1
Error: error creating EC2 Network Insights Path: UnsupportedOperation: The functionality you requested is not available in this region.
status code: 400, request id: 18f0a67d-9c0e-4670-8070-1ffe67604709
with aws_ec2_network_insights_path.test,
on terraform_plugin_test.tf line 35, in resource "aws_ec2_network_insights_path" "test":
35: resource "aws_ec2_network_insights_path" "test" {
--- SKIP: TestAccNetworkInsightsPath_tags (14.70s)
=== CONT TestAccNetworkInsightsPath_destinationIP
acctest.go:1046: skipping test for aws-us-gov/us-gov-west-1: Error running apply: exit status 1
Error: error creating EC2 Network Insights Path: UnsupportedOperation: The functionality you requested is not available in this region.
status code: 400, request id: 48cf9e50-096a-45b9-abb2-8f832e74dbb7
with aws_ec2_network_insights_path.test,
on terraform_plugin_test.tf line 35, in resource "aws_ec2_network_insights_path" "test":
35: resource "aws_ec2_network_insights_path" "test" {
--- SKIP: TestAccNetworkInsightsPath_disappears (15.25s)
--- SKIP: TestAccNetworkInsightsPath_destinationIP (15.84s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/ec2 51.708s
@george-richardson Thanks for the contribution 🎉 👏. |
This functionality has been released in v4.4.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. |
Adds a new resource
aws_ec2_network_insights_path
to partially address #16715.Adds tests, sweeper and find functions for the new resource type.
Adds documentation for the new resource type.
Example config:
Community Note
Relates #16715
Output from acceptance testing: