Skip to content

arubacloud_securityrule resource doesn't persist tags after apply #27

@aru-amedeo

Description

@aru-amedeo

Description
When creating an arubacloud_securityrule resource with tags specified, the tags are accepted during plan but are returned as null after apply, causing a "Provider produced inconsistent result after apply" error.

Steps to reproduce

  1. create securityrule with tags
resource "arubacloud_securityrule" "kaas_egress" {
  name              = "test-egress-rule"
  location          = "ITBG-Bergamo"
  project_id        = "your-project-id"
  vpc_id            = "your-vpc-id"
  security_group_id = "your-sg-id"
  tags              = ["tag1", "tag2", "tag3"]
  properties = {
    direction = "Egress"
    protocol  = "ANY"
    port      = "*"
    target = {
      kind  = "Ip"
      value = "0.0.0.0/0"
    }
  }
}
  1. Run terraform apply

Expected behavior
The tags should be persisted on the security rule resource and remain available in the state after apply.

Actual behavior

Terraform fails with:

Error: Provider produced inconsistent result after apply

When applying changes to arubacloud_securityrule.kaas_egress, provider "provider["registry.terraform.io/arubacloud/arubacloud"]" 
produced an unexpected new value: .tags: was cty.ListVal([]cty.Value{cty.StringVal("tag1"), cty.StringVal("tag2"), 
cty.StringVal("tag3")}), but now null.

This is a bug in the provider, which should be reported in the provider's own issue tracker.

Workaround
Remove the tags attribute from arubacloud_securityrule resources until this is fixed.

Notes
Other resources in the provider (e.g., arubacloud_vpc, arubacloud_subnet, arubacloud_securitygroup) handle tags correctly without this issue.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions