mirror of
https://github.com/opentofu/opentofu.git
synced 2025-02-25 18:45:20 -06:00
Mildwonkey/012 docs updated (#20542)
* docs: update plan command documentation. Fixes #19235 * docs: added a missing reserved variable name. Fixes #19159. * website: add note that resource names cannot start with a number * website: add some notes to the 0.12 upgrade guide
This commit is contained in:
parent
a0f3a2daa0
commit
21f6e3dffd
@ -191,7 +191,7 @@ func (c *PlanCommand) Run(args []string) int {
|
|||||||
|
|
||||||
func (c *PlanCommand) Help() string {
|
func (c *PlanCommand) Help() string {
|
||||||
helpText := `
|
helpText := `
|
||||||
Usage: terraform plan [options] [DIR-OR-PLAN]
|
Usage: terraform plan [options] [DIR]
|
||||||
|
|
||||||
Generates an execution plan for Terraform.
|
Generates an execution plan for Terraform.
|
||||||
|
|
||||||
@ -200,9 +200,6 @@ Usage: terraform plan [options] [DIR-OR-PLAN]
|
|||||||
a Terraform plan file, and apply can take this plan file to execute
|
a Terraform plan file, and apply can take this plan file to execute
|
||||||
this plan exactly.
|
this plan exactly.
|
||||||
|
|
||||||
If a saved plan is passed as an argument, this command will output
|
|
||||||
the saved plan contents. It will not modify the given plan.
|
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
|
|
||||||
-destroy If set, a plan will be generated to destroy all resources
|
-destroy If set, a plan will be generated to destroy all resources
|
||||||
|
@ -25,7 +25,7 @@ for later execution with `terraform apply`, which can be useful when
|
|||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
Usage: `terraform plan [options] [dir-or-plan]`
|
Usage: `terraform plan [options] [dir]`
|
||||||
|
|
||||||
By default, `plan` requires no flags and looks in the current directory
|
By default, `plan` requires no flags and looks in the current directory
|
||||||
for the configuration and state file to refresh.
|
for the configuration and state file to refresh.
|
||||||
|
@ -46,6 +46,9 @@ for the resource itself. Most arguments in this section depend on the
|
|||||||
resource type, and indeed in this example both `ami` and `instance_type` are
|
resource type, and indeed in this example both `ami` and `instance_type` are
|
||||||
arguments defined specifically for [the `aws_instance` resource type](/docs/providers/aws/r/instance.html).
|
arguments defined specifically for [the `aws_instance` resource type](/docs/providers/aws/r/instance.html).
|
||||||
|
|
||||||
|
-> **Note:** Resource names must start with a letter or underscore, and may
|
||||||
|
contain only letters, digits, underscores, and dashes.
|
||||||
|
|
||||||
## Resource Types and Arguments
|
## Resource Types and Arguments
|
||||||
|
|
||||||
Each resource is associated with a single _resource type_, which determines
|
Each resource is associated with a single _resource type_, which determines
|
||||||
|
@ -62,6 +62,8 @@ _except_ the following:
|
|||||||
- `count`
|
- `count`
|
||||||
- `for_each`
|
- `for_each`
|
||||||
- `lifecycle`
|
- `lifecycle`
|
||||||
|
- `depends_on`
|
||||||
|
- `locals`
|
||||||
|
|
||||||
These names are reserved for meta-arguments in
|
These names are reserved for meta-arguments in
|
||||||
[module configuration blocks](./modules.html), and cannot be
|
[module configuration blocks](./modules.html), and cannot be
|
||||||
|
@ -237,6 +237,13 @@ into a list. The upgrade tool does not remove or attempt to consolidate
|
|||||||
any existing duplicate arguments, but other commands like `terraform validate`
|
any existing duplicate arguments, but other commands like `terraform validate`
|
||||||
will detect and report these after upgrading.
|
will detect and report these after upgrading.
|
||||||
|
|
||||||
|
## Terraform Configuration upgrades requiring human intervention
|
||||||
|
There are some known situations that will be detected, but not upgrade, by the
|
||||||
|
upgrade tool. Some examples of these situatations include:
|
||||||
|
|
||||||
|
* `count` can no longer be used a variable name.
|
||||||
|
* `resource` names cannot start with a number, though they can still contain numbers.
|
||||||
|
|
||||||
## Working with `count` on resources
|
## Working with `count` on resources
|
||||||
|
|
||||||
The `count` feature allows declaration of multiple instances of a particular
|
The `count` feature allows declaration of multiple instances of a particular
|
||||||
|
Loading…
Reference in New Issue
Block a user