Skip to content

Terraform module to create a Connector in GCP for Banyan Security customers

License

Notifications You must be signed in to change notification settings

banyansecurity/terraform-google-banyan-connector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Banyan Google Cloud Connector Module

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.

Usage

locals {
  region = "us-central1"
}

module "gcp_connector" {
  source                 = "banyansecurity/banyan-connector/google"
  project                = "my-project"
  region                 = local.region  
  network                = "my-network"
  connector_name         = "my-banyan-connector"
  banyan_host            = "https://team.console.banyanops.com"
  banyan_api_key         = "abc123..."
}

Notes

The connector is deployed in a private subnet, so the default value for management_cidr uses SSH open to the world on port 22. 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 "gcp_connector" {
  source                 = "banyansecurity/banyan-connector/gcp"
  banyan_api_key         = var.banyan_api_key
  ...
}
export TF_VAR_banyan_api_key="abc123..."
terraform plan

Inputs

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
machine_type VM machine type to use when creating Connector instance string "e2-standard-2" 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
network Name of the network where the Connector instance should be created string n/a yes
package_version Override to use a specific version of connector (e.g. 1.3.0) string null no
project GCP project in which to create the Connector string n/a yes
tags Add tags to each resource map(any) null no

Outputs

Name Description
connector_name Name of the connector (example: my-conn)

Authors

Module created and managed by Banyan.

License

Licensed under Apache 2. See LICENSE for details.

About

Terraform module to create a Connector in GCP for Banyan Security customers

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages