diff --git a/tests/integration/update_cluster/bastionadditional_user-data/kubernetes.tf b/tests/integration/update_cluster/bastionadditional_user-data/kubernetes.tf index ee0ed5f7ff..14c886d586 100644 --- a/tests/integration/update_cluster/bastionadditional_user-data/kubernetes.tf +++ b/tests/integration/update_cluster/bastionadditional_user-data/kubernetes.tf @@ -429,7 +429,7 @@ resource "aws_launch_template" "bastion-bastionuserdata-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "bastion.bastionuserdata.example.com-" + name = "bastion.bastionuserdata.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true @@ -493,7 +493,7 @@ resource "aws_launch_template" "master-us-test-1a-masters-bastionuserdata-exampl lifecycle { create_before_destroy = true } - name_prefix = "master-us-test-1a.masters.bastionuserdata.example.com-" + name = "master-us-test-1a.masters.bastionuserdata.example.com" network_interfaces { associate_public_ip_address = false delete_on_termination = true @@ -553,7 +553,7 @@ resource "aws_launch_template" "nodes-bastionuserdata-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "nodes.bastionuserdata.example.com-" + name = "nodes.bastionuserdata.example.com" network_interfaces { associate_public_ip_address = false delete_on_termination = true diff --git a/tests/integration/update_cluster/complex/kubernetes.tf b/tests/integration/update_cluster/complex/kubernetes.tf index ec341b8925..29ee6f3d9f 100644 --- a/tests/integration/update_cluster/complex/kubernetes.tf +++ b/tests/integration/update_cluster/complex/kubernetes.tf @@ -297,7 +297,7 @@ resource "aws_launch_template" "master-us-test-1a-masters-complex-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "master-us-test-1a.masters.complex.example.com-" + name = "master-us-test-1a.masters.complex.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true @@ -374,7 +374,7 @@ resource "aws_launch_template" "nodes-complex-example-com" { monitoring { enabled = true } - name_prefix = "nodes.complex.example.com-" + name = "nodes.complex.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true diff --git a/tests/integration/update_cluster/existing_iam/kubernetes.tf b/tests/integration/update_cluster/existing_iam/kubernetes.tf index 8b07c2d858..c1bd348d28 100644 --- a/tests/integration/update_cluster/existing_iam/kubernetes.tf +++ b/tests/integration/update_cluster/existing_iam/kubernetes.tf @@ -387,7 +387,7 @@ resource "aws_launch_template" "master-us-test-1a-masters-existing-iam-example-c lifecycle { create_before_destroy = true } - name_prefix = "master-us-test-1a.masters.existing-iam.example.com-" + name = "master-us-test-1a.masters.existing-iam.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true @@ -451,7 +451,7 @@ resource "aws_launch_template" "master-us-test-1b-masters-existing-iam-example-c lifecycle { create_before_destroy = true } - name_prefix = "master-us-test-1b.masters.existing-iam.example.com-" + name = "master-us-test-1b.masters.existing-iam.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true @@ -515,7 +515,7 @@ resource "aws_launch_template" "master-us-test-1c-masters-existing-iam-example-c lifecycle { create_before_destroy = true } - name_prefix = "master-us-test-1c.masters.existing-iam.example.com-" + name = "master-us-test-1c.masters.existing-iam.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true @@ -575,7 +575,7 @@ resource "aws_launch_template" "nodes-existing-iam-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "nodes.existing-iam.example.com-" + name = "nodes.existing-iam.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true diff --git a/tests/integration/update_cluster/existing_sg/kubernetes.tf b/tests/integration/update_cluster/existing_sg/kubernetes.tf index f5c734f296..025b222dc1 100644 --- a/tests/integration/update_cluster/existing_sg/kubernetes.tf +++ b/tests/integration/update_cluster/existing_sg/kubernetes.tf @@ -468,7 +468,7 @@ resource "aws_launch_template" "master-us-test-1a-masters-existingsg-example-com lifecycle { create_before_destroy = true } - name_prefix = "master-us-test-1a.masters.existingsg.example.com-" + name = "master-us-test-1a.masters.existingsg.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true @@ -532,7 +532,7 @@ resource "aws_launch_template" "master-us-test-1b-masters-existingsg-example-com lifecycle { create_before_destroy = true } - name_prefix = "master-us-test-1b.masters.existingsg.example.com-" + name = "master-us-test-1b.masters.existingsg.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true @@ -596,7 +596,7 @@ resource "aws_launch_template" "master-us-test-1c-masters-existingsg-example-com lifecycle { create_before_destroy = true } - name_prefix = "master-us-test-1c.masters.existingsg.example.com-" + name = "master-us-test-1c.masters.existingsg.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true @@ -656,7 +656,7 @@ resource "aws_launch_template" "nodes-existingsg-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "nodes.existingsg.example.com-" + name = "nodes.existingsg.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true diff --git a/tests/integration/update_cluster/externallb/kubernetes.tf b/tests/integration/update_cluster/externallb/kubernetes.tf index 18082fab26..c6b0efb087 100644 --- a/tests/integration/update_cluster/externallb/kubernetes.tf +++ b/tests/integration/update_cluster/externallb/kubernetes.tf @@ -280,7 +280,7 @@ resource "aws_launch_template" "master-us-test-1a-masters-externallb-example-com lifecycle { create_before_destroy = true } - name_prefix = "master-us-test-1a.masters.externallb.example.com-" + name = "master-us-test-1a.masters.externallb.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true @@ -340,7 +340,7 @@ resource "aws_launch_template" "nodes-externallb-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "nodes.externallb.example.com-" + name = "nodes.externallb.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true diff --git a/tests/integration/update_cluster/externalpolicies/kubernetes.tf b/tests/integration/update_cluster/externalpolicies/kubernetes.tf index eb92c10f42..66fddf6a11 100644 --- a/tests/integration/update_cluster/externalpolicies/kubernetes.tf +++ b/tests/integration/update_cluster/externalpolicies/kubernetes.tf @@ -345,7 +345,7 @@ resource "aws_launch_template" "master-us-test-1a-masters-externalpolicies-examp lifecycle { create_before_destroy = true } - name_prefix = "master-us-test-1a.masters.externalpolicies.example.com-" + name = "master-us-test-1a.masters.externalpolicies.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true @@ -414,7 +414,7 @@ resource "aws_launch_template" "nodes-externalpolicies-example-com" { monitoring { enabled = true } - name_prefix = "nodes.externalpolicies.example.com-" + name = "nodes.externalpolicies.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true diff --git a/tests/integration/update_cluster/ha/kubernetes.tf b/tests/integration/update_cluster/ha/kubernetes.tf index 635087dffa..dfe29d079a 100644 --- a/tests/integration/update_cluster/ha/kubernetes.tf +++ b/tests/integration/update_cluster/ha/kubernetes.tf @@ -439,7 +439,7 @@ resource "aws_launch_template" "master-us-test-1a-masters-ha-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "master-us-test-1a.masters.ha.example.com-" + name = "master-us-test-1a.masters.ha.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true @@ -503,7 +503,7 @@ resource "aws_launch_template" "master-us-test-1b-masters-ha-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "master-us-test-1b.masters.ha.example.com-" + name = "master-us-test-1b.masters.ha.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true @@ -567,7 +567,7 @@ resource "aws_launch_template" "master-us-test-1c-masters-ha-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "master-us-test-1c.masters.ha.example.com-" + name = "master-us-test-1c.masters.ha.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true @@ -627,7 +627,7 @@ resource "aws_launch_template" "nodes-ha-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "nodes.ha.example.com-" + name = "nodes.ha.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true diff --git a/tests/integration/update_cluster/minimal-json/kubernetes.tf.json b/tests/integration/update_cluster/minimal-json/kubernetes.tf.json index 08dae8fba9..6691f2c091 100644 --- a/tests/integration/update_cluster/minimal-json/kubernetes.tf.json +++ b/tests/integration/update_cluster/minimal-json/kubernetes.tf.json @@ -294,7 +294,7 @@ }, "aws_launch_template": { "master-us-test-1a-masters-minimal-json-example-com": { - "name_prefix": "master-us-test-1a.masters.minimal-json.example.com-", + "name": "master-us-test-1a.masters.minimal-json.example.com", "lifecycle": { "create_before_destroy": true }, @@ -369,7 +369,7 @@ "user_data": "${file(\"${path.module}/data/aws_launch_template_master-us-test-1a.masters.minimal-json.example.com_user_data\")}" }, "nodes-minimal-json-example-com": { - "name_prefix": "nodes.minimal-json.example.com-", + "name": "nodes.minimal-json.example.com", "lifecycle": { "create_before_destroy": true }, diff --git a/tests/integration/update_cluster/minimal/kubernetes.tf b/tests/integration/update_cluster/minimal/kubernetes.tf index 379c919407..58da12bcea 100644 --- a/tests/integration/update_cluster/minimal/kubernetes.tf +++ b/tests/integration/update_cluster/minimal/kubernetes.tf @@ -277,7 +277,7 @@ resource "aws_launch_template" "master-us-test-1a-masters-minimal-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "master-us-test-1a.masters.minimal.example.com-" + name = "master-us-test-1a.masters.minimal.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true @@ -337,7 +337,7 @@ resource "aws_launch_template" "nodes-minimal-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "nodes.minimal.example.com-" + name = "nodes.minimal.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true diff --git a/tests/integration/update_cluster/mixed_instances/kubernetes.tf b/tests/integration/update_cluster/mixed_instances/kubernetes.tf index d2f0151ae8..2dd384a781 100644 --- a/tests/integration/update_cluster/mixed_instances/kubernetes.tf +++ b/tests/integration/update_cluster/mixed_instances/kubernetes.tf @@ -457,7 +457,7 @@ resource "aws_launch_template" "master-us-test-1a-masters-mixedinstances-example lifecycle { create_before_destroy = true } - name_prefix = "master-us-test-1a.masters.mixedinstances.example.com-" + name = "master-us-test-1a.masters.mixedinstances.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true @@ -521,7 +521,7 @@ resource "aws_launch_template" "master-us-test-1b-masters-mixedinstances-example lifecycle { create_before_destroy = true } - name_prefix = "master-us-test-1b.masters.mixedinstances.example.com-" + name = "master-us-test-1b.masters.mixedinstances.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true @@ -585,7 +585,7 @@ resource "aws_launch_template" "master-us-test-1c-masters-mixedinstances-example lifecycle { create_before_destroy = true } - name_prefix = "master-us-test-1c.masters.mixedinstances.example.com-" + name = "master-us-test-1c.masters.mixedinstances.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true @@ -645,7 +645,7 @@ resource "aws_launch_template" "nodes-mixedinstances-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "nodes.mixedinstances.example.com-" + name = "nodes.mixedinstances.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true diff --git a/tests/integration/update_cluster/mixed_instances_spot/kubernetes.tf b/tests/integration/update_cluster/mixed_instances_spot/kubernetes.tf index 6dda659801..e097def665 100644 --- a/tests/integration/update_cluster/mixed_instances_spot/kubernetes.tf +++ b/tests/integration/update_cluster/mixed_instances_spot/kubernetes.tf @@ -457,7 +457,7 @@ resource "aws_launch_template" "master-us-test-1a-masters-mixedinstances-example lifecycle { create_before_destroy = true } - name_prefix = "master-us-test-1a.masters.mixedinstances.example.com-" + name = "master-us-test-1a.masters.mixedinstances.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true @@ -521,7 +521,7 @@ resource "aws_launch_template" "master-us-test-1b-masters-mixedinstances-example lifecycle { create_before_destroy = true } - name_prefix = "master-us-test-1b.masters.mixedinstances.example.com-" + name = "master-us-test-1b.masters.mixedinstances.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true @@ -585,7 +585,7 @@ resource "aws_launch_template" "master-us-test-1c-masters-mixedinstances-example lifecycle { create_before_destroy = true } - name_prefix = "master-us-test-1c.masters.mixedinstances.example.com-" + name = "master-us-test-1c.masters.mixedinstances.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true @@ -645,7 +645,7 @@ resource "aws_launch_template" "nodes-mixedinstances-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "nodes.mixedinstances.example.com-" + name = "nodes.mixedinstances.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true diff --git a/tests/integration/update_cluster/private-shared-subnet/kubernetes.tf b/tests/integration/update_cluster/private-shared-subnet/kubernetes.tf index 6ffd48a0c9..7a2a32ae73 100644 --- a/tests/integration/update_cluster/private-shared-subnet/kubernetes.tf +++ b/tests/integration/update_cluster/private-shared-subnet/kubernetes.tf @@ -401,7 +401,7 @@ resource "aws_launch_template" "bastion-private-shared-subnet-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "bastion.private-shared-subnet.example.com-" + name = "bastion.private-shared-subnet.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true @@ -464,7 +464,7 @@ resource "aws_launch_template" "master-us-test-1a-masters-private-shared-subnet- lifecycle { create_before_destroy = true } - name_prefix = "master-us-test-1a.masters.private-shared-subnet.example.com-" + name = "master-us-test-1a.masters.private-shared-subnet.example.com" network_interfaces { associate_public_ip_address = false delete_on_termination = true @@ -524,7 +524,7 @@ resource "aws_launch_template" "nodes-private-shared-subnet-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "nodes.private-shared-subnet.example.com-" + name = "nodes.private-shared-subnet.example.com" network_interfaces { associate_public_ip_address = false delete_on_termination = true diff --git a/tests/integration/update_cluster/privatecalico/kubernetes.tf b/tests/integration/update_cluster/privatecalico/kubernetes.tf index 2b9da1825c..c1e2d3daf0 100644 --- a/tests/integration/update_cluster/privatecalico/kubernetes.tf +++ b/tests/integration/update_cluster/privatecalico/kubernetes.tf @@ -429,7 +429,7 @@ resource "aws_launch_template" "bastion-privatecalico-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "bastion.privatecalico.example.com-" + name = "bastion.privatecalico.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true @@ -492,7 +492,7 @@ resource "aws_launch_template" "master-us-test-1a-masters-privatecalico-example- lifecycle { create_before_destroy = true } - name_prefix = "master-us-test-1a.masters.privatecalico.example.com-" + name = "master-us-test-1a.masters.privatecalico.example.com" network_interfaces { associate_public_ip_address = false delete_on_termination = true @@ -552,7 +552,7 @@ resource "aws_launch_template" "nodes-privatecalico-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "nodes.privatecalico.example.com-" + name = "nodes.privatecalico.example.com" network_interfaces { associate_public_ip_address = false delete_on_termination = true diff --git a/tests/integration/update_cluster/privatecanal/kubernetes.tf b/tests/integration/update_cluster/privatecanal/kubernetes.tf index 0f57cc857e..b7b345939d 100644 --- a/tests/integration/update_cluster/privatecanal/kubernetes.tf +++ b/tests/integration/update_cluster/privatecanal/kubernetes.tf @@ -429,7 +429,7 @@ resource "aws_launch_template" "bastion-privatecanal-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "bastion.privatecanal.example.com-" + name = "bastion.privatecanal.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true @@ -492,7 +492,7 @@ resource "aws_launch_template" "master-us-test-1a-masters-privatecanal-example-c lifecycle { create_before_destroy = true } - name_prefix = "master-us-test-1a.masters.privatecanal.example.com-" + name = "master-us-test-1a.masters.privatecanal.example.com" network_interfaces { associate_public_ip_address = false delete_on_termination = true @@ -552,7 +552,7 @@ resource "aws_launch_template" "nodes-privatecanal-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "nodes.privatecanal.example.com-" + name = "nodes.privatecanal.example.com" network_interfaces { associate_public_ip_address = false delete_on_termination = true diff --git a/tests/integration/update_cluster/privatecilium/kubernetes.tf b/tests/integration/update_cluster/privatecilium/kubernetes.tf index ee53122d20..0415c7e8b2 100644 --- a/tests/integration/update_cluster/privatecilium/kubernetes.tf +++ b/tests/integration/update_cluster/privatecilium/kubernetes.tf @@ -429,7 +429,7 @@ resource "aws_launch_template" "bastion-privatecilium-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "bastion.privatecilium.example.com-" + name = "bastion.privatecilium.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true @@ -492,7 +492,7 @@ resource "aws_launch_template" "master-us-test-1a-masters-privatecilium-example- lifecycle { create_before_destroy = true } - name_prefix = "master-us-test-1a.masters.privatecilium.example.com-" + name = "master-us-test-1a.masters.privatecilium.example.com" network_interfaces { associate_public_ip_address = false delete_on_termination = true @@ -552,7 +552,7 @@ resource "aws_launch_template" "nodes-privatecilium-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "nodes.privatecilium.example.com-" + name = "nodes.privatecilium.example.com" network_interfaces { associate_public_ip_address = false delete_on_termination = true diff --git a/tests/integration/update_cluster/privatecilium2/kubernetes.tf b/tests/integration/update_cluster/privatecilium2/kubernetes.tf index ee53122d20..0415c7e8b2 100644 --- a/tests/integration/update_cluster/privatecilium2/kubernetes.tf +++ b/tests/integration/update_cluster/privatecilium2/kubernetes.tf @@ -429,7 +429,7 @@ resource "aws_launch_template" "bastion-privatecilium-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "bastion.privatecilium.example.com-" + name = "bastion.privatecilium.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true @@ -492,7 +492,7 @@ resource "aws_launch_template" "master-us-test-1a-masters-privatecilium-example- lifecycle { create_before_destroy = true } - name_prefix = "master-us-test-1a.masters.privatecilium.example.com-" + name = "master-us-test-1a.masters.privatecilium.example.com" network_interfaces { associate_public_ip_address = false delete_on_termination = true @@ -552,7 +552,7 @@ resource "aws_launch_template" "nodes-privatecilium-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "nodes.privatecilium.example.com-" + name = "nodes.privatecilium.example.com" network_interfaces { associate_public_ip_address = false delete_on_termination = true diff --git a/tests/integration/update_cluster/privateciliumadvanced/kubernetes.tf b/tests/integration/update_cluster/privateciliumadvanced/kubernetes.tf index 98fc7b2849..ce0520dd65 100644 --- a/tests/integration/update_cluster/privateciliumadvanced/kubernetes.tf +++ b/tests/integration/update_cluster/privateciliumadvanced/kubernetes.tf @@ -443,7 +443,7 @@ resource "aws_launch_template" "bastion-privateciliumadvanced-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "bastion.privateciliumadvanced.example.com-" + name = "bastion.privateciliumadvanced.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true @@ -506,7 +506,7 @@ resource "aws_launch_template" "master-us-test-1a-masters-privateciliumadvanced- lifecycle { create_before_destroy = true } - name_prefix = "master-us-test-1a.masters.privateciliumadvanced.example.com-" + name = "master-us-test-1a.masters.privateciliumadvanced.example.com" network_interfaces { associate_public_ip_address = false delete_on_termination = true @@ -566,7 +566,7 @@ resource "aws_launch_template" "nodes-privateciliumadvanced-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "nodes.privateciliumadvanced.example.com-" + name = "nodes.privateciliumadvanced.example.com" network_interfaces { associate_public_ip_address = false delete_on_termination = true diff --git a/tests/integration/update_cluster/privatedns1/kubernetes.tf b/tests/integration/update_cluster/privatedns1/kubernetes.tf index 8011f6d37e..989e7111bc 100644 --- a/tests/integration/update_cluster/privatedns1/kubernetes.tf +++ b/tests/integration/update_cluster/privatedns1/kubernetes.tf @@ -473,7 +473,7 @@ resource "aws_launch_template" "bastion-privatedns1-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "bastion.privatedns1.example.com-" + name = "bastion.privatedns1.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true @@ -542,7 +542,7 @@ resource "aws_launch_template" "master-us-test-1a-masters-privatedns1-example-co lifecycle { create_before_destroy = true } - name_prefix = "master-us-test-1a.masters.privatedns1.example.com-" + name = "master-us-test-1a.masters.privatedns1.example.com" network_interfaces { associate_public_ip_address = false delete_on_termination = true @@ -608,7 +608,7 @@ resource "aws_launch_template" "nodes-privatedns1-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "nodes.privatedns1.example.com-" + name = "nodes.privatedns1.example.com" network_interfaces { associate_public_ip_address = false delete_on_termination = true diff --git a/tests/integration/update_cluster/privatedns2/kubernetes.tf b/tests/integration/update_cluster/privatedns2/kubernetes.tf index 8f6b364d3c..7707526a24 100644 --- a/tests/integration/update_cluster/privatedns2/kubernetes.tf +++ b/tests/integration/update_cluster/privatedns2/kubernetes.tf @@ -415,7 +415,7 @@ resource "aws_launch_template" "bastion-privatedns2-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "bastion.privatedns2.example.com-" + name = "bastion.privatedns2.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true @@ -478,7 +478,7 @@ resource "aws_launch_template" "master-us-test-1a-masters-privatedns2-example-co lifecycle { create_before_destroy = true } - name_prefix = "master-us-test-1a.masters.privatedns2.example.com-" + name = "master-us-test-1a.masters.privatedns2.example.com" network_interfaces { associate_public_ip_address = false delete_on_termination = true @@ -538,7 +538,7 @@ resource "aws_launch_template" "nodes-privatedns2-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "nodes.privatedns2.example.com-" + name = "nodes.privatedns2.example.com" network_interfaces { associate_public_ip_address = false delete_on_termination = true diff --git a/tests/integration/update_cluster/privateflannel/kubernetes.tf b/tests/integration/update_cluster/privateflannel/kubernetes.tf index 9805130bb7..5dfe1e07fa 100644 --- a/tests/integration/update_cluster/privateflannel/kubernetes.tf +++ b/tests/integration/update_cluster/privateflannel/kubernetes.tf @@ -429,7 +429,7 @@ resource "aws_launch_template" "bastion-privateflannel-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "bastion.privateflannel.example.com-" + name = "bastion.privateflannel.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true @@ -492,7 +492,7 @@ resource "aws_launch_template" "master-us-test-1a-masters-privateflannel-example lifecycle { create_before_destroy = true } - name_prefix = "master-us-test-1a.masters.privateflannel.example.com-" + name = "master-us-test-1a.masters.privateflannel.example.com" network_interfaces { associate_public_ip_address = false delete_on_termination = true @@ -552,7 +552,7 @@ resource "aws_launch_template" "nodes-privateflannel-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "nodes.privateflannel.example.com-" + name = "nodes.privateflannel.example.com" network_interfaces { associate_public_ip_address = false delete_on_termination = true diff --git a/tests/integration/update_cluster/privatekopeio/kubernetes.tf b/tests/integration/update_cluster/privatekopeio/kubernetes.tf index 023da1e0f5..ee05e60dc2 100644 --- a/tests/integration/update_cluster/privatekopeio/kubernetes.tf +++ b/tests/integration/update_cluster/privatekopeio/kubernetes.tf @@ -435,7 +435,7 @@ resource "aws_launch_template" "bastion-privatekopeio-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "bastion.privatekopeio.example.com-" + name = "bastion.privatekopeio.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true @@ -498,7 +498,7 @@ resource "aws_launch_template" "master-us-test-1a-masters-privatekopeio-example- lifecycle { create_before_destroy = true } - name_prefix = "master-us-test-1a.masters.privatekopeio.example.com-" + name = "master-us-test-1a.masters.privatekopeio.example.com" network_interfaces { associate_public_ip_address = false delete_on_termination = true @@ -558,7 +558,7 @@ resource "aws_launch_template" "nodes-privatekopeio-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "nodes.privatekopeio.example.com-" + name = "nodes.privatekopeio.example.com" network_interfaces { associate_public_ip_address = false delete_on_termination = true diff --git a/tests/integration/update_cluster/privateweave/kubernetes.tf b/tests/integration/update_cluster/privateweave/kubernetes.tf index 6c720541b9..f6ef2514fe 100644 --- a/tests/integration/update_cluster/privateweave/kubernetes.tf +++ b/tests/integration/update_cluster/privateweave/kubernetes.tf @@ -429,7 +429,7 @@ resource "aws_launch_template" "bastion-privateweave-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "bastion.privateweave.example.com-" + name = "bastion.privateweave.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true @@ -492,7 +492,7 @@ resource "aws_launch_template" "master-us-test-1a-masters-privateweave-example-c lifecycle { create_before_destroy = true } - name_prefix = "master-us-test-1a.masters.privateweave.example.com-" + name = "master-us-test-1a.masters.privateweave.example.com" network_interfaces { associate_public_ip_address = false delete_on_termination = true @@ -552,7 +552,7 @@ resource "aws_launch_template" "nodes-privateweave-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "nodes.privateweave.example.com-" + name = "nodes.privateweave.example.com" network_interfaces { associate_public_ip_address = false delete_on_termination = true diff --git a/tests/integration/update_cluster/public-jwks/kubernetes.tf b/tests/integration/update_cluster/public-jwks/kubernetes.tf index 29cf8c058a..8031a201a1 100644 --- a/tests/integration/update_cluster/public-jwks/kubernetes.tf +++ b/tests/integration/update_cluster/public-jwks/kubernetes.tf @@ -304,7 +304,7 @@ resource "aws_launch_template" "master-us-test-1a-masters-minimal-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "master-us-test-1a.masters.minimal.example.com-" + name = "master-us-test-1a.masters.minimal.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true @@ -364,7 +364,7 @@ resource "aws_launch_template" "nodes-minimal-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "nodes.minimal.example.com-" + name = "nodes.minimal.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true diff --git a/tests/integration/update_cluster/shared_subnet/kubernetes.tf b/tests/integration/update_cluster/shared_subnet/kubernetes.tf index b7f0466252..a9493d0a98 100644 --- a/tests/integration/update_cluster/shared_subnet/kubernetes.tf +++ b/tests/integration/update_cluster/shared_subnet/kubernetes.tf @@ -263,7 +263,7 @@ resource "aws_launch_template" "master-us-test-1a-masters-sharedsubnet-example-c lifecycle { create_before_destroy = true } - name_prefix = "master-us-test-1a.masters.sharedsubnet.example.com-" + name = "master-us-test-1a.masters.sharedsubnet.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true @@ -323,7 +323,7 @@ resource "aws_launch_template" "nodes-sharedsubnet-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "nodes.sharedsubnet.example.com-" + name = "nodes.sharedsubnet.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true diff --git a/tests/integration/update_cluster/shared_vpc/kubernetes.tf b/tests/integration/update_cluster/shared_vpc/kubernetes.tf index de7dc48948..db64333e3c 100644 --- a/tests/integration/update_cluster/shared_vpc/kubernetes.tf +++ b/tests/integration/update_cluster/shared_vpc/kubernetes.tf @@ -263,7 +263,7 @@ resource "aws_launch_template" "master-us-test-1a-masters-sharedvpc-example-com" lifecycle { create_before_destroy = true } - name_prefix = "master-us-test-1a.masters.sharedvpc.example.com-" + name = "master-us-test-1a.masters.sharedvpc.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true @@ -323,7 +323,7 @@ resource "aws_launch_template" "nodes-sharedvpc-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "nodes.sharedvpc.example.com-" + name = "nodes.sharedvpc.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true diff --git a/tests/integration/update_cluster/unmanaged/kubernetes.tf b/tests/integration/update_cluster/unmanaged/kubernetes.tf index cb7d79bf55..444b50c4f0 100644 --- a/tests/integration/update_cluster/unmanaged/kubernetes.tf +++ b/tests/integration/update_cluster/unmanaged/kubernetes.tf @@ -406,7 +406,7 @@ resource "aws_launch_template" "bastion-unmanaged-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "bastion.unmanaged.example.com-" + name = "bastion.unmanaged.example.com" network_interfaces { associate_public_ip_address = true delete_on_termination = true @@ -469,7 +469,7 @@ resource "aws_launch_template" "master-us-test-1a-masters-unmanaged-example-com" lifecycle { create_before_destroy = true } - name_prefix = "master-us-test-1a.masters.unmanaged.example.com-" + name = "master-us-test-1a.masters.unmanaged.example.com" network_interfaces { associate_public_ip_address = false delete_on_termination = true @@ -529,7 +529,7 @@ resource "aws_launch_template" "nodes-unmanaged-example-com" { lifecycle { create_before_destroy = true } - name_prefix = "nodes.unmanaged.example.com-" + name = "nodes.unmanaged.example.com" network_interfaces { associate_public_ip_address = false delete_on_termination = true diff --git a/upup/pkg/fi/cloudup/awstasks/launchtemplate_target_terraform.go b/upup/pkg/fi/cloudup/awstasks/launchtemplate_target_terraform.go index 4184e5d7f2..a456a7f450 100644 --- a/upup/pkg/fi/cloudup/awstasks/launchtemplate_target_terraform.go +++ b/upup/pkg/fi/cloudup/awstasks/launchtemplate_target_terraform.go @@ -109,8 +109,8 @@ type terraformLaunchTemplateTagSpecification struct { } type terraformLaunchTemplate struct { - // NamePrefix is the name of the launch template - NamePrefix *string `json:"name_prefix,omitempty" cty:"name_prefix"` + // Name is the name of the launch template + Name *string `json:"name,omitempty" cty:"name"` // Lifecycle is the terraform lifecycle Lifecycle *terraform.Lifecycle `json:"lifecycle,omitempty" cty:"lifecycle"` @@ -168,7 +168,7 @@ func (t *LaunchTemplate) RenderTerraform(target *terraform.TerraformTarget, a, e } tf := terraformLaunchTemplate{ - NamePrefix: fi.String(fi.StringValue(e.Name) + "-"), + Name: e.Name, EBSOptimized: e.RootVolumeOptimization, ImageID: image, InstanceType: e.InstanceType, diff --git a/upup/pkg/fi/cloudup/awstasks/launchtemplate_target_terraform_test.go b/upup/pkg/fi/cloudup/awstasks/launchtemplate_target_terraform_test.go index 81c15d5547..613184278b 100644 --- a/upup/pkg/fi/cloudup/awstasks/launchtemplate_target_terraform_test.go +++ b/upup/pkg/fi/cloudup/awstasks/launchtemplate_target_terraform_test.go @@ -75,7 +75,7 @@ resource "aws_launch_template" "test" { monitoring { enabled = true } - name_prefix = "test-" + name = "test" network_interfaces { associate_public_ip_address = true delete_on_termination = true @@ -154,7 +154,7 @@ resource "aws_launch_template" "test" { monitoring { enabled = true } - name_prefix = "test-" + name = "test" network_interfaces { associate_public_ip_address = true delete_on_termination = true