1. 背景

証明書が期限切れ。

2. 証明書のインポート

インポート完了

3. terraform

定義は変更せずにplanする。更新した証明書のIDで書き換わるように出力される。

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # module.alb.aws_lb_listener.mars_g_a will be updated in-place
  ~ resource "aws_lb_listener" "mars_g_a" {
      ~ certificate_arn   = "arn:aws:acm:ap-northeast-1:816196381588:certificate/0d2cba6f-99e6-42e0-804b-759143f398b9" -> "arn:aws:acm:ap-northeast-1:816196381588:certificate/ae9215c0-8ca7-4eb4-b8cb-ae01ccfa3991"
        id                = "arn:aws:elasticloadbalancing:ap-northeast-1:816196381588:listener/app/prod-alb/533bc8372061e4db/573022dc39b58e29"
        tags              = {}
        # (6 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

  # module.alb.aws_lb_listener.mars_g_c will be updated in-place
  ~ resource "aws_lb_listener" "mars_g_c" {
      ~ certificate_arn   = "arn:aws:acm:ap-northeast-1:816196381588:certificate/0d2cba6f-99e6-42e0-804b-759143f398b9" -> "arn:aws:acm:ap-northeast-1:816196381588:certificate/ae9215c0-8ca7-4eb4-b8cb-ae01ccfa3991"
        id                = "arn:aws:elasticloadbalancing:ap-northeast-1:816196381588:listener/app/prod-alb/533bc8372061e4db/07ff77665a336830"
        tags              = {}
        # (6 unchanged attributes hidden)

        # (1 unchanged block hidden)
    }

Plan: 0 to add, 2 to change, 0 to destroy.