Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
morga471 committed Mar 13, 2025
1 parent b1c61af commit a3ace69
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 9 deletions.
3 changes: 2 additions & 1 deletion lab/_envcommon/default-versions.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ locals {
cert-manager = "kube-system"
karpenter = "kube-system"
metrics-server = "kube-system"
postgresql = "kube-system"
keylcloak = "kube-system"
istio = "istio-system"
kiali = "istio-system"
grafana = local.telemetry_namespace
k8s-dashboard = local.telemetry_namespace
kiali = local.telemetry_namespace
loki = local.telemetry_namespace
otel = local.telemetry_namespace
prometheus = local.telemetry_namespace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,5 @@ inputs = {
download_dashboards_image_tag = include.root.inputs.download_dashboards_image_tag
init_chown_data_image_tag = include.root.inputs.init_chown_data_image_tag
namespace = include.root.inputs.namespaces["grafana"]
service_name = "grafana"
service_name = "grafana"
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ include "root" {
}

terraform {
source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-k8s-dashboard.git?ref=${include.root.inputs.release_version}"
source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-k8s-dashboard.git?ref=mcmCluster"
extra_arguments "retry_lock" {
commands = get_terraform_commands_that_need_locking()
arguments = ["-lock-timeout=20s"]
Expand All @@ -29,17 +29,27 @@ dependency "eks" {
}
}

dependency "eks_dns" {
config_path = "../eks-dns"
mock_outputs_allowed_terraform_commands = ["init", "plan", "validate", "destroy"]
mock_outputs = {
cluster_domain = "mock.example.com"
oidc_provider_arn = "arn:aws-us-gov:iam::123456789012:oidc-provider/mock"
}
}

inputs = {
# AWS Configuration
account_id = include.root.inputs.aws_account_id
profile = include.root.inputs.aws_profile
region = include.root.inputs.aws_region

# Cluster Configuration
cluster_domain = include.root.inputs.vpc_domain_name
cluster_domain = dependency.eks_dns.outputs.cluster_domain
cluster_name = dependency.eks.outputs.cluster_name

# Dashboard Configuration
service_name = include.root.inputs.dashboard_hostname
k8s_dashboard_version = include.root.inputs.k8s_dashboard_version
namespace = include.root.inputs.namespaces["k8s-dashboard"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ dependency "eks_grafana" {
port_number = "80"
url = "https://grafana.mock.svc.cluster.local:80/"
}
namespace = "grafana"
public_endpoint = {
namespace = "grafana"
public_endpoint = {
hostname = "grafana.mock.lab.csp2.census.gov"
port_number = "80"
url = "https://grafana.mock.lab.csp2.census.gov:80/"
}
secret_name = "grafana"
secret_name = "grafana"
}
}

Expand Down Expand Up @@ -95,8 +95,8 @@ inputs = {
cluster_name = dependency.eks.outputs.cluster_name

# Kiali Configuration
service_name = "kiali"
namespace = include.root.inputs.namespaces["kiali"]
service_name = "kiali"
namespace = include.root.inputs.namespaces["kiali"]
grafana_internal_url = dependency.eks_grafana.outputs.internal_endpoint.url
grafana_namespace = dependency.eks_grafana.outputs.namespace
grafana_secret_name = dependency.eks_grafana.outputs.secret_name
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
include "root" {
path = find_in_parent_folders("root.hcl")
merge_strategy = "deep"
expose = true
}

terraform {
source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-postgresql.git?ref=main"
extra_arguments "retry_lock" {
commands = get_terraform_commands_that_need_locking()
arguments = ["-lock-timeout=20s"]
}
}

dependencies {
paths = [
"../eks",
"../eks-config",
"../eks-dns"
]
}

dependency "eks" {
config_path = "../eks"
mock_outputs_allowed_terraform_commands = ["init", "plan", "validate", "destroy"]
mock_outputs = {
cluster_name = include.root.inputs.cluster_name
oidc_provider_arn = "arn:aws-us-gov:iam::123456789012:oidc-provider/mock"
}
}

dependency "eks_dns" {
config_path = "../eks-dns"
mock_outputs_allowed_terraform_commands = ["init", "plan", "validate", "destroy"]
mock_outputs = {
cluster_domain = "mock.example.com"
oidc_provider_arn = "arn:aws-us-gov:iam::123456789012:oidc-provider/mock"
}
}

inputs = {
# AWS Configuration
account_id = include.root.inputs.aws_account_id
profile = include.root.inputs.aws_profile
region = include.root.inputs.aws_region

# Cluster Configuration
cluster_domain = dependency.eks_dns.outputs.cluster_domain
cluster_name = dependency.eks.outputs.cluster_name

# PostgreSQL Configuration
service_name = include.root.inputs.postgresql_name
postgresql_version = include.root.inputs.postgresql_version

namespace = include.root.inputs.namespaces["postgresql"]
}

0 comments on commit a3ace69

Please sign in to comment.