flat-bear-83490
06/24/2020, 4:02 PMtranformations
at https://www.pulumi.com/docs/intro/concepts/programming-model/#transformations and I'm finding that ResourceOptions.Merge doesn't seem to be available - I wondered if anyone had any pointers on this? Thanks!
var vpc = new MyVpcComponent("vpc", new ComponentResourceOptions
{
Transformations =
{
args =>
{
if (args.Resource.GetResourceType() == "aws:ec2/vpc:Vpc" ||
args.Resource.GetResourceType() === "aws:ec2/subnet:Subnet")
{
return new ResourceTransformationResult
{
Args: args.Args,
Options: ResourceOptions.Merge( // Not available
args.Options,
new CustomResourceOptions { IgnoreChanges = { "tags" } }),
};
}
return null;
}
},
});
faint-table-42725
06/24/2020, 6:49 PMCustomResourceOptions
or ComponentResourceOptions
depending on which type of resource it isflat-bear-83490
06/24/2020, 6:57 PMResourceTransformationArgs.Options
is a ResourceOptions whereas
CustomResourceOptions.Merge
takes CustomResourceOptions
Would you suggest creating a CustomResourceOptions based on the ResourceOptions from ResourceTransformationArgs.Options?tall-librarian-49374
06/24/2020, 7:43 PMif (options is CustomResourceOptions customOptions)
{
customOptions.Merge(…);
}
something like this?