Here is a trimmed down snippet of creating an EKS ...
# aws
s
Here is a trimmed down snippet of creating an EKS cluster and associated nodegroup.
Copy code
import * as eks from "@pulumi/eks";
const cluster = new eks.Cluster(...)
const clusterNodeGroup1 = cluster.createNodeGroup(...)
I want to adjust
enabledMetrics
and
suspendedProcesses
on the ASG, but I'm not sure how to access it. I think I can get the name from
clusterNodeGroup1.apply(ng => ng.autoScalingGroupName)
. I can also use the autoscaling getGroup function. How do I get an existing object and then update properties?
g
You cannot get an existing object and then update properties. You can import an existing resource and then make changes to it, but at that point Pulumi assumes "ownership" of the resource which means Pulumi could potentially destroy the resource (if you tell it to) and could cause issues for other tools or systems in your environment.
s
@gentle-diamond-70147 The
createNodeGroup
function above creates an Auto Scaling Group to manage the new nodes. One of the properties is
autoScalingGroupName
. I should be able to access the ASG that just got created and modify some of its properties. I'm not sure how to do that.