This repository was archived by the owner on Jan 25, 2026. It is now read-only.
fix: Add amazon provided dns to ecs instances#4
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds VPC DHCP options and associates them to enable AmazonProvidedDNS in the Networking module.
- Introduces an
aws_vpc_dhcp_optionsresource withec2.internaldomain andAmazonProvidedDNSservers - Adds an
aws_vpc_dhcp_options_associationto link the new DHCP options with the existing VPC
Comments suppressed due to low confidence (2)
Modules/Networking/main.tf:59
- [nitpick] The resource name
dhcp_optionsis generic; consider renaming it tovpc_dhcp_optionsfor clearer intent and consistency with other resource names.
resource "aws_vpc_dhcp_options" "dhcp_options" {
Modules/Networking/main.tf:68
- [nitpick] The association block uses an abbreviated name
dhcp_options_assoc; consider renaming todhcp_options_associationto match the resource type.
resource "aws_vpc_dhcp_options_association" "dhcp_options_assoc" {
Modules/Networking/main.tf
Outdated
| } | ||
|
|
||
| resource "aws_vpc_dhcp_options" "dhcp_options" { | ||
| domain_name = "ec2.internal" |
There was a problem hiding this comment.
Hardcoding the domain name may reduce flexibility across environments; consider exposing domain_name (and domain_name_servers) as input variables.
342bcae to
0a0f185
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces new resources to configure DHCP options for the VPC in the
Modules/Networking/main.tffile. These changes enhance the VPC's DNS and domain name configuration.Added DHCP Options Configuration:
aws_vpc_dhcp_optionsResource: Configures DHCP options for the VPC, including setting the domain name toec2.internaland usingAmazonProvidedDNSas the domain name servers. Tags the resource with the namedutymate-dhcp-options.aws_vpc_dhcp_options_associationResource: Associates the newly created DHCP options with the existing VPC.