terraform-provider-workspace

command module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2021 License: MIT Imports: 7 Imported by: 0

README

terraform-provider-workspace

A provider that errors out if the current terraform workspace does not match the input variables

## Usage Add the provider to your list of required providers and use terraform init:

terraform {
  required_providers {
    workspace = {
      source = "erran/workspace"
      version = ">= 0.0.1"
    }
  }
}

Add a workspace_requirement resource into your Terraform configuration to use this provider for guarding against applies in the wrong workspace.

resource "workspace_requirement" "x" {}

Optionally update the not_workspace provider configuration:

provider "workspace" {
  # Disable plans for the "default" workspace.
  not_workspace = "default"
}

If using the provider without an explicit provider block you may notice this warning attached to the expected "workspace restricted" error or when the workspace name matches the "not_workspace" argument.

Provider "erran/workspace" requires explicit configuration.

Add a provider block to the root module and configure the provider's required arguments as described in the provider documentation.

This can be suppressed by adding provider "workspace" {} block.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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