Terraform-provider-aws: terraform plan does not detect missing `ttl` attribute for aws_route53_records

Created on 13 Jun 2017  ยท  6Comments  ยท  Source: hashicorp/terraform-provider-aws

_This issue was originally opened by @mrwacky42 as hashicorp/terraform#9610. It was migrated here as part of the provider split. The original body of the issue is below._


Hi there,

Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.

Terraform Version

0.7.5 and 0.7.7

Affected Resource(s)

Please list the resources as a list, for example:

  • aws_route_53_record

Terraform Configuration Files

resource "aws_route53_record" "example" {
    name = "example"
    type = "CNAME"
    zone_id = "${var.example_zone_id}"
    records = ["hashicorp.com"]
}

Debug Output

N/A

Panic Output

N/A

Expected Behavior

TF should have bellyached that TTL is required

Actual Behavior

Terraform shows this plan:

+ aws_route53_record.example
    fqdn:               "<computed>"
    name:               "example"
    records.#:          "1"
    records.4210768119: "hashicorp.com"
    type:               "CNAME"
    zone_id:            "<redacted>"

But trying to apply yields the problem:

Error applying plan:

1 error(s) occurred:

* aws_route53_record.example: provider.aws: aws_route53_record: example: "ttl": required field is not set

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. terraform apply saved-plan (where plan has a aws_route53_resource that has no TTL argument)

Important Factoids

N/A

References

N/A

bug servicroute53 stale

Most helpful comment

@yeukhon , Glad to see the documentation is going to be updated. But are there any plans to support 0 ttl?

All 6 comments

terraform plan shows for an already imported record: ttl: "300" => "0"

0 is a valid value for DNS TTL and can be set via AWS console. The main problem here is that this terraform-provider considers a 0 as empty. This means the lowest TTL you can set is 1 even though AWS allows 0 in their API and Console.

This sounds like a logic bug we should be wiling to fix, or at least indicate in the doc. Let me pr the doc first...

@yeukhon , Glad to see the documentation is going to be updated. But are there any plans to support 0 ttl?

Marking this issue as stale due to inactivity. This helps our maintainers find and focus on the active issues. If this issue receives no comments in the next 30 days it will automatically be closed. Maintainers can also remove the stale label.

If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

Was this page helpful?
0 / 5 - 0 ratings