Skip to content

Commit

Permalink
Add kubeconfig update cli command to example outputs (#367)
Browse files Browse the repository at this point in the history
  • Loading branch information
naris-silpakit authored Mar 28, 2022
1 parent a4d924d commit a75e52f
Show file tree
Hide file tree
Showing 43 changed files with 170 additions and 19 deletions.
4 changes: 3 additions & 1 deletion examples/analytics/emr-on-eks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,8 @@ No inputs.
## Outputs
No outputs.
| Name | Description |
|------|-------------|
| <a name="output_configure_kubectl"></a> [configure\_kubectl](#output\_configure\_kubectl) | Configure kubectl: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig |

<!--- END_TF_DOCS --->
5 changes: 5 additions & 0 deletions examples/analytics/emr-on-eks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -189,3 +189,8 @@ module "kubernetes-addons" {

depends_on = [module.aws-eks-accelerator-for-terraform.managed_node_groups]
}

output "configure_kubectl" {
description = "Configure kubectl: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig"
value = module.aws-eks-accelerator-for-terraform.configure_kubectl
}
4 changes: 3 additions & 1 deletion examples/analytics/spark-k8s-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ No inputs.

## Outputs

No outputs.
| Name | Description |
|------|-------------|
| <a name="output_configure_kubectl"></a> [configure\_kubectl](#output\_configure\_kubectl) | Configure kubectl: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig |

<!--- END_TF_DOCS --->
5 changes: 5 additions & 0 deletions examples/analytics/spark-k8s-operator/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,8 @@ module "kubernetes-addons" {

depends_on = [module.aws-eks-accelerator-for-terraform.managed_node_groups]
}

output "configure_kubectl" {
description = "Configure kubectl: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig"
value = module.aws-eks-accelerator-for-terraform.configure_kubectl
}
1 change: 1 addition & 0 deletions examples/aws-efs-csi-driver/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ No inputs.

| Name | Description |
|------|-------------|
| <a name="output_configure_kubectl"></a> [configure\_kubectl](#output\_configure\_kubectl) | Configure kubectl: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig |
| <a name="output_efs_file_system_id"></a> [efs\_file\_system\_id](#output\_efs\_file\_system\_id) | ID of the EFS file system to use for creating a storage class |

<!--- END_TF_DOCS --->
5 changes: 5 additions & 0 deletions examples/aws-efs-csi-driver/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -198,3 +198,8 @@ output "efs_file_system_id" {
description = "ID of the EFS file system to use for creating a storage class"
value = aws_efs_file_system.efs.id
}

output "configure_kubectl" {
description = "Configure kubectl: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig"
value = module.aws-eks-accelerator-for-terraform.configure_kubectl
}
4 changes: 3 additions & 1 deletion examples/ci-cd/gitlab-ci-cd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ Manually trigger the `tf-destroy` stage in the GitLab Ci/CD pipeline to destroy

## Outputs

No outputs.
| Name | Description |
|------|-------------|
| <a name="output_configure_kubectl"></a> [configure\_kubectl](#output\_configure\_kubectl) | Configure kubectl: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig |

<!--- END_TF_DOCS --->
5 changes: 5 additions & 0 deletions examples/ci-cd/gitlab-ci-cd/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,8 @@ module "aws-eks-accelerator-for-terraform" {
}
}
}

output "configure_kubectl" {
description = "Configure kubectl: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig"
value = module.aws-eks-accelerator-for-terraform.configure_kubectl
}
4 changes: 3 additions & 1 deletion examples/complete-kubernetes-addons/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ terraform destroy --auto-approve

## Outputs

No outputs.
| Name | Description |
|------|-------------|
| <a name="output_configure_kubectl"></a> [configure\_kubectl](#output\_configure\_kubectl) | Configure kubectl: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig |

<!--- END_TF_DOCS --->
5 changes: 5 additions & 0 deletions examples/complete-kubernetes-addons/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -467,3 +467,8 @@ module "kubernetes-addons" {

depends_on = [module.aws-eks-accelerator-for-terraform.managed_node_groups]
}

output "configure_kubectl" {
description = "Configure kubectl: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig"
value = module.aws-eks-accelerator-for-terraform.configure_kubectl
}
4 changes: 3 additions & 1 deletion examples/crossplane/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@ No inputs.

## Outputs

No outputs.
| Name | Description |
|------|-------------|
| <a name="output_configure_kubectl"></a> [configure\_kubectl](#output\_configure\_kubectl) | Configure kubectl: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig |

<!--- END_TF_DOCS --->
5 changes: 5 additions & 0 deletions examples/crossplane/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,8 @@ module "kubernetes-addons" {
additional_irsa_policies = ["arn:aws:iam::aws:policy/AmazonS3FullAccess"]
}
}

output "configure_kubectl" {
description = "Configure kubectl: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig"
value = module.aws-eks-accelerator-for-terraform.configure_kubectl
}
4 changes: 3 additions & 1 deletion examples/eks-cluster-with-import-vpc/eks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ This deployment imports VPC state file from S3 bucket and deploys EKS Cluster us

## Outputs

No outputs.
| Name | Description |
|------|-------------|
| <a name="output_configure_kubectl"></a> [configure\_kubectl](#output\_configure\_kubectl) | Configure kubectl: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig |

<!--- END_TF_DOCS --->
5 changes: 5 additions & 0 deletions examples/eks-cluster-with-import-vpc/eks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,8 @@ module "kubernetes-addons" {

depends_on = [module.aws-eks-accelerator-for-terraform.managed_node_groups]
}

output "configure_kubectl" {
description = "Configure kubectl: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig"
value = module.aws-eks-accelerator-for-terraform.configure_kubectl
}
4 changes: 3 additions & 1 deletion examples/eks-cluster-with-new-vpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ No inputs.

## Outputs

No outputs.
| Name | Description |
|------|-------------|
| <a name="output_configure_kubectl"></a> [configure\_kubectl](#output\_configure\_kubectl) | Configure kubectl: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig |

<!--- END_TF_DOCS --->
5 changes: 5 additions & 0 deletions examples/eks-cluster-with-new-vpc/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -140,3 +140,8 @@ module "kubernetes-addons" {

depends_on = [module.aws-eks-accelerator-for-terraform.managed_node_groups]
}

output "configure_kubectl" {
description = "Configure kubectl: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig"
value = module.aws-eks-accelerator-for-terraform.configure_kubectl
}
4 changes: 3 additions & 1 deletion examples/fully-private-eks-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ No inputs.

## Outputs

No outputs.
| Name | Description |
|------|-------------|
| <a name="output_configure_kubectl"></a> [configure\_kubectl](#output\_configure\_kubectl) | Configure kubectl: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig |

<!--- END_TF_DOCS --->
5 changes: 5 additions & 0 deletions examples/fully-private-eks-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -217,3 +217,8 @@ module "aws-eks-accelerator-for-terraform" {
}

}

output "configure_kubectl" {
description = "Configure kubectl: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig"
value = module.aws-eks-accelerator-for-terraform.configure_kubectl
}
4 changes: 3 additions & 1 deletion examples/game-tech/agones-game-controller/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ No inputs.

## Outputs

No outputs.
| Name | Description |
|------|-------------|
| <a name="output_configure_kubectl"></a> [configure\_kubectl](#output\_configure\_kubectl) | Configure kubectl: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig |

<!--- END_TF_DOCS --->
5 changes: 5 additions & 0 deletions examples/game-tech/agones-game-controller/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,8 @@ module "kubernetes-addons" {

depends_on = [module.aws-eks-accelerator-for-terraform.managed_node_groups]
}

output "configure_kubectl" {
description = "Configure kubectl: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig"
value = module.aws-eks-accelerator-for-terraform.configure_kubectl
}
2 changes: 1 addition & 1 deletion examples/gitops/argocd/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
output "configure_kubectl" {
description = "Configure kubectl: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig"
value = "aws eks --region ${data.aws_region.current.id} update-kubeconfig --name ${module.aws-eks-accelerator-for-terraform.eks_cluster_id}"
value = module.aws-eks-accelerator-for-terraform.configure_kubectl
}
2 changes: 1 addition & 1 deletion examples/ingress-controllers/nginx/outputs.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
output "configure_kubectl" {
description = "Configure kubectl: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig"
value = "aws eks --region ${data.aws_region.current.id} update-kubeconfig --name ${module.aws-eks-accelerator-for-terraform.eks_cluster_id}"
value = module.aws-eks-accelerator-for-terraform.configure_kubectl
}
4 changes: 3 additions & 1 deletion examples/ipv6-eks-cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ No inputs.

## Outputs

No outputs.
| Name | Description |
|------|-------------|
| <a name="output_configure_kubectl"></a> [configure\_kubectl](#output\_configure\_kubectl) | Configure kubectl: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig |

<!--- END_TF_DOCS --->
5 changes: 5 additions & 0 deletions examples/ipv6-eks-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,8 @@ module "kubernetes-addons" {

depends_on = [module.aws-eks-accelerator-for-terraform.managed_node_groups]
}

output "configure_kubectl" {
description = "Configure kubectl: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig"
value = module.aws-eks-accelerator-for-terraform.configure_kubectl
}
4 changes: 3 additions & 1 deletion examples/karpenter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ No inputs.

## Outputs

No outputs.
| Name | Description |
|------|-------------|
| <a name="output_configure_kubectl"></a> [configure\_kubectl](#output\_configure\_kubectl) | Configure kubectl: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig |

<!--- END_TF_DOCS --->
5 changes: 5 additions & 0 deletions examples/karpenter/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -208,3 +208,8 @@ resource "kubectl_manifest" "karpenter_provisioner" {

depends_on = [module.kubernetes-addons]
}

output "configure_kubectl" {
description = "Configure kubectl: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig"
value = module.aws-eks-accelerator-for-terraform.configure_kubectl
}
2 changes: 2 additions & 0 deletions examples/multi-tenancy-with-teams/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ No inputs.

| Name | Description |
|------|-------------|
| <a name="output_application_teams_configure_kubectl"></a> [application\_teams\_configure\_kubectl](#output\_application\_teams\_configure\_kubectl) | Configure kubectl for each Application Teams: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig |
| <a name="output_platform_teams_configure_kubectl"></a> [platform\_teams\_configure\_kubectl](#output\_platform\_teams\_configure\_kubectl) | Configure kubectl for each Platform Team: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig |
| <a name="output_ssp_output"></a> [ssp\_output](#output\_ssp\_output) | SSP module outputs |

<!--- END_TF_DOCS --->
10 changes: 10 additions & 0 deletions examples/multi-tenancy-with-teams/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,13 @@ output "ssp_output" {
description = "SSP module outputs"
value = module.aws-eks-accelerator-for-terraform
}

output "platform_teams_configure_kubectl" {
description = "Configure kubectl for each Platform Team: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig"
value = module.aws-eks-accelerator-for-terraform.teams[0].platform_teams_configure_kubectl
}

output "application_teams_configure_kubectl" {
description = "Configure kubectl for each Application Teams: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig"
value = module.aws-eks-accelerator-for-terraform.teams[0].application_teams_configure_kubectl
}
4 changes: 3 additions & 1 deletion examples/node-groups/fargate-profiles/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ No inputs.

## Outputs

No outputs.
| Name | Description |
|------|-------------|
| <a name="output_configure_kubectl"></a> [configure\_kubectl](#output\_configure\_kubectl) | Configure kubectl: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig |

<!--- END_TF_DOCS --->
5 changes: 5 additions & 0 deletions examples/node-groups/fargate-profiles/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,8 @@ module "aws-eks-accelerator-for-terraform" {
},
} # END OF FARGATE PROFILES
}

output "configure_kubectl" {
description = "Configure kubectl: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig"
value = module.aws-eks-accelerator-for-terraform.configure_kubectl
}
4 changes: 3 additions & 1 deletion examples/node-groups/managed-node-groups-tfvars/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ terraform destroy --auto-approve

## Outputs

No outputs.
| Name | Description |
|------|-------------|
| <a name="output_configure_kubectl"></a> [configure\_kubectl](#output\_configure\_kubectl) | Configure kubectl: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig |

<!--- END_TF_DOCS --->
5 changes: 5 additions & 0 deletions examples/node-groups/managed-node-groups-tfvars/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,8 @@ locals {
vpc_name = join("-", [var.tenant, var.environment, var.zone, "vpc"])
cluster_name = join("-", [var.tenant, var.environment, var.zone, "eks"])
}

output "configure_kubectl" {
description = "Configure kubectl: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig"
value = module.aws-eks-accelerator-for-terraform.configure_kubectl
}
4 changes: 3 additions & 1 deletion examples/node-groups/managed-node-groups/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ No inputs.

## Outputs

No outputs.
| Name | Description |
|------|-------------|
| <a name="output_configure_kubectl"></a> [configure\_kubectl](#output\_configure\_kubectl) | Configure kubectl: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig |

<!--- END_TF_DOCS --->
5 changes: 5 additions & 0 deletions examples/node-groups/managed-node-groups/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -467,3 +467,8 @@ module "kubernetes-addons" {
enable_cluster_autoscaler = true

}

output "configure_kubectl" {
description = "Configure kubectl: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig"
value = module.aws-eks-accelerator-for-terraform.configure_kubectl
}
4 changes: 3 additions & 1 deletion examples/node-groups/self-managed-node-groups/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@ No inputs.

## Outputs

No outputs.
| Name | Description |
|------|-------------|
| <a name="output_configure_kubectl"></a> [configure\_kubectl](#output\_configure\_kubectl) | Configure kubectl: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig |

<!--- END_TF_DOCS --->
5 changes: 5 additions & 0 deletions examples/node-groups/self-managed-node-groups/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -174,3 +174,8 @@ module "aws-eks-accelerator-for-terraform" {
},
} # END OF SELF MANAGED NODE GROUPS
}

output "configure_kubectl" {
description = "Configure kubectl: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig"
value = module.aws-eks-accelerator-for-terraform.configure_kubectl
}
4 changes: 3 additions & 1 deletion examples/node-groups/windows-node-groups/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ No inputs.

## Outputs

No outputs.
| Name | Description |
|------|-------------|
| <a name="output_configure_kubectl"></a> [configure\_kubectl](#output\_configure\_kubectl) | Configure kubectl: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig |

<!--- END_TF_DOCS --->
5 changes: 5 additions & 0 deletions examples/node-groups/windows-node-groups/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -198,3 +198,8 @@ module "kubernetes-addons" {

depends_on = [module.aws-eks-accelerator-for-terraform.managed_node_groups]
}

output "configure_kubectl" {
description = "Configure kubectl: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig"
value = module.aws-eks-accelerator-for-terraform.configure_kubectl
}
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ You must set up an index pattern before you can explore data in the OpenSearch D
| Name | Description |
|------|-------------|
| <a name="output_bastion_host_public_ip"></a> [bastion\_host\_public\_ip](#output\_bastion\_host\_public\_ip) | n/a |
| <a name="output_configure_kubectl"></a> [configure\_kubectl](#output\_configure\_kubectl) | Configure kubectl: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig |
| <a name="output_opensearch_pw"></a> [opensearch\_pw](#output\_opensearch\_pw) | Amazon OpenSearch Service Domain password |
| <a name="output_opensearch_user"></a> [opensearch\_user](#output\_opensearch\_user) | Amazon OpenSearch Service Domain username |
| <a name="output_opensearch_vpc_endpoint"></a> [opensearch\_vpc\_endpoint](#output\_opensearch\_vpc\_endpoint) | Amazon OpenSearch Service Domain-specific endpoint |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,8 @@ output "opensearch_vpc_endpoint" {
output "bastion_host_public_ip" {
value = aws_instance.bastion_host.public_ip
}

output "configure_kubectl" {
description = "Configure kubectl: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig"
value = module.aws-eks-accelerator-for-terraform.configure_kubectl
}
2 changes: 2 additions & 0 deletions modules/aws-eks-teams/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,9 @@ No modules.

| Name | Description |
|------|-------------|
| <a name="output_application_teams_configure_kubectl"></a> [application\_teams\_configure\_kubectl](#output\_application\_teams\_configure\_kubectl) | Configure kubectl for each Application Teams: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig |
| <a name="output_application_teams_iam_role_arn"></a> [application\_teams\_iam\_role\_arn](#output\_application\_teams\_iam\_role\_arn) | IAM role ARN for Teams |
| <a name="output_platform_teams_configure_kubectl"></a> [platform\_teams\_configure\_kubectl](#output\_platform\_teams\_configure\_kubectl) | Configure kubectl for each Platform Team: make sure you're logged in with the correct AWS profile and run the following command to update your kubeconfig |
| <a name="output_platform_teams_iam_role_arn"></a> [platform\_teams\_iam\_role\_arn](#output\_platform\_teams\_iam\_role\_arn) | IAM role ARN for Platform Teams |
| <a name="output_team_sa_irsa_iam_role_arn"></a> [team\_sa\_irsa\_iam\_role\_arn](#output\_team\_sa\_irsa\_iam\_role\_arn) | IAM role ARN for Teams EKS Service Account (IRSA) |

Expand Down
Loading

0 comments on commit a75e52f

Please sign in to comment.