-
Notifications
You must be signed in to change notification settings - Fork 26
/
action.yml
93 lines (89 loc) · 3.45 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# Copyright (c) HashiCorp, Inc.
# SPDX-License-Identifier: MPL-2.0
name: 'TFC - Create Run'
description: "Performs a new plan run in HCP Terraform, using a configuration version and the workspace`s current variables"
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 Workspace name that specifies where the run will be executed"
## optional
configuration_version:
required: false
description: "Specifies the configuration version to use for this run. Defaults to the last run configuration."
default: ""
message:
required: false
description: "Specifies the message to be associated with this run. Default message will be generated."
default: ""
plan_only:
required: false
description: "Specifies if this is a speculative, plan-only run that Terraform cannot apply."
default: "false"
save_plan:
required: false
description: "Specifies if the plan should be saved for future reference."
default: "false"
is_destroy:
required: false
description: "Specifies if this is a destroy run."
default: "false"
target:
required: false
description: "Limit the planning operation to only the given module, resource, or resource instance and all of its dependencies. You can use this option multiple times to include more than one object. This is for exceptional use only. e.g. -target=aws_s3_bucket.foo"
default: ""
outputs:
status:
description: "The result of the operation. Possible values are `Success`, `Error` or `Timeout`"
payload:
description: "JSON response of a HCP Terraform run."
run_id:
description: "The ID of the created run."
run_status:
description: "The current status of the HCP Terraform run."
run_message:
description: "The message attribute of the shown run."
run_link:
description: "Link to view the run in HCP Terraform."
plan_id:
description: "The ID of the plan, associated to the created run."
plan_status:
description: "The plan status for the associated run."
configuration_version_id:
description: "The configuration version ID of the run."
cost_estimation_id:
description: "The ID of the cost estimation for the associated run. (If cost estimation is enabled)"
cost_estimation_status:
description: "The cost estimation status for the associated run. (If cost estimation is enabled)"
runs:
using: docker
image: 'docker://hashicorp/tfci:v1.3.1'
args:
- tfci
## global flags
- -hostname=${{ inputs.hostname }}
- -token=${{ inputs.token }}
- -organization=${{ inputs.organization }}
## command
- run
- create
- -workspace=${{ inputs.workspace }}
- -configuration_version=${{ inputs.configuration_version }}
- -message=${{ inputs.message }}
- -plan-only=${{ inputs.plan_only }}
- -save-plan=${{ inputs.save_plan }}
- -is-destroy=${{ inputs.is_destroy }}
- -target=${{ inputs.target }}