Skip to content

Conversation

@theipster
Copy link

Issue #, if available: #1286

Description of changes:

Currently, for each of the Terraform module's input variables, consumers must either configure all or none of that variable's nested attributes; it is not possible to only configure some of the nested attributes.

# Working scenario: configuring all attributes of `cid_dataexports_source` input variable.
module "foo" {
  ...

  cid_dataexports_source = {
    source_resource_prefix  = "cid"
    source_manage_cur2      = "yes"
    source_manage_focus     = "yes"
    source_manage_coh       = "yes"
    source_enable_scad      = "yes"
    source_role_path        = "/"
    source_time_granularity = "HOURLY"
  }
}

# Working scenario: configuring no attributes of `cid_dataexports_source` input variable.
module "foo" {
  ...

  # cid_dataexports_source = {}
}

However, it is quite a common scenario to want to only configure some attributes, e.g. enabling a single optional dashboard or enabling a single optional source, without being concerned about any of the other attributes (i.e. needing to copy all the other default values).

# Proposed scenario: configuring some attributes of `cid_dataexports_source` input variable.
module "foo" {
  ...

  cid_dataexports_source = {
    source_manage_focus = "yes"
    source_manage_coh   = "yes"
  }
}

This PR changes the definition of each of the nested attributes to be individually optional(...) but without breaking the interface / contract with existing consumers.

N.B. I can see that PR #1276 also introduces some changes to improve the usability of the module (in fact, we have made identical changes for our own deployment). Thankfully, my PR should not conflict with any changes in #1276.


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@theipster theipster mentioned this pull request Dec 9, 2025
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.

1 participant