-
Notifications
You must be signed in to change notification settings - Fork 35
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
Allow nested_type
terraform attributes
#101
Conversation
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 4m 42s |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #101 +/- ##
==========================================
+ Coverage 73.00% 74.10% +1.09%
==========================================
Files 16 17 +1
Lines 1015 1058 +43
Branches 182 186 +4
==========================================
+ Hits 741 784 +43
Misses 243 243
Partials 31 31
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Build failed. ❌ ansible-galaxy-importer RETRY_LIMIT in 7m 04s |
Merge Failed. This change or one of its cross-repo dependencies was unable to be automatically merged with the current state of its repository. Please rebase the change and upload a new patchset. |
@justinc1 you need to rebase the PR to fix linters issue (especially the |
Fixes ansible-collections#93 Signed-off-by: Justin Cinkelj <[email protected]>
Signed-off-by: Justin Cinkelj <[email protected]>
Signed-off-by: Justin Cinkelj <[email protected]>
Signed-off-by: Justin Cinkelj <[email protected]>
Signed-off-by: Justin Cinkelj <[email protected]>
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 4m 40s |
Signed-off-by: Justin Cinkelj <[email protected]>
Build succeeded. ✔️ ansible-galaxy-importer SUCCESS in 4m 54s |
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.
LGTM! Thanks @justinc1
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.
@justinc1 Thank you for working on this! LGTM!
a0306d7
into
ansible-collections:main
SUMMARY
terraform providers schema -json
attributes can be nested. In this case, there is notype
field, but we havenested_type
.The collection uses schema to sanitize
diff
interraform
module output.If attribute is sensitive, its value will be hidden.
In case of nested attribute it might be possible to have top level attribute with
sensitive=False
containing a child attribute withsensitive=True
. But I was not able to find terraform provider with such schema. I looked only at 35 official providers, and ignored remaining ~3000 partner and community providers.The only official provider with
nested_type
attributes and alsosensitive=True
child waswaypoint
. A schema fragment is included into unit tests.git_auth_basic
has non-sensitiveusername
and sensitivepassword
. Alsogit_auth_basic
is marked as sensitive. Thus it seems it is not needed to modify logic for diff sanitization - wholegit_auth_basic
will be hidden.Fixes #93
ISSUE TYPE
COMPONENT NAME
cloud.terraform.terraform
ADDITIONAL INFORMATION
Terraform provider
awscc
schema also contains nested attributes, an integration test is added to check schema is parsed.EDIT:
This is example of nested_type attribute that is not marked as sensitive, but it does contain sensitive sub-attribute.
Maybe a follow up PR will be need to ensure
admin_credentials.password
is hidden in ansible diff output.