Skip to content

feat: add terraform export support for auth0_token_exchange_profile - #1627

Open
katlimruiz-olh wants to merge 1 commit into
auth0:mainfrom
katlimruiz-olh:feat/terraform-export-token-exchange-profile
Open

feat: add terraform export support for auth0_token_exchange_profile#1627
katlimruiz-olh wants to merge 1 commit into
auth0:mainfrom
katlimruiz-olh:feat/terraform-export-token-exchange-profile

Conversation

@katlimruiz-olh

Copy link
Copy Markdown

🔧 Changes

Adds Terraform export (auth0 tf generate) support for the auth0_token_exchange_profile resource, following the same pattern used for other resources (e.g. auth0_client, auth0_user_attribute_profile):

  • Added tokenExchangeProfileResourceFetcher in internal/cli/terraform_fetcher.go, which paginates via the checkpoint-based List API (same pattern as auth0_user_attribute_profile) and emits one auth0_token_exchange_profile.<sanitized_name> import entry per profile.
  • Registered auth0_token_exchange_profile in defaultResources and in the parseResourceFetchers switch in internal/cli/terraform.go.
  • Regenerated docs/auth0_terraform_generate.md via make docs to reflect the new resource in the --resources flag's default value list.

No new dependencies, no changes to command behavior for existing resources.

🔬 Testing

  • Added TestTokenExchangeProfileResourceFetcher in internal/cli/terraform_fetcher_test.go, mirroring the existing TestUserAttributeProfileResourceFetcher test, verifying the fetcher maps a mocked TokenExchangeProfile to the expected importDataItem.
  • Added a case to TestTerraformInputs_ParseResourceFetchers in internal/cli/terraform_test.go verifying -r auth0_token_exchange_profile resolves to the new fetcher.
  • go build ./... and go test ./... pass.

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

Adds a resourceDataFetcher for auth0_token_exchange_profile, following the
same checkpoint-pagination pattern used by auth0_user_attribute_profile, and
registers it in the default resource list and parseResourceFetchers switch.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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

Successfully merging this pull request may close these issues.

1 participant