diff --git a/content/terraform/v1.15.x (alpha)/data/cli-nav-data.json b/content/terraform/v1.15.x (alpha)/data/cli-nav-data.json new file mode 100644 index 0000000000..f0cc988416 --- /dev/null +++ b/content/terraform/v1.15.x (alpha)/data/cli-nav-data.json @@ -0,0 +1,473 @@ +[ + { "heading": "Terraform CLI" }, + { "title": "Overview", "path": "" }, + { "title": "Basic CLI Features", "href": "/cli/commands" }, + { + "title": "Initializing Working Directories", + "routes": [ + { "title": "Overview", "path": "init" }, + { "title": "init", "href": "/cli/commands/init" }, + { "title": "get", "href": "/cli/commands/get" } + ] + }, + { + "title": "Provisioning Infrastructure", + "routes": [ + { "title": "Overview", "path": "run" }, + { "title": "plan", "href": "/cli/commands/plan" }, + { "title": "apply", "href": "/cli/commands/apply" }, + { "title": "destroy", "href": "/cli/commands/destroy" } + ] + }, + { + "title": "Authenticating", + "routes": [ + { "title": "Overview", "path": "auth" }, + { "title": "login", "href": "/cli/commands/login" }, + { "title": "logout", "href": "/cli/commands/logout" } + ] + }, + { + "title": "Writing and Modifying Code", + "routes": [ + { "title": "Overview", "path": "code" }, + { "title": "console", "href": "/cli/commands/console" }, + { "title": "fmt", "href": "/cli/commands/fmt" }, + { "title": "validate", "href": "/cli/commands/validate" } + ] + }, + { + "title": "Inspecting Infrastructure", + "routes": [ + { "title": "Overview", "path": "inspect" }, + { "title": "graph", "href": "/cli/commands/graph" }, + { "title": "output", "href": "/cli/commands/output" }, + { "title": "show", "href": "/cli/commands/show" }, + { + "title": "state list", + "href": "/cli/commands/state/list" + }, + { + "title": "state show", + "href": "/cli/commands/state/show" + } + ] + }, + { + "title": "Import Infrastructure", + "routes": [ + { "title": "Overview", "path": "import" }, + { "title": "Import existing resources", "path": "import/usage" }, + { + "title": "import command reference", + "href": "/cli/commands/import" + }, + { + "title": "query command reference", + "href": "/cli/commands/query" + } + ] + }, + { + "title": "Manually Update State", + "routes": [ + { "title": "Overview", "path": "state" }, + { + "title": "Resource Addressing", + "path": "state/resource-addressing" + }, + { "title": "state", "href": "/cli/commands/state" }, + { + "title": "Inspecting State", + "routes": [ + { "title": "Overview", "path": "state/inspect" }, + { + "title": "state list", + "href": "/cli/commands/state/list" + }, + { + "title": "state show", + "href": "/cli/commands/state/show" + }, + { + "title": "refresh", + "href": "/cli/commands/refresh" + } + ] + }, + { + "title": "Forcing Re-creation (Tainting)", + "routes": [ + { "title": "Overview", "path": "state/taint" }, + { + "title": "taint", + "href": "/cli/commands/taint" + }, + { + "title": "untaint", + "href": "/cli/commands/untaint" + } + ] + }, + { + "title": "Moving Resources", + "routes": [ + { "title": "Overview", "path": "state/move" }, + { + "title": "state mv", + "href": "/cli/commands/state/mv" + }, + { + "title": "state rm", + "href": "/cli/commands/state/rm" + }, + { + "title": "state replace-provider", + "href": "/cli/commands/state/replace-provider" + } + ] + }, + { + "title": "Disaster Recovery", + "routes": [ + { + "title": "Overview", + "path": "state/recover" + }, + { + "title": "state pull", + "href": "/cli/commands/state/pull" + }, + { + "title": "state push", + "href": "/cli/commands/state/push" + }, + { + "title": "force-unlock", + "href": "/cli/commands/force-unlock" + } + ] + } + ] + }, + { + "title": "Manage Stacks", + "routes": [ + + { "title": "Overview", "href": "/cli/commands/stacks" }, + { "title": "Global Flags", "href": "/cli/commands/stacks/global-flags" }, + { "title": "create", "href": "/cli/commands/stacks/create" }, + { "title": "fmt", "href": "/cli/commands/stacks/fmt" }, + { "title": "init", "href": "/cli/commands/stacks/init" }, + { "title": "list", "href": "/cli/commands/stacks/list" }, + { "title": "providers-lock", "href": "/cli/commands/stacks/providers-lock" }, + { "title": "validate", "href": "/cli/commands/stacks/validate" }, + { "title": "version", "href": "/cli/commands/stacks/version" }, + { + "title": "Configuration", + "routes": [ + { "title": "Overview", "href": "/cli/commands/stacks/configuration" }, + { "title": "configuration fetch", "href": "/cli/commands/stacks/configuration/fetch" }, + { "title": "configuration list", "href": "/cli/commands/stacks/configuration/list" }, + { "title": "configuration upload", "href": "/cli/commands/stacks/configuration/upload" }, + { "title": "configuration watch", "href": "/cli/commands/stacks/configuration/watch" } + ] + }, + { + "title": "Deployment Group", + "routes": [ + { "title": "Overview", "href": "/cli/commands/stacks/deployment-group" }, + { "title": "deployment-group approve-all-plans", "href": "/cli/commands/stacks/deployment-group/approve-all-plans" }, + { "title": "deployment-group list", "href": "/cli/commands/stacks/deployment-group/list" }, + { "title": "deployment-group rerun", "href": "/cli/commands/stacks/deployment-group/rerun" }, + { "title": "deployment-group watch", "href": "/cli/commands/stacks/deployment-group/watch" } + ] + }, + { + "title": "Deployment Run", + "routes": [ + { "title": "Overview", "href": "/cli/commands/stacks/deployment-run" }, + { "title": "deployment-run approve-all-plans", "href": "/cli/commands/stacks/deployment-run/approve-all-plans" }, + { "title": "deployment-run cancel", "href": "/cli/commands/stacks/deployment-run/cancel" }, + { "title": "deployment-run list", "href": "/cli/commands/stacks/deployment-run/list" }, + { "title": "deployment-run watch", "href": "/cli/commands/stacks/deployment-run/watch" } + ] + } + ] + }, + { + "title": "Managing Workspaces", + "routes": [ + { "title": "Overview", "path": "workspaces" }, + { + "title": "workspace", + "routes": [ + { "title": "Overview", "href": "/cli/commands/workspace" }, + { + "title": "workspace list", + "href": "/cli/commands/workspace/list" + }, + { + "title": "workspace select", + "href": "/cli/commands/workspace/select" + }, + { + "title": "workspace new", + "href": "/cli/commands/workspace/new" + }, + { + "title": "workspace delete", + "href": "/cli/commands/workspace/delete" + }, + { + "title": "workspace show", + "href": "/cli/commands/workspace/show" + } + ] + } + ] + }, + { + "title": "Managing Plugins", + "routes": [ + { "title": "Overview", "path": "plugins" }, + { "title": "Plugin Signing", "path": "plugins/signing" }, + { + "title": "providers", + "href": "/cli/commands/providers" + }, + { + "title": "version", + "href": "/cli/commands/version" + }, + { + "title": "providers lock", + "href": "/cli/commands/providers/lock" + }, + { + "title": "providers mirror", + "href": "/cli/commands/providers/mirror" + }, + { + "title": "providers schema", + "href": "/cli/commands/providers/schema" + } + ] + }, + { + "title": "CLI Configuration", + "routes": [ + { "title": "Overview", "path": "config" }, + { "title": "CLI Configuration", "path": "config/config-file" }, + { + "title": "Environment Variables", + "path": "config/environment-variables" + } + ] + }, + { + "title": "Using HCP Terraform", + "routes": [ + { "title": "Overview", "path": "cloud" }, + { "title": "Connect to HCP Terraform", "path": "cloud/settings" }, + { + "title": "Command Line Arguments", + "path": "cloud/command-line-arguments" + } + ] + }, + { + "title": "Testing Terraform", + "routes": [ + { "title": "Overview", "path": "test" }, + { "title": "test", "href": "/cli/commands/test"} + ] + }, + { + "title": "Automating Terraform", + "routes": [ + { + "title": "Running Terraform in Automation", + "href": "https://learn.hashicorp.com/tutorials/terraform/automate-terraform?in=terraform/automation&utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS" + }, + { + "title": "GitHub Actions", + "href": "https://learn.hashicorp.com/tutorials/terraform/github-actions?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS" + } + ] + }, + { + "title": "Alphabetical List of Commands", + "routes": [ + { "title": "Overview", "href": "/cli/commands" }, + { "title": "apply", "href": "/cli/commands/apply" }, + { "title": "console", "href": "/cli/commands/console" }, + { "title": "destroy", "href": "/cli/commands/destroy" }, + { "title": "fmt", "href": "/cli/commands/fmt" }, + { + "title": "force-unlock", + "href": "/cli/commands/force-unlock" + }, + { "title": "get", "href": "/cli/commands/get" }, + { "title": "graph", "href": "/cli/commands/graph" }, + { "title": "import", "href": "/cli/commands/import" }, + { "title": "init", "href": "/cli/commands/init" }, + { "title": "login", "href": "/cli/commands/login" }, + { "title": "logout", "href": "/cli/commands/logout" }, + { "title": "modules", "href": "/cli/commands/modules" }, + { "title": "output", "href": "/cli/commands/output" }, + { "title": "plan", "href": "/cli/commands/plan" }, + { "title": "providers", "href": "/cli/commands/providers" }, + { + "title": "providers lock", + "href": "/cli/commands/providers/lock" + }, + { + "title": "providers mirror", + "href": "/cli/commands/providers/mirror" + }, + { + "title": "providers schema", + "href": "/cli/commands/providers/schema" + }, + { "title": "query", "href": "/cli/commands/query" }, + { "title": "refresh", "href": "/cli/commands/refresh" }, + { "title": "show", "href": "/cli/commands/show" }, + { "title": "state", "href": "/cli/commands/state" }, + { + "title": "state list", + "href": "/cli/commands/state/list" + }, + { "title": "state mv", "href": "/cli/commands/state/mv" }, + { + "title": "state pull", + "href": "/cli/commands/state/pull" + }, + { + "title": "state push", + "href": "/cli/commands/state/push" + }, + { + "title": "state replace-provider", + "href": "/cli/commands/state/replace-provider" + }, + { "title": "state rm", "href": "/cli/commands/state/rm" }, + { + "title": "state show", + "href": "/cli/commands/state/show" + }, + { "title": "taint", "href": "/cli/commands/taint" }, + { "title": "test", "href": "/cli/commands/test" }, + { "title": "untaint", "href": "/cli/commands/untaint" }, + { "title": "validate", "href": "/cli/commands/validate" }, + { "title": "version", "href": "/cli/commands/version" }, + { "title": "workspace", "href": "/cli/commands/workspace" }, + { + "title": "workspace list", + "href": "/cli/commands/workspace/list" + }, + { + "title": "workspace select", + "href": "/cli/commands/workspace/select" + }, + { + "title": "workspace new", + "href": "/cli/commands/workspace/new" + }, + { + "title": "workspace delete", + "href": "/cli/commands/workspace/delete" + }, + { + "title": "workspace show", + "href": "/cli/commands/workspace/show" + }, + { + "title": "0.12upgrade", + "href": "/cli/commands/0.12upgrade" + }, + { + "title": "0.13upgrade", + "href": "/cli/commands/0.13upgrade" + } + ] + }, + { + "title": "Alphabetical list of commands", + "hidden": true, + "routes": [ + { "title": "Overview", "path": "commands" }, + { "title": "apply", "path": "commands/apply" }, + { "title": "console", "path": "commands/console" }, + { "title": "destroy", "path": "commands/destroy" }, + { "title": "fmt", "path": "commands/fmt" }, + { "title": "force-unlock", "path": "commands/force-unlock" }, + { "title": "get", "path": "commands/get" }, + { "title": "graph", "path": "commands/graph" }, + { "title": "import", "path": "commands/import" }, + { "title": "init", "path": "commands/init" }, + { "title": "login", "path": "commands/login" }, + { "title": "logout", "path": "commands/logout" }, + { "title": "modules", "path": "commands/modules" }, + { "title": "output", "path": "commands/output" }, + { "title": "plan", "path": "commands/plan" }, + { + "title": "providers", + "routes": [ + { "title": "providers", "path": "commands/providers" }, + { "title": "providers lock", "path": "commands/providers/lock" }, + { "title": "providers mirror", "path": "commands/providers/mirror" }, + { "title": "providers schema", "path": "commands/providers/schema" } + ] + }, + { "title": "query", "path": "commands/query" }, + { "title": "refresh", "path": "commands/refresh" }, + { "title": "show", "path": "commands/show" }, + { + "title": "state", + "routes": [ + { "title": "state", "path": "commands/state" }, + { "title": "state list", "path": "commands/state/list" }, + { "title": "state mv", "path": "commands/state/mv" }, + { "title": "state pull", "path": "commands/state/pull" }, + { "title": "state push", "path": "commands/state/push" }, + { + "title": "state replace-provider", + "path": "commands/state/replace-provider" + }, + { "title": "state rm", "path": "commands/state/rm" }, + { "title": "state show", "path": "commands/state/show" } + ] + }, + { "title": "taint", "path": "commands/taint" }, + { "title": "test", "path": "commands/test" }, + { "title": "untaint", "path": "commands/untaint" }, + { "title": "validate", "path": "commands/validate" }, + { "title": "version", "path": "commands/version" }, + { + "title": "workspace", + "routes": [ + { + "title": "workspace", + "path": "commands/workspace" + }, + { "title": "workspace list", "path": "commands/workspace/list" }, + { "title": "workspace select", "path": "commands/workspace/select" }, + { "title": "workspace new", "path": "commands/workspace/new" }, + { "title": "workspace delete", "path": "commands/workspace/delete" }, + { "title": "workspace show", "path": "commands/workspace/show" } + ] + }, + { + "title": "0.12upgrade", + "path": "commands/0.12upgrade" + }, + { + "title": "0.13upgrade", + "path": "commands/0.13upgrade" + } + ] + }, + { "divider": true }, + { "title": "Terraform Internals", "href": "/internals" } +] diff --git a/content/terraform/v1.15.x (alpha)/data/internals-nav-data.json b/content/terraform/v1.15.x (alpha)/data/internals-nav-data.json new file mode 100644 index 0000000000..f9291d8991 --- /dev/null +++ b/content/terraform/v1.15.x (alpha)/data/internals-nav-data.json @@ -0,0 +1,64 @@ +[ + { "heading": "Terraform Internals" }, + { + "title": "Overview", + "path": "" + }, + { + "title": "Credentials Helpers", + "path": "credentials-helpers" + }, + { + "title": "Debugging Terraform", + "path": "debugging" + }, + { + "title": "Module Registry Protocol", + "path": "module-registry-protocol" + }, + { + "title": "Provider Network Mirror Protocol", + "path": "provider-network-mirror-protocol" + }, + { + "title": "Provider Registry Protocol", + "path": "provider-registry-protocol" + }, + { + "title": "Dependency Graph", + "path": "graph" + }, + { + "title": "Login Protocol", + "path": "login-protocol" + }, + { + "title": "JSON Output Format", + "path": "json-format" + }, + { + "title": "Remote Service Discovery", + "path": "remote-service-discovery" + }, + { + "title": "Provider Metadata", + "path": "provider-meta" + }, + { + "title": "Functions Metadata", + "path": "functions-meta" + }, + { + "title": "Machine Readable UI", + "path": "machine-readable-ui" + }, + { + "title": "Archiving", + "path": "archiving", + "hidden": true + }, + { "divider": true }, + { "title": "Terraform CLI", "href": "/cli" }, + { "divider": true }, + { "title": "Configuration Language", "href": "/language" } +] diff --git a/content/terraform/v1.15.x (alpha)/data/intro-nav-data.json b/content/terraform/v1.15.x (alpha)/data/intro-nav-data.json new file mode 100644 index 0000000000..4d0da480af --- /dev/null +++ b/content/terraform/v1.15.x (alpha)/data/intro-nav-data.json @@ -0,0 +1,34 @@ +[ + { "heading": "Introduction to Terraform" }, + { "title": "What is Terraform?", "path": "" }, + { "title": "Use Cases", "path": "use-cases" }, + { + "title": "Get Started", + "href": "https://learn.hashicorp.com/collections/terraform/aws-get-started?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS" + }, + { "title": "Terraform Editions", "path": "terraform-editions" }, + { "title": "The Core Terraform Workflow", "path": "core-workflow" }, + { + "title": "Phases of Terraform Adoption", + "routes": [ + {"title": "Overview", "path": "phases"}, + {"title": "Adopt", "path": "phases/adopt"}, + {"title": "Collaborate", "path": "phases/collaborate"}, + {"title": "Scale", "path": "phases/scale"}, + {"title": "Govern", "path": "phases/govern"} + ] + }, + { + "title": "Terraform vs. Alternatives", + "routes": [ + { "title": "Overview", "path": "vs" }, + { "title": "Chef, Puppet, etc.", "path": "vs/chef-puppet" }, + { + "title": "CloudFormation, Heat, etc.", + "path": "vs/cloudformation" + }, + { "title": "Boto, Fog, etc.", "path": "vs/boto" }, + { "title": "Custom Solutions", "path": "vs/custom" } + ] + } +] diff --git a/content/terraform/v1.15.x (alpha)/data/language-nav-data.json b/content/terraform/v1.15.x (alpha)/data/language-nav-data.json new file mode 100644 index 0000000000..ef5955cd02 --- /dev/null +++ b/content/terraform/v1.15.x (alpha)/data/language-nav-data.json @@ -0,0 +1,1860 @@ +[ + { + "heading": "Terraform Language" + }, + { + "title": "Overview", + "path": "" + }, + { + "title": "Attributes as Blocks - Configuration Language", + "path": "attr-as-blocks", + "hidden": true + }, + { + "title": "Style guide", + "path": "style" + }, + { + "title": "Syntax", + "routes": [ + { + "title": "Overview", + "path": "syntax" + }, + { + "title": "Configuration syntax", + "path": "syntax/configuration" + }, + { + "title": "JSON configuration syntax", + "path": "syntax/json" + } + ] + }, + { + "title": "Files and configuration structure", + "routes": [ + { + "title": "Overview", + "path": "files" + }, + { + "title": "Override files", + "path": "files/override" + }, + { + "title": "Dependency lock file", + "path": "files/dependency-lock" + }, + { + "title": "Test files", + "path": "files/tests" + }, + { + "title": "Query files", + "path": "files/tfquery" + }, + { + "title": "Stack files", + "path": "files/stack" + } + ] + }, + { + "title": "Install providers", + "routes": [ + { + "title": "Overview", + "path": "providers" + }, + { + "title": "Provider requirements", + "path": "providers/requirements" + }, + { + "title": "Dependency lock file", + "href": "/language/files/dependency-lock" + } + ] + }, + { + "title": "Create and manage resources", + "routes": [ + { + "title": "Overview", + "path": "resources" + }, + { + "title": "Configure a resource", + "path": "resources/configure" + }, + { + "title": "Destroy a resource", + "path": "resources/destroy" + } + ] + }, + { + "title": "Manage values in modules", + "alias": "variables, outputs, locals", + "routes": [ + { + "title": "Overview", + "path": "values" + }, + { + "title": "Use variables", + "path": "values/variables" + }, + { + "title": "Use locals", + "path": "values/locals" + }, + { + "title": "Use outputs", + "path": "values/outputs" + } + ] + }, + { + "title": "Manage sensitive data", + "routes": [ + { + "title": "Overview", + "path": "manage-sensitive-data" + }, + { + "title": "Ephemeral values in resources", + "path": "manage-sensitive-data/ephemeral" + }, + { + "title": "Use temporary write-only arguments", + "path": "manage-sensitive-data/write-only", + "alias": "write only" + } + ] + }, + { + "title": "Query infrastructure data", + "path": "data-sources", + "alias": "data sources" + }, + { + "title": "Build and use modules", + "routes": [ + { + "title": "Overview", + "path": "modules" + }, + { + "title": "Use modules", + "path": "modules/configuration" + }, + { + "title": "Develop modules", + "routes": [ + { + "title": "Overview", + "path": "modules/develop" + }, + { + "title": "Standard module structure", + "path": "modules/develop/structure" + }, + { + "title": "Providers within modules", + "path": "modules/develop/providers" + }, + { + "title": "Best practices for composing modules", + "path": "modules/develop/composition" + }, + { + "title": "Publish modules", + "path": "modules/develop/publish" + }, + { + "title": "Refactor modules", + "path": "modules/develop/refactoring" + } + ] + } + ] + }, + { + "title": "Manage state", + "routes": [ + { + "title": "Overview", + "path": "state" + }, + { + "title": "Purpose", + "path": "state/purpose" + }, + { + "title": "Manage state in remote backends", + "path": "state/backends" + }, + { + "title": "Refactor state", + "path": "state/refactor" + }, + { + "title": "Remove a resource from state", + "path": "state/remove" + }, + { + "title": "Locking", + "path": "state/locking" + }, + { + "title": "Workspaces", + "path": "state/workspaces" + }, + { + "title": "Remote state", + "path": "state/remote" + } + ] + }, + { + "title": "Store state remotely", + "routes": [ + { + "title": "Overview", + "path": "backend" + }, + { + "title": "local", + "path": "backend/local" + }, + { + "title": "remote", + "path": "backend/remote" + }, + { + "title": "azurerm", + "path": "backend/azurerm" + }, + { + "title": "consul", + "path": "backend/consul" + }, + { + "title": "cos", + "path": "backend/cos" + }, + { + "title": "gcs", + "path": "backend/gcs" + }, + { + "title": "http", + "path": "backend/http" + }, + { + "title": "Kubernetes", + "path": "backend/kubernetes" + }, + { + "title": "oci", + "path": "backend/oci" + }, + { + "title": "oss", + "path": "backend/oss" + }, + { + "title": "pg", + "path": "backend/pg" + }, + { + "title": "s3", + "path": "backend/s3" + } + ] + }, + { + "title": "Import existing resources", + "routes": [ + { + "title": "Overview", + "path": "import" + }, + { + "title": "Import resources in bulk", + "path": "import/bulk", + "alias": "search, terraform search, query, list" + }, + { + "title": "Import a single resource", + "path": "import/single-resource" + }, + { + "title": "Generate configuration for single imports", + "path": "import/generating-configuration" + } + ] + }, + { + "title": "Test and validate configuration", + "routes": [ + { + "title": "Validate your configuration", + "path": "validate" + }, + { + "title": "Test your configuration", + "routes": [ + { + "title": "Overview", + "path": "tests" + }, + { + "title": "Mocks", + "path": "tests/mocking" + } + ] + } + ] + }, + { + "title": "Manage infrastructure at scale with Stacks", + "routes": [ + { + "title": "Overview", + "path": "stacks", + "alias": "stacks" + }, + { + "title": "Update from beta to general availability", + "path": "stacks/update-GA" + }, + { + "title": "Use cases", + "path": "stacks/use-cases" + }, + { + "title": "Design a Stack", + "path": "stacks/design" + }, + { + "title": "Create a Stack", + "routes": [ + { + "title": "Define configuration", + "path": "stacks/component/config" + }, + { + "title": "Declare providers", + "path": "stacks/component/declare-providers" + }, + { + "title": "Manage components", + "path": "stacks/component/manage" + } + ] + }, + { + "title": "Define deployments", + "routes": [ + { + "title": "Define configuration", + "path": "stacks/deploy/config" + }, + { + "title": "Set conditions for deployment runs", + "path": "stacks/deploy/conditions" + }, + { + "title": "Authenticate a Stack", + "path": "stacks/deploy/authenticate" + }, + { + "title": "Pass data from one Stack to another", + "path": "stacks/deploy/pass-data" + } + ] + } + ] + }, + { + "title": "Invoke actions", + "path": "invoke-actions" + }, + { + "title": "Use provisioners for post-apply operations", + "path": "provisioners", + "alias": "provisioners" + }, + { + "title": "Upgrading to Terraform v1.15", + "path": "upgrade-guides" + }, + { + "title": "v1.x Compatibility promises", + "path": "v1-compatibility-promises" + }, + { + "divider": true + }, + { + "heading": "REFERENCE" + }, + { + "title": "Configuration blocks", + "routes": [ + { + "title": "action", + "path": "block/action" + }, + { + "title": "check", + "path": "block/check" + }, + { + "title": "data", + "path": "block/data" + }, + { + "title": "ephemeral", + "path": "block/ephemeral" + }, + { + "title": "import", + "path": "block/import" + }, + { + "title": "locals", + "path": "block/locals" + }, + { + "title": "module", + "path": "block/module" + }, + { + "title": "moved", + "path": "block/moved" + }, + { + "title": "output", + "path": "block/output" + }, + { + "title": "provider", + "path": "block/provider" + }, + { + "title": "removed", + "path": "block/removed" + }, + { + "title": "resource", + "path": "block/resource" + }, + { + "title": "terraform", + "path": "block/terraform" + }, + { + "title": "variable", + "path": "block/variable" + } + ] + }, + { + "title": "Stack blocks", + "routes": [ + { + "title": "Component configuration", + "routes": [ + { + "title": "Overview", + "path": "block/stack/tfcomponent" + }, + { + "title": "component", + "path": "block/stack/tfcomponent/component" + }, + { + "title": "required_providers", + "path": "block/stack/tfcomponent/required_providers" + }, + { + "title": "provider", + "path": "block/stack/tfcomponent/provider" + }, + { + "title": "variable", + "path": "block/stack/tfcomponent/variable" + }, + { + "title": "output", + "path": "block/stack/tfcomponent/output" + }, + { + "title": "removed", + "path": "block/stack/tfcomponent/removed" + }, + { + "title": "locals", + "href": "block/locals" + } + ] + }, + { + "title": "Deployment configuration", + "routes": [ + { + "title": "Overview", + "path": "block/stack/tfdeploy" + }, + { + "title": "deployment", + "path": "block/stack/tfdeploy/deployment" + }, + { + "title": "deployment_group", + "path": "block/stack/tfdeploy/deployment_group" + }, + { + "title": "deployment_auto_approve", + "path": "block/stack/tfdeploy/deployment_auto_approve" + }, + { + "title": "identity_token", + "path": "block/stack/tfdeploy/identity_token" + }, + { + "title": "store", + "path": "block/stack/tfdeploy/store" + }, + { + "title": "publish_output", + "path": "block/stack/tfdeploy/publish_output" + }, + { + "title": "upstream_input", + "path": "block/stack/tfdeploy/upstream_input" + }, + { + "title": "locals", + "href": "block/locals" + } + ] + } + ] + }, + { + "title": "Query blocks", + "routes": [ + { + "title": "list", + "path": "block/tfquery/list", + "alias": "search, terraform search" + }, + { + "title": "locals", + "href": "/language/block/locals" + }, + { + "title": "provider", + "href": "/language/block/provider" + }, + { + "title": "variable", + "href": "/language/block/variable" + } + ] + }, + { + "title": "Meta-arguments", + "routes": [ + { + "title": "Overview", + "path": "meta-arguments" + }, + { + "title": "count", + "path": "meta-arguments/count" + }, + { + "title": "depends_on", + "path": "meta-arguments/depends_on" + }, + { + "title": "for_each", + "path": "meta-arguments/for_each" + }, + { + "title": "lifecycle", + "path": "meta-arguments/lifecycle", + "alias": "actions" + }, + { + "title": "provider", + "path": "meta-arguments/provider" + }, + { + "title": "providers", + "path": "meta-arguments/providers" + } + ] + }, + { + "title": "Built-in resources", + "routes": [ + { + "title": "terraform_data resource reference", + "path": "resources/terraform-data" + }, + { + "title": "The terraform_remote_state data source", + "path": "state/remote-state-data" + } + ] + }, + { + "title": "Expressions", + "routes": [ + { + "title": "Overview", + "path": "expressions" + }, + { + "title": "Types and values", + "path": "expressions/types" + }, + { + "title": "Strings and templates", + "path": "expressions/strings" + }, + { + "title": "References to values", + "path": "expressions/references" + }, + { + "title": "Operators", + "path": "expressions/operators" + }, + { + "title": "Function calls", + "path": "expressions/function-calls" + }, + { + "title": "Conditional expressions", + "path": "expressions/conditionals" + }, + { + "title": "For expressions", + "path": "expressions/for" + }, + { + "title": "Splat expressions", + "path": "expressions/splat" + }, + { + "title": "Dynamic blocks", + "path": "expressions/dynamic-blocks" + }, + { + "title": "Type constraints", + "path": "expressions/type-constraints" + }, + { + "title": "Version constraints", + "path": "expressions/version-constraints" + } + ] + }, + { + "title": "Functions", + "routes": [ + { + "title": "Overview", + "path": "functions" + }, + { + "title": "Numeric functions", + "routes": [ + { + "title": "abs", + "href": "/language/functions/abs" + }, + { + "title": "ceil", + "href": "/language/functions/ceil" + }, + { + "title": "floor", + "href": "/language/functions/floor" + }, + { + "title": "log", + "href": "/language/functions/log" + }, + { + "title": "max", + "href": "/language/functions/max" + }, + { + "title": "min", + "href": "/language/functions/min" + }, + { + "title": "parseint", + "href": "/language/functions/parseint" + }, + { + "title": "pow", + "href": "/language/functions/pow" + }, + { + "title": "signum", + "href": "/language/functions/signum" + } + ] + }, + { + "title": "String functions", + "routes": [ + { + "title": "chomp", + "href": "/language/functions/chomp" + }, + { + "title": "endswith", + "href": "/language/functions/endswith" + }, + { + "title": "format", + "href": "/language/functions/format" + }, + { + "title": "formatlist", + "href": "/language/functions/formatlist" + }, + { + "title": "indent", + "href": "/language/functions/indent" + }, + { + "title": "join", + "href": "/language/functions/join" + }, + { + "title": "lower", + "href": "/language/functions/lower" + }, + { + "title": "regex", + "href": "/language/functions/regex" + }, + { + "title": "regexall", + "href": "/language/functions/regexall" + }, + { + "title": "replace", + "href": "/language/functions/replace" + }, + { + "title": "split", + "href": "/language/functions/split" + }, + { + "title": "startswith", + "href": "/language/functions/startswith" + }, + { + "title": "strcontains", + "href": "/language/functions/strcontains" + }, + { + "title": "strrev", + "href": "/language/functions/strrev" + }, + { + "title": "substr", + "href": "/language/functions/substr" + }, + { + "title": "templatestring", + "href": "/language/functions/templatestring" + }, + { + "title": "title", + "href": "/language/functions/title" + }, + { + "title": "trim", + "href": "/language/functions/trim" + }, + { + "title": "trimprefix", + "href": "/language/functions/trimprefix" + }, + { + "title": "trimsuffix", + "href": "/language/functions/trimsuffix" + }, + { + "title": "trimspace", + "href": "/language/functions/trimspace" + }, + { + "title": "upper", + "href": "/language/functions/upper" + } + ] + }, + { + "title": "Collection functions", + "routes": [ + { + "title": "alltrue", + "href": "/language/functions/alltrue" + }, + { + "title": "anytrue", + "href": "/language/functions/anytrue" + }, + { + "title": "chunklist", + "href": "/language/functions/chunklist" + }, + { + "title": "coalesce", + "href": "/language/functions/coalesce" + }, + { + "title": "coalescelist", + "href": "/language/functions/coalescelist" + }, + { + "title": "compact", + "href": "/language/functions/compact" + }, + { + "title": "concat", + "href": "/language/functions/concat" + }, + { + "title": "contains", + "href": "/language/functions/contains" + }, + { + "title": "distinct", + "href": "/language/functions/distinct" + }, + { + "title": "element", + "href": "/language/functions/element" + }, + { + "title": "flatten", + "href": "/language/functions/flatten" + }, + { + "title": "index", + "href": "/language/functions/index_function" + }, + { + "title": "keys", + "href": "/language/functions/keys" + }, + { + "title": "length", + "href": "/language/functions/length" + }, + { + "title": "list", + "href": "/language/functions/list" + }, + { + "title": "lookup", + "href": "/language/functions/lookup" + }, + { + "title": "map", + "href": "/language/functions/map" + }, + { + "title": "matchkeys", + "href": "/language/functions/matchkeys" + }, + { + "title": "merge", + "href": "/language/functions/merge" + }, + { + "title": "one", + "href": "/language/functions/one" + }, + { + "title": "range", + "href": "/language/functions/range" + }, + { + "title": "reverse", + "href": "/language/functions/reverse" + }, + { + "title": "setintersection", + "href": "/language/functions/setintersection" + }, + { + "title": "setproduct", + "href": "/language/functions/setproduct" + }, + { + "title": "setsubtract", + "href": "/language/functions/setsubtract" + }, + { + "title": "setunion", + "href": "/language/functions/setunion" + }, + { + "title": "slice", + "href": "/language/functions/slice" + }, + { + "title": "sort", + "href": "/language/functions/sort" + }, + { + "title": "sum", + "href": "/language/functions/sum" + }, + { + "title": "transpose", + "href": "/language/functions/transpose" + }, + { + "title": "values", + "href": "/language/functions/values" + }, + { + "title": "zipmap", + "href": "/language/functions/zipmap" + } + ] + }, + { + "title": "Encoding functions", + "routes": [ + { + "title": "base64decode", + "href": "/language/functions/base64decode" + }, + { + "title": "base64encode", + "href": "/language/functions/base64encode" + }, + { + "title": "base64gzip", + "href": "/language/functions/base64gzip" + }, + { + "title": "csvdecode", + "href": "/language/functions/csvdecode" + }, + { + "title": "jsondecode", + "href": "/language/functions/jsondecode" + }, + { + "title": "jsonencode", + "href": "/language/functions/jsonencode" + }, + { + "title": "textdecodebase64", + "href": "/language/functions/textdecodebase64" + }, + { + "title": "textencodebase64", + "href": "/language/functions/textencodebase64" + }, + { + "title": "urlencode", + "href": "/language/functions/urlencode" + }, + { + "title": "yamldecode", + "href": "/language/functions/yamldecode" + }, + { + "title": "yamlencode", + "href": "/language/functions/yamlencode" + } + ] + }, + { + "title": "Filesystem functions", + "routes": [ + { + "title": "abspath", + "href": "/language/functions/abspath" + }, + { + "title": "dirname", + "href": "/language/functions/dirname" + }, + { + "title": "pathexpand", + "href": "/language/functions/pathexpand" + }, + { + "title": "basename", + "href": "/language/functions/basename" + }, + { + "title": "file", + "href": "/language/functions/file" + }, + { + "title": "fileexists", + "href": "/language/functions/fileexists" + }, + { + "title": "fileset", + "href": "/language/functions/fileset" + }, + { + "title": "filebase64", + "href": "/language/functions/filebase64" + }, + { + "title": "templatefile", + "href": "/language/functions/templatefile" + } + ] + }, + { + "title": "Date and time functions", + "routes": [ + { + "title": "formatdate", + "href": "/language/functions/formatdate" + }, + { + "title": "plantimestamp", + "href": "/language/functions/plantimestamp" + }, + { + "title": "timeadd", + "href": "/language/functions/timeadd" + }, + { + "title": "timecmp", + "href": "/language/functions/timecmp" + }, + { + "title": "timestamp", + "href": "/language/functions/timestamp" + } + ] + }, + { + "title": "Hash and crypto functions", + "routes": [ + { + "title": "base64sha256", + "href": "/language/functions/base64sha256" + }, + { + "title": "base64sha512", + "href": "/language/functions/base64sha512" + }, + { + "title": "bcrypt", + "href": "/language/functions/bcrypt" + }, + { + "title": "filebase64sha256", + "href": "/language/functions/filebase64sha256" + }, + { + "title": "filebase64sha512", + "href": "/language/functions/filebase64sha512" + }, + { + "title": "filemd5", + "href": "/language/functions/filemd5" + }, + { + "title": "filesha1", + "href": "/language/functions/filesha1" + }, + { + "title": "filesha256", + "href": "/language/functions/filesha256" + }, + { + "title": "filesha512", + "href": "/language/functions/filesha512" + }, + { + "title": "md5", + "href": "/language/functions/md5" + }, + { + "title": "rsadecrypt", + "href": "/language/functions/rsadecrypt" + }, + { + "title": "sha1", + "href": "/language/functions/sha1" + }, + { + "title": "sha256", + "href": "/language/functions/sha256" + }, + { + "title": "sha512", + "href": "/language/functions/sha512" + }, + { + "title": "uuid", + "href": "/language/functions/uuid" + }, + { + "title": "uuidv5", + "href": "/language/functions/uuidv5" + } + ] + }, + { + "title": "IP network functions", + "routes": [ + { + "title": "cidrhost", + "href": "/language/functions/cidrhost" + }, + { + "title": "cidrnetmask", + "href": "/language/functions/cidrnetmask" + }, + { + "title": "cidrsubnet", + "href": "/language/functions/cidrsubnet" + }, + { + "title": "cidrsubnets", + "href": "/language/functions/cidrsubnets" + } + ] + }, + { + "title": "Type conversion functions", + "routes": [ + { + "title": "can", + "href": "/language/functions/can" + }, + { + "title": "ephemeralasnull", + "href": "/language/functions/ephemeralasnull" + }, + { + "title": "issensitive", + "href": "/language/functions/issensitive" + }, + { + "title": "nonsensitive", + "href": "/language/functions/nonsensitive" + }, + { + "title": "sensitive", + "href": "/language/functions/sensitive" + }, + { + "title": "tobool", + "href": "/language/functions/tobool" + }, + { + "title": "tolist", + "href": "/language/functions/tolist" + }, + { + "title": "tomap", + "href": "/language/functions/tomap" + }, + { + "title": "tonumber", + "href": "/language/functions/tonumber" + }, + { + "title": "toset", + "href": "/language/functions/toset" + }, + { + "title": "tostring", + "href": "/language/functions/tostring" + }, + { + "title": "try", + "href": "/language/functions/try" + }, + { + "title": "type", + "href": "/language/functions/type" + } + ] + }, + { + "title": "Terraform-specific functions", + "routes": [ + { + "title": "provider::terraform::encode_tfvars", + "href": "/language/functions/terraform-encode_tfvars" + }, + { + "title": "provider::terraform::decode_tfvars", + "href": "/language/functions/terraform-decode_tfvars" + }, + { + "title": "provider::terraform::encode_expr", + "href": "/language/functions/terraform-encode_expr" + }, + { + "title": "terraform.applying", + "href": "/language/functions/terraform-applying" + } + ] + }, + { + "title": "abs", + "path": "functions/abs", + "hidden": true + }, + { + "title": "abspath", + "path": "functions/abspath", + "hidden": true + }, + { + "title": "alltrue", + "path": "functions/alltrue", + "hidden": true + }, + { + "title": "anytrue", + "path": "functions/anytrue", + "hidden": true + }, + { + "title": "base64decode", + "path": "functions/base64decode", + "hidden": true + }, + { + "title": "base64encode", + "path": "functions/base64encode", + "hidden": true + }, + { + "title": "base64gzip", + "path": "functions/base64gzip", + "hidden": true + }, + { + "title": "base64sha256", + "path": "functions/base64sha256", + "hidden": true + }, + { + "title": "base64sha512", + "path": "functions/base64sha512", + "hidden": true + }, + { + "title": "basename", + "path": "functions/basename", + "hidden": true + }, + { + "title": "bcrypt", + "path": "functions/bcrypt", + "hidden": true + }, + { + "title": "can", + "path": "functions/can", + "hidden": true + }, + { + "title": "ceil", + "path": "functions/ceil", + "hidden": true + }, + { + "title": "chomp", + "path": "functions/chomp", + "hidden": true + }, + { + "title": "chunklist", + "path": "functions/chunklist", + "hidden": true + }, + { + "title": "cidrhost", + "path": "functions/cidrhost", + "hidden": true + }, + { + "title": "cidrnetmask", + "path": "functions/cidrnetmask", + "hidden": true + }, + { + "title": "cidrsubnet", + "path": "functions/cidrsubnet", + "hidden": true + }, + { + "title": "cidrsubnets", + "path": "functions/cidrsubnets", + "hidden": true + }, + { + "title": "coalesce", + "path": "functions/coalesce", + "hidden": true + }, + { + "title": "coalescelist", + "path": "functions/coalescelist", + "hidden": true + }, + { + "title": "compact", + "path": "functions/compact", + "hidden": true + }, + { + "title": "concat", + "path": "functions/concat", + "hidden": true + }, + { + "title": "contains", + "path": "functions/contains", + "hidden": true + }, + { + "title": "csvdecode", + "path": "functions/csvdecode", + "hidden": true + }, + { + "title": "dirname", + "path": "functions/dirname", + "hidden": true + }, + { + "title": "distinct", + "path": "functions/distinct", + "hidden": true + }, + { + "title": "element", + "path": "functions/element", + "hidden": true + }, + { + "title": "endswith", + "path": "functions/endswith", + "hidden": true + }, + { + "title": "ephemeralasnull", + "path": "functions/ephemeralasnull", + "hidden": true + }, + { + "title": "file", + "path": "functions/file", + "hidden": true + }, + { + "title": "filebase64", + "path": "functions/filebase64", + "hidden": true + }, + { + "title": "filebase64sha256", + "path": "functions/filebase64sha256", + "hidden": true + }, + { + "title": "filebase64sha512", + "path": "functions/filebase64sha512", + "hidden": true + }, + { + "title": "fileexists", + "path": "functions/fileexists", + "hidden": true + }, + { + "title": "filemd5", + "path": "functions/filemd5", + "hidden": true + }, + { + "title": "fileset", + "path": "functions/fileset", + "hidden": true + }, + { + "title": "filesha1", + "path": "functions/filesha1", + "hidden": true + }, + { + "title": "filesha256", + "path": "functions/filesha256", + "hidden": true + }, + { + "title": "filesha512", + "path": "functions/filesha512", + "hidden": true + }, + { + "title": "flatten", + "path": "functions/flatten", + "hidden": true + }, + { + "title": "floor", + "path": "functions/floor", + "hidden": true + }, + { + "title": "format", + "path": "functions/format", + "hidden": true + }, + { + "title": "formatdate", + "path": "functions/formatdate", + "hidden": true + }, + { + "title": "formatlist", + "path": "functions/formatlist", + "hidden": true + }, + { + "title": "indent", + "path": "functions/indent", + "hidden": true + }, + { + "title": "index", + "path": "functions/index_function", + "hidden": true + }, + { + "title": "issensitive", + "path": "functions/issensitive", + "hidden": true + }, + { + "title": "join", + "path": "functions/join", + "hidden": true + }, + { + "title": "jsondecode", + "path": "functions/jsondecode", + "hidden": true + }, + { + "title": "jsonencode", + "path": "functions/jsonencode", + "hidden": true + }, + { + "title": "keys", + "path": "functions/keys", + "hidden": true + }, + { + "title": "length", + "path": "functions/length", + "hidden": true + }, + { + "title": "list", + "path": "functions/list", + "hidden": true + }, + { + "title": "log", + "path": "functions/log", + "hidden": true + }, + { + "title": "lookup", + "path": "functions/lookup", + "hidden": true + }, + { + "title": "lower", + "path": "functions/lower", + "hidden": true + }, + { + "title": "map", + "path": "functions/map", + "hidden": true + }, + { + "title": "matchkeys", + "path": "functions/matchkeys", + "hidden": true + }, + { + "title": "max", + "path": "functions/max", + "hidden": true + }, + { + "title": "md5", + "path": "functions/md5", + "hidden": true + }, + { + "title": "merge", + "path": "functions/merge", + "hidden": true + }, + { + "title": "min", + "path": "functions/min", + "hidden": true + }, + { + "title": "nonsensitive", + "path": "functions/nonsensitive", + "hidden": true + }, + { + "title": "one", + "path": "functions/one", + "hidden": true + }, + { + "title": "parseint", + "path": "functions/parseint", + "hidden": true + }, + { + "title": "pathexpand", + "path": "functions/pathexpand", + "hidden": true + }, + { + "title": "plantimestamp", + "path": "functions/plantimestamp", + "hidden": true + }, + { + "title": "pow", + "path": "functions/pow", + "hidden": true + }, + { + "title": "range", + "path": "functions/range", + "hidden": true + }, + { + "title": "regex", + "path": "functions/regex", + "hidden": true + }, + { + "title": "regexall", + "path": "functions/regexall", + "hidden": true + }, + { + "title": "replace", + "path": "functions/replace", + "hidden": true + }, + { + "title": "reverse", + "path": "functions/reverse", + "hidden": true + }, + { + "title": "rsadecrypt", + "path": "functions/rsadecrypt", + "hidden": true + }, + { + "title": "sensitive", + "path": "functions/sensitive", + "hidden": true + }, + { + "title": "setintersection", + "path": "functions/setintersection", + "hidden": true + }, + { + "title": "setproduct", + "path": "functions/setproduct", + "hidden": true + }, + { + "title": "setsubtract", + "path": "functions/setsubtract", + "hidden": true + }, + { + "title": "setunion", + "path": "functions/setunion", + "hidden": true + }, + { + "title": "sha1", + "path": "functions/sha1", + "hidden": true + }, + { + "title": "sha256", + "path": "functions/sha256", + "hidden": true + }, + { + "title": "sha512", + "path": "functions/sha512", + "hidden": true + }, + { + "title": "signum", + "path": "functions/signum", + "hidden": true + }, + { + "title": "slice", + "path": "functions/slice", + "hidden": true + }, + { + "title": "sort", + "path": "functions/sort", + "hidden": true + }, + { + "title": "split", + "path": "functions/split", + "hidden": true + }, + { + "title": "startswith", + "path": "functions/startswith", + "hidden": true + }, + { + "title": "strcontains", + "path": "functions/strcontains", + "hidden": true + }, + { + "title": "strrev", + "path": "functions/strrev", + "hidden": true + }, + { + "title": "substr", + "path": "functions/substr", + "hidden": true + }, + { + "title": "sum", + "path": "functions/sum", + "hidden": true + }, + { + "title": "templatefile", + "path": "functions/templatefile", + "hidden": true + }, + { + "title": "templatestring", + "path": "functions/templatestring", + "hidden": true + }, + { + "title": "terraform.applying", + "path": "functions/terraform-applying", + "hidden": true + }, + { + "title": "terraform-encode_tfvars", + "path": "functions/terraform-encode_tfvars", + "hidden": true + }, + { + "title": "terraform-decode_tfvars", + "path": "functions/terraform-decode_tfvars", + "hidden": true + }, + { + "title": "terraform-encode_expr", + "path": "functions/terraform-encode_expr", + "hidden": true + }, + { + "title": "textdecodebase64", + "path": "functions/textdecodebase64", + "hidden": true + }, + { + "title": "textencodebase64", + "path": "functions/textencodebase64", + "hidden": true + }, + { + "title": "timeadd", + "path": "functions/timeadd", + "hidden": true + }, + { + "title": "timecmp", + "path": "functions/timecmp", + "hidden": true + }, + { + "title": "timestamp", + "path": "functions/timestamp", + "hidden": true + }, + { + "title": "title", + "path": "functions/title", + "hidden": true + }, + { + "title": "tobool", + "path": "functions/tobool", + "hidden": true + }, + { + "title": "tolist", + "path": "functions/tolist", + "hidden": true + }, + { + "title": "tomap", + "path": "functions/tomap", + "hidden": true + }, + { + "title": "tonumber", + "path": "functions/tonumber", + "hidden": true + }, + { + "title": "toset", + "path": "functions/toset", + "hidden": true + }, + { + "title": "tostring", + "path": "functions/tostring", + "hidden": true + }, + { + "title": "transpose", + "path": "functions/transpose", + "hidden": true + }, + { + "title": "trim", + "path": "functions/trim", + "hidden": true + }, + { + "title": "trimprefix", + "path": "functions/trimprefix", + "hidden": true + }, + { + "title": "trimspace", + "path": "functions/trimspace", + "hidden": true + }, + { + "title": "trimsuffix", + "path": "functions/trimsuffix", + "hidden": true + }, + { + "title": "try", + "path": "functions/try", + "hidden": true + }, + { + "title": "type", + "path": "functions/type", + "hidden": true + }, + { + "title": "upper", + "path": "functions/upper", + "hidden": true + }, + { + "title": "urlencode", + "path": "functions/urlencode", + "hidden": true + }, + { + "title": "uuid", + "path": "functions/uuid", + "hidden": true + }, + { + "title": "uuidv5", + "path": "functions/uuidv5", + "hidden": true + }, + { + "title": "values", + "path": "functions/values", + "hidden": true + }, + { + "title": "yamldecode", + "path": "functions/yamldecode", + "hidden": true + }, + { + "title": "yamlencode", + "path": "functions/yamlencode", + "hidden": true + }, + { + "title": "zipmap", + "path": "functions/zipmap", + "hidden": true + } + ] + }, + { + "title": "Terraform internals", + "href": "/internals" + } +] \ No newline at end of file diff --git a/content/terraform/v1.15.x (alpha)/docs/cli/auth/index.mdx b/content/terraform/v1.15.x (alpha)/docs/cli/auth/index.mdx new file mode 100644 index 0000000000..52f11e73e9 --- /dev/null +++ b/content/terraform/v1.15.x (alpha)/docs/cli/auth/index.mdx @@ -0,0 +1,33 @@ +--- +page_title: Get an API token for HCP Terraform or Terraform Enterprise +description: >- + Use the `terraform login` and `terraform logout` commands get + an API token for your HCP Terraform or Terraform Enterprise account. +--- + +# Get an API token for HCP Terraform and Terraform Enterprise + +This topic describes how to use the `terraform login` and `terraform logout` to authenticate with HCP Terraform and Terraform Enterprise. + +> **Hands-on:** Try the [Authenticate the CLI with HCP Terraform](/terraform/tutorials/cloud/cloud-sign-up?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) tutorial. + +## Overview + +[HCP Terraform](https://cloud.hashicorp.com/products/terraform) and +[Terraform Enterprise](/terraform/enterprise) are platforms that perform +Terraform runs to provision infrastructure, offering a collaboration-focused +environment that makes it easier for teams to use Terraform together. + +You can integrate the Terraform CLI with HCP Terraform and Terraform Enterprise in the following ways: + +- Use the Terraform CLI as a front-end for [CLI-driven runs](/terraform/cloud-docs/run/cli) in HCP Terraform +- Use HCP Terraform or Terraform Enterprise as a state backend and a private module registry. + +These integrations require you to authenticate the Terraform CLI +with your HCP Terraform account. + +## Authentication + +Run the `terraform login` command to generate an API token for your HCP Terraform user account. Refer to the [`terraform login` command](/terraform/cli/commands/login) reference documentation for details. + +Run the `terraform logout` command to end your HCP Terraform or Terraform Enterprise session. Refer to the [`terraform logout` command](/terraform/cli/commands/logout) reference documentation for details. diff --git a/content/terraform/v1.15.x (alpha)/docs/cli/cloud/command-line-arguments.mdx b/content/terraform/v1.15.x (alpha)/docs/cli/cloud/command-line-arguments.mdx new file mode 100644 index 0000000000..8483a8adf2 --- /dev/null +++ b/content/terraform/v1.15.x (alpha)/docs/cli/cloud/command-line-arguments.mdx @@ -0,0 +1,24 @@ +--- +page_title: -ignore-remote-version reference +description: Use the -ignore-remote-version flag to override CLI-driven commands for HCP Terraform runs. +--- + +# `-ignore-remote-version` reference + +When your configuration includes a `cloud` block, commands that +make local modifications to Terraform state and then push them back up to the remote workspace +accept the following option to modify that behavior: + +- `-ignore-remote-version` - Override checking that the local and remote + Terraform versions agree, making an operation proceed even when there is + a mismatch. + + State-modification operations usually require using a local version of the + Terraform CLI that is compatible with the Terraform version selected + in the remote workspace settings. This prevents the + local operation from creating a new state snapshot that the workspace's + remote execution environment cannot decode. + + We recommend against using this option unless absolutely necessary. Overriding this check can result + in an HCP Terraform workspace that is no longer able to complete remote operations with the currently + selected version of Terraform. diff --git a/content/terraform/v1.15.x (alpha)/docs/cli/cloud/index.mdx b/content/terraform/v1.15.x (alpha)/docs/cli/cloud/index.mdx new file mode 100644 index 0000000000..be42a1ad37 --- /dev/null +++ b/content/terraform/v1.15.x (alpha)/docs/cli/cloud/index.mdx @@ -0,0 +1,25 @@ +--- +page_title: Use HCP Terraform or Terraform Enterprise with the Terraform CLI +description: >- + Learn how to use HCP Terraform and Terraform Enterprise on the command line with the Terraform CLI. +--- + +# Use HCP Terraform with the Terraform CLI + +The Terraform CLI integration with HCP Terraform lets you use [HCP Terraform](https://developer.hashicorp.com/terraform/cloud-docs) and [Terraform Enterprise](https://developer.hashicorp.com/terraform/enterprise) on the command line. The instructions for HCP Terraform also apply to Terraform Enterprise, except where explicitly stated. + +Using HCP Terraform through the command line is called the [CLI-driven run workflow](/terraform/cloud-docs/run/cli). When you use the CLI workflow, operations like `terraform plan` or `terraform apply` are remotely executed in HCP Terraform's run environment by default, with log output streaming to the local terminal. This lets you use HCP Terraform features within the familiar Terraform CLI workflow, including variables encrypted at rest in an HCP Terraform workspace, cost estimates, and policy checking. + +> **Hands On:** Try the [Migrate State to HCP Terraform](/terraform/tutorials/cloud/cloud-migrate) tutorial. + +Workspaces can also be configured for local execution, in which case HCP Terraform only stores state. In this mode, HCP Terraform behaves just like a standard state backend. + +-> **Note:** The CLI integration is available in Terraform 1.1.0 and later, and Terraform Enterprise 202201-1 and later. Previous versions can use the [`remote` backend](/terraform/language/backend/remote). Refer to [Migrating from the remote +backend](/terraform/cli/cloud/settings#migrate-state-data) for details about switching to the CLI integration. + +## Documentation Summary + +- [Connect to HCP Terraform](/terraform/cli/cloud/settings) documents the `cloud` block that you must add to your configuration to enable HCP Terraform support. +- [Command Line Arguments](/terraform/cli/cloud/command-line-arguments) lists the Terraform command flags that are specific to using Terraform with HCP Terraform. + +Refer to the [CLI-driven Run Workflow](/terraform/cloud-docs/run/cli) for more details about how to use HCP Terraform from the command line. diff --git a/content/terraform/v1.15.x (alpha)/docs/cli/cloud/settings.mdx b/content/terraform/v1.15.x (alpha)/docs/cli/cloud/settings.mdx new file mode 100644 index 0000000000..24f3229333 --- /dev/null +++ b/content/terraform/v1.15.x (alpha)/docs/cli/cloud/settings.mdx @@ -0,0 +1,158 @@ +--- +page_title: Connect to HCP Terraform +description: >- + Learn how to configure the Terraform CLI to connect to HCP Terraform. +--- + +# Connect to HCP Terraform + +This topic describes how to connect the Terraform CLI to HCP Terraform. Integrating the CLI with HCP Terraform enables the CLI to act as a client for CLI-drive workflows. Refer to [CLI-driven Run Workflow](/terraform/cloud-docs/run/cli) for additional information. + +> **Hands On:** Complete the [Migrate State to HCP Terraform](/terraform/tutorials/cloud/cloud-migrate) tutorial to learn more about integrating the CLI with HCP Terraform. + +## Overview + +Connecting the Terraform CLI to HCP Terraform links the working directory that contains your Terraform configurations to one or more HCP Terraform workspaces. This allows team members with access to the workspace to provision and manage infrastructure using HCP Terraform. Additionally, HCP Terraform manages state data so that you do not have to maintain remote state objects. Refer to the following topics for additional information: + +- [State overview](/terraform/language/state) in the Terraform configuration language reference. +- [Terraform State in HCP Terraform](/terraform/cloud-docs/workspaces/state) in the HCP Terraform documentation. + +Complete the following steps to connect to HCP Terraform: + +1. Provide credentials to HCP Terraform. +1. Define connection settings in your Terraform configuration. +1. Initialize the working directory. +1. Migrate state data. This step is optional. + +## Requirements + +You must have a user profile in HCP Terraform with permissions to create a workspace. Refer to [Workspace Permissions](/terraform/cloud-docs/users-teams-organizations/permissions) in the HCP Terraform documentation for additional information. + +## Provide credentials + +You must provide credentials to access HCP Terraform. We recommend using the +[`terraform login`](/terraform/cli/commands/login) command to log into Terraform. You can also provide a user token in the Terraform configuration. Refer to the [`token`](/terraform/language/terraform#terraform-cloud-token) attribute in the Terraform configuration reference for additional information. + + +## Define connection settings + +Add a `cloud` block to your Terraform configuration and configure the connection settings to link the working directory to an HCP Terraform workspace. The `cloud` block is a member of the `terraform` block. Refer to the [`terraform` block reference](/terraform/language/terraform) for additional information. + +Specify the following settings in the `cloud` block: + +- `organization`: Specifies the name of an HCP Terraform organization to connect to. +- `workspaces.tags`: Specifies either a map of tag strings or a list of key-only string tags (legacy style). Terraform links the working directory to existing workspaces in the organization that have matching tags. If there are no existing workspaces with matching tags, the Terraform CLI prompts you to create a new workspace that applies the tags you specify in this field when you initialize the configuration. +- `workspaces.name`: You can specify the name of an existing workspace to associate with the Terraform configuration instead of using tags. If you configure the `name`, you cannot use the `tags` configuration. +- `workspaces.project`: You can specify the name of an existing project. Terraform associates the configuration with workspaces in the project that match the `name` or `tags`. + +Refer to the [`cloud` block reference](/terraform/language/terraform#terraform-cloud) for details about configuring the `cloud` block. + +In the following example, the configuration links the working directory to all workspaces tagged with `networking` and `source:cli` in the `networking-development` project: + +```hcl +terraform { + cloud { + organization = "my-org" + hostname = "app.terraform.io" # Optional; defaults to app.terraform.io + + workspaces { + project = "networking-development" + + tags = { + layer = "networking" + source = "cli" + } + } + } +} +``` + +## Initialize the working directory + +After adding or changing a `cloud` block, run the [`terraform init` command](/terraform/cli/commands/init) to complete the set up. + +By default, Terraform uploads a copy of Terraform configurations stored in the working directory when you run the `terraform plan` or `terraform apply` command, but you can add a `.terraformignore` file to the directory and specify files that you do not want to upload to HCP Terraform. Refer to [Exclude files](#exclude-files) for additional information. + +If the working directory does not have an existing Terraform state file, you can immediately start using Terraform with HCP Terraform. Refer to [CLI-driven run workflow](/terraform/cloud-docs/run/cli) for additional information. + +If the directory has an existing state file associated with a `backend` configuration, Terraform prompts you to migrate state from any existing workspaces. Refer to [Migrate state data](#migrate-state-data) for next steps. + +## Migrate state data + +Complete the data migration process when prompted according to one of the following scenarios: + +State is stored in a [local or state backend](#local-and-state-backend-migration): If the working directory already has state data in one or more workspaces, Terraform prompts you to migrate the state to new HCP Terraform workspaces. +State is stored in a [remote backend](#remote-backend-migration): If the working directory is already connected to HCP Terraform with the remote backend, Terraform can continue using the same HCP Terraform workspaces. Change the `backend "remote"` configuration to a `cloud` block in this scenario. + +### Migrate local state + +Run the `terraform init` command and follow the CLI prompts to migrate state data stored in a local or state backend. + +HCP Terraform requires all workspaces to have a name. As a result, Terraform may also prompt you to rename your workspaces during the migration. + +Terraform CLI-only workspaces represent multiple environments associated with the same configuration, such as `production`, `staging`, and `development`, but HCP Terraform workspaces can represent completely independent configurations and must have unique names within the HCP Terraform organization. + +As a result, Terraform prompts you to rename workspaces according to a pattern relative to their existing names. The pattern is intended to indicate that the workspaces share configuration. A common strategy is `--`, for example `networking-prod-us-east` and `networking-staging-us-east`. Refer to [Workspace Naming](/terraform/cloud-docs/workspaces/naming) in the HCP Terraform documentation for additional information. + +### Migrate remote backend + +In the `terraform` block or `terraform.tf` file, replace `backend "remote"` with `cloud`. Terraform will continue to use the same ste of HCP Terraform workspaces. + +The following example migrates the state data for a single workspace named `my-app-prod` to an HCP Terraform organization named `my-org`. + +```hcl +terraform { +- backend "remote" { ++ cloud { + organization = "my-org" + + workspaces { + name = "my-app-prod" + } + } + } +} +``` + +If the `terraform` block or `terraform.tf` file uses the `prefix` argument to connect to multiple workspaces, you can specify a list of key-value string tags in the `tags` argument instead of using the `name` argument. During `terraform plan` or `terraform apply` operations, Terraform associates the configuration with workspaces that match the specified tags. + +The following example replaces the `my-app-` prefix with the `app=mine` tag: + +```hcl +terraform { +- backend "remote" { ++ cloud { + organization = "my-org" + + workspaces { +- prefix = "my-app-" ++ tags = { ++ app = "mine" ++ } + } + } + } + +``` + +Note that because the `cloud` block does not support the `prefix` argument, after you migrate your workspaces to HCP Terraform, you must refer to them by their full name when you use the Terraform CLI. For example, instead of running the `terraform workspace select prod` command, you would run `terraform workspace select my-app-prod` instead. + +## Exclude files + +When executing a remote `plan` or `apply` in a [CLI-driven run](/terraform/cloud-docs/run/cli), +a copy of your configuration directory is uploaded to HCP Terraform. You can define +paths to exclude from upload by adding a `.terraformignore` file at the root of your +configuration directory. If this file is not present, Terraform still excludes the following directories by default: + +- `.git/` directories +- `.terraform/` directories (exclusive of `.terraform/modules`) + +The rules for defining `.terraformignore` are based on +[.gitignore files](https://git-scm.com/book/en/v2/Git-Basics-Recording-Changes-to-the-Repository#_ignoring): + +- Terraform ignores comments starting with `#` +- Terraform ignores blank lines. +- End a pattern with a forward slash `/` to specify a directory. +- Negate a pattern by starting it with an exclamation point `!`. When ignoring large directories, negation patterns can impact performance. Place negation rules as early as possible within `.terraformignore` or avoid using them if possible. + +Terraform parses the `.terraformignore` at the root of the configuration directory. diff --git a/content/terraform/v1.15.x (alpha)/docs/cli/code/index.mdx b/content/terraform/v1.15.x (alpha)/docs/cli/code/index.mdx new file mode 100644 index 0000000000..c577f950f2 --- /dev/null +++ b/content/terraform/v1.15.x (alpha)/docs/cli/code/index.mdx @@ -0,0 +1,47 @@ +--- +page_title: Format and validate Terraform configuration using the Terraform CLI +description: Learn about the Terraform commands that validate, format, and upgrade code written in HCL. +--- + +# Write and modify Terraform configuration from the CLI + +This topic provides an overview of the Terraform CLI commands you can use to develop, format, and validate your Terraform configuration. + +## Introduction + +The [Terraform language](/terraform/language) is Terraform's primary +user interface, and all of Terraform's workflows rely on configurations written +in the Terraform language. + +## Workflows + +Terraform CLI includes several commands to make Terraform code more convenient +to work with. You can integrate the following commands into your editing +workflow to test expressions and format and validate your configuration syntax: + +- The [`terraform console`](/terraform/cli/commands/console) command starts an + interactive shell for evaluating Terraform + [expressions](/terraform/language/expressions), to quickly verify that a + particular resource argument results in the value you expect. + +- The [`terraform fmt`](/terraform/cli/commands/fmt) command automatically rewrites Terraform + configuration files to a canonical format and style, so you don't have to + waste time making minor adjustments for readability and consistency. The `terraform fmt` command works + well as a pre-commit hook in your version control system. + +- The [`terraform validate`](/terraform/cli/commands/validate) commands validates the + syntax and arguments of the Terraform configuration files in a directory, + including argument and attribute names and types for resources and modules. + The `plan` and `apply` commands automatically validate a configuration before + performing any other work. Running `validate` isn't a crucial part of the core + workflow but can be very useful as a pre-commit hook or as part of a + continuous integration pipeline. + +- The [`0.13upgrade`](/terraform/cli/commands/0.13upgrade) and + [`0.12upgrade`](/terraform/cli/commands/0.12upgrade) commands modify the configuration files in a Terraform module automatically to help deal with major + syntax changes that occurred in the 0.13 and 0.12 releases of Terraform. Both + commands are only available in the Terraform version they are + associated with. Make sure to upgrade older code to be compatible + with 0.12 before attempting to make it compatible with 0.13. For more detailed + information about updating code for new Terraform versions, refer to the [upgrade + guides](/terraform/language/upgrade-guides). diff --git a/content/terraform/v1.15.x (alpha)/docs/cli/commands/0.12upgrade.mdx b/content/terraform/v1.15.x (alpha)/docs/cli/commands/0.12upgrade.mdx new file mode 100644 index 0000000000..ef4cebb75e --- /dev/null +++ b/content/terraform/v1.15.x (alpha)/docs/cli/commands/0.12upgrade.mdx @@ -0,0 +1,117 @@ +--- +page_title: terraform 0.12upgrade command reference +description: >- + The `terraform 0.12upgrade` command automatically rewrites existing configurations for + Terraform 0.12 compatibility. +--- + +# `terraform 0.12upgrade` command + +The `terraform 0.12upgrade` command applies several automatic upgrade rules to +help prepare a module that was written for Terraform v0.11 to be used +with Terraform v0.12. + +-> **This command is available only in Terraform v0.12 releases.** For more information, see [the Terraform v0.12 upgrade guide](/terraform/language/v1.1.x/upgrade-guides/0-12). + +## Usage + +Usage: `terraform 0.12upgrade [options] [dir]` + +By default, `0.12upgrade` changes configuration files in the current working +directory. However, you can provide an explicit path to another directory if +desired, which may be useful for automating migrations of several modules in +the same repository. + +When run with no other options, the command will first explain what it is +going to do and prompt for confirmation: + +``` +$ terraform 0.12upgrade + +This command will rewrite the configuration files in the given directory so +that they use the new syntax features from Terraform v0.12, and will identify +any constructs that may need to be adjusted for correct operation with +Terraform v0.12. + +We recommend using this command in a clean version control work tree, so that +you can easily see the proposed changes as a diff against the latest commit. +If you have uncommitted changes already present, we recommend aborting this +command and dealing with them before running this command again. + +Would you like to upgrade the module in the current directory? + Only 'yes' will be accepted to confirm. + + Enter a value: yes +``` + +The `0.12upgrade` subcommand requires access to providers used in the +configuration in order to analyze their resource types, so it's important to +run `terraform init` first to install these. In some rare cases, a configuration +that worked in v0.11 may have syntax errors in v0.12, in which case +`terraform init` will run in a special mode where it installs only enough to +run the upgrade command, after which you can run `terraform init` again to +complete initialization. + +Many of the rewrite rules are completely automatic, but in some cases the +tool cannot determine enough information from the configuration alone to make +a decision, and so it will instead add a comment to the configuration for +user review. All such comments contain the string `TF-UPGRADE-TODO` to make +them easier to find. + +After upgrading, the configuration will also be reformatted into the standard +Terraform style and expressions rewritten to use the more-readable v0.12 syntax +features. + +We recommend running this command with a clean version control work tree so +that you can use VCS tools to review the proposed changes, including any +`TF-UPGRADE-TODO` comments, and make any revisions required before committing +the change. + +Once upgraded the configuration will no longer be compatible with Terraform +v0.11 and earlier. When upgrading a shared module that is called from multiple +configurations, you may need to +[fix existing configurations to a previous version](/terraform/language/modules/syntax#version) +to allow for a gradual upgrade. If the module is published via +[a Terraform registry](/terraform/registry), assign a new _major_ version number +to the upgraded module source to represent the fact that this is a breaking +change for v0.11 callers. If a module is installed directly from a version +control system such as Git, +[use specific revisions](/terraform/language/modules/sources#selecting-a-revision) +to control which version is used by which caller. + +The command-line options are all optional. The available options are: + +* `-yes` - Skip the initial introduction messages and interactive confirmation. + Use this when running the command in batch from a script. + +* `-force` - Override the heuristic that attempts to detect if a configuration + is already written for v0.12 or later. Some of the transformations made by + this command are not idempotent, so re-running against the same module may + change the meanings of some expressions in the module. + +## Batch Usage + +After you've experimented with the `0.12upgrade` command in some confined +situations, if you have a repository containing multiple modules you may +wish to batch-upgrade them all and review them together. Recursive upgrades +are not supported by the tool itself, but if you are on a Unix-style system +you can achieve this using the `find` command as follows: + +``` +find . -name '*.tf' -printf "%h\n" | uniq | xargs -n1 terraform 0.12upgrade -yes +``` + +On Mac OS X, the `find` included with the system does not support the `-printf` argument. You can install GNU find using Homebrew in order to use that argument: + +``` +brew install findutils +``` + +Once installed, run the above command line using `gfind` instead of `find`. + +Note that the above includes the `-yes` option to override the interactive +prompt, so be sure you have a clean work tree before running it. + +Because upgrading requires access to the configuration's provider plugins, +all of the directories must be initialized with `terraform init` prior to +running the above. \ No newline at end of file diff --git a/content/terraform/v1.15.x (alpha)/docs/cli/commands/0.13upgrade.mdx b/content/terraform/v1.15.x (alpha)/docs/cli/commands/0.13upgrade.mdx new file mode 100644 index 0000000000..0cc459b42b --- /dev/null +++ b/content/terraform/v1.15.x (alpha)/docs/cli/commands/0.13upgrade.mdx @@ -0,0 +1,89 @@ +--- +page_title: terraform 0.13upgrade command reference +description: >- + The `terraform 0.13upgrade` command updates existing configurations to use the new + provider source features from Terraform 0.13. +--- + +# `terraform 0.13upgrade` command + +The `terraform 0.13upgrade` command updates existing configuration to add an +explicit `source` attribute for each provider used in a given module. The +provider source settings are stored in a `required_providers` block. + +-> **This command is available only in Terraform v0.13 releases.** For more information, see [the Terraform v0.13 upgrade guide](/terraform/language/v1.1.x/upgrade-guides/0-13). + +## Usage + +Usage: `terraform 0.13upgrade [options] [dir]` + +The primary purpose of the `0.13upgrade` command is to determine which +providers are in use for a module, detect the source address for those +providers where possible, and record this information in a +[`required_providers` block][required-providers]. + +[required-providers]: /terraform/language/providers/requirements + +~> Note: the command ignores `.tf.json` files and override files in the module. + +If the module already has a `required_providers` block, the command updates it +in-place. Otherwise, a new block is added to the `versions.tf` file. + +By default, `0.13upgrade` changes configuration files in the current working +directory. However, you can provide an explicit path to another directory if +desired, which may be useful for automating migrations of several modules in +the same repository. + +When run with no other options, the command will first explain what it is +going to do and prompt for confirmation: + +``` +$ terraform 0.13upgrade + +This command will update the configuration files in the given directory to use +the new provider source features from Terraform v0.13. It will also highlight +any providers for which the source cannot be detected, and advise how to +proceed. + +We recommend using this command in a clean version control work tree, so that +you can easily see the proposed changes as a diff against the latest commit. +If you have uncommited changes already present, we recommend aborting this +command and dealing with them before running this command again. + +Would you like to upgrade the module in the current directory? + Only 'yes' will be accepted to confirm. + + Enter a value: yes +``` + +We recommend running this command with a clean version control work tree so +that you can use VCS tools to review the proposed changes, including any +`TF-UPGRADE-TODO` comments, and make any revisions required before committing +the change. + +There is one command-line option: + +* `-yes` - Skip the initial introduction messages and interactive confirmation. + Use this when running the command in batch from a script. + +## Batch Usage + +After you've experimented with the `0.13upgrade` command in some confined +situations, if you have a repository containing multiple modules you may +wish to batch-upgrade them all and review them together. Recursive upgrades +are not supported by the tool itself, but if you are on a Unix-style system +you can achieve this using the `find` command as follows: + +``` +$ find . -name '*.tf' | xargs -n1 dirname | uniq | xargs -n1 terraform 0.13upgrade -yes +``` + +On a Windows system with PowerShell, you can use this command: + +``` +Get-Childitem -Recurse -Include *.tf | Split-Path | ` +Select-Object -Unique | ForEach-Object { terraform 0.13upgrade -yes $_.FullName } +``` + +Note that the above commands include the `-yes` option to override the +interactive prompt, so be sure you have a clean work tree before running it. \ No newline at end of file diff --git a/content/terraform/v1.15.x (alpha)/docs/cli/commands/apply.mdx b/content/terraform/v1.15.x (alpha)/docs/cli/commands/apply.mdx new file mode 100644 index 0000000000..32f4985d2b --- /dev/null +++ b/content/terraform/v1.15.x (alpha)/docs/cli/commands/apply.mdx @@ -0,0 +1,155 @@ +--- +page_title: terraform apply command reference +description: The `terraform apply` command executes the actions proposed in a Terraform plan + to create, update, or destroy infrastructure. +--- + +# `terraform apply` command + +The `terraform apply` command executes the operations proposed in a Terraform +plan. + +> **Hands On:** Try the [Apply Terraform Configuration](/terraform/tutorials/cli/apply?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) tutorial to learn how Terraform applies a configuration, how Terraform recovers from errors during apply, and common ways to use this command. + +## Usage + +Usage: `terraform apply [options] [plan file]` + +### Automatic Plan Mode + +When you run `terraform apply` without passing a saved plan file, Terraform automatically creates a new execution plan as if you had run [`terraform plan`](/terraform/cli/commands/plan), prompts you to approve that plan, and performs the indicated operations. You can use all of the [planning modes](/terraform/cli/commands/plan#planning-modes) and +[planning options](/terraform/cli/commands/plan#planning-options) to customize how Terraform will create the plan. + +You can pass the `-auto-approve` option to instruct Terraform to apply the plan without asking for confirmation. + +!> **Warning:** If you use `-auto-approve`, we recommend making sure that no one can change your infrastructure outside of your Terraform workflow. This minimizes the risk of unpredictable changes and configuration drift. + +### Saved Plan Mode + +When you pass a [saved plan file](/terraform/cli/commands/plan#out-filename) to `terraform apply`, Terraform performs the operations in the saved plan without prompting you for confirmation. You may want to use this two-step workflow when [running Terraform in automation](/terraform/tutorials/automation/automate-terraform?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS). + +Use [`terraform show`](/terraform/cli/commands/show) to inspect a saved plan file before applying it. + +When using a saved plan, you cannot specify any additional planning modes or options. These options only affect Terraform's decisions about which +actions to take, and the plan file contains the final results of those +decisions. + +### Plan Options + +Without a saved plan file, `terraform apply` supports all planning modes and planning options available for `terraform plan`. + +- **[Planning Modes](/terraform/cli/commands/plan#planning-modes):** These include `-destroy`, which creates a plan to destroy all remote objects, and `-refresh-only`, which creates a plan to update Terraform state and root module output values. +- **[Planning Options](/terraform/cli/commands/plan#planning-options):** These include specifying which resource instances Terraform should replace (`-replace`), setting Terraform input variables (`-var` and `-var-file`), etc. + +### Apply Options + +The following options change how the apply command executes and reports on the apply operation. + +- `-auto-approve` - Skips interactive approval of the plan before applying. Terraform ignores this + option when you pass a previously-saved plan file. This is because + Terraform interprets the act of passing the plan file as the approval. + +- `-compact-warnings` - Shows any warning messages in a compact form which + includes only the summary messages, unless the warnings are accompanied by + at least one error and thus the warning text might be useful context for + the errors. + +- `-input=false` - Disables all of Terraform's interactive prompts. Note that + this also prevents Terraform from prompting for interactive approval of a + plan, so Terraform will conservatively assume that you do not wish to + apply the plan, causing the operation to fail. If you wish to run Terraform + in a non-interactive context, see + [Running Terraform in Automation](/terraform/tutorials/automation/automate-terraform?utm_source=WEBSITE&utm_medium=WEB_IO&utm_offer=ARTICLE_PAGE&utm_content=DOCS) for some + different approaches. + +- `-invoke=action..