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 support for IPv6 DHCP Lease Time option #36934

Merged
merged 6 commits into from Apr 16, 2024

Conversation

ddericco
Copy link
Contributor

@ddericco ddericco commented Apr 16, 2024

Description

Adds support for IPv6 preferred lease time setting in DHCP option sets, which allows customers to adjust the frequency of IPv6 lease renewals. This PR adds support for this feature in the following:

Resources:

  • aws_vpc_dhcp_options
  • aws_default_vpc_dhcp_options

Date sources:

  • aws_vpc_dhcp_options

NOTE

Relations

Closes #36270

References

API: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateDhcpOptions.html

Output from Acceptance Testing

$ make testacc TESTS='TestAccVPCDHCPOptions_*' PKG=ec2
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.21.8 test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccVPCDHCPOptions_*'  -timeout 360m
=== RUN   TestAccVPCDHCPOptionsAssociation_basic
=== PAUSE TestAccVPCDHCPOptionsAssociation_basic
=== RUN   TestAccVPCDHCPOptionsAssociation_Disappears_vpc
=== PAUSE TestAccVPCDHCPOptionsAssociation_Disappears_vpc
=== RUN   TestAccVPCDHCPOptionsAssociation_Disappears_dhcp
=== PAUSE TestAccVPCDHCPOptionsAssociation_Disappears_dhcp
=== RUN   TestAccVPCDHCPOptionsAssociation_disappears
=== PAUSE TestAccVPCDHCPOptionsAssociation_disappears
=== RUN   TestAccVPCDHCPOptionsAssociation_default
=== PAUSE TestAccVPCDHCPOptionsAssociation_default
=== RUN   TestAccVPCDHCPOptionsDataSource_basic
=== PAUSE TestAccVPCDHCPOptionsDataSource_basic
=== RUN   TestAccVPCDHCPOptionsDataSource_filter
=== PAUSE TestAccVPCDHCPOptionsDataSource_filter
=== RUN   TestAccVPCDHCPOptions_basic
=== PAUSE TestAccVPCDHCPOptions_basic
=== RUN   TestAccVPCDHCPOptions_full
=== PAUSE TestAccVPCDHCPOptions_full
=== RUN   TestAccVPCDHCPOptions_tags
=== PAUSE TestAccVPCDHCPOptions_tags
=== RUN   TestAccVPCDHCPOptions_disappears
=== PAUSE TestAccVPCDHCPOptions_disappears
=== CONT  TestAccVPCDHCPOptionsAssociation_basic
=== CONT  TestAccVPCDHCPOptionsDataSource_filter
=== CONT  TestAccVPCDHCPOptions_tags
=== CONT  TestAccVPCDHCPOptions_full
=== CONT  TestAccVPCDHCPOptionsAssociation_disappears
=== CONT  TestAccVPCDHCPOptionsDataSource_basic
=== CONT  TestAccVPCDHCPOptionsAssociation_default
=== CONT  TestAccVPCDHCPOptions_disappears
=== CONT  TestAccVPCDHCPOptions_basic
=== CONT  TestAccVPCDHCPOptionsAssociation_Disappears_dhcp
=== CONT  TestAccVPCDHCPOptionsAssociation_Disappears_vpc
=== NAME  TestAccVPCDHCPOptions_disappears
    vpc_dhcp_options_test.go:148: Error running post-test destroy, there may be dangling resources: exit status 1
        
        Error: deleting EC2 DHCP Options Set (dopt-0832c83c07b644573): InvalidDhcpOptionsID.NotFound: The dhcpOptions ID 'dopt-0832c83c07b644573' does not exist
                status code: 400, request id: 37df4095-c495-48b4-bce4-cf0ef4da1b29
        
--- FAIL: TestAccVPCDHCPOptions_disappears (47.17s)
--- PASS: TestAccVPCDHCPOptionsDataSource_basic (48.42s)
--- PASS: TestAccVPCDHCPOptionsAssociation_Disappears_vpc (49.25s)
--- PASS: TestAccVPCDHCPOptionsAssociation_disappears (49.87s)
=== NAME  TestAccVPCDHCPOptionsAssociation_Disappears_dhcp
    vpc_dhcp_options_association_test.go:76: Error running post-test destroy, there may be dangling resources: exit status 1
        
        Error: deleting EC2 DHCP Options Set (dopt-025b92361ec5b3772): InvalidDhcpOptionsID.NotFound: The dhcpOptions ID 'dopt-025b92361ec5b3772' does not exist
                status code: 400, request id: 47e533da-8e40-40ad-b157-e79e34b5c4c3
        
--- FAIL: TestAccVPCDHCPOptionsAssociation_Disappears_dhcp (50.63s)
--- PASS: TestAccVPCDHCPOptions_basic (51.33s)
--- PASS: TestAccVPCDHCPOptions_full (51.35s)
--- PASS: TestAccVPCDHCPOptionsAssociation_default (53.41s)
--- PASS: TestAccVPCDHCPOptionsAssociation_basic (54.14s)
--- PASS: TestAccVPCDHCPOptionsDataSource_filter (55.31s)
--- PASS: TestAccVPCDHCPOptions_tags (71.17s)
FAIL
FAIL    github.com/hashicorp/terraform-provider-aws/internal/service/ec2        77.123s
FAIL
make: *** [testacc] Error 1

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/vpc Issues and PRs that pertain to the vpc service. labels Apr 16, 2024
@terraform-aws-provider terraform-aws-provider bot added needs-triage Waiting for first response or review from a maintainer. partner Contribution from a partner. labels Apr 16, 2024
@jar-b jar-b removed the needs-triage Waiting for first response or review from a maintainer. label Apr 16, 2024
@jar-b jar-b self-assigned this Apr 16, 2024
@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 Apr 16, 2024
Copy link
Member

@jar-b jar-b 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 PKG=ec2 TESTS="TestAccVPCDHCPOptions"
==> Checking that code complies with gofmt requirements...
TF_ACC=1 go1.21.8 test ./internal/service/ec2/... -v -count 1 -parallel 20 -run='TestAccVPCDHCPOptions'  -timeout 360m

--- PASS: TestAccVPCDHCPOptionsDataSource_basic (15.46s)
--- PASS: TestAccVPCDHCPOptions_disappears (16.06s)
--- PASS: TestAccVPCDHCPOptions_basic (18.90s)
--- PASS: TestAccVPCDHCPOptions_full (18.91s)
--- PASS: TestAccVPCDHCPOptionsAssociation_disappears (19.30s)
--- PASS: TestAccVPCDHCPOptionsAssociation_Disappears_vpc (19.71s)
--- PASS: TestAccVPCDHCPOptionsAssociation_Disappears_dhcp (20.57s)
--- PASS: TestAccVPCDHCPOptionsAssociation_basic (21.45s)
--- PASS: TestAccVPCDHCPOptionsAssociation_default (22.38s)
--- PASS: TestAccVPCDHCPOptionsDataSource_filter (22.80s)
--- PASS: TestAccVPCDHCPOptions_tags (33.13s)
PASS
ok      github.com/hashicorp/terraform-provider-aws/internal/service/ec2        39.081s

@jar-b
Copy link
Member

jar-b commented Apr 16, 2024

Thanks for your contribution, @ddericco! 👍

@jar-b jar-b merged commit 3401119 into hashicorp:main Apr 16, 2024
53 checks passed
@github-actions github-actions bot added this to the v5.46.0 milestone Apr 16, 2024
@ddericco ddericco deleted the f-vpc_dhcp_ipv6_options branch April 16, 2024 19:32
@github-actions github-actions bot removed the prioritized Part of the maintainer teams immediate focus. To be addressed within the current quarter. label Apr 19, 2024
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Introduces or discusses updates to documentation. partner Contribution from a partner. service/vpc Issues and PRs that pertain to the vpc service. size/M Managed by automation to categorize the size of a PR. tests PRs: expanded test coverage. Issues: expanded coverage, enhancements to test infrastructure.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Amazon VPC DHCPv6 setting to adjust IPv6 preferred lease time
2 participants