Skip to content

Deleting a partially created policy set in harness from TF causes TF to fail to resolve #1345

@estein9825

Description

@estein9825

When trying to create a policy set, I had the wrong policy severity (warn instead of warning) it still created an empty policy set. When I fixed the warning and attempted to run it again I got:


│ Error: Bad Request: policy set identifier must be unique

│ with harness_platform_policyset.opa_policyset["nonproduction_set"],
│ on main.tf line 61, in resource "harness_platform_policyset" "opa_policyset":
│ 61: resource "harness_platform_policyset" "opa_policyset" {

I deleted the policy set in harness and went to reapply and got this error in TF:

│ Error: Provider produced inconsistent result after apply

│ When applying changes to
│ harness_platform_policyset.opa_policyset["nonproduction_set"], provider
│ "provider["registry.opentofu.org/harness/harness"]" produced an
│ unexpected new value: root object was present, but now absent.

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

It still created the policy set, however.

Please fix it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions