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-537: Removing minor validation to enable easier importing of auth0_guardian #820

Merged
merged 2 commits into from
Sep 11, 2023

Conversation

willvedd
Copy link
Contributor

@willvedd willvedd commented Sep 8, 2023

🔧 Changes

When importing auth0_guardian with a config-driven import, it is possible that generated configuration be invalid. In particular if the phone block is disabled or not defined. The result is this error:

with auth0_guardian.guardian,
│   on auth0_generated.tf line 18, in resource "auth0_guardian" "guardian":
│   18:     message_types = []
│
│ "phone.0.message_types": all of phone.0.message_types,phone.0.provider must be specified

We investigated this issue pretty thoroughly and there is not a simple way of addressing in a more idiomatic way, through the flattens or expands. This is made more difficult by the Management API which can return empty phone providers and empty-set message types.

An important note – in practical terms, it would be rare to configure the message types without a provider but it is technically possible because they are administered with separate endpoints. Because of this, this validation is lax but still correct.

📚 References

🔬 Testing

All tests should pass. Also manually verified with config-driven imports.

📝 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 September 8, 2023 17:31
@codecov-commenter
Copy link

Codecov Report

Merging #820 (abd4088) into v1 (abd4088) will not change coverage.
The diff coverage is n/a.

❗ Current head abd4088 differs from pull request most recent head 8d79aa3. Consider uploading reports for the commit 8d79aa3 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##               v1     #820   +/-   ##
=======================================
  Coverage   89.88%   89.88%           
=======================================
  Files          99       99           
  Lines       13569    13569           
=======================================
  Hits        12197    12197           
  Misses        975      975           
  Partials      397      397           

@sergiught sergiught merged commit 1543ea4 into v1 Sep 11, 2023
4 checks passed
@sergiught sergiught deleted the DXCDT-537-guardian-import-empty-message-types branch September 11, 2023 13:14
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