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-500: auth0_import.tf file creation function #793

Merged
merged 6 commits into from
Aug 8, 2023

Conversation

willvedd
Copy link
Contributor

@willvedd willvedd commented Aug 7, 2023

🔧 Changes

Introducing the createImportFile function which accepts data about import blocks, formats that data and creates a auth0_import.tf file in the specified directory. This file is then used in subsequent steps to facilitate automatic configuration generation.

It introduces a ImportResource type that standardizes the contract between this new function and the rest of the process.

Sample Output import.tf

# This file automatically generated via the Auth0 CLI.
# It can be safely removed after the successful generation 
# of TF resource definition files.

import {
	id = "con_FJVIi4jt1aQWwvoG"
	to = auth0_connection.sms
}
import {
	id = "con_DW1Ii5Tb4aEkvtoE"
	to = auth0_connection.email
}

📚 References

🔬 Testing

Added unit tests. Also manually ran and verified that it worked with subsequent terraform plan -generate-config-out=generated_output.tf

📝 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 7, 2023 21:24
@codecov-commenter
Copy link

Codecov Report

Patch coverage: 83.78% and project coverage change: +0.02% 🎉

Comparison is base (810de08) 72.11% compared to head (bb28c74) 72.14%.

Additional details and impacted files
@@                       Coverage Diff                       @@
##           feature/DXCDT-498-terraform     #793      +/-   ##
===============================================================
+ Coverage                        72.11%   72.14%   +0.02%     
===============================================================
  Files                               90       90              
  Lines                            11223    11260      +37     
===============================================================
+ Hits                              8093     8123      +30     
- Misses                            2627     2633       +6     
- Partials                           503      504       +1     
Files Changed Coverage Δ
internal/cli/terraform.go 82.72% <83.78%> (+0.53%) ⬆️

... and 1 file with indirect coverage changes

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

Base automatically changed from feature/DXCDT-498-terraform to main August 8, 2023 11:44
@sergiught sergiught force-pushed the DXCDT-500-import-tf-file-generation branch from bb28c74 to 5576bda Compare August 8, 2023 13:51
@sergiught sergiught changed the base branch from main to feature/DXCDT-499-client-data-fetcher August 8, 2023 13:52
Base automatically changed from feature/DXCDT-499-client-data-fetcher to main August 8, 2023 14:29
@willvedd willvedd enabled auto-merge (squash) August 8, 2023 14:32
@willvedd willvedd merged commit 00f56c4 into main Aug 8, 2023
6 checks passed
@willvedd willvedd deleted the DXCDT-500-import-tf-file-generation branch August 8, 2023 14:47
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