mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-10-01 01:36:09 -04:00
Mark externally managed terraform resources to make infrastructure terraform appliable throughout its lifetime (#442)
* Mark externally managed terraform resources to make infrastructure terraform appliable throughout its lifetime * Use correct field for nat gateway Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com> Co-authored-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
This commit is contained in:
parent
a70161730f
commit
fa6dfdff4f
@ -39,10 +39,14 @@ resource "aws_launch_template" "launch_template" {
|
||||
|
||||
lifecycle {
|
||||
create_before_destroy = true
|
||||
ignore_changes = [
|
||||
default_version, # required. update procedure creates new versions of the launch template
|
||||
image_id, # required. update procedure modifies the image id externally
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
resource "aws_autoscaling_group" "control_plane_autoscaling_group" {
|
||||
resource "aws_autoscaling_group" "autoscaling_group" {
|
||||
name = local.name
|
||||
launch_template {
|
||||
id = aws_launch_template.launch_template.id
|
||||
@ -53,10 +57,6 @@ resource "aws_autoscaling_group" "control_plane_autoscaling_group" {
|
||||
vpc_zone_identifier = [var.subnetwork]
|
||||
target_group_arns = var.target_group_arns
|
||||
|
||||
lifecycle {
|
||||
create_before_destroy = true
|
||||
}
|
||||
|
||||
tag {
|
||||
key = "Name"
|
||||
value = local.name
|
||||
@ -78,4 +78,14 @@ resource "aws_autoscaling_group" "control_plane_autoscaling_group" {
|
||||
value = "Constellation-${var.uid}"
|
||||
propagate_at_launch = true
|
||||
}
|
||||
|
||||
lifecycle {
|
||||
create_before_destroy = true
|
||||
ignore_changes = [
|
||||
launch_template.0.version, # required. update procedure creates new versions of the launch template
|
||||
min_size, # required. autoscaling modifies the instance count externally
|
||||
max_size, # required. autoscaling modifies the instance count externally
|
||||
desired_capacity, # required. autoscaling modifies the instance count externally
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -42,8 +42,8 @@ resource "aws_route_table" "private_nat" {
|
||||
tags = merge(var.tags, { Name = "${var.name}-private-nat" })
|
||||
|
||||
route {
|
||||
cidr_block = "0.0.0.0/0"
|
||||
gateway_id = aws_nat_gateway.gw.id
|
||||
cidr_block = "0.0.0.0/0"
|
||||
nat_gateway_id = aws_nat_gateway.gw.id
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -78,4 +78,11 @@ resource "azurerm_linux_virtual_machine_scale_set" "scale_set" {
|
||||
load_balancer_backend_address_pool_ids = var.backend_address_pool_ids
|
||||
}
|
||||
}
|
||||
|
||||
lifecycle {
|
||||
ignore_changes = [
|
||||
instances, # required. autoscaling modifies the instance count externally
|
||||
source_image_id, # required. update procedure modifies the image id externally
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -94,4 +94,11 @@ resource "google_compute_instance_group_manager" "instance_group_manager" {
|
||||
port = named_port.value.port
|
||||
}
|
||||
}
|
||||
|
||||
lifecycle {
|
||||
ignore_changes = [
|
||||
target_size, # required. autoscaling modifies the instance count externally
|
||||
version, # required. update procedure modifies the instance template externally
|
||||
]
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user