Hi all. I have infrastructure separated into `comm...
# aws
b
Hi all. I have infrastructure separated into
common
(where i create eks cluster and nodepool and shared things else) and per-project infrastructure (lives with code and has services/deployments/etc). How do i specify in the per-project infrastructure which eks cluster to deploy to? i have aws:profile specified in the stack yaml, but it looks that pulumi ignores it and deploys to current kubectl context.
b
@bitter-kite-21926 export the kubeconfig from your
common
project, then build a provider in your per-project infrastructure and pass it to the resources. here’s an example of building the cluster and exporting the kubeconfig: https://github.com/jaxxstorm/pulumi-examples/blob/main/typescript/aws/eks-platform/eks/index.ts#L22 then grabbing the provider from the other stack as a stack reference: https://github.com/jaxxstorm/pulumi-examples/blob/main/typescript/aws/eks-platform/sample-app/index.ts#L8
🙌 1