Skip to content

arkhn/terraform-provider-thebastion

Repository files navigation

GitHub Actions CI

Terraform Provider TheBastion

Build provider

Run the following command to build the provider

$ go build -o terraform-provider-thebastion

To communicate with TheBastion you must set environment variables.

export THEBASTION_HOST=host \
THEBASTION_USERNAME=username \
THEBASTION_PATH_KNOWN_HOST=$HOME/.ssh/known_hosts \
THEBASTION_PATH_PRIVATE_KEY=$HOME/.ssh/id_ed25519

Setup (Required if provider not publish to the Terraform Registry)

Run the following command:

cp .terraformrc.template .terraformrc 

You need to complete .terraformrc for the terraform-provider, you must replace <Username> with the username of your session.

Test sample configuration

First, build and install the provider.

$ make install

Then, navigate to the examples directory.

$ cd examples/provider-install-verification/

Run the following command to apply the sample configuration.

$ terraform apply

Generate documentation

Run the following command to generate documentation about the provider.

$ go generate ./...

Usage

For more information about the terraform-provider-thebastion and its features, visit here.

Testing

For more information about the terraform-provider-thebastion and how to test new features, visit here.