Skip to content
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
jongwooo merged 1 commit intomainfrom
fix/add-amazon-provided-dns-to-ecs-instances
May 31, 2025
Merged

fix: Add amazon provided dns to ecs instances#4
jongwooo merged 1 commit intomainfrom
fix/add-amazon-provided-dns-to-ecs-instances

Conversation

@jongwooo
Copy link
Contributor

This pull request introduces new resources to configure DHCP options for the VPC in the Modules/Networking/main.tf file. These changes enhance the VPC's DNS and domain name configuration.

Added DHCP Options Configuration:

  • aws_vpc_dhcp_options Resource: Configures DHCP options for the VPC, including setting the domain name to ec2.internal and using AmazonProvidedDNS as the domain name servers. Tags the resource with the name dutymate-dhcp-options.
  • aws_vpc_dhcp_options_association Resource: Associates the newly created DHCP options with the existing VPC.

@jongwooo jongwooo requested a review from Copilot May 31, 2025 09:17
@jongwooo jongwooo self-assigned this May 31, 2025
@jongwooo jongwooo added the bug label May 31, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds VPC DHCP options and associates them to enable AmazonProvidedDNS in the Networking module.

  • Introduces an aws_vpc_dhcp_options resource with ec2.internal domain and AmazonProvidedDNS servers
  • Adds an aws_vpc_dhcp_options_association to 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_options is generic; consider renaming it to vpc_dhcp_options for 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 to dhcp_options_association to match the resource type.
resource "aws_vpc_dhcp_options_association" "dhcp_options_assoc" {

}

resource "aws_vpc_dhcp_options" "dhcp_options" {
domain_name = "ec2.internal"
Copy link

Copilot AI May 31, 2025

Choose a reason for hiding this comment

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

Hardcoding the domain name may reduce flexibility across environments; consider exposing domain_name (and domain_name_servers) as input variables.

Copilot uses AI. Check for mistakes.
@jongwooo jongwooo force-pushed the fix/add-amazon-provided-dns-to-ecs-instances branch from 342bcae to 0a0f185 Compare May 31, 2025 09:20
@jongwooo jongwooo merged commit fb1ed4a into main May 31, 2025
1 check passed
@jongwooo jongwooo deleted the fix/add-amazon-provided-dns-to-ecs-instances branch May 31, 2025 09:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant