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

Add new flag to specify terraform version in auth0 tf generate command #1098

Merged
merged 3 commits into from
Oct 31, 2024

Conversation

duedares-rvj
Copy link
Contributor

🔧 Changes

Auth0-cli used 1.5.0 terraform version while generating the terraform files duing auth0 tf generate
Among multiple limitations of this version, one was that during the use of terraform import if a resource attribute contains a json, it is treated as a escaped strings.

Example:

auth0 tf generate --output-dir tmp-auth0-tf --resources auth0_flow_vault_connection,auth0_form,auth0_flow --tf-version 1.9.1

Would generate below format:

nodes = jsonencode([{
    config = {
      flow_id   = "af_rmhb8CRNFydAikyW6WJohs"
      next_node = "$ending"
    }
    coordinates = {
      x = 1835
      y = 35
    }
}])

On versions lower than 1.8.0 it'd look like below:

  start        = "{\"coordinates\":{\"x\":-131,\"y\":-14},\"next_node\":\"step_JCbi\"}"

📚 References

🔬 Testing

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

@duedares-rvj duedares-rvj requested a review from a team as a code owner October 29, 2024 05:54
kushalshit27
kushalshit27 previously approved these changes Oct 29, 2024
@codecov-commenter
Copy link

codecov-commenter commented Oct 29, 2024

Codecov Report

Attention: Patch coverage is 92.30769% with 1 line in your changes missing coverage. Please review.

Project coverage is 71.81%. Comparing base (6b655ef) to head (1587141).

Files with missing lines Patch % Lines
internal/cli/terraform.go 92.30% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1098   +/-   ##
=======================================
  Coverage   71.80%   71.81%           
=======================================
  Files          94       94           
  Lines       13150    13151    +1     
=======================================
+ Hits         9443     9444    +1     
  Misses       3153     3153           
  Partials      554      554           

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

@duedares-rvj duedares-rvj merged commit 00cb216 into main Oct 31, 2024
9 checks passed
@duedares-rvj duedares-rvj deleted the add_terraform_version_flag_for_generate branch October 31, 2024 09:49
@duedares-rvj duedares-rvj self-assigned this Oct 31, 2024
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