Skip to content

Latest commit

 

History

History
196 lines (125 loc) · 4.46 KB

configuration-file.md

File metadata and controls

196 lines (125 loc) · 4.46 KB

Configuration file reference

The goal of the Basti configuration file is to make CLI usage faster, less error-prone and much more convenient. With configuration file, you can predefine connections and targets to use with the basti connect command.

Table of contents

Location

The configuration file must be named .basti.yaml, .basti.yml, or .basti.json. Basti CLI looks for the configuration file in the current directory and all the parent directories up to the home directory with the closest one taking precedence.

Example

# - Connections are used with the `basti connect <connection>` command
# - Targets' fields are the same as the options for the `basti connect` command
connections: 
  database-dev:
    target:
      rdsInstance: my-dev-database
      awsProfile: dev
    localPort: 5432

  database-prod:
    target:
      rdsInstance: my-prod-database
      awsProfile: prod
    localPort: 5432

  # Default AWS profile and region are used if not specified in the target
  redis-cache-dev:
    target:
      elasticacheRedisCluster: my-dev-cache
    localPort: 6379

  # Same target but with different local port
  custom-target-local:
    target: custom-target
    localPort: 4646

# Targets can be extracted and reused in multiple connections
# with different local ports
targets:
  custom-target:
    customTargetVpc: vpc-1234567890
    customTargetHost: 10.0.1.1
    customTargetPort: 4646
    awsProfile: prod
    awsRegion: us-east-1 -->

Structure

Types

Connections

Map (Key: Connection name, Value: Connection object)

A map of connections. The keys in this map can be used as connection names in the basti connect command.


Connection

Object

Describes a connection that can be used with the basti connect command.

target

Target object or Target name

The target to connect to.

localPort

Integer

The local port to forward the target port to. The connection target will be available on localhost:<port>.


Targets

Map (Key: Target name, Value: Target object)

A map of targets. The keys in this map can be used as target names in connections.


Target

Object

Describes a connection target that can be used in a connection.

rdsInstance

String

The ID of the RDS instance to connect to.

rdsCluster

String

The ID of the RDS cluster to connect to.

elasticacheRedisCluster

String

The ID of the Elasticache Redis cluster to connect to. For a Cluster Mode Disabled (CMD) cluster, the primary endpoint is used. For a Cluster Mode Enabled (CME) cluster, the configuration endpoint is used.

elasticacheRedisNode

String

The ID of the Elasticache Redis node to connect to. You can specify both primary and replica nodes.

elasticacheMemcachedCluster

String

The ID of the Elasticache Memcached cluster to connect to. The primary endpoint is used.

elasticacheMemcachedNode

String

The ID of the Elasticache Memcached node to connect to. You can specify both primary and replica nodes.

customTargetVpc

String

The ID of the custom connection target's VPC.

customTargetHost

String

The IP address or the DNS name of the custom connection target.

customTargetPort

Integer

The port of the custom connection target.

awsProfile

String

The name of the AWS profile to use. If not specified, the default profile is used.

awsRegion

String

The name of the AWS region to use. If not specified, the default region configured in the AWS profile is used.