Terraform
terraform stacks configuration upload reference
Use the terraform stacks configuration upload
command to upload the deployment and component configuration files in the current directory to the specified Stack.
Usage
$ terraform stacks <global-stacks-flags> configuration upload <options>
Description
The terraform stacks configuration upload
command uploads the Stack configuration files from the current directory to a Stack that is not connected to a VCS provider in HCP Terraform.
You must specify either a Stack ID directly, or provide the organization name, project name, and Stack name to identify the target Stack.
Options
-organization-name
: The name of the organization to target.- Optional when using
-stack-id
, required when using name-based targeting. - Data type: string.
- Overrides the
TF_STACKS_ORGANIZATION_NAME
environment variable if provided.
- Optional when using
-project-name
: The name of the project to target.- Optional when using
-stack-id
, required when using name-based targeting. - Data type: string.
- Overrides the
TF_STACKS_PROJECT_NAME
environment variable if provided.
- Optional when using
-stack-name
: The name of the Stack to target.- Optional when using
-stack-id
, required when using name-based targeting. - Data type: string.
- Overrides the
TF_STACKS_STACK_NAME
environment variable if provided.
- Optional when using
-stack-id
: The ID of the Stack to upload to.- Optional (but required if not using
-stack-name
). - Data type: string.
- Has precedence over the
-stack-name
option if both are provided.
- Optional (but required if not using
-speculative
: Upload will be speculative and will not trigger any deployments.- Optional.
- Data type: boolean flag.
- Default: false.
-json
: Output results in JSON format.- Optional.
- Data type: boolean flag.
- Default: false.
Examples
The following command uploads configuration to a Stack using organization, project, and Stack names:
$ terraform stacks configuration upload -organization-name my-org -project-name my-project -stack-name my-stack
The following command uploads configuration using a Stack ID:
$ terraform stacks configuration upload -stack-id stack-abc123
The following command performs a speculative upload that won't trigger deployments:
$ terraform stacks configuration upload -stack-id stack-abc123 -speculative
Global flags
Refer to Global flags reference for information about flags you can use with all commands.