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 velero_storage_settings type #3

Merged
merged 3 commits into from
Mar 11, 2022

Conversation

Flow76320
Copy link

Hi !

There seems to be an issue when we try to override velero_storage_settings.
It's used as an object, but it defaults to the old map(any) type. This prevents users to override more than one parameter at a time.

This PR should fix this.
Users should be able to override all settings with, for example:

  velero_storage_settings = {
    name                              = mystoragename
    resource_group_name     = module.mymodule.resource_rg_name
    location                           = var.location
    account_tier                    = "Standard"
    account_replication_type = "GRS"
    tags                                = local.sometags
    allowed_cidrs                  = []
    allowed_subnet_ids         = []
    container_name              = "velero-backups"
  }

@BzSpi
Copy link
Contributor

BzSpi commented Mar 10, 2022

Hello @Flow76320

Thank you very much for your contribution, we appreciate.

However, can you provide us a code example in which overriding several parameters is not possible ? We're not able to reproduce the issue.

Also, with your implementation, the user is forced to override every parameters, unless you use the optional experimental flag.

@Flow76320
Copy link
Author

Optional parameter is an option but I didn't want to add some experimental feature into that PR. LGTM

Copy link
Contributor

@jmapro jmapro left a comment

Choose a reason for hiding this comment

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

LGTM

@BzSpi
Copy link
Contributor

BzSpi commented Mar 11, 2022

Optional parameter is an option but I didn't want to add some experimental feature into that PR. LGTM

We tried to avoid it in the beginning also, but it's implemented since a few versions now and it's very very handy for this kind of use cases.

@Shr3ps Shr3ps merged commit 9932ac9 into claranet:master Mar 11, 2022
Shr3ps added a commit that referenced this pull request Mar 11, 2022
Breaking
  * GITHUB-3: `[module_variable_optional_attrs]` requires terraform `v0.14+`

Changed
  * [GITHUB-3](#3): Fix `velero_storage_settings` type, and make attributes optional

Added
  * AZ-615: Add an option to enable or disable default tags
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.

5 participants