diff --git a/modules/cloud-config-container/bindplane/README.md b/modules/cloud-config-container/bindplane/README.md
index 035722521e..055b22f229 100644
--- a/modules/cloud-config-container/bindplane/README.md
+++ b/modules/cloud-config-container/bindplane/README.md
@@ -42,12 +42,13 @@ Navigate to http://localhost:3001 to access the Bindplane console, the following
This example will create a `cloud-config` that uses the module's defaults, creating a simple bindplane server with default (latest) docker image versions and setting localhost as remote url (suited only for local development).
```hcl
-module "cos-nginx" {
- source = "./fabric/modules/cloud-config-container/bindplane"
- password = "secret"
+module "cos-bindplane" {
+ source = "./fabric/modules/cloud-config-container/bindplane"
+ bindplane_license = "XXXXXXXXX"
+ password = "secret"
}
-module "vm-nginx-tls" {
+module "bindplane" {
source = "./fabric/modules/compute-vm"
project_id = "my-project"
zone = "europe-west8-b"
@@ -57,7 +58,7 @@ module "vm-nginx-tls" {
subnetwork = "gce"
}]
metadata = {
- user-data = module.cos-nginx.cloud_config
+ user-data = module.cos-bindplane.cloud_config
google-logging-enabled = true
}
boot_disk = {
@@ -71,21 +72,21 @@ module "vm-nginx-tls" {
}
# tftest modules=2 resources=2
```
-
## Variables
| name | description | type | required | default |
|---|---|:---:|:---:|:---:|
-| [password](variables.tf#L63) | Default admin user password. | string
| ✓ | |
+| [bindplane_license](variables.tf#L29) | BindPlane server license. | string
| ✓ | |
+| [password](variables.tf#L68) | Default admin user password. | string
| ✓ | |
| [bindplane_config](variables.tf#L17) | Bindplane configurations. | object({…})
| | {}
|
-| [cloud_config](variables.tf#L29) | Cloud config template path. If null default will be used. | string
| | null
|
-| [config_variables](variables.tf#L35) | Additional variables used to render the cloud-config and Nginx templates. | map(any)
| | {}
|
-| [file_defaults](variables.tf#L41) | Default owner and permissions for files. | object({…})
| | {…}
|
-| [files](variables.tf#L53) | Map of extra files to create on the instance, path as key. Owner and permissions will use defaults if null. | map(object({…}))
| | {}
|
-| [runcmd_post](variables.tf#L68) | Extra commands to run after starting nginx. | list(string)
| | []
|
-| [runcmd_pre](variables.tf#L74) | Extra commands to run before starting nginx. | list(string)
| | []
|
-| [users](variables.tf#L80) | List of additional usernames to be created. | list(object({…}))
| | […]
|
+| [cloud_config](variables.tf#L34) | Cloud config template path. If null default will be used. | string
| | null
|
+| [config_variables](variables.tf#L40) | Additional variables used to render the cloud-config and Nginx templates. | map(any)
| | {}
|
+| [file_defaults](variables.tf#L46) | Default owner and permissions for files. | object({…})
| | {…}
|
+| [files](variables.tf#L58) | Map of extra files to create on the instance, path as key. Owner and permissions will use defaults if null. | map(object({…}))
| | {}
|
+| [runcmd_post](variables.tf#L73) | Extra commands to run after starting nginx. | list(string)
| | []
|
+| [runcmd_pre](variables.tf#L79) | Extra commands to run before starting nginx. | list(string)
| | []
|
+| [users](variables.tf#L85) | List of additional usernames to be created. | list(object({…}))
| | […]
|
## Outputs
diff --git a/modules/cloud-config-container/bindplane/cloud-config.yaml b/modules/cloud-config-container/bindplane/cloud-config.yaml
index 78f6ea6ec5..885a0af402 100644
--- a/modules/cloud-config-container/bindplane/cloud-config.yaml
+++ b/modules/cloud-config-container/bindplane/cloud-config.yaml
@@ -47,7 +47,7 @@ write_files:
volumes:
bindplane:
prometheus:
-
+
services:
prometheus:
container_name: bindplane-prometheus
@@ -57,14 +57,14 @@ write_files:
- "9090:9090"
volumes:
- prometheus:/prometheus
-
+
transform:
container_name: bindplane-transform-agent
restart: always
image: ${bindplane_transform_agent_image}
ports:
- "4568:4568"
-
+
bindplane:
container_name: bindplane-server
restart: always
@@ -72,6 +72,7 @@ write_files:
ports:
- "3001:3001"
environment:
+ - BINDPLANE_LICENSE=${license}
- BINDPLANE_USERNAME=admin
- BINDPLANE_PASSWORD=${password}
- BINDPLANE_REMOTE_URL=http://${remote_url}:3001
diff --git a/modules/cloud-config-container/bindplane/main.tf b/modules/cloud-config-container/bindplane/main.tf
index a2a11f8654..ab7ba0660e 100644
--- a/modules/cloud-config-container/bindplane/main.tf
+++ b/modules/cloud-config-container/bindplane/main.tf
@@ -21,6 +21,7 @@ locals {
bindplane_transform_agent_image = var.bindplane_config.bindplane_transform_agent_image
files = local.files
password = var.password
+ license = var.bindplane_license
remote_url = var.bindplane_config.remote_url
runcmd_pre = var.runcmd_pre
runcmd_post = var.runcmd_post
diff --git a/modules/cloud-config-container/bindplane/variables.tf b/modules/cloud-config-container/bindplane/variables.tf
index 39856f4585..92082aa8dd 100644
--- a/modules/cloud-config-container/bindplane/variables.tf
+++ b/modules/cloud-config-container/bindplane/variables.tf
@@ -26,6 +26,11 @@ variable "bindplane_config" {
nullable = false
}
+variable "bindplane_license" {
+ description = "BindPlane server license."
+ type = string
+}
+
variable "cloud_config" {
description = "Cloud config template path. If null default will be used."
type = string