mysterious-australia-14256
07/14/2021, 10:06 AMvar connectorDeployment = new Pulumi.AzureNative.Resources.Deployment( .... )
I then create the connection using an expanded version of the following where I am retrieving the CustomApi object created by the above deployment and using that when creating the connection.
var outputResources = connectorDeployment.Properties.Apply(props =>
{
Pulumi.AzureNative.Web.CustomApi bamConnector = Pulumi.AzureNative.Web.CustomApi.Get(connectorDeploymentResourceName, props.OutputResources[0].Id);
var connection = Pulumi.AzureNative.Web.Connection(name, args, new CustomResourceOptions
{
DependsOn = bamConnector,
Parent = bamConnector
});
return props;
}
This does deploy correctly and everything works but I would like to get Pulumi Preview to pick up this operation. How can I tweak my code so that Pulumi Preview is picking up the connection correctly?
I also have an issue where a Pulumi Destroy is only removing the deployment and not the actual object that was created.tall-librarian-49374
07/14/2021, 11:04 AMApply
which doesn’t run in the original preview (there’s no value to apply yet)Apply
. Instead, create it always, but pass args that are calculates with `Apply`sdependsOn
in this case. Not sure you can do Parent
though.mysterious-australia-14256
07/14/2021, 11:12 AMtall-librarian-49374
07/14/2021, 11:24 AMmysterious-australia-14256
07/14/2021, 11:25 AMtall-librarian-49374
07/14/2021, 11:52 AM