ably / terraform-provider-ably

Ably's Terraform Provider, enabling you to manage your Ably account programmatically.
https://registry.terraform.io/providers/ably/ably
Apache License 2.0
11 stars 2 forks source link

AMQP rule does not accept null for channel_filter #151

Closed kandreasyan closed 1 year ago

kandreasyan commented 1 year ago

Ably AMQP rule does not accept null for channel_filter(it is a mandatory field) but when I set match everything/leave blank in the UI it stores a null in the state file.

resource "ably_rule_amqp" "rule_amqp" {
Must set a configuration value for the source.channel_filter attribute as the provider has marked it as required.

I can use a regular expression that matches everything, but I am not sure that will work as expected.

sync-by-unito[bot] commented 1 year ago

➤ Automation for Jira commented:

The link to the corresponding Jira issue is https://ably.atlassian.net/browse/SDK-2977

Morganamilo commented 1 year ago

It seems the REST API we are calling to manage rules requires this field when it really shouldn't. Asking the web team for a fix and once that lands we can fix it here too.

Morganamilo commented 1 year ago

So it seems that the API wants an empty string not a null. So you can just set the value to an empty string as a work around. I have a PR up that makes the field optional so a null will also work on the terraform side.

kandreasyan commented 1 year ago

@Morganamilo Thank you!