terraform-aws-modules / terraform-aws-ec2-instance

Terraform module to create AWS EC2 instance(s) resources 🇺🇦
https://registry.terraform.io/modules/terraform-aws-modules/ec2-instance/aws
Apache License 2.0
754 stars 1.87k forks source link

Support private_dns_name_options #348

Closed israel-anaya closed 11 months ago

israel-anaya commented 1 year ago

Description

When creating a new EC2 instance via the web console you have the option to choose the hostname type for the new instance - options are either IP name by default (ip-172-26-0-1.eu-west-3.compute.internal) or Resource name (i-0f0ccc1aa12371b73.eu-west-3.compute.internal). It should be possible to set this option in terraform. image

Potential Terraform Configuration

module "ec2_instance" { source = "terraform-aws-modules/ec2-instance/aws" ... private_dns_name_options { hostname_type = "resource-name" | "ip-name" } ... }

manu4O commented 1 year ago

I think this module is missing this config: https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/instance.html#private-dns-name-options

dmitry-mightydevops commented 1 year ago

Yes would be nice to support it, right now the plan shows a diff

      - private_dns_name_options {
          - enable_resource_name_dns_a_record    = false -> null
          - enable_resource_name_dns_aaaa_record = false -> null
          - hostname_type                        = "ip-name" -> null
        }
github-actions[bot] commented 11 months ago

This issue has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this issue will be closed in 10 days

github-actions[bot] commented 11 months ago

This issue was automatically closed because of stale in 10 days

github-actions[bot] commented 10 months ago

I'm going to lock this issue 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 similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.