I'm finally back in Pulumi land and trying to port...
# dotnet
w
I'm finally back in Pulumi land and trying to port some ts code to c#...
Copy code
const cluster = new eks.Cluster(
    name,
    {
        deployDashboard: false,
        publicSubnetIds: publicSubnetIds,
        privateSubnetIds: privateSubnetIds,
        instanceRole: instanceRole,
        roleMappings: iam.getRoleMappings(),
        userMappings: iam.getUserMappings(),
        skipDefaultNodeGroup: true,
        tags: {
            Environment: environment,
            EnvironmentType: environmentType,
            CostCenter: costCenter
        },
        version: k8sVersion,
        vpcId: vpc.outputs.Vpc
    },
    {
        customTimeouts: {
            create: "30m",
            update: "30m"
        }
    }
);
... but I can't find the equivalent of a lot of the above args on
ClusterArgs
e.g. how am I supposed to pass role and user mappings? 😕
This is what I have so far in c#...
Copy code
var cluster = new Cluster(name,
    new ClusterArgs
    {
        RoleArn = instanceRole.Arn,
        Tags = new Dictionary<string, string>
        {
            ["Environment"] = environment,
            ["EnvironmentType"] = environmentType,
            ["CostCenter"] = costCenter
        },
        Version = k8sVersion,
        VpcConfig = new ClusterVpcConfigArgs
        {
            SubnetIds = publicSubnetIds.Concat(privateSubnetIds).ToArray(),
            VpcId = vpc.Outputs["Vpc"]
        }
    },
    new CustomResourceOptions
    {
        CustomTimeouts = new CustomTimeouts
        {
            Create = TimeSpan.FromMinutes(30),
            Update = TimeSpan.FromMinutes(30)
        }
    }
);
t
Is the original example using the
pulumi-eks
package?
w
Copy code
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
import * as eks from "@pulumi/eks";
Yes
t
The
pulumi-eks
package is currently in Node.js only. We are working to bring it to other languages, but it’s not there yet. FWIW, it’s a convenience wrapper around raw provider API, so you can do everything in C# too, but you’ll have to use lower-level APIs.
😞 1
w
@tall-librarian-49374 okay, will a port to C# etc happen any time soon? There's a lot going on in this package so it would be quite a lot of work for me to switch to the lower-level APIs and then I might find other holes in the C# API anyway.
Just trying to weigh up my options and not waste any effort
t
There’s still some non-trivial work to be done there, which is planned for Q3