polite-napkin-90098
07/13/2022, 8:49 PMcluster.name
I get a compile error saying:
TSError: ⨯ Unable to compile TypeScript:
index.ts(427,24): error TS2339: Property 'name' does not exist on type 'Cluster'.
but looking in the docs
https://www.pulumi.com/registry/packages/eks/api-docs/cluster/#name_nodejs
it has name as an input and all inputs are outputs, so why doesn't that work.
To prove it wasn't some other issue, like the cluster var being the wrong type of object or something I tried cluster.core.vpcId
and then the TS compiles fine but obviously the ClusterName is set wrong in the helm chart.billowy-army-68599
07/13/2022, 8:50 PMpolite-napkin-90098
07/13/2022, 8:53 PMbillowy-army-68599
07/13/2022, 8:55 PMpolite-napkin-90098
07/13/2022, 8:56 PM// Create an EKS cluster
const cluster = new eks.Cluster(nam, {
vpcId: vpcid,
privateSubnetIds: [ privsub[0], privsub[1] ],
publicSubnetIds: [ pubsub[0], pubsub[1] ],
clusterSecurityGroup: sg,
endpointPrivateAccess: true,
endpointPublicAccess: false,
enabledClusterLogTypes: ["api", "audit", "authenticator", "controllerManager", "scheduler"],
nodeAssociatePublicIpAddress: false,
instanceType: "t3a.medium",
maxSize: 10,
minSize: 2,
serviceRole: serviceRole,
createOidcProvider: true,
useDefaultVpcCni: true,
roleMappings: [
{
groups: [ "system:masters" ],
roleArn: adminVMrole.arn,
username: "admin",
},
],
});
That's the call to the eks.cluster functionbillowy-army-68599
07/13/2022, 8:57 PMpolite-napkin-90098
07/13/2022, 8:57 PM// deploy the helm chart for the ALB Controller
const albController = new k8s.helm.v3.Release("albController", {
repositoryOpts: {
repo: "<https://aws.github.io/eks-charts>",
},
chart: "aws-load-balancer-controller",
namespace: "kube-system",
values: {
image: {
reposistory: "<http://602401143452.dkr.ecr.us-east-2.amazonaws.com/amazon/aws-load-balancer-controller|602401143452.dkr.ecr.us-east-2.amazonaws.com/amazon/aws-load-balancer-controller>",
},
clusterName: cluster.name,
serviceAccount: {
annotations: {
"<http://eks.amazonaws.com/role-arn|eks.amazonaws.com/role-arn>": albControllerRole.arn,
},
},
},
}, { provider: cluster.provider });
billowy-army-68599
07/13/2022, 8:58 PMexport const clusterName = cluster.eksCluster.name
polite-napkin-90098
07/13/2022, 8:59 PMbillowy-army-68599
07/13/2022, 9:03 PM