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

Make terraform module variables nullable #79

Merged
merged 1 commit into from
Dec 8, 2023

Conversation

johnake
Copy link
Contributor

@johnake johnake commented Dec 7, 2023

Context

So we can have the option of leaving some parameters empty and they pick the default value or we override the default other values when we use the modules

Changes proposed in this pull request

Make terraform module variables nullable if they are optional and have default values(and the default value isn't null)

Checklist

  • I have performed a self-review of my code, including formatting and typos
  • I have cleaned the commit history
  • I have added the Devops label
  • I have attached the pull request to the trello card

@johnake johnake added the devops label Dec 7, 2023
@johnake
Copy link
Contributor Author

johnake commented Dec 7, 2023

Copy link
Contributor

@thomasleese thomasleese left a comment

Choose a reason for hiding this comment

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

Should we instead be setting nullable = false on the required variables? I believe nullable = true is the default for all variables.

aks/application/variables.tf Outdated Show resolved Hide resolved
aks/redis/variables.tf Outdated Show resolved Hide resolved
@johnake johnake force-pushed the 808-make-terraform-module-variable-nullable branch from 0b65a58 to 47a786e Compare December 7, 2023 17:50
Copy link
Contributor

@thomasleese thomasleese left a comment

Choose a reason for hiding this comment

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

Nice, I think there might be a few more variables where we can set nullable = false, I think pretty much any variable where there isn't a default or it's not null.

So we can have the option of leaving some parameters empty and they
pick the default value or we override the default other values when
we use the modules
@johnake johnake force-pushed the 808-make-terraform-module-variable-nullable branch from 47a786e to 007b279 Compare December 8, 2023 14:32
@johnake johnake merged commit f51f10a into main Dec 8, 2023
3 checks passed
@johnake johnake deleted the 808-make-terraform-module-variable-nullable branch December 8, 2023 14:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants