-
Notifications
You must be signed in to change notification settings - Fork 59
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-539: Miscellaneous tf generate
cleanup ahead of release
#845
Conversation
|
||
It automatically scans your Auth0 Tenant and compiles a set of Terraform configuration files based on the existing resources and configurations. | ||
|
||
Refer to the [instructional guide](https://registry.terraform.io/providers/auth0/auth0/latest/docs/guides/generate_terraform_config) for specific details on how to use this command. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Link isn't live yet but will be once auth0/terraform-provider-auth0#825 is merged and published.
@@ -28,7 +32,7 @@ auth0 terraform generate [flags] | |||
``` | |||
--force Skip confirmation. | |||
-o, --output-dir string Output directory for the generated Terraform config files. If not provided, the files will be saved in the current working directory. (default "./") | |||
-r, --resources strings Resource types to generate Terraform config for. If not provided, config files for all available resources will be generated. (default [auth0_action,auth0_attack_protection,auth0_branding,auth0_client,auth0_client_grant,auth0_connection,auth0_custom_domain,auth0_email_provider,auth0_guardian,auth0_log_stream,auth0_organization,auth0_pages,auth0_prompt,auth0_prompt_custom_text,auth0_resource_server,auth0_role,auth0_tenant,auth0_trigger_actions]) | |||
-r, --resources strings Resource types to generate Terraform config for. If not provided, config files for all available resources will be generated. (default [auth0_action,auth0_attack_protection,auth0_branding,auth0_client,auth0_client_grant,auth0_connection,auth0_custom_domain,auth0_email_provider,auth0_guardian,auth0_organization,auth0_pages,auth0_prompt,auth0_prompt_custom_text,auth0_resource_server,auth0_role,auth0_tenant,auth0_trigger_actions]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
auth0_log_stream
had some issues during initial testing. Notably, the configuration that gets generated violates the TF provider validation. Removing it from the default list enables a better developer experience overall while we investigate how to generate valid config.
@@ -68,7 +68,7 @@ func (i *terraformInputs) parseResourceFetchers(api *auth0.API) ([]resourceDataF | |||
fetchers = append(fetchers, &clientResourceFetcher{api}) | |||
case "auth0_client_grant": | |||
fetchers = append(fetchers, &clientGrantResourceFetcher{api}) | |||
case "auth0_connection": | |||
case "auth0_connection", "auth0_connection_clients": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The auth0_connection_clients
resource, along with other relationship resources, is outputted along with the auth0_connection
resource. The user does not have the option to specify one or the other, simply all or nothing. However, it may be confusing for users which want to specify these resources in the --resources
argument. This change simply prevents any error that could occur.
@@ -264,7 +268,7 @@ func createMainFile(outputDIR string) error { | |||
required_providers { | |||
auth0 = { | |||
source = "auth0/auth0" | |||
version = "1.0.0-beta.1" | |||
version = "1.0.0-beta.4" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not yet released but anticipating this release. It includes necessary fixes for this feature.
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #845 +/- ##
==========================================
+ Coverage 72.47% 72.65% +0.17%
==========================================
Files 91 92 +1
Lines 11773 11846 +73
==========================================
+ Hits 8533 8607 +74
+ Misses 2734 2733 -1
Partials 506 506
☔ View full report in Codecov by Sentry. |
@@ -233,7 +233,7 @@ func TestActionsInputSecretsToActionSecrets(t *testing.T) { | |||
}, | |||
} | |||
assert.Len(t, *res, 3) | |||
assert.Equal(t, res, &expected) | |||
assert.Equal(t, *res, expected) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixing a flaky test.
🔧 Changes
Tying-up some loose ends ahead of the
auth0 tf generate
functionality release. Added context inline with the changes.🔬 Testing
Relevant changes to unit tests when applicable.
📝 Checklist