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

fix: Fix cycle error during the destroy phase when we change workers order #1043

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions workers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,10 @@ resource "random_pet" "workers" {
keepers = {
lc_name = aws_launch_configuration.workers[count.index].name
}

lifecycle {
create_before_destroy = true
}
}

resource "aws_security_group" "workers" {
Expand Down Expand Up @@ -409,6 +413,10 @@ resource "aws_iam_instance_profile" "workers" {
)

path = var.iam_path

lifecycle {
create_before_destroy = true
}
}

resource "aws_iam_role_policy_attachment" "workers_AmazonEKSWorkerNodePolicy" {
Expand Down
5 changes: 5 additions & 0 deletions workers_launch_template.tf
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,7 @@ resource "random_pet" "workers_launch_template" {
)
)
}

lifecycle {
create_before_destroy = true
}
Expand All @@ -506,4 +507,8 @@ resource "aws_iam_instance_profile" "workers_launch_template" {
local.default_iam_role_id,
)
path = var.iam_path

lifecycle {
create_before_destroy = true
}
}