pulumi-eks
pulumi-eks copied to clipboard
Parameterize all endpoint/namespace values so that all AWS regions work properly
Hello!
- Vote on this issue by adding a 👍 reaction
- To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already)
The EKS package currently hardcodes a number of values specific to the default US regions, which breaks usage in other regions (aws-global/aws-cn/aws-us-gov). While it is possible to work around the issue using transformations, the package logic should be parameterized to handle different regions appropriately.
The following issues are related: https://github.com/pulumi/pulumi-eks/issues/570 https://github.com/pulumi/pulumi-eks/issues/534 https://github.com/pulumi/pulumi-eks/issues/386
@lblackstone - Any update on this? When this can be solved and pulumi-eks provides support for China?
I am also stuck with this now and cannot create cluster in China region.
Can you check if the transformations workaround works for you?
I don't have an update on scheduling for this issue, but you can upvote issues to help us determine priority.
@lblackstone - I was trying the transformation workaround but can you please tell me how that can be used? I am quite new to typescript so don't know that.
Do I have to put that snippet in index.ts
as it is or do I need to create some method etc?
Can you share with me a working .ts file?
We currently have this problem with private link on eu-central-1 ECR. If done so the default EKS setup doesn't work anymore since it wants to pull images from us-west-1. Being able to set the region or letting pulumi auto detect the correct ECR region for system images would be good.
@lblackstone - I was trying the transformation workaround but can you please tell me how that can be used? I am quite new to typescript so don't know that.
Do I have to put that snippet in
index.ts
as it is or do I need to create some method etc?Can you share with me a working .ts file?
const cluster = new eks.Cluster(
this.clusterName,
{
instanceType: this.instanceType,
desiredCapacity: this.desiredNodeNumber,
minSize: this.minNodeNumber,
maxSize: this.maxNodeNumber,
enabledClusterLogTypes: [
'api',
'audit',
'authenticator',
'controllerManager',
'scheduler',
],
},
{
transformations: [
// Update all RolePolicyAttachment resources to use aws-cn ARNs.
args => {
if (
args.type === 'aws:iam/rolePolicyAttachment:RolePolicyAttachment'
) {
const arn: string | undefined = args.props['policyArn'];
if (arn && arn.startsWith('arn:aws:iam')) {
args.props['policyArn'] = arn.replace(
'arn:aws:iam',
'arn:aws-cn:iam'
);
}
return {
props: args.props,
opts: args.opts,
};
}
return undefined;
},
],
}
);
@lblackstone Can I get an example of this exact transformation in golang, for govcloud?
@lblackstone https://github.com/pulumi/pulumi-eks/pull/785
I am just using the already imported pulumi classic to fetch the Partition during the run.