Skip to content

Commit 1c7878a

Browse files
authored
Merge pull request #1 from cruxstack/dev
fix: remove spot related tags when spot is disabled
2 parents 927f642 + be27dc4 commit 1c7878a

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,12 @@ jobs:
1111
steps:
1212
- name: Checkout Code
1313
uses: actions/checkout@v3
14+
- name: Setup Terraform
15+
uses: hashicorp/setup-terraform@v3
1416
- name: Terraform Setup
15-
run: |
16-
terraform init
17+
run: terraform init
18+
- name: Terraform Validate
19+
run: terraform validate
1720
- name: Lint Terraform
1821
uses: reviewdog/action-tflint@master
1922
with:

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ module "node" {
6363
max_size = local.instance_capacity.max
6464
max_instance_lifetime = "604800"
6565
wait_for_capacity_timeout = "300s"
66-
tag_specifications_resource_types = ["instance", "volume", "spot-instances-request"]
66+
tag_specifications_resource_types = var.instance_spot.enabled ? ["instance", "volume", "spot-instances-request"] : ["instance", "volume"]
6767

6868
mixed_instances_policy = {
6969
instances_distribution = {

0 commit comments

Comments
 (0)