website: replace "env" command docs with "workspace" command docs
We are replacing this terminology. The old command continues to work for compatibility, but is deprecated. The docs should reflect the currently-recommended form.
This commit is contained in:
parent
418a8a8bc9
commit
5a57962a32
|
@ -0,0 +1,13 @@
|
||||||
|
---
|
||||||
|
layout: "docs"
|
||||||
|
page_title: "Command: env"
|
||||||
|
sidebar_current: "docs-commands-env"
|
||||||
|
description: |-
|
||||||
|
The terraform env command is a deprecated, legacy form of "terraform workspace".
|
||||||
|
---
|
||||||
|
|
||||||
|
# Command: env
|
||||||
|
|
||||||
|
The `terraform env` command is deprecated.
|
||||||
|
[The `terraform workspace` command](/docs/commands/workspace/)
|
||||||
|
should be used instead.
|
|
@ -1,39 +0,0 @@
|
||||||
---
|
|
||||||
layout: "commands-env"
|
|
||||||
page_title: "Command: env delete"
|
|
||||||
sidebar_current: "docs-env-sub-delete"
|
|
||||||
description: |-
|
|
||||||
The terraform env delete command is used to create a delete state environment.
|
|
||||||
---
|
|
||||||
|
|
||||||
# Command: env delete
|
|
||||||
|
|
||||||
The `terraform env delete` command is used to delete an existing environment.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
Usage: `terraform env delete [NAME]`
|
|
||||||
|
|
||||||
This command will delete the specified environment.
|
|
||||||
|
|
||||||
To delete an environment, it must already exist, it must be empty, and
|
|
||||||
it must not be your current environment. If the environment
|
|
||||||
is not empty, Terraform will not allow you to delete it without the
|
|
||||||
`-force` flag.
|
|
||||||
|
|
||||||
If you delete a non-empty state (via force), then resources may become
|
|
||||||
"dangling". These are resources that Terraform no longer manages since
|
|
||||||
a state doesn't point to them, but still physically exist. This is sometimes
|
|
||||||
preferred: you want Terraform to stop managing resources. Most of the time,
|
|
||||||
however, this is not intended so Terraform protects you from doing this.
|
|
||||||
|
|
||||||
The command-line flags are all optional. The list of available flags are:
|
|
||||||
|
|
||||||
* `-force` - Delete the state even if non-empty. Defaults to false.
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
```
|
|
||||||
$ terraform env delete example
|
|
||||||
Deleted environment "example"!
|
|
||||||
```
|
|
|
@ -1,21 +0,0 @@
|
||||||
---
|
|
||||||
layout: "commands-env"
|
|
||||||
page_title: "Command: env"
|
|
||||||
sidebar_current: "docs-env-index"
|
|
||||||
description: |-
|
|
||||||
The `terraform env` command is used to manage state environments.
|
|
||||||
---
|
|
||||||
|
|
||||||
# Env Command
|
|
||||||
|
|
||||||
The `terraform env` command is used to manage
|
|
||||||
[state environments](/docs/state/environments.html).
|
|
||||||
|
|
||||||
This command is a nested subcommand, meaning that it has further subcommands.
|
|
||||||
These subcommands are listed to the left.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
Usage: `terraform env <subcommand> [options] [args]`
|
|
||||||
|
|
||||||
Please click a subcommand to the left for more information.
|
|
|
@ -1,27 +0,0 @@
|
||||||
---
|
|
||||||
layout: "commands-env"
|
|
||||||
page_title: "Command: env list"
|
|
||||||
sidebar_current: "docs-env-sub-list"
|
|
||||||
description: |-
|
|
||||||
The terraform env list command is used to list all created state environments.
|
|
||||||
---
|
|
||||||
|
|
||||||
# Command: env list
|
|
||||||
|
|
||||||
The `terraform env list` command is used to list all created state environments.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
Usage: `terraform env list`
|
|
||||||
|
|
||||||
The command will list all created environments. The current environment
|
|
||||||
will have an asterisk (`*`) next to it.
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
```
|
|
||||||
$ terraform env list
|
|
||||||
default
|
|
||||||
* development
|
|
||||||
mitchellh-test
|
|
||||||
```
|
|
|
@ -1,50 +0,0 @@
|
||||||
---
|
|
||||||
layout: "commands-env"
|
|
||||||
page_title: "Command: env new"
|
|
||||||
sidebar_current: "docs-env-sub-new"
|
|
||||||
description: |-
|
|
||||||
The terraform env new command is used to create a new state environment.
|
|
||||||
---
|
|
||||||
|
|
||||||
# Command: env new
|
|
||||||
|
|
||||||
The `terraform env new` command is used to create a new state
|
|
||||||
environment.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
Usage: `terraform env new [NAME]`
|
|
||||||
|
|
||||||
This command will create a new environment with the given name. This
|
|
||||||
environment must not already exist.
|
|
||||||
|
|
||||||
If the `-state` flag is given, the state specified by the given path
|
|
||||||
will be copied to initialize the state for this new environment.
|
|
||||||
|
|
||||||
The command-line flags are all optional. The list of available flags are:
|
|
||||||
|
|
||||||
* `-state=path` - Path to a state file to initialize the state of this environment.
|
|
||||||
|
|
||||||
## Example: Create
|
|
||||||
|
|
||||||
```
|
|
||||||
$ terraform env new example
|
|
||||||
Created and switched to environment "example"!
|
|
||||||
|
|
||||||
You're now on a new, empty environment. Environments isolate their state,
|
|
||||||
so if you run "terraform plan" Terraform will not see any existing state
|
|
||||||
for this configuration.
|
|
||||||
```
|
|
||||||
|
|
||||||
## Example: Create from State
|
|
||||||
|
|
||||||
To create a new environment from a pre-existing state path:
|
|
||||||
|
|
||||||
```
|
|
||||||
$ terraform env new -state=old.terraform.tfstate example
|
|
||||||
Created and switched to environment "example"!
|
|
||||||
|
|
||||||
You're now on a new, empty environment. Environments isolate their state,
|
|
||||||
so if you run "terraform plan" Terraform will not see any existing state
|
|
||||||
for this configuration.
|
|
||||||
```
|
|
|
@ -1,31 +0,0 @@
|
||||||
---
|
|
||||||
layout: "commands-env"
|
|
||||||
page_title: "Command: env select"
|
|
||||||
sidebar_current: "docs-env-sub-select"
|
|
||||||
description: |-
|
|
||||||
The terraform env select command is used to select state environments.
|
|
||||||
---
|
|
||||||
|
|
||||||
# Command: env select
|
|
||||||
|
|
||||||
The `terraform env select` command is used to select to a different
|
|
||||||
environment that is already created.
|
|
||||||
|
|
||||||
## Usage
|
|
||||||
|
|
||||||
Usage: `terraform env select [NAME]`
|
|
||||||
|
|
||||||
This command will select to another environment. The environment must
|
|
||||||
already be created.
|
|
||||||
|
|
||||||
## Example
|
|
||||||
|
|
||||||
```
|
|
||||||
$ terraform env list
|
|
||||||
default
|
|
||||||
* development
|
|
||||||
mitchellh-test
|
|
||||||
|
|
||||||
$ terraform env select default
|
|
||||||
Switched to environment "default"!
|
|
||||||
```
|
|
|
@ -33,7 +33,6 @@ Common commands:
|
||||||
apply Builds or changes infrastructure
|
apply Builds or changes infrastructure
|
||||||
console Interactive console for Terraform interpolations
|
console Interactive console for Terraform interpolations
|
||||||
destroy Destroy Terraform-managed infrastructure
|
destroy Destroy Terraform-managed infrastructure
|
||||||
env Environment management
|
|
||||||
fmt Rewrites config files to canonical format
|
fmt Rewrites config files to canonical format
|
||||||
get Download and install modules for the configuration
|
get Download and install modules for the configuration
|
||||||
graph Create a visual graph of Terraform resources
|
graph Create a visual graph of Terraform resources
|
||||||
|
@ -49,6 +48,7 @@ Common commands:
|
||||||
untaint Manually unmark a resource as tainted
|
untaint Manually unmark a resource as tainted
|
||||||
validate Validates the Terraform files
|
validate Validates the Terraform files
|
||||||
version Prints the Terraform version
|
version Prints the Terraform version
|
||||||
|
workspace Workspace management
|
||||||
|
|
||||||
All other commands:
|
All other commands:
|
||||||
debug Debug output management (experimental)
|
debug Debug output management (experimental)
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
---
|
||||||
|
layout: "commands-workspace"
|
||||||
|
page_title: "Command: workspace delete"
|
||||||
|
sidebar_current: "docs-workspace-sub-delete"
|
||||||
|
description: |-
|
||||||
|
The terraform workspace delete command is used to delete a workspace.
|
||||||
|
---
|
||||||
|
|
||||||
|
# Command: workspace delete
|
||||||
|
|
||||||
|
The `terraform workspace delete` command is used to delete an existing workspace.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
Usage: `terraform workspace delete [NAME]`
|
||||||
|
|
||||||
|
This command will delete the specified workspace.
|
||||||
|
|
||||||
|
To delete an workspace, it must already exist, it must have an empty state,
|
||||||
|
and it must not be your current workspace. If the workspace state is not empty,
|
||||||
|
Terraform will not allow you to delete it unless the `-force` flag is specified.
|
||||||
|
|
||||||
|
If you delete a workspace with a non-empty state (via `-force`), then resources
|
||||||
|
may become "dangling". These are resources that physically exist but that
|
||||||
|
Terraform can no longer manage. This is sometimes preferred: you want
|
||||||
|
Terraform to stop managing resources so they can be managed some other way.
|
||||||
|
Most of the time, however, this is not intended and so Terraform protects you
|
||||||
|
from getting into this situation.
|
||||||
|
|
||||||
|
The command-line flags are all optional. The only supported flag is:
|
||||||
|
|
||||||
|
* `-force` - Delete the workspace even if its state is not empty. Defaults to false.
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
```
|
||||||
|
$ terraform workspace delete example
|
||||||
|
Deleted workspace "example".
|
||||||
|
```
|
|
@ -0,0 +1,21 @@
|
||||||
|
---
|
||||||
|
layout: "commands-workspace"
|
||||||
|
page_title: "Command: workspace"
|
||||||
|
sidebar_current: "docs-workspace-index"
|
||||||
|
description: |-
|
||||||
|
The terraform workspace command is used to manage workspaces.
|
||||||
|
---
|
||||||
|
|
||||||
|
# Command: workspace
|
||||||
|
|
||||||
|
The `terraform workspace` command is used to manage
|
||||||
|
[workspaces](/docs/state/workspaces.html).
|
||||||
|
|
||||||
|
This command is a container for further subcommands. These subcommands are
|
||||||
|
listed in the navigation bar.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
Usage: `terraform workspace <subcommand> [options] [args]`
|
||||||
|
|
||||||
|
Please choose a subcommand from the navigation for more information.
|
|
@ -0,0 +1,27 @@
|
||||||
|
---
|
||||||
|
layout: "commands-workspace"
|
||||||
|
page_title: "Command: workspace list"
|
||||||
|
sidebar_current: "docs-workspace-sub-list"
|
||||||
|
description: |-
|
||||||
|
The terraform workspace list command is used to list all existing workspaces.
|
||||||
|
---
|
||||||
|
|
||||||
|
# Command: workspace list
|
||||||
|
|
||||||
|
The `terraform workspace list` command is used to list all existing workspaces.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
Usage: `terraform workspace list`
|
||||||
|
|
||||||
|
The command will list all existing workspaces. The current workspace is
|
||||||
|
indicated using an asterisk (`*`) marker.
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
```
|
||||||
|
$ terraform workspace list
|
||||||
|
default
|
||||||
|
* development
|
||||||
|
jsmith-test
|
||||||
|
```
|
|
@ -0,0 +1,49 @@
|
||||||
|
---
|
||||||
|
layout: "commands-workspace"
|
||||||
|
page_title: "Command: workspace new"
|
||||||
|
sidebar_current: "docs-workspace-sub-new"
|
||||||
|
description: |-
|
||||||
|
The terraform workspace new command is used to create a new workspace.
|
||||||
|
---
|
||||||
|
|
||||||
|
# Command: workspace new
|
||||||
|
|
||||||
|
The `terraform workspace new` command is used to create a new workspace.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
Usage: `terraform workspace new [NAME]`
|
||||||
|
|
||||||
|
This command will create a new workspace with the given name. A workspace with
|
||||||
|
this name must not already exist.
|
||||||
|
|
||||||
|
If the `-state` flag is given, the state specified by the given path
|
||||||
|
will be copied to initialize the state for this new workspace.
|
||||||
|
|
||||||
|
The command-line flags are all optional. The only supported flag is:
|
||||||
|
|
||||||
|
* `-state=path` - Path to a state file to initialize the state of this environment.
|
||||||
|
|
||||||
|
## Example: Create
|
||||||
|
|
||||||
|
```
|
||||||
|
$ terraform workspace new example
|
||||||
|
Created and switched to workspace "example"!
|
||||||
|
|
||||||
|
You're now on a new, empty workspace. Workspaces isolate their state,
|
||||||
|
so if you run "terraform plan" Terraform will not see any existing state
|
||||||
|
for this configuration.
|
||||||
|
```
|
||||||
|
|
||||||
|
## Example: Create from State
|
||||||
|
|
||||||
|
To create a new workspace from a pre-existing local state file:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ terraform workspace new -state=old.terraform.tfstate example
|
||||||
|
Created and switched to workspace "example".
|
||||||
|
|
||||||
|
You're now on a new, empty workspace. Workspaces isolate their state,
|
||||||
|
so if you run "terraform plan" Terraform will not see any existing state
|
||||||
|
for this configuration.
|
||||||
|
```
|
|
@ -0,0 +1,31 @@
|
||||||
|
---
|
||||||
|
layout: "commands-workspace"
|
||||||
|
page_title: "Command: workspace select"
|
||||||
|
sidebar_current: "docs-workspace-sub-select"
|
||||||
|
description: |-
|
||||||
|
The terraform workspace select command is used to choose a workspace.
|
||||||
|
---
|
||||||
|
|
||||||
|
# Command: env select
|
||||||
|
|
||||||
|
The `terraform workspace select` command is used to choose a different
|
||||||
|
workspace to use for further operations.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
Usage: `terraform workspace select [NAME]`
|
||||||
|
|
||||||
|
This command will select another workspace. The named workspace must already
|
||||||
|
exist.
|
||||||
|
|
||||||
|
## Example
|
||||||
|
|
||||||
|
```
|
||||||
|
$ terraform workspace list
|
||||||
|
default
|
||||||
|
* development
|
||||||
|
jsmith-test
|
||||||
|
|
||||||
|
$ terraform workspace select default
|
||||||
|
Switched to workspace "default".
|
||||||
|
```
|
|
@ -1,38 +0,0 @@
|
||||||
<% wrap_layout :inner do %>
|
|
||||||
<% content_for :sidebar do %>
|
|
||||||
<div class="docs-sidebar hidden-print affix-top" role="complementary">
|
|
||||||
<ul class="nav docs-sidenav">
|
|
||||||
<li<%= sidebar_current("docs-home") %>>
|
|
||||||
<a href="/docs/commands/index.html">All Providers</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li<%= sidebar_current("docs-env-index") %>>
|
|
||||||
<a href="/docs/commands/env/index.html">env Command</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li<%= sidebar_current("docs-env-sub") %>>
|
|
||||||
<a href="#">Subcommands</a>
|
|
||||||
<ul class="nav nav-visible">
|
|
||||||
<li<%= sidebar_current("docs-env-sub-list") %>>
|
|
||||||
<a href="/docs/commands/env/list.html">list</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li<%= sidebar_current("docs-env-sub-select") %>>
|
|
||||||
<a href="/docs/commands/env/select.html">select</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li<%= sidebar_current("docs-env-sub-new") %>>
|
|
||||||
<a href="/docs/commands/env/new.html">new</a>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li<%= sidebar_current("docs-env-sub-delete") %>>
|
|
||||||
<a href="/docs/commands/env/delete.html">delete</a>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<%= yield %>
|
|
||||||
<% end %>
|
|
|
@ -0,0 +1,38 @@
|
||||||
|
<% wrap_layout :inner do %>
|
||||||
|
<% content_for :sidebar do %>
|
||||||
|
<div class="docs-sidebar hidden-print affix-top" role="complementary">
|
||||||
|
<ul class="nav docs-sidenav">
|
||||||
|
<li<%= sidebar_current("docs-home") %>>
|
||||||
|
<a href="/docs/commands/index.html">All Commands</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li<%= sidebar_current("docs-workspace-index") %>>
|
||||||
|
<a href="/docs/commands/env/index.html">workspace Command</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li<%= sidebar_current("docs-workspace-sub") %>>
|
||||||
|
<a href="#">Subcommands</a>
|
||||||
|
<ul class="nav nav-visible">
|
||||||
|
<li<%= sidebar_current("docs-workspace-sub-list") %>>
|
||||||
|
<a href="/docs/commands/workspace/list.html">list</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li<%= sidebar_current("docs-workspace-sub-select") %>>
|
||||||
|
<a href="/docs/commands/workspace/select.html">select</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li<%= sidebar_current("docs-workspace-sub-new") %>>
|
||||||
|
<a href="/docs/commands/workspace/new.html">new</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li<%= sidebar_current("docs-workspace-sub-delete") %>>
|
||||||
|
<a href="/docs/commands/workspace/delete.html">delete</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<% end %>
|
||||||
|
|
||||||
|
<%= yield %>
|
||||||
|
<% end %>
|
|
@ -74,7 +74,7 @@
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li<%= sidebar_current("docs-commands-env") %>>
|
<li<%= sidebar_current("docs-commands-env") %>>
|
||||||
<a href="/docs/commands/env/index.html">env</a>
|
<a href="/docs/commands/env.html">env</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li<%= sidebar_current("docs-commands-fmt") %>>
|
<li<%= sidebar_current("docs-commands-fmt") %>>
|
||||||
|
@ -140,6 +140,10 @@
|
||||||
<li<%= sidebar_current("docs-commands-untaint") %>>
|
<li<%= sidebar_current("docs-commands-untaint") %>>
|
||||||
<a href="/docs/commands/untaint.html">untaint</a>
|
<a href="/docs/commands/untaint.html">untaint</a>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li<%= sidebar_current("docs-commands-workspace") %>>
|
||||||
|
<a href="/docs/commands/workspace/index.html">workspace</a>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue