【发布时间】:2022-07-28 00:08:10
【问题描述】:
我正在更改 AWS 金丝雀代码。
运行 terraform apply 后,我在新的 zip 文件中看到了更新,但在 AWS 控制台中,代码是旧的。
我做错了什么?
我的地形代码:
resource "aws_synthetics_canary" "canary" {
depends_on = [time_sleep.wait_5_minutes]
name = var.name
artifact_s3_location = "s3://${local.artifacts_bucket_and_path}"
execution_role_arn = aws_iam_role.canary_role.arn
handler = "apiCanary.handler"
start_canary = true
zip_file = data.archive_file.source_zip.output_path
runtime_version = "syn-nodejs-puppeteer-3.3"
tags = {
Description = var.description
Entity = var.entity
Service = var.service
}
run_config {
timeout_in_seconds = 300
}
schedule {
expression = "rate(${var.rate_in_minutes} ${var.rate_in_minutes == 1 ? "minute" : "minutes"})"
}
}
我读了this,但对我没有帮助。
【问题讨论】:
标签: amazon-web-services terraform amazon-cloudwatch