- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
当我做 terraform apply
每次所需的计数从 1 -> 2 变化时。请提出建议。
但是在 variables.tf
, 我声明为 desired_count=2
.
~ resource "aws_ecs_service" "ecs_service" {
cluster = "arn:aws:ecs::cluster/"
deployment_maximum_percent = 200
deployment_minimum_healthy_percent = 100
~ desired_count = 1 -> 2
enable_ecs_managed_tags = false
force_new_deployment = true
health_check_grace_period_seconds = 0
iam_role = "aws-service-role"
id = "arn:aws:ecs:-ecs-service"
launch_type = "FARGATE"
name = "ecs-service"
platform_version = "LATEST"
propagate_tags = "NONE"
scheduling_strategy = "REPLICA"
tags = {}
task_definition = "arn:aws:ecs:"
deployment_controller {
type = "ECS"
}
load_balancer {
container_name = "abcd"
container_port = 80
target_group_arn = "arn.*"
}
network_configuration {
assign_public_ip = false
security_groups = []
subnets = []
}
}
############ ECS Service ##############
resource "aws_ecs_service" "ecs_service" {
name = "${var.name}-ecs-service"
cluster = var.cluster_id
task_definition = var.task_definition_arn
desired_count = var.desired_count
iam_role = var.ecs_iam_role
force_new_deployment = var.force_new_deployment
launch_type = "FARGATE"
deployment_controller {
type = "ECS"
}
deployment_maximum_percent = "200"
deployment_minimum_healthy_percent = "100"
load_balancer {
target_group_arn = var.lb_tg_arn
container_name = var.name
container_port = var.port
}
network_configuration {
security_groups = var.security_group_id
subnets = var.subnets
assign_public_ip = var.assign_public_ip
}
depends_on = [var.aws_alb]
}
最佳答案
不确定是什么真正导致了更改,但如果您只想静音更改,您可以忽略 terraform docs 中所述的更改。
resource "aws_ecs_service" "example" {
# ... other configurations ...
# Example: Create service with 2 instances to start
desired_count = 2
# Optional: Allow external changes without Terraform plan difference
lifecycle {
ignore_changes = [desired_count]
}
}
关于amazon-web-services - 地形 | AWS ECS 服务 |每个 tf apply 所需的计数值更改,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62203702/
示例:https://www.terraform.io/docs/providers/kubernetes/r/service_account.html 我们看到了: resource "kubern
示例:https://www.terraform.io/docs/providers/kubernetes/r/service_account.html 我们看到了: resource "kubern
我有 5 个 keyvaults,有 5 个 secret ,问题是我不希望我的 terraform 文件有 10 个这样的数据 block : data "azurerm_key_vault" "k
我之前在我的 TF 代码中使用过这个: count = "${var.whatever == "true" ? 1 : 0}" 这非常适合我想要使用的东西。但是,我正在考虑如何最好地使用类似于说的
我之前在我的 TF 代码中使用过这个: count = "${var.whatever == "true" ? 1 : 0}" 这非常适合我想要使用的东西。但是,我正在考虑如何最好地使用类似于说的
我想创建一个上面有山的地形,使用一个非常基本的原理,如这个高度映射所示: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0
根据文档,使用terraform,我能够在 digital ocean 上创建一个小滴: resource "digitalocean_volume" "foobar" { region
在 Terraform 中,我正在尝试创建一个模块,其中包含一个带有变量键的 map 。我不确定这是否可能,但我尝试了以下但没有成功。 resource "aws_instance" "web" {
我正在使用Box2d进行自行车物理游戏,Box2d可以让你拥有8点或更少的凸多边形的固定装置,有人知道更简单的方法吗除了制作一大堆固定装置之外,还有复杂的凹形地形?或者这是唯一的方法? 任何想法、指示
我正在尝试在 LWJGL 中制作 2D 游戏。我在地形生成方面遇到问题。 我目前有一个生成地形的算法,但它总是随机的,我永远无法再次获得相同的世界,我想制作一个基于生成 x 和 y 坐标的算法给定的数
我在使用 libgdx 和 box2d 进行卡车游戏。 在我的游戏中 1 米 = 100 像素。 我的 2d 地形是由我生成的,由点组成。 我所做的是为整个多边形制作了一个多边形区域并使用了textu
我有一个 3D boolean 值数组,代表一些 3D 地形。目前我可以通过在数组中的 x y 和 z 指定的位置绘制一个点来绘制它,它看起来像这样。 我想不通的是如何使用三角形绘制它,所以它看起来像
我读过很多关于这个概念的教程,但我觉得它们都没有深入探讨如何做到这一点。我已经知道 3D 编程(光栅化、投影矩阵等)、光线转换(使用欧几里得几何和矢量)和光线追踪如何工作,我只需要知道如何使用柏林噪声
关闭。这个问题需要更多focused .它目前不接受答案。 想改进这个问题吗? 更新问题,使其只关注一个问题 editing this post . 关闭 9 年前。 Improve this qu
我正在做一些地形渲染,但遇到了一些麻烦。在这个时间点,我只是镶嵌顶点补丁,然后用高度图替换它们。我目前的问题是渲染看起来很时髦。我已经调试了一段时间,看起来这是深度缓冲区的问题。除此之外,我对正在发生
在 OpenGL 中用四边形制作地形纹理的最佳方法是什么?我有大约 30 种不同的纹理我想为我的地形(每种地形类型 1 个纹理,所以 30 种地形类型)并且希望在任何两个地形之间平滑过渡。 我一直在浏
执行时 terraform plan我没有错误,但是当我执行 terraform apply 时我收到以下错误。 地形计划输出:- + aws_route53_record.alm_route_rec
执行 terraform init 时出现以下错误升级到 0.12.2 后的命令版本。早期的相同代码在 terraform 中运行良好,没有问题 0.11.10版本。 alb.tf tags {
terraform init成功初始化但卡在 terraform 计划上。 该错误与功能块有关。我不确定在哪里添加功能块: Insufficient features blocks (source c
我正在使用 terraform 版本 0.14.3。我有一个用于创建 Azure 网络接口(interface)卡的模块,如下所示: resource "azurerm_network_interfa
我是一名优秀的程序员,十分优秀!