Skip to content

Commit

Permalink
standardize modules
Browse files Browse the repository at this point in the history
  • Loading branch information
morga471 committed Feb 13, 2025
1 parent 3327a11 commit a0623bb
Show file tree
Hide file tree
Showing 12 changed files with 186 additions and 94 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ include "root" {
expose = true
}

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",
Expand All @@ -17,33 +26,28 @@ dependency "eks" {
mock_outputs_allowed_terraform_commands = ["init", "plan", "validate", "destroy"]

mock_outputs = {
cluster_name = "mock-cluster"
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 = "1.27"
}
}

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"]
cluster_version = include.root.inputs.cluster_version
}
}

inputs = {
# Core configuration
# AWS Configuration
profile = include.root.inputs.aws_profile
region = include.root.inputs.aws_region

# Cluster Configuration
cluster_name = dependency.eks.outputs.cluster_name
oidc_provider_arn = dependency.eks.outputs.oidc_provider_arn
cluster_mailing_list = include.root.inputs.cluster_mailing_list
oidc_provider_arn = dependency.eks.outputs.oidc_provider_arn

# Cert-manager configuration
# 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
# Version Configuration
cert_manager_cainjector_tag = include.root.inputs.cert_manager_cainjector_tag
cert_manager_controller_tag = include.root.inputs.cert_manager_controller_tag
cert_manager_startupapicheck_tag = include.root.inputs.cert_manager_startupapicheck_tag
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,18 @@ dependency "eks" {
}

inputs = {
# Core cluster configuration
cluster_name = dependency.eks.outputs.cluster_name
vpc_id = dependency.eks.outputs.vpc_id
subnets = dependency.eks.outputs.subnets
security_group_all_worker_mgmt_id = dependency.eks.outputs.security_group_all_worker_mgmt_id
eks_managed_node_groups_autoscaling_group_names = dependency.eks.outputs.eks_managed_node_groups_autoscaling_group_names

# AWS configuration
# AWS Configuration
profile = include.root.inputs.aws_profile
region = include.root.inputs.aws_region

# Additional configurations
oidc_provider_arn = dependency.eks.outputs.oidc_provider_arn
# Core Cluster Configuration
cluster_name = dependency.eks.outputs.cluster_name
eks_managed_node_groups_autoscaling_group_names = dependency.eks.outputs.eks_managed_node_groups_autoscaling_group_names
oidc_provider_arn = dependency.eks.outputs.oidc_provider_arn
security_group_all_worker_mgmt_id = dependency.eks.outputs.security_group_all_worker_mgmt_id
subnets = dependency.eks.outputs.subnets
vpc_id = dependency.eks.outputs.vpc_id

# Additional Configuration
kubectl_image_tag = include.root.inputs.kubectl_image_tag
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ dependency "eks" {
config_path = "../eks"
mock_outputs_allowed_terraform_commands = ["init", "plan", "validate", "destroy"]
mock_outputs = {
subnets = ["subnet-00000000000000001", "subnet-00000000000000002", "subnet-00000000000000003"]
cluster_name = include.root.inputs.cluster_name
subnets = ["subnet-mock1", "subnet-mock2", "subnet-mock3"]
}
}

Expand All @@ -25,23 +26,35 @@ dependency "istio" {
mock_outputs_allowed_terraform_commands = ["init", "plan", "validate", "destroy"]
mock_outputs = {
istio_ingress_lb = {
dns_name = "a1111111111111111111111111111111-2bbbbbbbbbbbbbbb.elb.us-gov-east-1.amazonaws.com"
zone_id = "ZABC123456DEF"
dns_name = "mock-${include.root.inputs.cluster_name}.elb.amazonaws.com"
zone_id = "MOCKZONEID"
}
}
}

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

inputs = {
cluster_name = dependency.eks.inputs.cluster_name
# 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 = include.root.inputs.cluster_name

# Network Configuration
istio_ingress_lb = dependency.istio.outputs.istio_ingress_lb
profile = dependency.eks.inputs.aws_profile
region = dependency.eks.inputs.aws_region
route53_endpoints = dependency.eks.inputs.route53_endpoints
subnets = dependency.eks.outputs.subnets
tags = dependency.eks.inputs.tags
vpc_domain_name = dependency.eks.inputs.vpc_domain_name
vpc_name = dependency.eks.inputs.vpc_name
route53_endpoints = include.root.inputs.route53_endpoints
subnets = dependency.eks.outputs.subnets
vpc_domain_name = include.root.inputs.vpc_domain_name
vpc_name = include.root.inputs.vpc_name

# Additional Configuration
tags = include.root.inputs.tags
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ dependency "eks" {
mock_outputs = {
cluster_name = "mock-cluster"
oidc_provider_arn = "arn:aws-us-gov:iam::123456789012:oidc-provider/mock"
cluster_version = "1.27"
cluster_version = include.root.inputs.cluster_version
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,41 @@ include "root" {
expose = true
}

terraform {
source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-istio.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"]
paths = [
"../eks",
"../eks-config"
]
}

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

terraform {
source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-istio.git?ref=${include.root.inputs.release_version}"
extra_arguments "retry_lock" {
commands = get_terraform_commands_that_need_locking()
arguments = ["-lock-timeout=20m"]
}
}

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
oidc_provider_arn = dependency.eks.outputs.oidc_provider_arn
istio_version = include.root.inputs.istio_version
istio_namespace = include.root.inputs.istio_namespace

# Istio Configuration
istio_namespace = include.root.inputs.istio_namespace
istio_version = include.root.inputs.istio_version
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ include "root" {
}

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

dependency "eks" {
Expand All @@ -26,6 +29,9 @@ terraform {
}

inputs = {
cluster_name = dependency.eks.outputs.cluster_name
# Cluster Configuration
cluster_name = dependency.eks.outputs.cluster_name

# Dashboard Configuration
k8s_dashboard_version = include.root.inputs.k8s_dashboard_version
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ include "root" {
}

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

dependency "eks" {
Expand All @@ -26,7 +30,15 @@ terraform {
}

inputs = {
cluster_name = dependency.eks.outputs.cluster_name
kiali_version = include.root.inputs.kiali_version
# 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

# Kiali Configuration
istio_namespace = include.root.inputs.istio_namespace
kiali_version = include.root.inputs.kiali_version
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,17 @@ include "root" {
}

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

dependency "eks" {
config_path = "../eks"
mock_outputs_allowed_terraform_commands = ["init", "plan", "validate", "destroy"]
mock_outputs = {
cluster_name = "mock-cluster"
cluster_name = include.root.inputs.cluster_name
oidc_provider_arn = "arn:aws-us-gov:iam::123456789012:oidc-provider/mock"
}
}
Expand All @@ -26,8 +29,16 @@ terraform {
}

inputs = {
cluster_name = dependency.eks.outputs.cluster_name
# 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

# Loki Configuration
loki_version = include.root.inputs.loki_version
storage_class = include.root.inputs.storage_class
retention_days = include.root.inputs.loki_retention_days
storage_class = include.root.inputs.storage_class
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ include "root" {
}

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

dependency "eks" {
Expand All @@ -25,6 +28,14 @@ terraform {
}

inputs = {
cluster_name = dependency.eks.outputs.cluster_name
# 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

# Metrics Server Configuration
metrics_server_version = include.root.inputs.metrics_server_version
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,42 @@ include "root" {
expose = true
}

terraform {
source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-prometheus.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"]
paths = [
"../eks",
"../eks-config"
]
}

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

terraform {
source = "git@github.e.it.census.gov:SCT-Engineering/tfmod-prometheus.git?ref=${include.root.inputs.release_version}"
extra_arguments "retry_lock" {
commands = get_terraform_commands_that_need_locking()
arguments = ["-lock-timeout=20m"]
}
}

inputs = {
cluster_name = dependency.eks.outputs.cluster_name
oidc_provider_arn = dependency.eks.outputs.oidc_provider_arn
# 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
oidc_provider_arn = dependency.eks.outputs.oidc_provider_arn

# Prometheus Configuration
prometheus_version = include.root.inputs.prometheus_version
storage_class = include.root.inputs.storage_class
retention_days = include.root.inputs.prometheus_retention_days
retention_days = include.root.inputs.prometheus_retention_days
storage_class = include.root.inputs.storage_class
}
Loading

0 comments on commit a0623bb

Please sign in to comment.