-
Notifications
You must be signed in to change notification settings - Fork 1
/
host-catalog.tf
32 lines (27 loc) · 1 KB
/
host-catalog.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Create a Static Host Catalog called DevOps for targets to be associated with.
resource "boundary_host_catalog_static" "devops" {
name = "DevOps"
description = "For DevOps Team"
scope_id = boundary_scope.project.id
}
# Creates a static private Boundary host and assigns it to the static host catalog
resource "boundary_host_static" "amazon_private_linux" {
name = "aws-private-linux"
description = "AWS Linux host"
address = aws_instance.boundary_target.private_ip
host_catalog_id = boundary_host_catalog_static.devops.id
}
# Creates a dynamic host catalog for AWS
resource "boundary_host_catalog_plugin" "aws_plugin" {
name = "AWS Catalog"
description = "AWS Host Catalog"
scope_id = boundary_scope.project.id
plugin_name = "aws"
attributes_json = jsonencode({
"region" = "eu-west-2",
"disable_credential_rotation" = true })
secrets_json = jsonencode({
"access_key_id" = var.aws_access,
"secret_access_key" = var.aws_secret
})
}