what
- Add
atmos aws
commands - Add
atmos aws eks update-kubeconfig
command
why
- Execute
aws
CLI commands usingatmos
context (atmos.yaml
CLI config and component/stack configurations) - Downloading
kubeconfig
from an EKS cluster using `atmos - Allow using this functionality in Terraform by implementing a new data source in the
terraform-provider-utils
provider (this will be added in a PR in https://github.com/cloudposse/terraform-provider-utils repo)
`atmos aws eks update-kubeconfig` command can be executed in three different ways:
1. If all the required parameters (cluster name and AWS profile/role) are provided on the command-line,
then 'atmos' executes the command without requiring atmos CLI config and context.
For example: atmos aws eks update-kubeconfig --profile=<profile> --name=<cluster_name>
2. If 'component' and 'stack' are provided on the command-line,
then 'atmos' executes the command using atmos CLI config and stack's context by searching for the following settings:
- 'components.helmfile.cluster_name_pattern' in 'atmos.yaml' CLI config (and calculates the '--name' parameter using the pattern)
- 'components.helmfile.helm_aws_profile_pattern' in 'atmos.yaml' CLI config (and calculates the '--profile' parameter using the pattern)
- 'components.helmfile.kubeconfig_path' in 'atmos.yaml' CLI config
- the variables for the component in the provided stack
- 'region' from the variables for the component in the stack
For example: atmos aws eks update-kubeconfig <component> -s <stack>
3. Combination of the above. Provide a component and a stack, and override other parameters on the command line:
For example: atmos aws eks update-kubeconfig <component> -s <stack> --kubeconfig=<path_to_kubeconfig> --region=<region>