From a7d34c347f040d8d1a24b90443df09feffdf2370 Mon Sep 17 00:00:00 2001 From: Ariel Gordon Date: Thu, 21 Mar 2024 07:09:34 +0000 Subject: [PATCH] fix: Add example for multi target run command --- examples/complete/main.tf | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/examples/complete/main.tf b/examples/complete/main.tf index 305602d..b7cae41 100644 --- a/examples/complete/main.tf +++ b/examples/complete/main.tf @@ -95,6 +95,32 @@ module "eventbridge" { { name = "log-orders-to-cloudwatch" arn = aws_cloudwatch_log_group.this.arn + }, + { + name = "run-shell-script-one-target" + arn = "arn:aws:ssm:${data.aws_region.current.name}::document/AWS-RunShellScript" + input = "{\"commands\": [\"uptime\"]}" + run_command_targets = [ + { + key = "InstanceIds" + values = ["i-123456"] + } + ] + }, + { + name = "run-shell-script-multi-target" + arn = "arn:aws:ssm:${data.aws_region.current.name}::document/AWS-RunShellScript" + input = "{\"commands\": [\"uptime\"]}" + run_command_targets = [ + { + key = "tag:Name" + values = ["FooBar"] + }, + { + key = "InstanceIds" + values = ["i-123456"] + } + ] } ]