https://pulumi.com logo
#general
Title
# general
i

incalculable-engineer-92975

05/20/2020, 8:54 PM
How do we handle manipulating resources created as a side-effect? For example, if creating a cluster causes a default security group to be created, how do we reference that security group?
m

millions-furniture-75402

05/20/2020, 9:05 PM
Can you iterate over the
securityGroups
property on the cluster created?
Copy code
const cluster = new awsx.ecs.Cluster("my-cluster");
for (let i = 0; i < cluster.securityGroups.length; i++) {
  console.log(cluster.securityGroups[i]);
}
i

incalculable-engineer-92975

05/20/2020, 9:18 PM
i mean generically is there a method for doing this? a search or lookup that can run in the context of a pulumi run?