You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
stackit_cdn_distribution: removing WAF disabled_rule_ids is not detected during terraform plan #1630
When a value is added to disabled_rule_ids, Terraform correctly detects the change and applies it successfully.
However, after removing the value from the Terraform configuration, terraform plan reports no changes, even though the rule is still configured remotely.
As a result, the configuration cannot be reverted using Terraform.
Remove or comment out the disabled_rule_ids attribute.
Run terraform plan or terraform apply
Actual behavior
No changes. Your infrastructure matches the configuration.
Although the disabled_rule_ids configuration has been removed from the Terraform configuration, Terraform does not detect any changes and therefore never removes the rule from the remote resource.
Expected behavior
Terraform should detect that disabled_rule_ids has been removed from the configuration and generate an update plan that removes the rule from the remote resource.
Terraform version (see terraform --version): v1.15.8
Version of the STACKIT Terraform provider: v0.104.0
Additional information
Adding values to disabled_rule_ids works correctly and the provider successfully updates the resource.
The issue only occurs when removing previously configured values. Since Terraform reports "No changes", users cannot remove disabled WAF rules through Terraform once they have been applied.
This may indicate that the provider does not correctly compare the configured state with the remote state for disabled_rule_ids during the planning phase.
During testing, the same behavior appears to affect other WAF list attributes as well (for example enabled_rule_ids, enabled_rule_group_ids, disabled_rule_group_ids, log_only_rule_ids, and similar attributes), although only disabled_rule_ids has been verified in detail so far.
Additionally, after successfully applying disabled_rule_ids, the STACKIT Portal still displays the corresponding WAF rule as active instead of disabled. It is currently unclear whether this is only a UI issue in the portal or whether the rule is not being persisted correctly by the backend.
Hey @Met1nG, i'm currently looking into this again after some changes to the API. Just to be clear, this is the default behavior of optional + computed fields. Removing them from the config will first retain the state (thus no changes will be planned for the next terraform apply) and allow the server to control the attribute. If you want to clear it, you can always set it to an explicit empty list: disabled_rule_ids = []. Terraform will detect this and clear the value.
Is there a specific reason why you would expect this attribute to deviate from the default optional + computed field's behavior? I'm open to changing it but i'm interested in your reasoning.
Thanks and best regards,
Jonas from the STACKIT Developer Tools team
thanks for the clarification regarding the default behavior of optional + computed attributes.
That makes sense, and I agree that explicitly setting an empty list is a reasonable approach.
We had previously encountered an issue when using empty lists, which was addressed in #1629.
I've now retested this with disabled_rule_collection_ids = [], and the apply completes successfully.
From my side, there's no need to change the current optional + computed behavior.
Activity
SerseusWasTaken commentedon Jul 31, 2026
Hi @Met1nG, thanks for raising this issue. I was also able to reproduce this and created a internal ticket for tracking. We will take a look at this.
SerseusWasTaken commentedon Oct 30, 2026
Hey @Met1nG, i'm currently looking into this again after some changes to the API. Just to be clear, this is the default behavior of
optional+computedfields. Removing them from the config will first retain the state (thus no changes will be planned for the nextterraform apply) and allow the server to control the attribute. If you want to clear it, you can always set it to an explicit empty list:disabled_rule_ids = []. Terraform will detect this and clear the value.Is there a specific reason why you would expect this attribute to deviate from the default
optional+computedfield's behavior? I'm open to changing it but i'm interested in your reasoning.Thanks and best regards,
Jonas from the STACKIT Developer Tools team
Met1nG commentedon Nov 3, 2026
Hi @SerseusWasTaken
thanks for the clarification regarding the default behavior of optional + computed attributes.
That makes sense, and I agree that explicitly setting an empty list is a reasonable approach.
We had previously encountered an issue when using empty lists, which was addressed in #1629.
I've now retested this with disabled_rule_collection_ids = [], and the apply completes successfully.
From my side, there's no need to change the current optional + computed behavior.
Thanks for looking into this!
Best regards
Metin