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

Fix mount_options in nomad_volume #188

Merged
merged 2 commits into from
Jan 15, 2021
Merged

Conversation

lgfa29
Copy link
Contributor

@lgfa29 lgfa29 commented Jan 15, 2021

The nomad_volume resource had mount_options as a map with complex types, which Terraform can't process properly. The Nomad API also redacts mount_options from its response since it may contain sensitive values.

This PR changes the field type to a list with only 1 item to allow passing the sub-fields from the config file. It also doesn't try to read back mount_options from the API since it will always be nil.

Since the schema was modified, a migration function was necessary.

Fixes #182

@lgfa29 lgfa29 force-pushed the fix-nomad-volume-mount-options branch from 231adb3 to 13c3ccd Compare January 15, 2021 19:23
@lgfa29 lgfa29 marked this pull request as ready for review January 15, 2021 19:23
cgbaker
cgbaker previously approved these changes Jan 15, 2021
Copy link
Contributor

@cgbaker cgbaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good job, especially on the upgrade.

nomad/resource_volume.go Outdated Show resolved Hide resolved
Co-authored-by: Chris Baker <1675087+cgbaker@users.noreply.github.com>
@lgfa29
Copy link
Contributor Author

lgfa29 commented Jan 15, 2021

@cgbaker can I get a ✅? 😄

@cgbaker
Copy link
Contributor

cgbaker commented Jan 15, 2021

that's so weird, i thought i did.... has github changed the order of the combo box or something?

Copy link
Contributor

@cgbaker cgbaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved!!!

@lgfa29 lgfa29 merged commit b66efb5 into master Jan 15, 2021
@lgfa29 lgfa29 deleted the fix-nomad-volume-mount-options branch January 15, 2021 20:31
This was referenced Jan 16, 2021
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.

Nomad Volume mount_options Issue
2 participants