Skip to content

Commit 5a6ec12

Browse files
fix: Correct names for instances in preemptible and regular instance module (#81)
BREAKING CHANGE: The preemptible_and_regular_instance_templates modules have had name_prefixes renamed, forcing instances to be recreated.
1 parent 1c0ec45 commit 5a6ec12

File tree

2 files changed

+6
-6
lines changed
  • modules/preemptible_and_regular_instance_templates
  • test/integration/preemptible_and_regular_instance_templates_simple/controls

2 files changed

+6
-6
lines changed

modules/preemptible_and_regular_instance_templates/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
module "preemptible" {
2222
source = "../../modules/instance_template"
23-
name_prefix = "${var.name_prefix}-regular"
23+
name_prefix = "${var.name_prefix}-preemptible"
2424
project_id = var.project_id
2525
machine_type = var.machine_type
2626
labels = var.labels
@@ -45,7 +45,7 @@ module "preemptible" {
4545

4646
module "regular" {
4747
source = "../../modules/instance_template"
48-
name_prefix = "${var.name_prefix}-preemptible"
48+
name_prefix = "${var.name_prefix}-regular"
4949
project_id = var.project_id
5050
machine_type = var.machine_type
5151
labels = var.labels

test/integration/preemptible_and_regular_instance_templates_simple/controls/simple.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434

3535
describe "kind of templates" do
3636
it "should be #{expected_disks}" do
37-
expect(data[0]['properties']['scheduling']['preemptible']).to be_truthy
38-
expect(data[0]['properties']['scheduling']['automaticRestart']).to be_falsey
37+
expect(data[0]['properties']['scheduling']['preemptible']).to be_falsey
38+
expect(data[0]['properties']['scheduling']['automaticRestart']).to be_truthy
3939
end
4040
end
4141

@@ -90,8 +90,8 @@
9090

9191
describe "kind of templates" do
9292
it "should be #{expected_disks}" do
93-
expect(data[0]['properties']['scheduling']['preemptible']).to be_falsey
94-
expect(data[0]['properties']['scheduling']['automaticRestart']).to be_truthy
93+
expect(data[0]['properties']['scheduling']['preemptible']).to be_truthy
94+
expect(data[0]['properties']['scheduling']['automaticRestart']).to be_falsey
9595
end
9696
end
9797

0 commit comments

Comments
 (0)