From 21f6e3dffde1f461d4be644ed2a689d1fd232639 Mon Sep 17 00:00:00 2001 From: Kristin Laemmert Date: Fri, 1 Mar 2019 12:30:51 -0800 Subject: [PATCH] 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 --- command/plan.go | 5 +---- website/docs/commands/plan.html.markdown | 2 +- website/docs/configuration/resources.html.md | 3 +++ website/docs/configuration/variables.html.md | 2 ++ website/upgrade-guides/0-12.html.markdown | 7 +++++++ 5 files changed, 14 insertions(+), 5 deletions(-) diff --git a/command/plan.go b/command/plan.go index 836b8d14e..d3b159653 100644 --- a/command/plan.go +++ b/command/plan.go @@ -191,7 +191,7 @@ func (c *PlanCommand) Run(args []string) int { func (c *PlanCommand) Help() string { helpText := ` -Usage: terraform plan [options] [DIR-OR-PLAN] +Usage: terraform plan [options] [DIR] 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 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: -destroy If set, a plan will be generated to destroy all resources diff --git a/website/docs/commands/plan.html.markdown b/website/docs/commands/plan.html.markdown index 41bf7d295..bb97a5bc6 100644 --- a/website/docs/commands/plan.html.markdown +++ b/website/docs/commands/plan.html.markdown @@ -25,7 +25,7 @@ for later execution with `terraform apply`, which can be useful when ## 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 for the configuration and state file to refresh. diff --git a/website/docs/configuration/resources.html.md b/website/docs/configuration/resources.html.md index e1c416074..a67203ec8 100644 --- a/website/docs/configuration/resources.html.md +++ b/website/docs/configuration/resources.html.md @@ -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 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 Each resource is associated with a single _resource type_, which determines diff --git a/website/docs/configuration/variables.html.md b/website/docs/configuration/variables.html.md index c5b68030b..2c7bf4129 100644 --- a/website/docs/configuration/variables.html.md +++ b/website/docs/configuration/variables.html.md @@ -62,6 +62,8 @@ _except_ the following: - `count` - `for_each` - `lifecycle` +- `depends_on` +- `locals` These names are reserved for meta-arguments in [module configuration blocks](./modules.html), and cannot be diff --git a/website/upgrade-guides/0-12.html.markdown b/website/upgrade-guides/0-12.html.markdown index 80ab9cb6f..b312bcb74 100644 --- a/website/upgrade-guides/0-12.html.markdown +++ b/website/upgrade-guides/0-12.html.markdown @@ -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` 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 The `count` feature allows declaration of multiple instances of a particular