0

我正在使用 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"
        }
    }
4

1 回答 1

0

据推测,有人不小心对您的资源运行了taint命令。你会想要清除它以避免不必要的娱乐。

terraform untaint aws_lb.mylb

于 2020-08-04T18:12:40.750 回答