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

DXCDT-515: Client grants resource export support #815

Merged
merged 4 commits into from
Aug 30, 2023

Conversation

willvedd
Copy link
Contributor

🔧 Changes

Introducing support for exporting the auth0_client_grant resource with the reverse terraform functionality.

The output will appear like this:

import {
  id = "cgr_1WD0mr76sNmRi0Hq"
  to = auth0_client_grant.BZRIum1HFFj1x_httpstravel0usauth0comapiv2
}

import {
  id = "cgr_OqbXFjrBsN1qSwty"
  to = auth0_client_grant.hvxA5ojdxUw_httpstravel0usauth0comapiv2
}

Admittedly, the formatting of the audience, usually a URL, is not pleasant but this will be corrected in a follow-up PR which will clean-up all resource names.

📚 References

Related PRs: #808, #797, #810, #809 #812 #811

🔬 Testing

Adding unit tests, manually verified.

📝 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)

@willvedd willvedd requested a review from a team as a code owner August 30, 2023 12:24

for _, grant := range grants.ClientGrants {
data = append(data, importDataItem{
ResourceName: "auth0_client_grant." + grant.GetClientID() + "_" + sanitizeResourceName(grant.GetAudience()),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to get the client name here 😭 but I know we don't have access to it on the client grant, so nothing actionable, just a note.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, its similar to what we do in Deploy CLI. I'll add a ticket for this enhancement.

@codecov-commenter
Copy link

Codecov Report

Patch coverage: 89.47% and project coverage change: +0.08% 🎉

Comparison is base (062091f) 72.10% compared to head (56119fb) 72.18%.
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #815      +/-   ##
==========================================
+ Coverage   72.10%   72.18%   +0.08%     
==========================================
  Files          91       91              
  Lines       11474    11531      +57     
==========================================
+ Hits         8273     8324      +51     
- Misses       2696     2702       +6     
  Partials      505      505              
Files Changed Coverage Δ
internal/cli/terraform.go 65.51% <0.00%> (-1.55%) ⬇️
internal/cli/terraform_fetcher.go 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@willvedd willvedd merged commit e69ef61 into main Aug 30, 2023
@willvedd willvedd deleted the DXCDT-515-client-grants-resource-export-support branch August 30, 2023 18:20
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.

3 participants