0

aws_config_config_ruleのセットでリソースを追加しようとしていますがinput_parameters、取得し続けます

Error: Error creating AWSConfig rule: Failed to create AWSConfig rule: InvalidParameterValueException: Unknown parameters provided in the inputParameters: {"targetBucket":"mybucket"}.
# Enables access logging for the CloudTrail S3 bucket
resource aws_config_config_rule cloudtrail-s3-bucket-logging-enabled {
    name = "cloudtrail-s3-bucket-logging-enabled"
    description = "Checks whether logging is enabled for your S3 buckets."

    source {
        owner   = "AWS"
        source_identifier = "S3_BUCKET_LOGGING_ENABLED"
    }

    scope {
        compliance_resource_id = aws_s3_bucket.mybucket.arn
        compliance_resource_types = ["AWS::S3::Bucket"]
    }

    input_parameters = jsonencode({"targetBucket":"${aws_s3_bucket.mybucket.id}"})
}

jsonencode 関数https://www.terraform.io/docs/configuration/functions/jsonencode.htmlを使用できると考えました。https://github.com/hashicorp/terraform/issues/14074という github の問題に遭遇しましたが、私が経験しているものとは異なります。どんな助けでも大歓迎です。

4

1 に答える 1