lively-dentist-84054
12/12/2021, 11:51 PMNodeSecurityGroup
created by eks.NewCluster
but the type returned is a *SecurityGroupOutput
and I can't figure out how to get the ID output out of it to use with other resourcesbillowy-army-68599
lively-dentist-84054
12/13/2021, 12:07 AMNewVpcEndpoint
, which takes a StringArrayInput
for the SecurityGroupIds
field and it wasn't clear how to convert it as there's no ToStringOutput
method on SecurityGroupOutput
and no obvious ToStringArray*
function for this./main.go:71:48: cannot use cluster.NodeSecurityGroup (type "<http://github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ec2|github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ec2>".SecurityGroupOutput) as type pulumi.StringInput in slice literal:
"<http://github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ec2|github.com/pulumi/pulumi-aws/sdk/v4/go/aws/ec2>".SecurityGroupOutput does not implement pulumi.StringInput (missing ToStringOutput method)
// HACK: cluster.NodeSecurityGroup is a SecurityGroupOutput that doesn't have an accessible ID
nodeSecurityGroupTag := cluster.ToClusterOutput().ApplyT(func(_ *eks.Cluster) string {
// use ApplyT to build a StringOutput that depends on cluster
return prefix + "-nodeSecurityGroup"
}).(pulumi.StringOutput)
nodeSecurityGroup := ec2.LookupSecurityGroupOutput(ctx, ec2.LookupSecurityGroupOutputArgs{
Tags: pulumi.StringMap{"Name": nodeSecurityGroupTag},
})
billowy-army-68599
lively-dentist-84054
12/14/2021, 4:32 PMbillowy-army-68599
lively-dentist-84054
12/14/2021, 4:45 PM