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

EC2: Add default DHCP options set for VPCs #6901

Merged
merged 2 commits into from
Oct 11, 2023

Conversation

viren-nadkarni
Copy link
Contributor

AWS provides the AssociateDhcpOptions operation to associate a DHCP Options Set with a VPC.

There is no DisassociateDhcpOptions operation to remove a DHCP Options Set from a VPC. Instead, DhcpOptionsId must be set to default when calling AssociateDhcpOptions to achieve this.

This PR implements this capability.

See: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_AssociateDhcpOptions.html#API_AssociateDhcpOptions_RequestParameters

Closes: localstack/localstack#9222

@codecov
Copy link

codecov bot commented Oct 11, 2023

Codecov Report

Merging #6901 (571b205) into master (f39bb45) will decrease coverage by 0.01%.
Report is 1 commits behind head on master.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master    #6901      +/-   ##
==========================================
- Coverage   95.82%   95.82%   -0.01%     
==========================================
  Files         826      826              
  Lines       80961    80976      +15     
==========================================
+ Hits        77579    77593      +14     
- Misses       3382     3383       +1     
Flag Coverage Δ
servertests 36.76% <12.50%> (-0.01%) ⬇️
unittests 95.76% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
moto/ec2/models/dhcp_options.py 100.00% <100.00%> (ø)
moto/ec2/responses/dhcp_options.py 100.00% <100.00%> (ø)
moto/ec2/responses/vpcs.py 98.67% <ø> (ø)

... and 2 files with indirect coverage changes

Copy link
Collaborator

@bblommers bblommers left a comment

Choose a reason for hiding this comment

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

LGTM - thanks @viren-nadkarni!

@bblommers bblommers merged commit 7e891f7 into getmoto:master Oct 11, 2023
@bblommers bblommers added this to the 4.2.6 milestone Oct 11, 2023
@github-actions
Copy link
Contributor

This is now part of moto >= 4.2.6.dev29

@viren-nadkarni viren-nadkarni deleted the vpc-dhcp-options-delete branch October 12, 2023 06:59
toshyak pushed a commit to toshyak/moto that referenced this pull request Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: Default DHCP options set missing
2 participants