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

Client Import does not import addons #28

Closed
sergiught opened this issue Feb 21, 2022 · 2 comments
Closed

Client Import does not import addons #28

sergiught opened this issue Feb 21, 2022 · 2 comments
Labels
🪲 bug Something isn't working resource/auth0_client

Comments

@sergiught
Copy link
Contributor

From terraform-provider-auth0 created by larryboymi: alexkappa/terraform-provider-auth0#361

Description

When importing a client with the provider, it does not pull in addon-related data, such that a plan for terraform and a client having addons will think that a change/modify is necessary to get in-line with what is present in Auth0 for the client.

Terraform Version

Terraform v0.14.9
+ provider.auth0 v0.20.0

Affected Resource(s)

  • auth0_client

Terraform Configuration Files

  dynamic "addons" {
    for_each = each.value.logout_callback == null ? [] : [each.value.logout_callback]

    content {
      samlp {
        audience = each.value.audience

        logout = {
          callback = each.value.logout_callback
        }

        map_unknown_claims_as_is = true
      }
    }
  }

Expected Behavior

When running a terraform import for a given client, it would be nice if the addons were imported as well, such that a subsequent terraform plan does not try to modify an existing client for which addons already exist.

Actual Behavior

Steps to Reproduce

  1. terraform plan

After an import, a subsequent plan of a client having addons looks like the following

      + addons {
          + samlp {
              + audience                           = "https://my-url"
              + create_upn_claim                   = true
              + digest_algorithm                   = "sha1"
              + include_attribute_name_format      = true
              + lifetime_in_seconds                = 3600
              + logout                             = {
                  + "callback" = "https://my-saml-logout"
                }
              + map_identities                     = true
              + map_unknown_claims_as_is           = true
              + name_identifier_format             = "urn:oasis:names:tc:SAML:1.1:nameid-format:unspecified"
              + passthrough_claims_with_no_mapping = true
              + signature_algorithm                = "rsa-sha1"
              + typed_attributes                   = true
            }
        }

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
@sergiught
Copy link
Contributor Author

Closing this down as this is now available through https://github.com/auth0/terraform-provider-auth0/releases/tag/v0.29.0.

cc: @larryboimi

@cassdeckard
Copy link

cassdeckard commented Sep 27, 2024

Using v1.6.1, I'm still finding this behavior. Not sure if it's a regression from some time between 0.29 and now.

We had an application with the SAML2 (samlp) addon configured. Imported it to a resource that had no addons configured and the plan stage detected no changes.

We then added the samlp block to our addons block for the now-imported app resource and and plan told us that addition was a change, just like in OP's Steps to Reproduce. Applying didn't actually change anything, since we already had the addon enabled with defaults for everything, but I suspect that if we had changed any of the default configuration, the auth0 provider would have overwritten those changes while claiming they were mere additions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪲 bug Something isn't working resource/auth0_client
Projects
None yet
Development

No branches or pull requests

2 participants