Skip to content

create incident catalog entry attribute#218

Open
crockeo wants to merge 2 commits intoincident-io:masterfrom
crockeo:master
Open

create incident catalog entry attribute#218
crockeo wants to merge 2 commits intoincident-io:masterfrom
crockeo:master

Conversation

@crockeo
Copy link

@crockeo crockeo commented Jun 10, 2025

Creates a new resource type, incident_catalog_entry_attribute which can be used to assign a single attribute to an Incident.io catalog entry.

Example usage:

resource "incident_catalog_entry_attribute" "attribute" {
    catalog_entry_id = "FAKEID1"
    attribute_id     = "FAKEID2"
    value            = "some value"
}

This form allows you to manage a catalog entry and its attributes separately, which means:

  • You can more easily conditionally attach attributes to an entry (using count = <condition> : 1 ? 0, rather than conditionally populating elements in array).
  • You can resolve cycles between catalogs, where for example, catalog1 and catalog2 have attributes which reference each other. Currently, that produces a cycle at TF plan time. In this formulation you can provision catalog1, catalog2, and their attributes such that they don't have a cycle.

Note that this architecture is used elsewhere in the TF ecosyste, for example AWS once suggested developer use ingress and egress on the aws_security_group resource, but now they suggest that developers create separate resources, much in the same way.

Note that this creates a sharp edge, where one could accidentally try to manage a catalog entry attribute through both incident_catalog_entry and incident_catalog_entry_attribute. I don't know a great solution to this w/o a backwards incompatible change.

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