-
Notifications
You must be signed in to change notification settings - Fork 9.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
terraform ssm association issue #2840
Comments
Same issue here: works if I try to attach a document with schema 1.2, but fails for schema 2.0 or 2.2 I was able to work around this by using "targets" to specify instance-id vs using the instance parameter directly. |
This error is being returned from the SSM API: Does it work with resource "aws_ssm_association" "example" {
# ... other configuration ...
targets {
key = "InstanceIds"
values = "${aws_instance.example.id}"
}
} |
Yep, that way works with the newer schema versions. If we could update the docs to note the instance-id parameter doesn't work for newer schema's that should help others from hitting the same issue. |
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! |
This issue was originally opened by @fdavier as hashicorp/terraform#16988. It was migrated here as a result of the provider split. The original body of the issue is below.
Terraform Version
v0.11.1
Terraform Configuration Files
I added "aws_ssm_document" and "aws_ssm_association" after existing instance ressource:
My hope is to be able to launch commands to update/install additional features some linux instances after their creation
Debug Output
Expected Behavior
expect that Association is done and 'hostname' command executed on existing ec2 linux instance
Actual Behavior
Don't execute, see crash output, ssm association don't work
Steps to Reproduce
Please list the full steps required to reproduce the issue, for example:
terraform init
terraform plan
terraform apply
Important Factoids
References
The text was updated successfully, but these errors were encountered: