現在、cloudformation テンプレートを使用して aws config ルールの作成を自動化する作業を行っています。準拠していないリソースを自動化するために、スクリプトに修復アクションを追加する必要があります。クラウド形成テンプレートのパラメーターとして修復アクションを追加する方法がわかりません。誰かがこの問題を解決するのを手伝ってくれますか? 以下は私のコードです。しかし、スタックを作成できません
{
"Resources": {
"AWSConfigRule": {
"Type": "AWS::Config::ConfigRule",
"Properties": {
"ConfigRuleName": {
"Ref": "ConfigRuleName"
},
"Description": "Checks whether Amazon Virtual Private Cloud flow logs
are found and enabled for Amazon VPC.",
"InputParameters": {
"trafficType": {
"Fn::If": [
"trafficType",
{
"Ref": "trafficType"
},
{
"Ref": "AWS::NoValue"
}
]
}
},
"Scope": {},
"Source": {
"Owner": "AWS",
"SourceIdentifier": "VPC_FLOW_LOGS_ENABLED"
},
"MaximumExecutionFrequency": {
"Ref": "MaximumExecutionFrequency"
},
"RemediationConfigurations": {
"Ref": "RemediationConfigurations"
},
}
}
},
"Parameters": {
"ConfigRuleName": {
"Type": "String",
"Default": "vpc-flow-logs-enabled",
"Description": "The name that you assign to the AWS Config rule.",
"MinLength": "1",
"ConstraintDescription": "This parameter is required."
},
"MaximumExecutionFrequency": {
"Type": "String",
"Default": "TwentyFour_Hours",
"Description": "The frequency that you want AWS Config to run evaluations for the rule.",
"MinLength": "1",
"ConstraintDescription": "This parameter is required.",
"AllowedValues": [
"One_Hour",
"Three_Hours",
"Six_Hours",
"Twelve_Hours",
"TwentyFour_Hours"
]
},
"trafficType": {
"Type": "String",
"Default": "",
"Description": "TrafficType of flow logs"
},
"RemediationConfigurations": [
{
"TargetId": "AWS-PublishSNSNotification",
"TargetType": "SSM_DOCUMENT"
}
]
},