I’m facing an issue where I cannot attach a podExecutionRole to a Fargate profile because the Blueprint doesn’t allow using the existing stack. This limitation is causing problems in setting up the necessary role for my Fargate profiles.
Example code as follow
new FargateClusterProvider({
version: KubernetesVersion.V1_29,
clusterName: `${this.props.clusterName}`,
fargateProfiles: this.getFargateProfiles(),
tags: this.props.tags,
});
private getFargateProfiles(): Map<string, FargateProfileOptions> {
const namespaces = [
...this.props.namespaces.map((namespace) => namespace.name),
];
// Issue: How do we correctly obtain the scope here?
const role = new Role(this.scope, "FargatePodExecutionRole", {});
return new Map([
// Observability
[
"observability",
{
selectors: OBSERVABILITY_NAMESPACES.map((namespace) => ({
namespace,
})),
podExecutionRole: role,
},
],
]);
}
Problem:
The Blueprint setup doesn’t provide a clear way to reference an existing stack’s scope, which is necessary to create and attach the podExecutionRole to a Fargate profile.
Request:
I’m looking for guidance on how to correctly obtain the scope in this context, or if there’s an alternative approach to achieve this.
Hello There!!
I’m facing an issue where I cannot attach a podExecutionRole to a Fargate profile because the Blueprint doesn’t allow using the existing stack. This limitation is causing problems in setting up the necessary role for my Fargate profiles.
Example code as follow
Problem:
The Blueprint setup doesn’t provide a clear way to reference an existing stack’s scope, which is necessary to create and attach the podExecutionRole to a Fargate profile.
Request:
I’m looking for guidance on how to correctly obtain the scope in this context, or if there’s an alternative approach to achieve this.
Links
https://aws-quickstart.github.io/cdk-eks-blueprints/cluster-providers/fargate-cluster-provider/