resource "aws_ssm_document" "ad-server-domain-join-document" {
name = "myapp_dir_default_doc"
document_type = "Command"
content = <<DOC
{
"schemaVersion": "1.0",
"description": "Join an instance to a domain",
"runtimeConfig": {
"aws:domainJoin": {
"properties": {
"directoryId": "${aws_directory_service_directory.AD.id}",
"directoryName": "${var.dir_domain_name}",
“dnsIpAddresses”: ${jsonencode(aws_directory_service_directory.AD.dns_ip_addresses)}
}
}
}
}
DOC
}
resource "aws_ssm_association" "ad-server-association" {
name = "dir_default_doc"
instance_id = aws_instance.ec2.id
}
--
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-too...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/CALmkhkqFNdp%3DptXbQxGQF%2B1UaOF0CyQ0fgfYdT1Gjts6Qp0CnQ%40mail.gmail.com.
Maybe this is a cut/paste issue with your email client, but the quotes around `dnsIpAddresses` are rendered as smart quotes below, not straight quotes.
--Jamie
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/CAJQCwJxDZe9a0P3Mjycw%2BrDOd6iM9748sj54CKUhB_yxaPgSdQ%40mail.gmail.com.
resource "aws_ssm_document" "ad-server-domain-join-document" {
name = "myapp_dir_default_doc"
document_type = "Command"
content = <<DOC
{
"schemaVersion": "1.0",
"description": "Join an instance to a domain",
"runtimeConfig": {
"aws:domainJoin": {
"properties": {
"directoryId": "${aws_directory_service_directory.AD.id}",
"directoryName": "${var.dir_domain_name}"
}
}
}
DOC
depends_on = ["aws_directory_service_directory.AD"]
}
resource "aws_ssm_association" "ad-server-association" {
name = "dir_default_doc"
instance_id = aws_instance.ec2.id
depends_on = ["aws_ssm_document.ad-server-domain-join-document", "aws_instance.ec2"]
}
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/MN2PR18MB2750147619897E756D7E40E1FC690%40MN2PR18MB2750.namprd18.prod.outlook.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/CALmkhkpu-XJ4dXE8cfodZJ5wGKTBRB%3DC%2B2%2B%2B8vRS5CX5_X0R1A%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/CAJQCwJzU_MpuUgzhYnQW_dmV4mNE22n2XGXoqcUAEmNXjn09Ow%40mail.gmail.com.
Copy/paste your JSON (from first character after the first DOC to the last character preceding the second DOC) into the parser provided below and your error will become evident.
--Jamie
To view this discussion on the web visit https://groups.google.com/d/msgid/terraform-tool/CALmkhkpQrHp7mV-TUz2yS2KopSm54ZB_w6yPXTdfWqOqs4W1YA%40mail.gmail.com.