Skip to content

Latest commit

 

History

History
56 lines (42 loc) · 1.74 KB

api_option_list.md

File metadata and controls

56 lines (42 loc) · 1.74 KB
page_title subcategory description
morpheus_api_option_list Resource - terraform-provider-morpheus
Provides a Morpheus api option list resource.

morpheus_api_option_list

Provides a Morpheus api option list resource.

Example Usage

resource "morpheus_api_option_list" "tf_example_api_option_list" {
  name               = "tf_example_api_option_list"
  description        = "Terraform Morpheus API option list example"
  visibility         = "private"
  option_list        = "instances"
  translation_script = <<SCRIPT
  var i=0;
  results = [];
  for(i; i<data.length; i++) {
    results.push({name: data[i].name, value: data[i].name});
  }
  SCRIPT
}

Schema

Required

  • name (String) The name of the option list

Optional

  • description (String) The description of the option list
  • labels (Set of String) The organization labels associated with the option list (Only supported on Morpheus 5.5.3 or higher)
  • option_list (String) The Morpheus object option list (clouds, instanceTypeClouds, instanceTypeLayouts, environments, groups, instances, instance-wiki, networks, instanceNetworks, servicePlans, resourcePools, securityGroups, servers, server-wiki)
  • request_script (String) A js script to manipulate the request payload.
  • translation_script (String) A js script to translate the result data object into an Array containing objects with properties 'name’ and 'value’.
  • visibility (String) Whether the option list is visible in sub-tenants or not

Read-Only

  • id (String) The ID of the api option list

Import

Import is supported using the following syntax:

terraform import morpheus_api_option_list.tf_example_api_option_list 1