Creates an outbound Connector for use with Banyan Security.
This module creates a VM instance for the Banyan Connector. The VM instance lives in a private subnet with no ingress from the internet.
locals {
location = "westus3"
}
provider "azurerm" {
location = local.location
}
module "azure_connector" {
source = "banyansecurity/banyan-connector/azure"
location = local.location
resource_group_name = "my-resource-group"
subnet_id = "subnet-00e393f22c3f09e16"
ssh_key_path = "~/.ssh/id_rsa.pub"
connector_name = "my-banyan-connector"
banyan_host = "https://team.console.banyanops.com"
banyan_api_key = "abc123..."
}
The connector is deployed in a private subnet, so the default value for management_cidr
uses SSH open to the world on port 2222. You can use the CIDR of your VPC, or a bastion host, instead.
It's probably also a good idea to leave the banyan_api_key
out of your code and pass it as a variable instead, so you don't accidentally commit your Banyan API token to your version control system:
variable "banyan_api_key" {
type = string
}
module "azure_connector" {
source = "banyansecurity/banyan-connector/azure"
banyan_api_key = var.banyan_api_key
...
}
export TF_VAR_banyan_api_key="abc123..."
terraform plan
Name | Description | Type | Default | Required |
---|---|---|---|---|
api_key_secret | API key generated from the Banyan Command Center console | string |
n/a | yes |
command_center_url | URL of the Banyan Command Center | string |
"https://team.console.banyanops.com" |
no |
connector_name | Name to use when registering this Connector with the Command Center console | string |
n/a | yes |
instance_size | VM instance SKU to use when creating Connector instance | string |
"Standard_F2" |
no |
management_cidrs | CIDR blocks to allow SSH connections from | list(string) |
[ "0.0.0.0/0" ] |
no |
name_prefix | String to be added in front of all AWS object names | string |
"banyan" |
no |
package_version | Override to use a specific version of connector (e.g. 1.3.0 ) |
string |
null |
no |
ssh_key_path | Path of your SSH key to upload to instance to allow management access | string |
n/a | yes |
subnet_id | ID of the subnet where the Connector instance should be created | string |
n/a | yes |
tags | Add tags to each resource | map(any) |
null |
no |
resource_group_name | Name of the Resource Group in which to create the Connector | string |
n/a | yes |
Name | Description |
---|---|
connector_name | Name of the connector (example: my-conn ) |
Module created and managed by Banyan.
Licensed under Apache 2. See LICENSE for details.