【问题标题】:terraform aws_lb getting tainted and the resource is getting recreatedterraform aws_lb 被污染并且资源正在重新创建
【发布时间】:2020-11-23 22:57:46
【问题描述】:

我正在使用 aws_lb 在 aws 中创建应用程序负载均衡器。但是,当我运行 terraform apply 时,它显示应用程序负载均衡器已被污染,需要一直重新创建。

 # aws_lb.mylb is tainted, so must be replaced

-/+ resource "aws_lb" "mylb" {
      ~ arn                        = "arn:aws:elasticloadbalancing:us-east-1:accountid:loadbalancer/app/mylb/6aa550b5001f55" -> (known after apply)
      ~ arn_suffix                 = "app/mylb/6aa550b5001f55" -> (known after apply)
      ~ dns_name                   = "internal-mylb-5175872.us-east-1.elb.amazonaws.com" -> (known after apply)
        drop_invalid_header_fields = false
        enable_deletion_protection = false
        enable_http2               = true
      ~ id                         = "arn:aws:elasticloadbalancing:us-east-1:accountid:loadbalancer/app/mylb/6aa550b5001f55" -> (known after apply)
        idle_timeout               = 60
        internal                   = true
      ~ ip_address_type            = "ipv4" -> (known after apply)
        load_balancer_type         = "application"
        name                       = "mylb"
        security_groups            = [
            "sg-abc",
        ]
      - tags                       = {} -> null
      ~ vpc_id                     = "vpc-xyz" -> (known after apply)
      ~ zone_id                    = "zxcdfdstestzoneid" -> (known after apply)

      ~ access_logs {
          + bucket  = "mybucket"
          ~ enabled = false -> true
          + prefix  = "access_logs"
        }

        subnet_mapping {
            subnet_id = "subnet-xyz"
        }
        subnet_mapping {
            subnet_id = "subnet-abc"
        }
    }

【问题讨论】:

  • 你能不能也给出你的定义?

标签: amazon-web-services terraform terraform0.12+


【解决方案1】:

可能有人不小心对您的资源运行了taint 命令。你会想untaint它以避免不必要的娱乐。

terraform untaint aws_lb.mylb

【讨论】:

    猜你喜欢
    • 2018-09-24
    • 2018-10-23
    • 2022-07-24
    • 2022-12-29
    • 2019-03-12
    • 2021-08-28
    • 2019-10-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多