-
Notifications
You must be signed in to change notification settings - Fork 26
/
action.yml
57 lines (53 loc) · 2.08 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
name: "TFC - Upload Configuration"
description: "Creates and uploads configuration files for a given workspace"
inputs:
# global flags
hostname:
required: false
description: "The hostname of a Terraform Enterprise installation, if using Terraform Enterprise. Defaults to HCP Terraform (app.terraform.io) if `TF_HOSTNAME` environment variable is not set."
default: ""
token:
required: false
description: "The token used to authenticate with HCP Terraform. Defaults to reading `TF_API_TOKEN` environment variable"
default: ""
organization:
required: false
description: "The name of the organization in HCP Terraform. Defaults to reading `TF_CLOUD_ORGANIZATION` environment variable"
default: ""
# required
workspace:
required: true
description: "The name of the workspace to create the new configuration version in."
directory:
required: true
description: "Path to the configuration files on disk. Relative to the working directory of the workspace if configured"
# optional
speculative:
required: false
description: "When true, this configuration version may only be used to create runs which are speculative, that is, can neither be confirmed nor applied."
default: "false"
outputs:
status:
description: "The result of the operation. Possible values are `Success`, `Error` or `Timeout`"
payload:
description: "JSON response from HCP Terraform of the created Configuration Version."
configuration_version_id:
description: "The Configuration Version ID that was created."
configuration_version_status:
description: "Current status of the created configuration version."
runs:
using: docker
image: "docker://hashicorp/tfci:v1.3.1"
args:
- tfci
## global flags
- -hostname=${{ inputs.hostname }}
- -token=${{ inputs.token }}
- -organization=${{ inputs.organization }}
## command arguments
- upload
- -workspace=${{ inputs.workspace }}
- -directory=${{ inputs.directory }}
- -speculative=${{ inputs.speculative }}