Skip to content

Terraform fails to create a namespace if its configuration is empty (no groups) #20

@e-gautier

Description

@e-gautier
terraform -v
v1.5.0

actual behavior

When attempting to create a namespace (for instance: )

resource "mimirtool_ruler_namespace" "my_namespace" {
  namespace                   = "my_namespace"
  config_yaml                 = file("my_namespace.yaml")
  strict_recording_rule_check = true
}

where my_namespace.yaml contains the following:

---
namespace: my_namespace
groups: []

Terraform succeeds to plan but fails to apply and returns no namespace definition found.

Expected Behavior

Terraform should fail to plan or proceed to create an empty namespace on apply.

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