Skip to content

Commit

Permalink
Format terraform
Browse files Browse the repository at this point in the history
  • Loading branch information
Rafael Mendes Pereira committed Oct 17, 2024
1 parent f142fac commit ea60f34
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions modules/terraform/aws/eks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ resource "aws_eks_cluster" "eks" {
]

tags = {
"role" = local.role
}
"role" = local.role
}
}

resource "aws_eks_node_group" "eks_managed_node_groups" {
Expand Down Expand Up @@ -135,7 +135,7 @@ module "karpenter" {
cluster_name = aws_eks_cluster.eks.name
region = var.region
tags = var.tags
cluster_iam_role_name = aws_iam_role.eks_cluster_role.name
cluster_iam_role_name = aws_iam_role.eks_cluster_role.name

depends_on = [aws_eks_node_group.eks_managed_node_groups]
}
10 changes: 5 additions & 5 deletions modules/terraform/aws/main.tf
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
locals {
region = lookup(var.json_input, "region", "us-east-1")
run_id = lookup(var.json_input, "run_id", "123456")
region = lookup(var.json_input, "region", "us-east-1")
run_id = lookup(var.json_input, "run_id", "123456")
current_time = lookup(var.json_input, "current_time")

non_computed_tags = {
# Note: Define only non computed values (i.e. values that do not change for each resource). This is required due to a limitation at "aws" provider default_tags.
"owner" = var.owner # note: MUST NOT REMOVE (it's used for resources accountability and cost tracking)
"owner" = var.owner # note: MUST NOT REMOVE (it's used for resources accountability and cost tracking)
"scenario" = "${var.scenario_type}-${var.scenario_name}"
"creation_time" = local.current_time # note: should not use timestamp() since it is a computed value
"deletion_due_time" = timeadd(local.current_time, var.deletion_delay) # note: MUST NOT BE REMOVED (it's used by the garbage collector)
"creation_time" = local.current_time # note: should not use timestamp() since it is a computed value
"deletion_due_time" = timeadd(local.current_time, var.deletion_delay) # note: MUST NOT BE REMOVED (it's used by the garbage collector)
"run_id" = local.run_id
}

Expand Down
4 changes: 2 additions & 2 deletions modules/terraform/aws/variables.tf
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
variable "json_input" {
description = "value of the json input"
type = object({
run_id = string
region = string
run_id = string
region = string
current_time = string
})

Expand Down

0 comments on commit ea60f34

Please sign in to comment.