Initial commit.
This commit is contained in:
40
infra/eks-aws-auth/.terraform.lock.hcl
generated
Normal file
40
infra/eks-aws-auth/.terraform.lock.hcl
generated
Normal file
@ -0,0 +1,40 @@
|
||||
# This file is maintained automatically by "terraform init".
|
||||
# Manual edits may be lost in future updates.
|
||||
|
||||
provider "registry.terraform.io/hashicorp/aws" {
|
||||
version = "4.4.0"
|
||||
constraints = "~> 4.4.0"
|
||||
hashes = [
|
||||
"h1:xUXge6/Bn/CzSjZpmQIr7/FwANKj+3cIEnxYlgS1xFo=",
|
||||
"zh:087e8e1b9c3d2c9d547181aa88f75fd42d9800eea6d37c0276b1208c427113ff",
|
||||
"zh:25c3deac14f06a7da5d4d8b56dd5e25a24b5c3bb6bb7a585145d7df1a6e5bc3f",
|
||||
"zh:5bd23fc03cd51eca3f1e4e4414624dcc4f075eca5cf5aabf06b54b4edded5c50",
|
||||
"zh:8399507975a422a84b93b24c07db34cc9342f54aa693eace1b451c6b1ab54b87",
|
||||
"zh:9618bed0832433fee57579d4a001479b08e2092d0c08539edb897f57f6ea0114",
|
||||
"zh:b0b9060bc367c5fb6175c7ae59382fd6107ab0c0bad6e40cd3205127d8e6717d",
|
||||
"zh:b160122057659cceb72f78a86483f71d59742502dad23b770dc4248b8e94edd4",
|
||||
"zh:cb927f4622ef9bf439b867aef760c948839e1cec2ddb8bdba7abfc5183124360",
|
||||
"zh:e37ce5054a5838eda190f286a62eeb7146087863e38b1a205aa0eb12a5e765b9",
|
||||
"zh:e38856fd703b2f6e08a35cbe5ddab9a734c9608d2372411bfa6ef1b05ffeb758",
|
||||
"zh:f342e638d9672d969ed3946b9f0650cf327690b35e0812b2ddae97bd32c2d946",
|
||||
]
|
||||
}
|
||||
|
||||
provider "registry.terraform.io/hashicorp/kubernetes" {
|
||||
version = "2.8.0"
|
||||
constraints = "2.8.0"
|
||||
hashes = [
|
||||
"h1:UZCCMTH49ziz6YDV5oCCoOHypOxZWvzc59IfZxVdWeI=",
|
||||
"zh:0cf42c17c05ae5f0f5eb4b2c375dd2068960b97392e50823e47b2cee7b5e01be",
|
||||
"zh:29e3751eceae92c7400a17fe3a5394ed761627bcadfda66e7ac91d6485c37927",
|
||||
"zh:2d95584504c651e1e2e49fbb5fae1736e32a505102c3dbd2c319b26884a7d3d5",
|
||||
"zh:4a5f1d915c19e7c7b4f04d7d68f82db2c872dad75b9e6f33a6ddce43aa160405",
|
||||
"zh:4b959187fd2c884a4c6606e1c4edc7b506ec4cadb2742831f37aca1463eb349d",
|
||||
"zh:5e76a2b81c93d9904d50c2a703845f79d2b080c2f87c07ef8f168592033d638f",
|
||||
"zh:c5aa21a7168f96afa4b4776cbd7eefd3e1f47d48430dce75c7f761f2d2fac77b",
|
||||
"zh:d45e8bd98fc6752ea087e744efdafb209e7ec5a4224f9affee0a24fb51d26bb9",
|
||||
"zh:d4739255076ed7f3ac2a06aef89e8e48a87667f3e470c514ce2185c0569cc1fb",
|
||||
"zh:dbd2f11529a422ffd17040a70c0cc2802b7f1be2499e976dc22f1138d022b1b4",
|
||||
"zh:dbd5357082b2485bb9978bce5b6d508d6b431d15c53bfa1fcc2781131826b5d8",
|
||||
]
|
||||
}
|
49
infra/eks-aws-auth/terragrunt.hcl
Normal file
49
infra/eks-aws-auth/terragrunt.hcl
Normal file
@ -0,0 +1,49 @@
|
||||
include "root" {
|
||||
path = find_in_parent_folders()
|
||||
}
|
||||
|
||||
terraform {
|
||||
source = "${get_repo_root()}//modules/eks-auth"
|
||||
}
|
||||
|
||||
dependency "eks" {
|
||||
config_path = "../eks"
|
||||
|
||||
# Configure mock outputs for the `validate` and `plan` commands that are returned when there are no outputs available
|
||||
# (e.g the module hasn't been applied yet)
|
||||
mock_outputs_allowed_terraform_commands = ["validate", "plan"]
|
||||
mock_outputs = {
|
||||
aws_auth_configmap_yaml = <<EOT
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: aws-auth
|
||||
namespace: kube-system
|
||||
data:
|
||||
mapRoles: |
|
||||
- rolearn: arn:aws:iam::505686222560:role/aviatrix-dev-node-group-20220309105644518100000003
|
||||
username: system:node:{{EC2PrivateDNSName}}
|
||||
groups:
|
||||
- system:bootstrappers
|
||||
- system:nodes
|
||||
|
||||
EOT
|
||||
cluster_id = "fake-cluster-id"
|
||||
cluster_endpoint = "https://fake-cluster-endpoint.eks.amazonaws.com"
|
||||
cluster_certificate_authority_data = "ZmFrZS1jYS1jZXJ0LWRhdGE="
|
||||
}
|
||||
}
|
||||
|
||||
locals {
|
||||
config_vars = read_terragrunt_config(find_in_parent_folders("config.hcl"))
|
||||
}
|
||||
|
||||
generate = local.config_vars.generate
|
||||
|
||||
inputs = {
|
||||
aws_auth_configmap_yaml = dependency.eks.outputs.aws_auth_configmap_yaml
|
||||
cluster_id = dependency.eks.outputs.cluster_id
|
||||
cluster_endpoint = dependency.eks.outputs.cluster_endpoint
|
||||
cluster_certificate_authority_data = dependency.eks.outputs.cluster_certificate_authority_data
|
||||
aws_auth_additional_roles = local.config_vars.locals.eks_aws_auth_additional_roles
|
||||
}
|
Reference in New Issue
Block a user