Skip to content

Allow configuration of origin_group name #339

@atimofeev

Description

@atimofeev

Describe the Feature

Currently, origin_groups is an object with following structure:

list(object({
    primary_origin_id  = string
    failover_origin_id = string
    failover_criteria  = list(string)
  }))

It does not allow setting up custom id.
Instead, the module names groups in this format:
$name-group[$id]

This is not ideal, as when specifying target_origin_id in ordered_cache config, we have to reference it by an arbitrary group id, based on its order of appearance in config, instead of actual name and purpose.

Expected Behavior

Allow optional attribute to specify group_id:

list(object({
    group_id = optional(string)
    primary_origin_id  = string
    failover_origin_id = string
    failover_criteria  = list(string)
  }))

Use Case

Ability to specify custom origin_group id will allow creation of more readable, template-able and DRY tf manifests.

Describe Ideal Solution

Allow optional attribute to specify group_id:

list(object({
    group_id = optional(string)
    primary_origin_id  = string
    failover_origin_id = string
    failover_criteria  = list(string)
  }))

Alternatives Considered

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions