0
0
mirror of https://github.com/thegeeklab/wp-opentofu.git synced 2024-11-24 13:20:39 +00:00

use plan instead of dry-run

This commit is contained in:
jackspirou 2016-02-14 16:00:32 -06:00
parent 69ea162dbf
commit e685b92711
2 changed files with 4 additions and 4 deletions

View File

@ -1,6 +1,6 @@
Use the Terraform plugin to apply the infrastructure configuration contained within the repository. The following parameters are used to configure this plugin: Use the Terraform plugin to apply the infrastructure configuration contained within the repository. The following parameters are used to configure this plugin:
* `dry_run` - if true, calculates a plan but does __NOT__ apply it. * `plan` - if true, calculates a plan but does __NOT__ apply it.
* `remote` - contains the configuration for the Terraform remote state tracking. * `remote` - contains the configuration for the Terraform remote state tracking.
* `backend` - the Terraform remote state backend to use. * `backend` - the Terraform remote state backend to use.
* `config` - a map of configuration parameters for the remote state backend. Each value is passed as a `-backend-config=<key>=<value>` option. * `config` - a map of configuration parameters for the remote state backend. Each value is passed as a `-backend-config=<key>=<value>` option.
@ -11,7 +11,7 @@ The following is a sample Terraform configuration in your .drone.yml file:
```yaml ```yaml
deploy: deploy:
terraform: terraform:
dry_run: false plan: false
remote: remote:
backend: S3 backend: S3
config: config:

View File

@ -11,7 +11,7 @@ import (
type terraform struct { type terraform struct {
Remote remote `json:"remote"` Remote remote `json:"remote"`
DryRun bool `json:"dry_run"` Plan bool `json:"plan"`
Vars map[string]string `json:"vars"` Vars map[string]string `json:"vars"`
} }
@ -35,7 +35,7 @@ func main() {
commands = append(commands, remoteConfigCommand(remote)) commands = append(commands, remoteConfigCommand(remote))
} }
commands = append(commands, planCommand(vargs.Vars)) commands = append(commands, planCommand(vargs.Vars))
if !vargs.DryRun { if !vargs.Plan {
commands = append(commands, applyCommand()) commands = append(commands, applyCommand())
} }