generated from terraform-modules/template_aws_submodules
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
179 additions
and
514 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,18 @@ | ||
| locals { | ||
| aws_eks_cluster_auth = data.aws_eks_cluster_auth.cluster | ||
| # for main.tf | ||
| aws_eks_cluster = aws_eks_cluster.eks_cluster | ||
| # for all subdirectories | ||
| ## aws_eks_cluster = data.aws_eks_cluster.cluster | ||
| } | ||
|
|
||
| data "aws_eks_cluster_auth" "cluster" { | ||
| name = var.cluster_name | ||
| } | ||
|
|
||
| #--- | ||
| # for all subdirectories only | ||
| #--- | ||
| ## data "aws_eks_cluster" "cluster" { | ||
| ## name = var.cluster_name | ||
| ## } |
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 was deleted.
Oops, something went wrong.
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 @@ | ||
| resource "null_resource" "kubeconfig" { | ||
| triggers = { | ||
| always_run = timestamp() | ||
| } | ||
| provisioner "local-exec" { | ||
| command = "which kubectl > /dev/null 2>&1; if [ $? != 0 ]; then 'echo missing kubectl'; exit 1; else exit 0; fi" | ||
| } | ||
| provisioner "local-exec" { | ||
| command = "test -d '${path.root}/setup' || mkdir '${path.root}/setup'" | ||
| } | ||
| provisioner "local-exec" { | ||
| environment = { | ||
| AWS_PROFILE = var.profile | ||
| AWS_REGION = local.region | ||
| } | ||
| command = "aws eks update-kubeconfig --name ${var.cluster_name} --kubeconfig ${path.root}/setup/kube.config" | ||
| } | ||
| depends_on = [aws_eks_cluster.eks_cluster] | ||
| } | ||
|
|
||
| #--- | ||
| # call it like | ||
| #--- | ||
| ## provisioner "local-exec" { | ||
| ## environment = { | ||
| ## KUBECONFIG = "${path.root}/setup/kube.config" | ||
| ## } | ||
| ## command = "kubectli set env daemonset aws-node -n kube-system AWS_VPC_K8S_CNI_CUSTOM_NETWORK_CFG=true" | ||
| ## } |
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
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
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