Skip to content

Commit

Permalink
Merge branch 'temp-app' into feature-app-demo
Browse files Browse the repository at this point in the history
  • Loading branch information
mcgin314 committed Feb 19, 2025
2 parents 836a3c4 + 9aced81 commit fdf48c6
Show file tree
Hide file tree
Showing 25 changed files with 728 additions and 400 deletions.
81 changes: 81 additions & 0 deletions .github/platform-tg-infra.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{
"folders": [
{
"name": "platform-tg-infra",
"path": "../"
},
{
"name": "tfmod-cert-mgr",
"path": "../../tfmod-cert-mgr"
},
{
"name": "tfmod-config-job",
"path": "../../tfmod-config-job"
},
{
"name": "tfmod-custom-iam-role-for-service-account-eks",
"path": "../../tfmod-custom-iam-role-for-service-account-eks"
},
{
"name": "tfmod-eks",
"path": "../../tfmod-eks"
},
{
"name": "tfmod-eks-configuration",
"path": "../../tfmod-eks-configuration"
},
{
"name": "tfmod-eks-dns",
"path": "../../tfmod-eks-dns"
},
{
"name": "tfmod-grafana",
"path": "../../tfmod-grafana"
},
{
"name": "tfmod-istio",
"path": "../../tfmod-istio"
},
{
"name": "tfmod-istio-service-ingress",
"path": "../../tfmod-istio-service-ingress"
},
{
"name": "tfmod-k8s-dashboard",
"path": "../../tfmod-k8s-dashboard"
},
{
"name": "tfmod-karpenter",
"path": "../../tfmod-karpenter"
},
{
"name": "tfmod-kiali",
"path": "../../tfmod-kiali"
},
{
"name": "tfmod-loki",
"path": "../../tfmod-loki"
},
{
"name": "tfmod-metrics-server",
"path": "../../tfmod-metrics-server"
},
{
"name": "tfmod-prometheus",
"path": "../../tfmod-prometheus"
},
{
"name": "tfmod-tempo",
"path": "../../tfmod-tempo"
},
{
"path": "../../terraform-aws-eks"
},
{
"path": "../../karpenter-provider-aws"
},
{
"path": "../../terragrunt"
}
]
}
35 changes: 35 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
.PHONY: help init validate plan fmt check clean

help:
@echo "Available targets:"
@echo " init - Initialize Terragrunt configurations"
@echo " validate - Validate all Terragrunt configurations"
@echo " plan - Run plan in dry-run mode across all configurations"
@echo " fmt - Format HCL files"
@echo " check - Run all checks (format, validate, plan)"
@echo " clean - Clean up Terragrunt cache and temporary files"

init:
@echo "Initializing Terragrunt configurations..."
terragrunt run-all init

validate:
@echo "Validating Terragrunt configurations..."
terragrunt run-all validate

plan:
@echo "Running plan in dry-run mode..."
terragrunt run-all plan --terragrunt-non-interactive

fmt:
@echo "Formatting HCL files..."
find . -type f -name "*.hcl" -exec terragrunt hclfmt {} \;

check: fmt validate plan
@echo "All checks completed"

clean:
@echo "Cleaning Terragrunt cache..."
find . -type d -name ".terragrunt-cache" -exec rm -rf {} +
find . -type f -name ".terraform.lock.hcl" -delete
find . -type f -name "terragrunt-debug.tfvars.json" -delete
2 changes: 0 additions & 2 deletions lab/_envcommon/common-variables.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ locals {
project_role = "csvd_platformbaseline_app"
state_bucket_prefix = "inf-tfstate"
state_table_name = "tf_remote_state"
terraform = true
terragrunt = true
route53_endpoints = {
route53_main = {
"account_id" = "269244441389"
Expand Down
8 changes: 5 additions & 3 deletions lab/_envcommon/default-versions.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ locals {
#####################
cluster_version = "1.31"
custom_service_eks_account = "${local.release_version}"
eks_module_version = "20.31.1"
eks_module_version = "20.33.1"
istio_ingress_version = "${local.release_version}"
release_version = "0.1.1"
release_version = "main" # change to main when testing updated modules

#####################
# TF Providers
Expand Down Expand Up @@ -47,14 +47,16 @@ locals {
################
# Istio
################
istio_version = "1.24.2"
istio_namespace = "istio-system"
istio_version = "1.24.2"

################
# Grafana
################
download_dashboards_image_tag = "7.85.0"
grafana_chart_version = "8.8.5"
grafana_hostname = "grafana"
grafana_namespace = "grafana"
grafana_tag = "11.4.0"
init_chown_data_image_tag = "1.31.1"

Expand Down
24 changes: 0 additions & 24 deletions lab/_envcommon/helm-provider.hcl

This file was deleted.

22 changes: 0 additions & 22 deletions lab/_envcommon/kube-provider.hcl

This file was deleted.

23 changes: 15 additions & 8 deletions lab/development/us-gov-east-1/vpc/platform-eng-eks-mcm/cluster.hcl
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
# lab/development/us-gov-east-1/vpc/platform-eng-eks-mcm/cluster.hcl

# Set cluster specific variables. These are automatically pulled in to configure the remote state bucket in the root
# terragrunt.hcl configuration.
locals {
# Cluster specific configuration
cluster_endpoint_public_access = true
cluster_name = "platform-eng-eks-mcm"
created_reason = "Terragrunt Development for CICD Delivered EKS Platform"
creator = "matthew.c.morgan@census.gov"
cluster_mailing_list = "matthew.c.morgan@census.gov"
eks_instance_disk_size = 100
eks_ng_desired_size = 2
eks_ng_max_size = 10
eks_ng_min_size = 0
enable_cluster_creator_admin_permissions = true
terraform = true
terragrunt = true
tags = {
"slim:schedule" = "8:00-17:00"
"cluster:size" = "min:${local.eks_ng_min_size}-max:${local.eks_ng_max_size}-desired:${local.eks_ng_desired_size}"
}

# Common configuration
common_retry_args = {
commands = get_terraform_commands_that_need_locking()
arguments = ["-lock-timeout=20m"]
}

common_dependencies = ["../eks", "../eks-config"]

common_mock_eks = {
cluster_name = "mock-cluster"
oidc_provider_arn = "arn:aws-us-gov:iam::123456789012:oidc-provider/mock"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,51 @@ include "root" {

terraform {
source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-cert-mgr.git?ref=${include.root.inputs.release_version}"

extra_arguments "retry_lock" {
commands = get_terraform_commands_that_need_locking()
arguments = ["-lock-timeout=20m"]
}
}

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

dependency "eks" {
config_path = "../eks"
config_path = "../eks"
mock_outputs_allowed_terraform_commands = ["init", "plan", "validate", "destroy"]

mock_outputs = {
cluster_name = "a-cluster-name"
oidc_provider_arn = "arn:aws-us-gov:iam::111111111111:oidc-provider/oidc.eks.us-gov-east-1.amazonaws.com/id/0000000000000000AAAAAAAAAAAAAAAA"
cluster_name = include.root.inputs.cluster_name
oidc_provider_arn = "arn:aws-us-gov:iam::123456789012:oidc-provider/mock"
cluster_endpoint = "https://mock-endpoint.eks.amazonaws.com"
cluster_version = include.root.inputs.cluster_version
}
}

dependency "eks_config" {
config_path = "../eks-config"
skip_outputs = true
}

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_name = dependency.eks.outputs.cluster_name
cluster_mailing_list = include.root.inputs.cluster_mailing_list
oidc_provider_arn = dependency.eks.outputs.oidc_provider_arn

# Cert Manager Configuration
cert_manager_helm_chart = include.root.inputs.cert_manager_helm_chart
cluster_issuer_name = include.root.inputs.cluster_issuer_name

# Version Tags
cert_manager_cainjector_tag = include.root.inputs.cert_manager_cainjector_tag
cert_manager_controller_tag = include.root.inputs.cert_manager_controller_tag
cert_manager_helm_chart = include.root.inputs.cert_manager_helm_chart
cert_manager_startupapicheck_tag = include.root.inputs.cert_manager_startupapicheck_tag
cert_manager_webhook_tag = include.root.inputs.cert_manager_webhook_tag
cluster_issuer_name = include.root.inputs.cluster_issuer_name
cluster_mailing_list = dependency.eks.inputs.creator
cluster_name = dependency.eks.outputs.cluster_name
oidc_provider_arn = dependency.eks.outputs.oidc_provider_arn
profile = include.root.inputs.aws_profile
region = include.root.inputs.aws_region
release_version = include.root.inputs.release_version
}
Loading

0 comments on commit fdf48c6

Please sign in to comment.