sparse-intern-71089
01/15/2021, 12:35 AMlittle-cartoon-10569
01/15/2021, 12:48 AMlittle-cartoon-10569
01/15/2021, 12:48 AMapply
block, or let Pulumi create the LaunchTemplate (if it is a supported resource type?)gray-xylophone-22620
01/15/2021, 12:52 AMApply
method should get this StringPtrOutput, and then try to call Elem()
inside? I still just have to pass StringOutput
to the LaunchTemplateArgs
little-cartoon-10569
01/15/2021, 12:52 AMLaunchTemplate
resource?gray-xylophone-22620
01/15/2021, 12:53 AMLaunchTemplate
is defined in ec2
package, is that what you're asking?little-cartoon-10569
01/15/2021, 12:53 AMApply
block to create one of those...little-cartoon-10569
01/15/2021, 12:53 AMlittle-cartoon-10569
01/15/2021, 12:53 AMlittle-cartoon-10569
01/15/2021, 12:55 AMgray-xylophone-22620
01/15/2021, 12:55 AMLaunchTemplateNetworkInterfaceArgs {
...
SecurityGroups pulumi.StringArrayInput
...
}
little-cartoon-10569
01/15/2021, 12:56 AMStringInput
member in there? That's how it would work in TypeScript...gray-xylophone-22620
01/15/2021, 12:56 AMStringPtrOutput
can't be casted to StringInput
gray-xylophone-22620
01/15/2021, 12:57 AMStringPtrOutput
from this eksCluster.VpcConfig.ToClusterVpcConfigOutput().ClusterSecurityGroupId()
little-cartoon-10569
01/15/2021, 12:57 AMgray-xylophone-22620
01/15/2021, 12:58 AMgray-xylophone-22620
01/15/2021, 12:59 AMlittle-cartoon-10569
01/15/2021, 12:59 AMgray-xylophone-22620
01/15/2021, 1:00 AMLaunchTemplateNetworkInterfaceArgs
- what is interesting, some fields there are of StringPtrInput
typegray-xylophone-22620
01/15/2021, 1:00 AMPrivateIpAddress
gray-xylophone-22620
01/15/2021, 1:01 AMSecurityGroups
field is of StringArrayInput
, not StringPtrArrayInput
gray-xylophone-22620
01/15/2021, 1:01 AMStringPtrArrayInput
does not even existlittle-cartoon-10569
01/15/2021, 1:04 AMgray-xylophone-22620
01/15/2021, 1:08 AMcannot use value of type pulumi.StringPtrOutpu as pulumi.StringInput value in array or slice literal: missing method ToStringOutput()
gray-xylophone-22620
01/15/2021, 1:10 AMStringPtrOutput
does not have method ToStringOutput
, it has only Elem()
methodgray-xylophone-22620
01/15/2021, 1:10 AMStringOutput
, but also causes program to panic because of uninitialized pointer dereferencegray-xylophone-22620
01/15/2021, 1:13 AMToStringOutput
, but as I had put the same code there as is in the Elem()
function it ents up the same: paniclittle-cartoon-10569
01/15/2021, 1:14 AMElem()
where you're calling NewLaunchTemplate? Similar to the way it's done in the 2nd code snippet here? https://www.pulumi.com/docs/intro/concepts/programming-model/#liftinggray-xylophone-22620
01/15/2021, 1:20 AMlaunchTemplateArgs := ec2.LaunchTemplateArgs{
NetworkInterfaces: ec2.LaunchTemplateNetworkInterfaceArray{
ec2.LaunchTemplateNetworkInterfaceArgs{
DeviceIndex: pulumi.IntPtr(0),
SecurityGroups: pulumi.StringArray{
eksCluster.VpcConfig.ToClusterVpcConfigOutput().ClusterSecurityGroupId().Elem(),
},
},
},
}
gray-xylophone-22620
01/15/2021, 1:22 AMlaunchTemplate, err := ec2.NewLaunchTemplate(ctx, ..., &launchTemplateArgs)
gray-xylophone-22620
01/15/2021, 1:23 AMElem
method, something with route53, is this the one?little-cartoon-10569
01/15/2021, 1:23 AMeksCluster.VpcConfig.ToClusterVpcConfigOutput().ClusterSecurityGroupId().Elem()
instead of eksCluster.VpcConfig.ClusterSecurityGroupId()
? Or maybe eksCluster.VpcConfig.ClusterSecurityGroupId().Elem()
?gray-xylophone-22620
01/15/2021, 1:26 AMlittle-cartoon-10569
01/15/2021, 1:27 AMgray-xylophone-22620
01/15/2021, 1:27 AMToClusterVpcConfigOutput()
seems to do nothing, let's forget I've put it theregray-xylophone-22620
01/15/2021, 1:27 AMToClusterVpcConfigOutput()
gray-xylophone-22620
01/15/2021, 1:27 AMgray-xylophone-22620
01/15/2021, 1:28 AMeksCluster.VpcConfig.ClusterSecurityGroupId()
because it returns StringPtrOutput
gray-xylophone-22620
01/15/2021, 1:29 AMStringInput
interfacelittle-cartoon-10569
01/15/2021, 1:29 AMeksCluster.VpcConfig.ClusterSecurityGroupId().Elem()
causes the same panic? I'd raise an issue on GitHub.gray-xylophone-22620
01/15/2021, 1:29 AMToStringOutput()
gray-xylophone-22620
01/15/2021, 1:30 AMgray-xylophone-22620
01/15/2021, 1:31 AMeksCluster.VpcConfig.ClusterSecurityGroupId().Elem()
causes panic, eksCluster.VpcConfig.ClusterSecurityGroupId()
just does not compile because of the issue I've just describedgray-xylophone-22620
01/15/2021, 1:32 AMlittle-cartoon-10569
01/15/2021, 1:33 AMgray-xylophone-22620
01/15/2021, 1:34 AMgray-xylophone-22620
01/15/2021, 9:29 AMcool-fireman-90027
01/15/2021, 1:08 PMgray-xylophone-22620
01/15/2021, 2:15 PMgray-xylophone-22620
01/20/2021, 10:10 PMcool-fireman-90027
01/21/2021, 1:03 PM