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

Resolve issue with mount_points.readOnly bool and TF15 #137

Merged
merged 3 commits into from
Jul 30, 2021

Conversation

darpham
Copy link
Contributor

@darpham darpham commented May 19, 2021

what

  • Add backwards compatibility with TF15 related to mount_points variable

why

  • Incompatibility with TF15, root cause is unknown

references

comments/notes

  • This will force users to specify the readOnly bool, previously where null was specified should now be false per AWS default
  • Initially wanted to use default optional function within the variable, but this feature is only available in TF15

@darpham darpham force-pushed the mount_points_readOnly_tf15 branch from fa4376d to 02e3ad6 Compare May 19, 2021 21:19
@nitrocode
Copy link
Member

See the original PR https://github.com/cloudposse/terraform-aws-ecs-container-definition/pull/78/files that changed

Unfortunately this will break backwards compatibility with previous default of readOnly to false which is why the list(object()) definition for this variable was removed since in pre-0.15 versions, we could not set optional map values.

It would be better to analyze why terraform 15 has an issue with unmarshalling string readOnly of type bool. Perhaps it's a bug in terraform?

Even better would be that once we move to all of our modules to tf 15, we use the optional function instead and remove our dependence on previous versions.

@nitrocode
Copy link
Member

/test all

@nitrocode nitrocode merged commit 63facfd into cloudposse:master Jul 30, 2021
@nitrocode
Copy link
Member

@darpham it seems it's better to explicitly set the variable if there is no other workaround. Thank you for the PR.

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.

Terraform 0.15 error when specifying bool input
3 participants