tf-crud

command module
v0.0.0-...-edc4131 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

README

Go Report Card

Tfc-Workspace-manager

Terrafrom cloud workspace manager is a command line utility to create, delete, list and update workspaces in Terraform cloud. Tfc workspace manager is written in Go lang and uses Hashicrop's go-tfe SDK for managing Terraform cloud workspaces.

Terraform cloud workspace manager provides capablity to manage lifecycle of terrafrom workspaces. You can list all unused workspaces in an oragnisation and sort workspaces according to creation time. Empty workspace list can be ran as a cron job daily to monitor usage and record usage reports.

Currenlty supported commands.

  • Create workspace
  • Delete workspace
  • List all workspaces
  • List unused workspaces

Installation

You can intall tfc workspace manager using homebrew by adding this tap. Once tap is configured you can use the brew install command to install the binary.

brew tap bmv3cg/homebrew-tap
brew install bmv3cg/tap/tfc 

Pre-requistes

Terraform cloud API token is requried for authentciating with Terraform cloud account. You can follow the steps in this link to create a token. You can export Terraform token as environment variable and Terraform cloud organsiation to manage workspaces using the following commands.

export TFE_TOKEN="Replace with Terraform cloud token"
export TFE_ORGANISATION="Replace with organisation"

Tfc-Workspace-manager usage

You can see all currenlty supported commands of TfC workspace manager in following demo.

Using with Terraform Enterprise

Terrafrom cloud workspace manager is configured to run with Terraform cloud by default. You can use TFC workspace manager with Terraform enterpise by exporting TFE host environment variable.

export TFE_HOST="Replace with Terraform enterpise host"

Documentation

Overview

Copyright © 2020 NAME HERE <EMAIL ADDRESS>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis
Package cmd Copyright © 2020 NAME HERE <EMAIL ADDRESS> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
Package cmd Copyright © 2020 NAME HERE <EMAIL ADDRESS> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL