"records": required field is not set when trying to create CNAME for instance

460 views
Skip to first unread message

Brendan Grainger

unread,
Apr 20, 2017, 3:14:04 PM4/20/17
to Terraform
I am trying to create CNAME for an instance I've provisioned using terraform:

resource "aws_route53_record" "dev" {
  zone_id
= "MY_ZONE_ID"
  name    
= "dev"
  type    
= "CNAME"
  ttl    
= "300"
  records
= ["${aws_instance.dev.public_dns}"}
}


but it errors out with:

Error applying plan:


1 error(s) occurred:


* aws_route53_record.dev: 1 error(s) occurred:


* aws_route53_record.dev: provider.aws: aws_route53_record: dev: "records": required field is not set


Can anyone see what I'm doing wrong?

Thanks.

Lowe Schmidt

unread,
Apr 21, 2017, 5:22:52 AM4/21/17
to terrafo...@googlegroups.com
Is DNS enabled in your VPC where you started the dev aws_instance? 
Is the aws_instance.dev resource part of the same module / in the same terraform file ?

--
Lowe Schmidt | +46 723 867 157

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/hashicorp/terraform/issues
IRC: #terraform-tool on Freenode
---
You received this message because you are subscribed to the Google Groups "Terraform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to terraform-tool+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/9e35ca48-fa47-4072-9434-1a085026c14b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages