Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent property_mappings behavior in authentik_provider_proxy #470

Open
diegmonti opened this issue Feb 13, 2024 · 0 comments
Open

Comments

@diegmonti
Copy link

Issue Description

When creating a Terraform resource authentik_provider_proxy with a property_mappings array, the state of the resource on the server becomes inconsistent with respect to the state in the configuration.

Steps to Reproduce

  1. Define the following Terraform configuration:
resource "authentik_scope_mapping" "my_mapping" {
  name       = "my_mapping"
  scope_name = "my_mapping"
  expression = [...]
}
resource "authentik_provider_proxy" "provider_proxy" {
  name              = "example"
  mode              = "forward_single"
  external_host     = "https://my.example.com"
  property_mappings = [authentik_scope_mapping.my_mapping.id]
}
  1. After creating the resources, run again terraform apply.

Observed Behavior

Each time terraform apply is executed, Terraform attempts to modify the resource to remove some property_mappings:

  ~ resource "authentik_provider_proxy" "provider_proxy" {
      ~ property_mappings            = [
            "my_mapping_id",
          - "managed_mapping_id_1",
          - "managed_mapping_id_2",
          - "managed_mapping_id_3",
          - "managed_mapping_id_4",
        ]
    }

Expected Behavior

The resource should maintain consistency between the configuration and the server state. Terraform should not attempt to remove "managed_mapping_id_1", "managed_mapping_id_2", "managed_mapping_id_3", and "managed_mapping_id_4", as these are considered "managed mappings" and should not be altered by Terraform during plan execution.

managed mappings

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant