<https://www.pulumi.com/registry/packages/aws/api-...
# golang
c
https://www.pulumi.com/registry/packages/aws/api-docs/eks/getcluster/
Copy code
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := eks.LookupCluster(ctx, &eks.LookupClusterArgs{
			Name: "example",
		}, nil)
		if err != nil {
			return err
		}
		ctx.Export("endpoint", example.Endpoint)
		ctx.Export("kubeconfig-certificate-authority-data", example.CertificateAuthorities[0].Data)
		ctx.Export("identity-oidc-issuer", example.Identities[0].Oidcs[0].Issuer)
		return nil
	})
}
c
@billowy-army-68599 okay let me try that out. Also looks like the following field is no longer available:
Copy code
CreateOidcProvider: pulumi.Bool(true),
If this would work then I wouldn’t even need the issuer url
b
you still need it? are you saying it’s not available on the EKS package?
c
Yeah its giving me an compiler error
Its not a valid Cluster Arg
b
can you share your code?
c
Yeah hold on pushing
Theres a bunch going on there but it seems like I’m using a different package ?
b
you are using the AWS resource for EKS, not the EKS component package. if you want to use the EKS package from AWS, you’te going to have to do a lot of building for OIDC
Copy code
"<http://github.com/pulumi/pulumi-aws/sdk/v5/go/aws/eks|github.com/pulumi/pulumi-aws/sdk/v5/go/aws/eks>"
Is the EKS package from AWS
Copy code
"<http://github.com/pulumi/pulumi-eks/sdk/go/eks|github.com/pulumi/pulumi-eks/sdk/go/eks>"
Which abstracts away a lot of the pain of building an EKS cluster, including adding nodes and creating the OIDC provider
c
So I should be able to still use the EKS package for my AWS deployment ?
b
if you want an easy deployment yes
c
Alright then I’m gonna play around this a little more then 😄 Would I need to do anything extra to make it work on AWS. I just assumed the EKS package was primarily for local kubernates deployments and not for AWS.
b
you’d need to do quite a bit, here’s an old example: https://github.com/jaxxstorm/iac-in-go/blob/master/eks/main.go
c
This example uses AWS/go/eks package. and not the EKS package. I followed your example (more or less) to setup the EKS in my code.
b
sorry i’m not following
c
I’m testing out your code
I’ll need a little time to test it 😄
b
which one?
c
The old example you’ve sent, it seems like this version of the code allows me to automatically create an OIDC