Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

force recreating while adding target #23

Closed
takutakahashi opened this issue May 7, 2020 · 0 comments · Fixed by #25
Closed

force recreating while adding target #23

takutakahashi opened this issue May 7, 2020 · 0 comments · Fixed by #25

Comments

@takutakahashi
Copy link
Owner

target IPs are not sorted. so tga will be recreated.

------------------------------------------------------------------------

An execution plan has been generated and is shown below.
Resource actions are indicated with the following symbols:
  + create
-/+ destroy and then create replacement

Terraform will perform the following actions:

  # aws_lb_target_group_attachment.TCP_443_tga[0] must be replaced
-/+ resource "aws_lb_target_group_attachment" "TCP_443_tga" {
        availability_zone = "ap-northeast-1a"
      ~ id                = "arn:aws:elasticloadbalancing:ap-northeast-1:xxxxxxxxx:targetgroup/tf-20200507065639528000000002/e86a57c4fae7cbf4-20200507072714114700000002" -> (known after apply)
        port              = 32443
        target_group_arn  = "arn:aws:elasticloadbalancing:ap-northeast-1:xxxxxxxxx:targetgroup/tf-20200507065639528000000002/e86a57c4fae7cbf4"
      ~ target_id         = "xx.xx.105.114" -> "xx.xx.105.106" # forces replacement
    }

  # aws_lb_target_group_attachment.TCP_443_tga[1] must be replaced
-/+ resource "aws_lb_target_group_attachment" "TCP_443_tga" {
        availability_zone = "ap-northeast-1a"
      ~ id                = "arn:aws:elasticloadbalancing:ap-northeast-1:xxxxxxxxx:targetgroup/tf-20200507065639528000000002/e86a57c4fae7cbf4-20200507074015683300000004" -> (known after apply)
        port              = 32443
        target_group_arn  = "arn:aws:elasticloadbalancing:ap-northeast-1:xxxxxxxxx:targetgroup/tf-20200507065639528000000002/e86a57c4fae7cbf4"
      ~ target_id         = "xx.xx.105.132" -> "xx.xx.105.114" # forces replacement
    }

  # aws_lb_target_group_attachment.TCP_443_tga[2] must be replaced
-/+ resource "aws_lb_target_group_attachment" "TCP_443_tga" {
        availability_zone = "ap-northeast-1a"
      ~ id                = "arn:aws:elasticloadbalancing:ap-northeast-1:xxxxxxxxx:targetgroup/tf-20200507065639528000000002/e86a57c4fae7cbf4-20200507074015622100000003" -> (known after apply)
        port              = 32443
        target_group_arn  = "arn:aws:elasticloadbalancing:ap-northeast-1:xxxxxxxxx:targetgroup/tf-20200507065639528000000002/e86a57c4fae7cbf4"
      ~ target_id         = "xx.xx.105.163" -> "xx.xx.105.132" # forces replacement
    }

  # aws_lb_target_group_attachment.TCP_443_tga[3] must be replaced
-/+ resource "aws_lb_target_group_attachment" "TCP_443_tga" {
        availability_zone = "ap-northeast-1a"
      ~ id                = "arn:aws:elasticloadbalancing:ap-northeast-1:xxxxxxxxx:targetgroup/tf-20200507065639528000000002/e86a57c4fae7cbf4-20200507074015580500000002" -> (known after apply)
        port              = 32443
        target_group_arn  = "arn:aws:elasticloadbalancing:ap-northeast-1:xxxxxxxxx:targetgroup/tf-20200507065639528000000002/e86a57c4fae7cbf4"
      ~ target_id         = "xx.xx.105.197" -> "xx.xx.105.163" # forces replacement
    }

  # aws_lb_target_group_attachment.TCP_443_tga[4] must be replaced
-/+ resource "aws_lb_target_group_attachment" "TCP_443_tga" {
        availability_zone = "ap-northeast-1a"
      ~ id                = "arn:aws:elasticloadbalancing:ap-northeast-1:xxxxxxxxx:targetgroup/tf-20200507065639528000000002/e86a57c4fae7cbf4-20200507074015514900000001" -> (known after apply)
        port              = 32443
        target_group_arn  = "arn:aws:elasticloadbalancing:ap-northeast-1:xxxxxxxxx:targetgroup/tf-20200507065639528000000002/e86a57c4fae7cbf4"
      ~ target_id         = "xx.xx.105.7" -> "xx.xx.105.197" # forces replacement
    }

  # aws_lb_target_group_attachment.TCP_443_tga[5] will be created
  + resource "aws_lb_target_group_attachment" "TCP_443_tga" {
      + availability_zone = "ap-northeast-1a"
      + id                = (known after apply)
      + port              = 32443
      + target_group_arn  = "arn:aws:elasticloadbalancing:ap-northeast-1:xxxxxxxxx:targetgroup/tf-20200507065639528000000002/e86a57c4fae7cbf4"
      + target_id         = "xx.xx.105.7"
    }

  # aws_lb_target_group_attachment.TCP_80_tga[0] must be replaced
-/+ resource "aws_lb_target_group_attachment" "TCP_80_tga" {
        availability_zone = "ap-northeast-1a"
      ~ id                = "arn:aws:elasticloadbalancing:ap-northeast-1:xxxxxxxxx:targetgroup/tf-20200507065639523800000001/09dbaedd66b4b358-20200507072714161600000004" -> (known after apply)
        port              = 32080
        target_group_arn  = "arn:aws:elasticloadbalancing:ap-northeast-1:xxxxxxxxx:targetgroup/tf-20200507065639523800000001/09dbaedd66b4b358"
      ~ target_id         = "xx.xx.105.114" -> "xx.xx.105.106" # forces replacement
    }

  # aws_lb_target_group_attachment.TCP_80_tga[1] must be replaced
-/+ resource "aws_lb_target_group_attachment" "TCP_80_tga" {
        availability_zone = "ap-northeast-1a"
      ~ id                = "arn:aws:elasticloadbalancing:ap-northeast-1:xxxxxxxxx:targetgroup/tf-20200507065639523800000001/09dbaedd66b4b358-20200507073916010900000003" -> (known after apply)
        port              = 32080
        target_group_arn  = "arn:aws:elasticloadbalancing:ap-northeast-1:xxxxxxxxx:targetgroup/tf-20200507065639523800000001/09dbaedd66b4b358"
      ~ target_id         = "xx.xx.105.132" -> "xx.xx.105.114" # forces replacement
    }

  # aws_lb_target_group_attachment.TCP_80_tga[2] must be replaced
-/+ resource "aws_lb_target_group_attachment" "TCP_80_tga" {
        availability_zone = "ap-northeast-1a"
      ~ id                = "arn:aws:elasticloadbalancing:ap-northeast-1:xxxxxxxxx:targetgroup/tf-20200507065639523800000001/09dbaedd66b4b358-20200507073916311600000004" -> (known after apply)
        port              = 32080
        target_group_arn  = "arn:aws:elasticloadbalancing:ap-northeast-1:xxxxxxxxx:targetgroup/tf-20200507065639523800000001/09dbaedd66b4b358"
      ~ target_id         = "xx.xx.105.163" -> "xx.xx.105.132" # forces replacement
    }

  # aws_lb_target_group_attachment.TCP_80_tga[3] must be replaced
-/+ resource "aws_lb_target_group_attachment" "TCP_80_tga" {
        availability_zone = "ap-northeast-1a"
      ~ id                = "arn:aws:elasticloadbalancing:ap-northeast-1:xxxxxxxxx:targetgroup/tf-20200507065639523800000001/09dbaedd66b4b358-20200507073915978400000002" -> (known after apply)
        port              = 32080
        target_group_arn  = "arn:aws:elasticloadbalancing:ap-northeast-1:xxxxxxxxx:targetgroup/tf-20200507065639523800000001/09dbaedd66b4b358"
      ~ target_id         = "xx.xx.105.197" -> "xx.xx.105.163" # forces replacement
    }

  # aws_lb_target_group_attachment.TCP_80_tga[4] must be replaced
-/+ resource "aws_lb_target_group_attachment" "TCP_80_tga" {
        availability_zone = "ap-northeast-1a"
      ~ id                = "arn:aws:elasticloadbalancing:ap-northeast-1:xxxxxxxxx:targetgroup/tf-20200507065639523800000001/09dbaedd66b4b358-20200507073915935200000001" -> (known after apply)
        port              = 32080
        target_group_arn  = "arn:aws:elasticloadbalancing:ap-northeast-1:xxxxxxxxx:targetgroup/tf-20200507065639523800000001/09dbaedd66b4b358"
      ~ target_id         = "xx.xx.105.7" -> "xx.xx.105.197" # forces replacement
    }

  # aws_lb_target_group_attachment.TCP_80_tga[5] will be created
  + resource "aws_lb_target_group_attachment" "TCP_80_tga" {
      + availability_zone = "ap-northeast-1a"
      + id                = (known after apply)
      + port              = 32080
      + target_group_arn  = "arn:aws:elasticloadbalancing:ap-northeast-1:xxxxxxxxx:targetgroup/tf-20200507065639523800000001/09dbaedd66b4b358"
      + target_id         = "xx.xx.105.7"
    }

Plan: 12 to add, 0 to change, 10 to destroy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant