Skip to content

Resource aws_vpc_dhcp_options should trim trailing . from domain_name #7800

@rlees85

Description

@rlees85

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

  • Terraform v0.11.7
  • AWS Provider 2.0.0

Affected Resource(s)

  • aws_vpc_dhcp_options

Terraform Configuration Files

resource "aws_vpc_dhcp_options" "scope" {
  domain_name         =   "${coalesce(join("", aws_route53_zone.private.*.name), format("%v.%v", data.aws_region.scope.name, var.dhcp_options_domain_fallback_suffix))}"
  domain_name_servers = [ "${var.dhcp_options_dns_servers                                                                                                             }" ]

  tags {
    VPC    = "${var.name                                                                                                                                }"
    Name   = "${var.name}-${var.dhcp_options_name                                                                                                       }"
    Owner  = "${var.owner                                                                                                                               }"
    Domain = "${coalesce(join("", aws_route53_zone.private.*.name), format("%v.%v", data.aws_region.scope.name,var.dhcp_options_domain_fallback_suffix))}"
    Region = "${data.aws_region.scope.name                                                                                                              }"
  }
}

Debug Output

n/a

Panic Output

n/a

Expected Behavior

The output of the route53_zone name to be accepted into the domain_name for DHCP options.

Actual Behavior

There is now a trailing dot, that the DHCP option set resource accepts but breaks all DHCP clients.

Similar:
#6535
#6389

Steps to Reproduce

  1. terraform apply

Important Factoids

References

  • #0000

Metadata

Metadata

Assignees

Labels

bugAddresses a defect in current functionality.service/ec2Issues and PRs that pertain to the ec2 service.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions