unplatform-io / pulumi-commercetools

A Commercetools Pulumi resource package, bridges to the commercetools Terraform provider
Apache License 2.0
4 stars 3 forks source link

All subscription fields are required #5

Open Jonne opened 2 years ago

Jonne commented 2 years ago

When creating a new subscription and choosing azure service bus for example, you also need to provider the required fields for other destination types.

For example, region and uri are not relevant for the azure service bus destination

        new Pulumi.Commercetools.Subscription("Index update", new Pulumi.Commercetools.SubscriptionArgs
        {
            Key = "index-update",
            Destination = new SubscriptionDestinationArgs
            {
                Type = "azure_servicebus",
                ConnectionString = IndexUpdateConnectionString,
                Region = "not_used",
                Uri = "http://notused.com",
            },
            Messages = new List<SubscriptionMessageArgs>
            {
                new SubscriptionMessageArgs
                {
                    ResourceTypeId = "product",
                    Types = new List<string>
                    {
                        "ProductPublished"
                    }
                }
            },
        });
Jonne commented 2 years ago

Not sure if we can fix this, also seems to be a problem in the Terraform provider.