Skip to content

pagerduty_incident_type_custom_field will not accept variables for both data_type & field_options inputs #1010

@davenash-lytx

Description

@davenash-lytx

When using the pagerduty_incident_type_custom_field resource it throws the following error if both data_type & field_options are passed as variables.

example:
  variables {
    field_type = "single_value_fixed"
    data_type = "string"
}

resource "pagerduty_incident_type_custom_field" "this" {
  name          = "${var.name}"
  incident_type = var.incident_type_id
  display_name  = var.display_name
  field_type    = var.field_type
  description   = "${var.description}"
  data_type     = var.data_type
  field_options =  var.field_options
  default_value = jsonencode(var.default_value)
  enabled       = var.enabled
}

returns:

│ with pagerduty_incident_type_custom_field.this,
│ on main.tf line 10, in resource "pagerduty_incident_type_custom_field" "this":
│ 10: field_type = var.field_type

│ field_type must be single_value when data_type is

If I replace either 'data_type = var.data_type' with data_type = "string" or field_options = var.field_options with `field_options = "single_value_fixed" it proceeds without any errors.

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