Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
morga471 committed Jul 30, 2024
1 parent 9db34fb commit c14c820
Show file tree
Hide file tree
Showing 13 changed files with 52 additions and 65 deletions.
4 changes: 2 additions & 2 deletions lab/us-gov-east-1/vpc/_mcmCluster/common_vars.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ locals {
####################################################
# Information about the VPC in which artifacts are being created

vpc_name = "vpc3-lab-dev"
vpc_name = "vpc3-lab-dev"

####################################################
## EKS Configuration
####################################################
Expand Down
27 changes: 11 additions & 16 deletions lab/us-gov-east-1/vpc/_mcmCluster/eks-cert-manager/terragrunt.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,19 @@ dependency "eks" {
config_path = "../eks"
}
dependency "eks-config" {
config_path = "../eks-config"
skip_outputs = true
}
dependency "eks-istio" {
config_path = "../eks-istio"
skip_outputs = true
config_path = "../eks-config"
}

inputs = {
cluster_name = dependency.eks.inputs.cluster_name
cluster_mailing_list = dependency.eks.inputs.creator
oidc_provider_arn = dependency.eks.outputs.oidc_provider_arn
profile = dependency.eks.inputs.profile
region = dependency.eks.inputs.region
cert_manager-helm_chart = "1.15.1"
cert_manager-cainjector_tag = "v1.15.1"
cert_manager-controller_tag = "v1.15.1"
cluster_name = dependency.eks.inputs.cluster_name
cluster_mailing_list = dependency.eks.inputs.creator
oidc_provider_arn = dependency.eks.outputs.oidc_provider_arn
profile = dependency.eks.inputs.profile
region = dependency.eks.inputs.region
cert_manager-helm_chart = "1.15.1"
cert_manager-cainjector_tag = "v1.15.1"
cert_manager-controller_tag = "v1.15.1"
cert_manager-startupapicheck_tag = "v1.15.1"
cert_manager-webhook_tag = "v1.15.1"
namespace = "cert-manager"
cert_manager-webhook_tag = "v1.15.1"
namespace = "cert-manager"
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ dependency "eks-config" {
}

inputs = {
cluster_name = dependency.eks.inputs.cluster_name
cluster_name = dependency.eks.inputs.cluster_name
tag_costallocation = local.tag_costallocation
oidc_provider_arn = dependency.eks.outputs.oidc_provider_arn
region = dependency.eks.inputs.region
profile = dependency.eks.inputs.profile
oidc_provider_arn = dependency.eks.outputs.oidc_provider_arn
region = dependency.eks.inputs.region
profile = dependency.eks.inputs.profile
}
6 changes: 3 additions & 3 deletions lab/us-gov-east-1/vpc/_mcmCluster/eks-config/terragrunt.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ dependency "eks-karpenter" {
}

inputs = {
profile = dependency.eks.inputs.profile
vpc_id = dependency.eks.outputs.vpc_id
cluster_name = dependency.eks.inputs.cluster_name
profile = dependency.eks.inputs.profile
vpc_id = dependency.eks.outputs.vpc_id
cluster_name = dependency.eks.inputs.cluster_name
# cluster_autoscaler_role_name = dependency.eks.outputs.cluster_autoscaler_role_name
subnets = dependency.eks.outputs.subnets
security_group_all_worker_mgmt_id = dependency.eks.outputs.security_group_all_worker_mgmt_id
Expand Down
10 changes: 5 additions & 5 deletions lab/us-gov-east-1/vpc/_mcmCluster/eks-grafana/terragrunt.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ dependency "eks-cert-manager" {
}

inputs = {
profile = dependency.eks.inputs.profile
cluster_name = dependency.eks.inputs.cluster_name
region = dependency.eks.inputs.region
cluster_domain = dependency.eks.inputs.vpc_domain_name
profile = dependency.eks.inputs.profile
cluster_name = dependency.eks.inputs.cluster_name
region = dependency.eks.inputs.region
cluster_domain = dependency.eks.inputs.vpc_domain_name
# datasources = dependency.eks-loki.outputs.gateway_internal_endpoint
rwo_storage_class = dependency.eks-loki.outputs.rwo_storage_class
rwo_storage_class = dependency.eks-loki.outputs.rwo_storage_class
}
6 changes: 3 additions & 3 deletions lab/us-gov-east-1/vpc/_mcmCluster/eks-istio/terragrunt.hcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include "root" {
path = find_in_parent_folders()
path = find_in_parent_folders()
}

terraform {
Expand All @@ -14,10 +14,10 @@ dependency "eks" {
config_path = "../eks"
}
dependency "eks-config" {
config_path = "../eks-config"
config_path = "../eks-config"
}
dependency "eks-cert-manager" {
config_path = "../eks-cert-manager"
config_path = "../eks-cert-manager"
}

inputs = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ dependency "eks" {
}

inputs = {
profile = dependency.eks.inputs.profile
profile = dependency.eks.inputs.profile
cluster_endpoint = dependency.eks.outputs.cluster_endpoint
cluster_name = dependency.eks.inputs.cluster_name
karpenter_node_group_name = dependency.eks.outputs.node_group_name
Expand Down
9 changes: 9 additions & 0 deletions lab/us-gov-east-1/vpc/_mcmCluster/eks-kiali/terragrunt.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ dependency "eks" {
dependency "eks-config" {
config_path = "../eks-config"
}
dependency "eks-loki" {
config_path = "../eks-loki"
}
dependency "eks-grafana" {
config_path = "../eks-grafana"
}
dependency "eks-prometheus" {
config_path = "../eks-prometheus"
}

inputs = {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ dependency "eks-loki" {
}

inputs = {
profile = dependency.eks.inputs.profile
profile = dependency.eks.inputs.profile
cluster_name = dependency.eks.inputs.cluster_name
region = dependency.eks.inputs.region
region = dependency.eks.inputs.region
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ dependency "eks" {
dependency "eks-config" {
config_path = "../eks-config"
}
dependency "eks-loki" {
config_path = "../eks-loki"
}

inputs = {
profile = dependency.eks.inputs.profile
Expand Down
3 changes: 3 additions & 0 deletions lab/us-gov-east-1/vpc/_mcmCluster/eks-tempo/terragrunt.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ dependency "eks" {
dependency "eks-config" {
config_path = "../eks-config"
}
dependency "eks-loki" {
config_path = "../eks-loki"
}

inputs = {

Expand Down
12 changes: 6 additions & 6 deletions lab/us-gov-east-1/vpc/_mcmCluster/eks/terragrunt.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ include "root" {

locals {
account_vars = read_terragrunt_config(find_in_parent_folders("account.hcl"))
region_vars = read_terragrunt_config(find_in_parent_folders("region.hcl"))
region_vars = read_terragrunt_config(find_in_parent_folders("region.hcl"))
# In which AWS region are operations being performed
account_id = local.account_vars.locals.aws_account_id
account_id = local.account_vars.locals.aws_account_id
vpc_name = "vpc3-lab-dev"
cluster_name = "platform-eng-eks-mcm"
cluster_version = "1.30"
vpc_domain_name = "dev.lab.csp2.census.gov"
vpc_domain_name = "dev.lab.csp2.census.gov"
eks_instance_disk_size = 100
eks_vpc_name = "vpc3-lab-dev"
eks_ng_desired_size = 3
Expand Down Expand Up @@ -62,7 +62,7 @@ terraform {
}

inputs = {
aws_account_id = local.account_id
aws_account_id = local.account_id
profile = local.profile
vpc_name = local.eks_vpc_name
cluster_name = local.cluster_name
Expand All @@ -81,6 +81,6 @@ inputs = {
vcp_domain_name = local.vpc_domain_name
region = local.region
creator = local.cluster_mailing_list
os_username = local.cluster_mailing_list
shared_vpc_label = "dev"
os_username = local.cluster_mailing_list
shared_vpc_label = "dev"
}
23 changes: 0 additions & 23 deletions lab/us-gov-east-1/vpc/_mcmCluster/terragrunt.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ locals {
project_number = "fs0000000078"
project_role = "csvd_platformbaseline_mcm"
region = local.region_vars.locals.aws_region
_module_providers = []
}

generate "provider" {
Expand Down Expand Up @@ -54,28 +53,6 @@ provider "aws" {
allowed_account_ids = ["${local.account_id}"]
}
%{if contains(local._module_providers, "kubernetes") || contains(local._module_providers, "helm")}
data "aws_eks_cluster" "cluster" {
name = "${local.config.cluster_name}"
}
data "aws_eks_cluster_auth" "cluster" {
name = "${local.config.cluster_name}"
}
provider "kubernetes" {
host = data.aws_eks_cluster.cluster.endpoint
cluster_ca_certificate = base64decode(data.aws_eks_cluster.cluster.certificate_authority[0].data)
token = data.aws_eks_cluster_auth.cluster.token
}
%{endif}
%{if contains(local._module_providers, "helm")}
provider "helm" {
kubernetes {
host = data.aws_eks_cluster.cluster.endpoint
cluster_ca_certificate = base64decode(data.aws_eks_cluster.cluster.certificate_authority[0].data)
token = data.aws_eks_cluster_auth.cluster.token
}
}
%{endif}
EOF
}

Expand Down

0 comments on commit c14c820

Please sign in to comment.