1 réponse
- Le plus récent
- Le plus de votes
- La plupart des commentaires
0
Hello.
Since "document_format" is set to YAML, I think an error will occur if "mainSteps" is not written in YAML.
https://docs.aws.amazon.com/systems-manager/latest/userguide/documents-schemas-features.html#automation-doc-syntax-examples
https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/ssm_document
resource "aws_ssm_association" "testa" { name = aws_ssm_document.test.name schedule_expression = "cron(0 0 0 ? * * *)" targets { key = "tag:run_ssm_document" values = ["yes"] } }
resource "aws_ssm_document" "test" {
name = "test"
document_format = "YAML"
document_type = "Automation"
content =<<DOC
schemaVersion:"0.3"
assumeRole: parameters: {}
mainSteps:
- name:runtestpose
action: "aws:executeScript"
inputs:
Runtime: python3.6
Handler: script_handler
Script: | -
def script_handler(events, context):
import boto3
ec2 = boto3.client('ec2')
print("hello world")
DOC
}
Contenus pertinents
- demandé il y a 2 ans
- demandé il y a 7 mois
- demandé il y a 3 mois
- demandé il y a 2 ans
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a 9 mois
- AWS OFFICIELA mis à jour il y a 3 ans