У меня есть ресурс aws_codepipeline
в Terraform с двумя этапами. Второй - это развертывание с использованием ECS:
resource "aws_codepipeline" "codepipeline" {
name = "my-codepipeline"
role_arn = "my_arn"
artifact_store {
location = "codepipeline-eu-west-1-xxxx"
type = "S3"
}
stage {
name = "Source"
action {
name = "Source"
category = "Source"
owner = "ThirdParty"
provider = "GitHub"
version = "1"
output_artifacts = ["my_artifact"]
configuration = {
Owner = "Myself"
Repo = "myRepo"
Branch = "Master"
OAuthToken = ""
}
}
}
stage {
name = "Deploy"
action {
name = "Deploy"
category = "Deploy"
owner = "AWS"
provider = "ECS"
input_artifacts = ["my_artifact"]
version = "1"
configuration = {
ClusterName = "my-cluster"
ServiceName = "my-service"
}
}
}
}
Ошибка:
Error: Error creating CodePipeline: ValidationException: 1 validation error detected: Value at 'pipeline.stages.1.member.actions.1.member.configuration' failed to satisfy constraint: Map value must satisfy constraint: [Member must have length less than or equal to 1000, Member must have length greater than or equal to 1]
Я думаю, что эта ошибка связана с настройкой конфигурации, но я не нахожу ни в Документах Terraform, ни в Google никаких проблем, связанных с этим.