Files
terraform-provider-threshold/docs/resources/host_set.md
T
Jeff Malnick 4f4318d005 v1.0.2 (#108)
v1.0.2 docs, go mod, and changelog
2021-05-05 10:02:53 -07:00

2.4 KiB

page_title, subcategory, description
page_title subcategory description
boundary_host_set Resource - terraform-provider-boundary The host_set resource allows you to configure a Boundary host set. Host sets are always part of a host catalog, so a host catalog resource should be used inline or you should have the host catalog ID in hand to successfully configure a host set.

boundary_host_set (Resource)

The host_set resource allows you to configure a Boundary host set. Host sets are always part of a host catalog, so a host catalog resource should be used inline or you should have the host catalog ID in hand to successfully configure a host set.

Example Usage

resource "boundary_scope" "org" {
  name                     = "organization_one"
  description              = "My first scope!"
  scope_id                 = "global"
  auto_create_admin_role   = true
  auto_create_default_role = true
}

resource "boundary_scope" "project" {
  name                   = "project_one"
  description            = "My first scope!"
  scope_id               = boundary_scope.org.id
  auto_create_admin_role = true
}

resource "boundary_host_catalog" "static" {
  scope_id = boundary_scope.project.id
}

resource "boundary_host" "1" {
  name            = "host_1"
  description     = "My first host!"
  address         = "10.0.0.1"
  host_catalog_id = boundary_host_catalog.static.id
  scope_id        = boundary_scope.project.id
}

resource "boundary_host" "2" {
  name            = "host_2"
  description     = "My second host!"
  address         = "10.0.0.2"
  host_catalog_id = boundary_host_catalog.static.id
  scope_id        = boundary_scope.project.id
}

resource "boundary_host_set" "web" {
  host_catalog_id = boundary_host_catalog.static.id
  host_ids = [
    boundary_host.1.id,
    boundary_host.2.id,
  ]
}

Schema

Required

  • host_catalog_id (String) The catalog for the hostset.
  • type (String)

Optional

  • description (String) The hostset description.
  • host_ids (Set of String) The list of host IDs contained in this set.
  • name (String) The hostset name. Defaults to the resource name.

Read-Only

  • id (String) The ID of the hostset.

Import

Import is supported using the following syntax:

terraform import boundary_host_set.foo <my-id>