/
getClusterAuth.go
38 lines (33 loc) · 1.35 KB
/
getClusterAuth.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
// *** Do not edit by hand unless you're certain you know what you are doing! ***
package eks
import (
"github.com/pulumi/pulumi/sdk/go/pulumi"
)
// Get an authentication token to communicate with an EKS cluster.
//
// Uses IAM credentials from the AWS provider to generate a temporary token that is compatible with
// [AWS IAM Authenticator](https://github.com/kubernetes-sigs/aws-iam-authenticator) authentication.
// This can be used to authenticate to an EKS cluster or to a cluster that has the AWS IAM Authenticator
// server configured.
func GetClusterAuth(ctx *pulumi.Context, args *GetClusterAuthArgs, opts ...pulumi.InvokeOption) (*GetClusterAuthResult, error) {
var rv GetClusterAuthResult
err := ctx.Invoke("aws:eks/getClusterAuth:getClusterAuth", args, &rv, opts...)
if err != nil {
return nil, err
}
return &rv, nil
}
// A collection of arguments for invoking getClusterAuth.
type GetClusterAuthArgs struct {
// The name of the cluster
Name string `pulumi:"name"`
}
// A collection of values returned by getClusterAuth.
type GetClusterAuthResult struct {
// id is the provider-assigned unique ID for this managed resource.
Id string `pulumi:"id"`
Name string `pulumi:"name"`
// The token to use to authenticate with the cluster.
Token string `pulumi:"token"`
}