glamorous-holiday-93698
07/17/2024, 1:04 PMaws eks create-cluster \
--name <CLUSTER_NAME> \
--role-arn <CLUSTER_ROLE_ARN> \
--resources-vpc-config subnetIds=<value>,endpointPublicAccess=true,endpointPrivateAccess=true \
--logging '{"clusterLogging":[{"types":["api","audit","authenticator","controllerManager","scheduler"],"enabled":true}]}' \
--access-config authenticationMode=API
This is the aws-cli command to create eks cluster. See the last line of access-config. I’d like to add this option for aws.eks.cluster() command. Tried pulumi ai, no luck. It’s to enable clusterApi which seems to me allows to do rbac mappings automatically with iam. though not sure will experiment futher.glamorous-holiday-93698
07/17/2024, 1:20 PMimport pulumi
import pulumi_aws as aws
example = aws.iam.Role("example",
assume_role_policy=example_assume_role_policy["json"],
name="example")
example_cluster = aws.eks.Cluster("example",
name="example-cluster",
role_arn=example.arn,
vpc_config={
"endpointPrivateAccess": True,
"endpointPublicAccess": False,
},
access_config={
"authenticationMode": "CONFIG_MAP",
"bootstrapClusterCreatorAdminPermissions": True,
})
Wonder if anyone even tried to use ClusterAPI auth method with pulumi: <https://aws.amazon.com/blogs/containers/a-deep-dive-into-simplified-amazon-eks-access-management-controls/>
quick-house-41860
07/17/2024, 2:15 PMWonder if anyone even tried to use ClusterAPI auth method with pulumi: https://aws.amazon.com/blogs/containers/a-deep-dive-into-simplified-amazon-eks-access-management-controls/We have a few examples using that authentication mode through our pulumi-eks component provider: https://github.com/pulumi/pulumi-eks/blob/986c528a058381be989c382d38a2e74238c9502b/examples/authentication-mode/index.ts#L80