Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add EKS cluster auth token data resource continued #7438

Merged
merged 5 commits into from
Feb 6, 2019

Commits on Feb 6, 2019

  1. Add EKS cluster auth token data resource

    This allows Terraform to authenticate with an EKS cluster via the
    Kubernetes provider:
    
    ```hcl
    resource "aws_eks_cluster" "foo" {
      name = "foo"
    }
    
    data "aws_eks_cluster_auth" "foo_auth" {
      name = "foo"
    }
    
    provider "kubernetes" {
      host = "${aws_eks_cluster.foo.endpoint}"
      cluster_ca_certificate = "${base64decode(aws_eks_cluster.foo.certificate_authority.0.data)}"
      token = "${data.aws_eks_cluster_auth.foo_auth.token}"
    }
    ```
    
    The auth logic was extracted from
    https://github.com/heptio/aws-iam-authenticator because of lack of
    documentation from AWS. Basically, the token is a signed URL for the
    GetCallerIdentity action with a custom header. The URL is then base64
    encoded and prefixed with vendor string.
    evilmarty authored and mbarrien committed Feb 6, 2019
    Configuration menu
    Copy the full SHA
    a6ba529 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    fc7aac8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2a35172 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    797297f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    28a811f View commit details
    Browse the repository at this point in the history