Files
terraform-provider-threshold/examples/resources/boundary_host_set/resource.tf
T

44 lines
1.2 KiB
Terraform
Raw Normal View History

2020-09-17 15:34:00 -07:00
resource "boundary_scope" "org" {
2020-10-13 23:12:03 -04:00
name = "organization_one"
description = "My first scope!"
scope_id = "global"
auto_create_admin_role = true
auto_create_default_role = true
2020-09-17 15:34:00 -07:00
}
2020-09-02 14:36:52 -07:00
2020-09-17 15:34:00 -07:00
resource "boundary_scope" "project" {
2021-01-14 14:07:36 -08:00
name = "project_one"
description = "My first scope!"
scope_id = boundary_scope.org.id
auto_create_admin_role = true
2020-09-02 14:36:52 -07:00
}
resource "boundary_host_catalog" "static" {
2022-06-01 13:22:31 -07:00
type = "static"
2020-09-17 15:34:00 -07:00
scope_id = boundary_scope.project.id
2020-09-02 14:36:52 -07:00
}
2022-05-13 18:10:43 -07:00
resource "boundary_host" "first" {
2022-06-01 13:22:31 -07:00
type = "static"
2020-09-02 14:36:52 -07:00
name = "host_1"
description = "My first host!"
2020-09-20 12:13:08 -04:00
address = "10.0.0.1"
2020-09-02 14:36:52 -07:00
host_catalog_id = boundary_host_catalog.static.id
}
2022-05-13 18:10:43 -07:00
resource "boundary_host" "second" {
2022-06-01 13:22:31 -07:00
type = "static"
2020-09-02 14:36:52 -07:00
name = "host_2"
description = "My second host!"
2020-09-20 12:13:08 -04:00
address = "10.0.0.2"
2020-09-02 14:36:52 -07:00
host_catalog_id = boundary_host_catalog.static.id
}
resource "boundary_host_set" "web" {
host_catalog_id = boundary_host_catalog.static.id
2021-09-02 00:36:33 +03:00
type = "static"
2020-10-06 20:34:16 -04:00
host_ids = [
2022-05-13 18:10:43 -07:00
boundary_host.first.id,
boundary_host.second.id,
2020-09-02 14:36:52 -07:00
]
}