Skip to content

Commit

Permalink
Fix provider error.
Browse files Browse the repository at this point in the history
  • Loading branch information
Prashant Tiwari committed Jan 8, 2024
1 parent 30d0e5b commit 433e9cb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/_nebari/stages/kubernetes_initialize/template/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ module "nvidia-driver-installer" {
}

module "tagging" {
count = var.cloud_provider == "aws" ? 1 : 0
source = "./modules/tagging"
cluster_name = local.cluster_name
cloud_provider = var.cloud_provider
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
data "aws_eks_node_group" "user" {
count = var.cloud_provider == "aws" ? 1 : 0
cluster_name = var.cluster_name
node_group_name = "user"
}
Expand All @@ -7,7 +8,9 @@ resource "aws_autoscaling_group_tag" "dedicated_user" {
for_each = toset(
[for asg in flatten(
[for resources in data.aws_eks_node_group.user.resources : resources.autoscaling_groups]
) : asg.name]
) : asg.name
if var.cloud_provider == "aws" ? 1 : 0
]
)
autoscaling_group_name = each.value
tag {
Expand All @@ -21,6 +24,7 @@ resource "aws_autoscaling_group_tag" "dedicated_user" {
}

data "aws_eks_node_group" "worker" {
count = var.cloud_provider == "aws" ? 1 : 0
cluster_name = var.cluster_name
node_group_name = "worker"
}
Expand All @@ -29,7 +33,9 @@ resource "aws_autoscaling_group_tag" "dedicated_worker" {
for_each = toset(
[for asg in flatten(
[for resources in data.aws_eks_node_group.worker.resources : resources.autoscaling_groups]
) : asg.name]
) : asg.name
if var.cloud_provider == "aws" ? 1 : 0
]
)
autoscaling_group_name = each.value
tag {
Expand Down

0 comments on commit 433e9cb

Please sign in to comment.