Files
terraform-provider-threshold/docs/resources/target.md
T
Louis Ruch 224c8f5849 Update docs (#65)
* Update go mod and include go:generate for docs

* go generate
2021-01-14 14:07:36 -08:00

2.5 KiB

page_title, subcategory, description
page_title subcategory description
boundary_target Resource - terraform-provider-boundary The target resource allows you to configure a Boundary target.

Resource boundary_target

The target resource allows you to configure a Boundary target.

Example Usage

resource "boundary_scope" "global" {
  global_scope = true
  scope_id     = "global"
}

resource "boundary_scope" "org" {
  name                     = "organization_one"
  description              = "My first scope!"
  scope_id                 = boundary_scope.global.id
  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" "foo" {
  name        = "test"
  description = "test catalog"
  scope_id    = boundary_scope.project.id
  type        = "static"
}

resource "boundary_host" "foo" {
  name            = "foo"
  host_catalog_id = boundary_host_catalog.foo.id
  scope_id        = boundary_scope.project.id
  address         = "10.0.0.1"
}

resource "boundary_host" "bar" {
  name            = "bar"
  host_catalog_id = boundary_host_catalog.foo.id
  scope_id        = boundary_scope.project.id
  address         = "10.0.0.1"
}

resource "boundary_host_set" "foo" {
  name            = "foo"
  host_catalog_id = boundary_host_catalog.foo.id

  host_ids = [
    boundary_host.foo.id,
    boundary_host.bar.id,
  ]
}

resource "boundary_target" "foo" {
  name         = "foo"
  description  = "Foo target"
  default_port = "22"
  scope_id     = boundary_scope.project.id
  host_set_ids = [
    boundary_host_set.foo.id
  ]
}

Schema

Required

  • scope_id (String) The scope ID in which the resource is created. Defaults to the provider's default_scope if unset.
  • type (String) The target resource type.

Optional

  • default_port (Number) The default port for this target.
  • description (String) The target description.
  • host_set_ids (Set of String) A list of host set ID's.
  • name (String) The target name. Defaults to the resource name.
  • session_connection_limit (Number)
  • session_max_seconds (Number)

Read-only

  • id (String) The ID of the target.

Import

Import is supported using the following syntax:

terraform import boundary_target.foo <my-id>