-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Phase 1 Implementation: Simplify module interface and consolidate naming - Created defaults.tf with centralized module defaults - Updated variables.tf to remove redundant variables (repository_template, etc.) - Fixed main.tf to pass local values to templates instead of hardcoded defaults - Updated locals.tf to use new simplified variable structure - Fixed validation errors and template variable references - Updated examples to demonstrate simplified user interface - Consolidated repository and cluster naming to single 'name' variable - Hidden implementation complexity from users per call notes discussion Implements Phase 1 of callnotes-09152025 implementation plan. Ready for Phase 2: eks-clusters-workspace creation. * updating * udpating stuff and things * current --------- Co-authored-by: Your Name <user@example.com> Co-authored-by: Matthew C. Morgan <matthew.c.morgan@census.gov>
- Loading branch information
1 parent
d0abbb6
commit 71d5719
Showing
16 changed files
with
410 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| # defaults.tf - Default values for module configuration | ||
| # These values should not be exposed to users but are used internally by templates | ||
|
|
||
| locals { | ||
| # Dynamic AWS profile generation | ||
| aws_profile = "${var.cluster_config.account_name}-${var.cluster_config.environment_abbr}" | ||
|
|
||
| # Static template values (hidden from users) | ||
| repository_defaults = { | ||
| template = "template-eks-cluster" | ||
| template_owner = "SCT-Engineering" | ||
| } | ||
|
|
||
| # Static EKS configuration for Karpenter bootstrap node group | ||
| eks_defaults = { | ||
| instance_disk_size = 200 | ||
| ng_desired_size = 3 | ||
| ng_max_size = 10 | ||
| ng_min_size = 3 | ||
| enable_cluster_creator_admin_permissions = true | ||
| } | ||
|
|
||
| # Organization settings - now configurable through finops variable | ||
| organization_defaults = { | ||
| finops_project_name = var.finops.project_name | ||
| finops_project_number = var.finops.project_number | ||
| finops_project_role = var.finops.project_role | ||
| } | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule eks_deployment.github_repo
updated
from b6b6cb to 550560
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| {"Modules":[{"Key":"","Source":"","Dir":"."},{"Key":"eks_deployment","Source":"../..","Dir":"../.."},{"Key":"eks_deployment.github_repo","Source":"registry.terraform.io/HappyPathway/repo/github","Version":"1.0.83","Dir":".terraform/modules/eks_deployment.github_repo"}]} | ||
| {"Modules":[{"Key":"","Source":"","Dir":"."},{"Key":"eks_deployment","Source":"../..","Dir":"../.."},{"Key":"eks_deployment.github_repo","Source":"git::ssh://git@github.e.it.census.gov/CSVD/terraform-github-repo.git","Dir":".terraform/modules/eks_deployment.github_repo"}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,62 @@ | ||
| [ | ||
| { | ||
| "commit_hash": "2d1a9976c65f53b370b4a3ff0829394449127d5a", | ||
| "commit_message": "Fix formatting of runs-on value in GitHub Actions workflow", | ||
| "author": "Your Name", | ||
| "timestamp": "2025-09-04T13:49:32.940158" | ||
| }, | ||
| { | ||
| "commit_hash": "2d1a9976c65f53b370b4a3ff0829394449127d5a", | ||
| "commit_message": "Fix formatting of runs-on value in GitHub Actions workflow", | ||
| "author": "Your Name", | ||
| "timestamp": "2025-09-04T13:52:48.384810" | ||
| }, | ||
| { | ||
| "commit_hash": "2d1a9976c65f53b370b4a3ff0829394449127d5a", | ||
| "commit_message": "Fix formatting of runs-on value in GitHub Actions workflow", | ||
| "author": "Your Name", | ||
| "timestamp": "2025-09-04T14:36:08.594715" | ||
| }, | ||
| { | ||
| "commit_hash": "2d1a9976c65f53b370b4a3ff0829394449127d5a", | ||
| "commit_message": "Fix formatting of runs-on value in GitHub Actions workflow", | ||
| "author": "Your Name", | ||
| "timestamp": "2025-09-04T15:59:08.094373" | ||
| }, | ||
| { | ||
| "commit_hash": "94a518393002dd67ec0a178aee46323921889767", | ||
| "commit_message": "Refactor README and ROADMAP for clarity; update Terraform configurations and remove deprecated variables", | ||
| "author": "Your Name", | ||
| "timestamp": "2025-09-05T13:52:50.300053" | ||
| }, | ||
| { | ||
| "commit_hash": "94a518393002dd67ec0a178aee46323921889767", | ||
| "commit_message": "Refactor README and ROADMAP for clarity; update Terraform configurations and remove deprecated variables", | ||
| "author": "Your Name", | ||
| "timestamp": "2025-09-05T13:57:43.873358" | ||
| }, | ||
| { | ||
| "commit_hash": "94a518393002dd67ec0a178aee46323921889767", | ||
| "commit_message": "Refactor README and ROADMAP for clarity; update Terraform configurations and remove deprecated variables", | ||
| "author": "Your Name", | ||
| "timestamp": "2025-09-08T13:08:10.570707" | ||
| }, | ||
| { | ||
| "commit_hash": "94a518393002dd67ec0a178aee46323921889767", | ||
| "commit_message": "Refactor README and ROADMAP for clarity; update Terraform configurations and remove deprecated variables", | ||
| "author": "Your Name", | ||
| "timestamp": "2025-09-10T15:25:49.548237" | ||
| }, | ||
| { | ||
| "commit_hash": "1694ff2abd5271962c65bf1a8798c15cfdcd0af9", | ||
| "commit_message": "Update main.tf", | ||
| "author": "David John Arnold Jr", | ||
| "timestamp": "2025-09-10T17:11:02.705468" | ||
| }, | ||
| { | ||
| "commit_hash": "1694ff2abd5271962c65bf1a8798c15cfdcd0af9", | ||
| "commit_message": "Update main.tf", | ||
| "author": "David John Arnold Jr", | ||
| "timestamp": "2025-09-10T17:17:55.685167" | ||
| } | ||
| ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| data "aws_secretsmanager_secret_version" "github_token" { | ||
| secret_id = "/eks-cluster-deployment/github_token" | ||
| } | ||
|
|
||
| provider "github" { | ||
| token = data.aws_secretsmanager_secret_version.github_token.secret_string | ||
| } | ||
|
|
||
| module "eks_deployment" { | ||
| source = "../../" | ||
|
|
||
| # Repository and cluster configuration - single name for both | ||
| name = "mojo-cubestr-dev" | ||
| environment = "dev" | ||
| region = "us-gov-east-1" | ||
|
|
||
| # Cluster configuration - simplified interface | ||
| cluster_config = { | ||
| account_name = "ma6-gov" | ||
| aws_account_id = "252960665057" | ||
| cluster_mailing_list = "adep.mojo.development.list@census.gov" | ||
| environment_abbr = "dev" | ||
| finops_project_name = "PPSI_DICE" | ||
| finops_project_number = "fs0000000015" | ||
| finops_project_role = "dice:dev:mojo" | ||
| vpc_domain_name = "dev.dice.census.gov" | ||
| vpc_name = "vpc2-dice-dev" | ||
| tags = { | ||
| Owner = "PETeam" | ||
| Environment = "Development" | ||
| CostCenter = "fs0000000015" | ||
| } | ||
| organization = "census:ocio:dice" | ||
| } | ||
| } | ||
|
|
||
| output "repository_url" { | ||
| description = "URL of the created GitHub repository" | ||
| value = module.eks_deployment.repository_url | ||
| } | ||
|
|
||
| output "ssh_clone_url" { | ||
| description = "SSH clone URL of the repository" | ||
| value = module.eks_deployment.ssh_clone_url | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| provider "aws" { | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| data "aws_secretsmanager_secret_version" "github_token" { | ||
| secret_id = "/eks-cluster-deployment/github_token" | ||
| } | ||
|
|
||
| provider "github" { | ||
| token = data.aws_secretsmanager_secret_version.github_token.secret_string | ||
| } | ||
|
|
||
| module "eks_deployment" { | ||
| source = "../../" | ||
|
|
||
| # Repository and cluster configuration - single name for both | ||
| name = "ois-misp-prod" | ||
| environment = "prod" | ||
| region = "us-gov-east-1" | ||
|
|
||
| # Cluster configuration - simplified interface | ||
| cluster_config = { | ||
| account_name = "ois-misp-prod-gov" | ||
| aws_account_id = "399570725053" | ||
| cluster_mailing_list = "ois.misp.list@census.gov" | ||
| environment_abbr = "prod" | ||
| finops_project_name = "OIS_MISP" | ||
| finops_project_number = "fs0000000102" | ||
| finops_project_role = "OIS_MISP_APP" | ||
| vpc_domain_name = "shared.inf.csp1.census.gov" | ||
| vpc_name = "vpc2-inf-shared" | ||
| tags = { | ||
| Owner = "ois.misp.list@census.gov" | ||
| Environment = "production" | ||
| CostCenter = "ocio:ois-misp" | ||
| } | ||
| organization = "census:ocio:ois" | ||
| } | ||
| } | ||
|
|
||
| output "repository_url" { | ||
| description = "URL of the created GitHub repository" | ||
| value = module.eks_deployment.repository_url | ||
| } | ||
|
|
||
| output "ssh_clone_url" { | ||
| description = "SSH clone URL of the repository" | ||
| value = module.eks_deployment.ssh_clone_url | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| provider "aws" { | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| {} |
Oops, something went wrong.