Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions _sub/compute/eks-heptio/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ resource "local_file" "default-configmap" {
}

resource "null_resource" "enable-workers-default" {
count = var.blaster_configmap_apply ? 0 : 1
count = length(var.blaster_configmap_s3_bucket) > 0 ? 0 : 1

provisioner "local-exec" {
command = "kubectl --kubeconfig ${var.kubeconfig_path} apply -f ${local.path_default_configmap}"
Expand All @@ -43,7 +43,7 @@ resource "null_resource" "enable-workers-default" {
}

resource "null_resource" "enable-workers-from-s3" {
count = var.blaster_configmap_apply ? 1 : 0
count = length(var.blaster_configmap_s3_bucket) > 0 ? 1 : 0

# Terraform does not seem to re-run script, unless a trigger is defined
triggers = {
Expand Down
7 changes: 2 additions & 5 deletions _sub/compute/eks-heptio/vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,10 @@ variable "aws_assume_role_arn" {
type = string
}

variable "blaster_configmap_apply" {
type = bool
default = false
}

variable "blaster_configmap_s3_bucket" {
type = string
description = "The S3 bucket where the blaster configmap is stored. If empty default ConfigMap will be applied. If the bucket or object `var.blaster_configmap_key` specified does not exist, the default ConfigMap will also be used."
type = string
}

variable "blaster_configmap_key" {
Expand Down
1 change: 0 additions & 1 deletion compute/eks-ec2/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,6 @@ module "eks_heptio" {
eks_endpoint = module.eks_cluster.eks_endpoint
eks_certificate_authority = module.eks_cluster.eks_certificate_authority
eks_role_arn = module.eks_workers.worker_role
blaster_configmap_apply = length(var.blaster_configmap_bucket) >= 1 ? true : false
blaster_configmap_s3_bucket = module.blaster_configmap_bucket.bucket_name
blaster_configmap_key = "configmap_${module.eks_heptio.cluster_name}_blaster.yml"
aws_assume_role_arn = var.aws_assume_role_arn
Expand Down