Terraform v0.7.10
aws_vpc_dhcp_options
source "aws_vpc_dhcp_options" "dns_resolver" {
domain_name = "${var.dhcp_options_domain_name}"
domain_name_servers = ["${var.dhcp_options_dns_servers}"]
ntp_servers = ["${var.dhcp_options_dns_servers}"]
#netbios_name_servers = ["127.0.0.1"]
#netbios_node_type = 2
tags{
Name = "eCP Shared Services"
}
}
output "aws_vpc_dhcp_options_ID" {
value = "${aws_vpc_dhcp_options.dns_resolver.id}"
}
module root: 2 error(s) occurred:
DHCP Options should be set, and return the ID associated with it.
Error occured, as above.
terraform planI was originally trying to consume the ID in the following:
resource "aws_vpc_dhcp_options_association" "vpc_dhcp_options_association_ecp" {
vpc_id = "${aws_vpc.main.id}"
dhcp_options_id = "${aws_vpc_dhcp_options.dns_resolver.id}"
}
Hey @mcraig88
Looking at your first error, i.e. unknown root level key: source, it seems that you are missing the re part in the object type, i.e resource instead of source. So from:
source "aws_vpc_dhcp_options" "dns_resolver" {
Could you change to
resource "aws_vpc_dhcp_options" "dns_resolver" {
?
Oh! Thank you that fixed it. What a noob mistake. Bet you wish all bugs
were this easy to resolve.
Thanks again.
Mike
On Thu, Nov 17, 2016 at 12:41 AM, Ninir [email protected] wrote:
Hey @mcraig88 https://github.com/mcraig88
Looking at your first error, i.e. unknown root level key: source, it
seems that you are missing the re part in this. So from:source "aws_vpc_dhcp_options" "dns_resolver" {
Could you change to
resource "aws_vpc_dhcp_options" "dns_resolver" {
?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/hashicorp/terraform/issues/10163#issuecomment-261187584,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AIFybTJo33J5DNJ1rRlbovbYDuCVDQFJks5q_BMkgaJpZM4K0Itc
.
Thanks @Ninir for helping with this - @mcraig88 closing this out :)
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.
Most helpful comment
Hey @mcraig88
Looking at your first error, i.e.
unknown root level key: source, it seems that you are missing therepart in the object type, i.eresourceinstead ofsource. So from:Could you change to
?