highbond_attribute_type (Resource)

Example Usage

resource "highbond_attribute_type" "number" {
  name          = "What is your age?"
  display_name  = "What is your age?"
  data_type     = "number"
  is_global     = true
  is_required   = true
  tooltip       = "Hey"
  field_name    = "number_attribute_type__c" // Non-root user should suffix field_name with __c and from toolkits(root-user) need not suffix field_name with __c
  force_updates = true                       // Create only with force update changes

  type_options {
    default    = 45
    is_decimal = true
  }
}

resource "highbond_attribute_type" "boolean" {
  name          = "Are you married?"
  display_name  = "Are you married?"
  data_type     = "boolean"
  is_global     = true
  is_required   = true
  tooltip       = "Hey"
  field_name    = "boolean_attribute_type__c" // Non-root user should suffix field_name with __c and from toolkits(root-user) need not suffix field_name with __c
  force_updates = true                        // Create only with force update changes
  type_options {
    default = false
  }
}

resource "highbond_attribute_type" "text" {
  name          = "What is your name?"
  display_name  = "What is your name?"
  data_type     = "text"
  is_global     = true
  is_required   = true
  tooltip       = "Hey"
  field_name    = "text_attribute_type__c" // Non-root user should suffix field_name with __c and from toolkits(root-user) need not suffix field_name with __c
  force_updates = true                     // Create only with force update changes
  type_options {
    default = "Biswa"
  }
}


resource "highbond_attribute_type" "paragraph" {
  name          = "paragraph attribute type"
  display_name  = "Payam"
  data_type     = "paragraph"
  is_global     = true
  is_required   = true
  tooltip       = "Hey"
  field_name    = "paragraph_attribute_type__c" // Non-root user should suffix field_name with __c and from toolkits(root-user) need not suffix field_name with __c
  force_updates = true                          // Create only with force update changes
  type_options {
    default     = "asdasd"
    is_richtext = true
  }
}


resource "highbond_attribute_type" "dateTime" {
  name          = "datetime attribute type"
  display_name  = "Created At"
  data_type     = "dateTime"
  is_global     = true
  is_required   = true
  tooltip       = "Hey"
  field_name    = "datetime_attribute_type__c" // Non-root user should suffix field_name with __c and from toolkits(root-user) need not suffix field_name with __c
  force_updates = true                         // Create only with force update changes
  type_options {
    default   = "2020-12-25"
    is_24hour = true
  }
}


resource "highbond_attribute_type" "userLookup" {
  name          = "userlookup attribute type"
  display_name  = "Owner"
  data_type     = "userLookup"
  is_global     = true
  is_required   = true
  tooltip       = "Userlookup"
  field_name    = "userlookup_attribute_type__c" // Non-root user should suffix field_name with __c and from toolkits(root-user) need not suffix field_name with __c
  force_updates = true                           // Create only with force update changes
  type_options {
    default_options {
      user_ids  = ["current"]
      group_ids = []
    }
    is_multi_select = true
    is_select_user  = true
    is_select_group = true
    roles           = ["b9941967-9375-4699-bf2e-8e5aed054404"]
  }
}

resource "highbond_attribute_type" "select" {
  name          = "select attribute type"
  display_name  = "Department"
  data_type     = "select"
  is_global     = true
  is_required   = false
  tooltip       = "Select a department that the asset belongs to."
  field_name    = "select_attribute_type__c" // Non-root user should suffix field_name with __c and from toolkits(root-user) need not suffix field_name with __c
  force_updates = true                       // Create only with force update changes
  type_options {
    visual = "dropdown" // can be dropdown or radio
    select_values {
      name       = "Sales"
      score      = 10
      sort_order = 1
      color      = "#3F3D3C"
      default    = true
    }
    select_values {
      name       = "Marketing"
      score      = 5
      sort_order = 1
      color      = "#3F3D3C"
      default    = false
    }
  }
}

resource "highbond_attribute_type" "assessment" {
  name          = "Assessment attribute type "
  display_name  = " Vendor assessment"
  field_name    = "assessment_attribute_type__c" // Non-root user should suffix field_name with __c and from toolkits(root-user) need not suffix field_name with __c
  data_type     = "assessment"
  is_global     = true
  is_required   = true
  tooltip       = "Hey"
  force_updates = true // Create only with force update changes
}

resource "highbond_attribute_type" "attachment" {
  name          = "attachmentAttributeType"
  display_name  = "Attribute with Attachments"
  data_type     = "attachment"
  is_global     = true
  is_required   = true
  tooltip       = "Im a attachment tooltip"
  field_name    = "attachment_attribute_type__c" // Non-root user should suffix field_name with __c and from toolkits(root-user) need not suffix field_name with __c
  force_updates = true                           // Create only with force update changes
  type_options {
    allow_multiple_files = true
  }
}

// Adhoc relationship attribute type
resource "highbond_attribute_type" "adHoc" {
  name          = "Third Party"
  display_name  = "Third Party"
  data_type     = "adHocRelationship"
  is_global     = true
  is_required   = false
  tooltip       = "Third Party"
  field_name    = "thirdparty__c" // Non-root user should suffix field_name with __c and from toolkits(root-user) need not suffix field_name with __c
  force_updates = true            // Create only with force update changes
  type_options {
    labels {
      name = "Relates to"
      type = "parallel"
      permitted_relationships {
        primary_object_type_id   = highbond_asset_type.main.id
        secondary_object_type_id = highbond_asset_type.main.id
      }
      permitted_relationships {
        primary_object_type_id   = highbond_asset_type.main.id
        secondary_object_type_id = highbond_asset_record_type.main.id
      }
    }
    labels {
      name = "Causes"
      type = "upstream"

      related_label {
        name = "Caused By"
      }
      permitted_relationships {
        primary_object_type_id   = highbond_asset_type.main.id
        secondary_object_type_id = highbond_asset_record_type.main.id
      }
    }
    labels {
      name = "Caused By"
      type = "downstream"
      related_label {
        name = "Causes"
      }
    }
  }
}

Schema

Required

  • data_type (String) The data type of the attribute type
  • display_name (String) The name that will be displayed for this attribute type
  • name (String) The name of the attribute type

Optional

  • field_name (String) The name of the attribute type as it appears in the system
  • force_updates (Boolean) Allows overriding top-level 'create_only' option.
  • is_global (Boolean) Whether the attribute type is global
  • is_required (Boolean) If this attribute type is associated with an object with a handler, the handler indicates either that all of the associated attribute types, or specific attribute types, must be checked for whether they have values for the workflow to advance
  • tooltip (String) Text information for the UI element
  • type_options (Block List) (see below for nested schema)

Read-Only

  • created_at (String) The date the attribubte type was created
  • created_by (String) The user ID of the user who created this attribute type
  • id (String) The ID of this resource.
  • is_metadata (Boolean) Whether the attribute type is metadata
  • updated_at (String) The date the attribute type was updated
  • updated_by (String) The user ID of the last user who updated this attribute type

Nested Schema for type_options

Optional:

  • allow_multiple_files (Boolean) Specifies whether the attribute will allow multiple files
  • default (String) Default value for attribute type varies based on attribute tyep
  • default_options (Block List) Default userlookup attribute value (see below for nested schema)
  • is_24hour (Boolean) Specifies whether the value is in 24-hour format
  • is_decimal (Boolean) Specifies whether the value is in decimal format
  • is_multi_select (Boolean) Specifies whether the userLookup attribute can be assgined to multiple user/groups
  • is_richtext (Boolean) Specifies whether the value is in Rich Text format
  • is_select_group (Boolean) Specifies whether the userLookup attribute can select groups
  • is_select_user (Boolean) Specifies whether the userLookup attribute can select users
  • labels (Block List) (see below for nested schema)
  • roles (List of String) Represent the userLookup role_id that is assigned to the attribute
  • select_values (Block Set) (see below for nested schema)
  • visual (String) Values can be one of dropdown or radio

Nested Schema for type_options.default_options

Optional:

  • group_ids (List of String) Array of UUID of group
  • user_ids (List of String) Array of UUID of user

Nested Schema for type_options.labels

Required:

  • name (String) Must be unique within the attribute type
  • type (String) The type of relationships

Optional:

Read-Only:

  • field_name (String) Unique identifier assigned by the system. Required when modifying a label.

Nested Schema for type_options.labels.permitted_relationships

Required:

  • primary_object_type_id (String) The upstream object type for non-parallel relationships
  • secondary_object_type_id (String) The downstream object type for non-parallel relationships

Nested Schema for type_options.labels.related_label

Required:

  • name (String) Display name of the label

Read-Only:

  • field_name (String) Unique identifier assigned by the system. Required when changing the related label

Nested Schema for type_options.select_values

Required:

  • name (String) The name of the option value

Optional:

  • color (String) Hexadecimal value to capture a color for the field, used in display and reporting
  • default (Boolean) Specifies that the option is the default selected one
  • removed (Boolean) Used to delete an existing option during UPDATE request. Not available for CREATE requests
  • score (Number) A decimal that enables calculation on the selected values of the list
  • sort_order (Number) Numeric value used to determine the display order of the options

Read-Only:

  • id (String) UUID assigned to the option before saving to Bigfoot