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

Add timeouts to the aws_networkfirewall_firewall resource #34918

Conversation

alexknez
Copy link
Contributor

Description

This change allows users to change the timeout for the user creation, default time is 30 minutes.

resource "aws_networkfirewall_firewall" "example" {
  name                = "example"
  firewall_policy_arn = aws_networkfirewall_firewall_policy.example.arn
  vpc_id              = aws_vpc.example.id
  subnet_mapping {
    subnet_id = aws_subnet.example.id
  }

  tags = {
    Tag1 = "Value1"
    Tag2 = "Value2"
  }

  timeouts {
     create = "35m"
     update = "40m"
     delete = "45m"
  }
}

Relations

Closes #34888

References

Output from Acceptance Testing

% make testacc TESTS=TestAccNetworkFirewallFirewall_ PKG=networkfirewall
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/networkfirewall/... -v -count 1 -parallel 20 -run='TestAccNetworkFirewallFirewall_'  -timeout 360m
=== RUN   TestAccNetworkFirewallFirewall_basic
=== PAUSE TestAccNetworkFirewallFirewall_basic
=== RUN   TestAccNetworkFirewallFirewall_dualstackSubnet
=== PAUSE TestAccNetworkFirewallFirewall_dualstackSubnet
=== RUN   TestAccNetworkFirewallFirewall_description
=== PAUSE TestAccNetworkFirewallFirewall_description
=== RUN   TestAccNetworkFirewallFirewall_deleteProtection
=== PAUSE TestAccNetworkFirewallFirewall_deleteProtection
=== RUN   TestAccNetworkFirewallFirewall_encryptionConfiguration
=== PAUSE TestAccNetworkFirewallFirewall_encryptionConfiguration
=== RUN   TestAccNetworkFirewallFirewall_SubnetMappings_updateSubnet
=== PAUSE TestAccNetworkFirewallFirewall_SubnetMappings_updateSubnet
=== RUN   TestAccNetworkFirewallFirewall_SubnetMappings_updateMultipleSubnets
=== PAUSE TestAccNetworkFirewallFirewall_SubnetMappings_updateMultipleSubnets
=== RUN   TestAccNetworkFirewallFirewall_tags
=== PAUSE TestAccNetworkFirewallFirewall_tags
=== RUN   TestAccNetworkFirewallFirewall_timeout
=== PAUSE TestAccNetworkFirewallFirewall_timeout
=== RUN   TestAccNetworkFirewallFirewall_disappears
=== PAUSE TestAccNetworkFirewallFirewall_disappears
=== CONT  TestAccNetworkFirewallFirewall_basic
=== CONT  TestAccNetworkFirewallFirewall_SubnetMappings_updateSubnet
=== CONT  TestAccNetworkFirewallFirewall_deleteProtection
=== CONT  TestAccNetworkFirewallFirewall_timeout
=== CONT  TestAccNetworkFirewallFirewall_encryptionConfiguration
=== CONT  TestAccNetworkFirewallFirewall_SubnetMappings_updateMultipleSubnets
=== CONT  TestAccNetworkFirewallFirewall_disappears
=== CONT  TestAccNetworkFirewallFirewall_tags
=== CONT  TestAccNetworkFirewallFirewall_description
=== CONT  TestAccNetworkFirewallFirewall_dualstackSubnet
--- PASS: TestAccNetworkFirewallFirewall_basic (1565.27s)
--- PASS: TestAccNetworkFirewallFirewall_disappears (1594.96s)
--- PASS: TestAccNetworkFirewallFirewall_dualstackSubnet (1596.85s)
--- PASS: TestAccNetworkFirewallFirewall_timeout (1598.73s)
--- PASS: TestAccNetworkFirewallFirewall_encryptionConfiguration (1625.55s)
--- PASS: TestAccNetworkFirewallFirewall_tags (1626.76s)
--- PASS: TestAccNetworkFirewallFirewall_deleteProtection (1656.03s)
--- PASS: TestAccNetworkFirewallFirewall_description (1656.11s)
--- PASS: TestAccNetworkFirewallFirewall_SubnetMappings_updateMultipleSubnets (3258.00s)
--- PASS: TestAccNetworkFirewallFirewall_SubnetMappings_updateSubnet (3294.53s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/networkfirewall	3298.045s
% make testacc TESTS=TestAccNetworkFirewallFirewall_timeout PKG=networkfirewall
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/networkfirewall/... -v -count 1 -parallel 20 -run='TestAccNetworkFirewallFirewall_timeout'  -timeout 360m
=== RUN   TestAccNetworkFirewallFirewall_timeout
=== PAUSE TestAccNetworkFirewallFirewall_timeout
=== CONT  TestAccNetworkFirewallFirewall_timeout
--- PASS: TestAccNetworkFirewallFirewall_timeout (1590.43s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/networkfirewall	1593.850s

Copy link

Community Note

Voting for Prioritization

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

For Submitters

  • Review the contribution guide relating to the type of change you are making to ensure all of the necessary steps have been taken.
  • For new resources and data sources, use skaff to generate scaffolding with comments detailing common expectations.
  • Whether or not the branch has been rebased will not impact prioritization, but doing so is always a welcome surprise.

@github-actions github-actions bot added size/M Managed by automation to categorize the size of a PR. documentation Introduces or discusses updates to documentation. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. service/networkfirewall Issues and PRs that pertain to the networkfirewall service. and removed size/M Managed by automation to categorize the size of a PR. labels Dec 14, 2023
@terraform-aws-provider terraform-aws-provider bot added the needs-triage Waiting for first response or review from a maintainer. label Dec 14, 2023
@justinretzolk justinretzolk added enhancement Requests to existing resources that expand the functionality or scope. timeouts Pertains to timeout increases. and removed needs-triage Waiting for first response or review from a maintainer. labels Dec 18, 2023
@johnsonaj johnsonaj self-assigned this Dec 27, 2023
@terraform-aws-provider terraform-aws-provider bot added the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Dec 27, 2023
Copy link
Contributor

@johnsonaj johnsonaj left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

make testacc TESTARGS="-run=TestAccNetworkFirewallFirewall_basic" PKG=networkfirewall                                 2 ↵
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go test ./internal/service/networkfirewall/... -v -count 1 -parallel 20  -run=TestAccNetworkFirewallFirewall_basic -timeout 360m
=== RUN   TestAccNetworkFirewallFirewall_basic
=== PAUSE TestAccNetworkFirewallFirewall_basic
=== CONT  TestAccNetworkFirewallFirewall_basic
--- PASS: TestAccNetworkFirewallFirewall_basic (1668.72s)
PASS
ok  	github.com/hashicorp/terraform-provider-aws/internal/service/networkfirewall	1672.152s

@johnsonaj
Copy link
Contributor

@alexknez thank you for the contribution! 🎉

@johnsonaj johnsonaj merged commit ad50991 into hashicorp:main Dec 27, 2023
43 checks passed
@github-actions github-actions bot added this to the v5.32.0 milestone Dec 27, 2023
@alexknez alexknez deleted the feature/aws_networkfirewall_firewall-timeouts branch January 3, 2024 18:28
@AdamTylerLynch AdamTylerLynch added the partner Contribution from a partner. label Jan 8, 2024
Copy link

This functionality has been released in v5.32.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!

Copy link

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.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Introduces or discusses updates to documentation. enhancement Requests to existing resources that expand the functionality or scope. partner Contribution from a partner. prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. service/networkfirewall Issues and PRs that pertain to the networkfirewall service. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure. timeouts Pertains to timeout increases.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Enhancement]: aws_networkfirewall_firewall needs to support a timeouts block
4 participants