Skip to content

Commit 835bf8f

Browse files
committed
add enable_ha_proxy_service local variable
1 parent e3a880c commit 835bf8f

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
default: help
22

33
.PHONY: terraform-check-tflint
4-
terraform-check-tflint: ## Run 'terraform-check-tflint' github actions with https://github.com/nektos/act
4+
terraform-check-tflint: ## Run 'terraform-check-tflint' workflow with https://github.com/nektos/act
55
act -j terraform-check-tflint
66

77
.PHONY: terraform-check-examples
8-
terraform-check-examples: ## Run specific 'check' github actions with https://github.com/nektos/act
8+
terraform-check-examples: ## Run specific 'check' workflow with https://github.com/nektos/act
99
act -j terraform-check-fmt
1010
act -j terraform-check-variables-tailscale-install-scripts
1111

1212
.PHONY: terraform-fmt
13-
terraform-fmt: ## Run 'terraform-fmt' github actions with https://github.com/nektos/act
13+
terraform-fmt: ## Run 'terraform-fmt' workflow with https://github.com/nektos/act
1414
@terraform fmt -recursive
1515

1616
.PHONY: help

terraform/aws/aws-eks-operator/main.tf

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ locals {
2323
tailscale_oauth_client_id = var.tailscale_oauth_client_id
2424
tailscale_oauth_client_secret = var.tailscale_oauth_client_secret
2525

26-
ha_proxy_service_name = "${helm_release.tailscale_operator.name}-ha"
26+
enable_ha_proxy_service = true
27+
ha_proxy_service_name = "${helm_release.tailscale_operator.name}-ha"
2728
}
2829

2930
# This isn't required but helps avoid conflicts and Let's Encrypt throttling to make testing and iterating easier.
@@ -147,7 +148,8 @@ resource "helm_release" "tailscale_operator" {
147148
# high availability API server proxy to run from other platforms.
148149
#
149150
resource "null_resource" "kubectl_ha_proxy" {
150-
count = 1 # Change to 0 to destroy. Commenting or removing the resource will not run the destroy provisioners.
151+
count = local.enable_ha_proxy_service ? 1 : 0
152+
151153
triggers = {
152154
region = data.aws_region.current.region
153155
cluster_arn = module.eks.cluster_arn

0 commit comments

Comments
 (0)