mirror of
https://github.com/thegeeklab/wp-opentofu.git
synced 2024-11-22 00:30:40 +00:00
Version 5.0-0.11.7
This commit is contained in:
parent
81e17a4339
commit
f71e203109
@ -1,3 +1,10 @@
|
|||||||
|
## 5.0-0.11.7 (2018-04-25)
|
||||||
|
**BREAKING CHANGE**
|
||||||
|
* Removed `destroy` param
|
||||||
|
* Removed `plan` param
|
||||||
|
* Added `actions` param to provide a list of actions to perform.
|
||||||
|
See [DOCS.md](DOCS.md) for more info and examples.
|
||||||
|
|
||||||
## 4.1-0.11.7 (2018-04-25)
|
## 4.1-0.11.7 (2018-04-25)
|
||||||
* Add .netrc support
|
* Add .netrc support
|
||||||
* Update embedded TF to `0.11.7`
|
* Update embedded TF to `0.11.7`
|
||||||
|
68
DOCS.md
68
DOCS.md
@ -8,13 +8,12 @@ logo: terraform.svg
|
|||||||
image: jmccann/drone-terraform
|
image: jmccann/drone-terraform
|
||||||
---
|
---
|
||||||
|
|
||||||
The Terraform plugin applies the infrastructure configuration contained within the repository. The below pipeline configuration demonstrates simple usage:
|
The Terraform plugin applies the infrastructure configuration contained within the repository. The below pipeline configuration demonstrates simple usage which will run a `validate`, `plan` and `apply`:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
pipeline:
|
pipeline:
|
||||||
terraform:
|
terraform:
|
||||||
image: jmccann/drone-terraform:1
|
image: jmccann/drone-terraform:5
|
||||||
plan: false
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Example configuration passing `vars` to terraform commands:
|
Example configuration passing `vars` to terraform commands:
|
||||||
@ -22,13 +21,23 @@ Example configuration passing `vars` to terraform commands:
|
|||||||
```diff
|
```diff
|
||||||
pipeline:
|
pipeline:
|
||||||
terraform:
|
terraform:
|
||||||
image: jmccann/drone-terraform:1
|
image: jmccann/drone-terraform:5
|
||||||
plan: false
|
|
||||||
+ vars:
|
+ vars:
|
||||||
+ app_name: my-project
|
+ app_name: my-project
|
||||||
+ app_version: 1.0.0
|
+ app_version: 1.0.0
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Example of explicitly specifying `actions` to perform a dry run.
|
||||||
|
|
||||||
|
```diff
|
||||||
|
pipeline:
|
||||||
|
terraform:
|
||||||
|
image: jmccann/drone-terraform:5
|
||||||
|
+ actions:
|
||||||
|
+ - validate
|
||||||
|
+ - plan
|
||||||
|
```
|
||||||
|
|
||||||
Example configuration passing secrets to terraform. Please read
|
Example configuration passing secrets to terraform. Please read
|
||||||
https://www.terraform.io/docs/configuration/variables.html#environment-variables
|
https://www.terraform.io/docs/configuration/variables.html#environment-variables
|
||||||
for more details.
|
for more details.
|
||||||
@ -38,8 +47,7 @@ for more details.
|
|||||||
```diff
|
```diff
|
||||||
pipeline:
|
pipeline:
|
||||||
terraform:
|
terraform:
|
||||||
image: jmccann/drone-terraform:1
|
image: jmccann/drone-terraform:5
|
||||||
plan: false
|
|
||||||
+ secrets:
|
+ secrets:
|
||||||
+ - source: terraform_secret
|
+ - source: terraform_secret
|
||||||
+ target: tf_var_my_secret
|
+ target: tf_var_my_secret
|
||||||
@ -50,13 +58,12 @@ pipeline:
|
|||||||
```diff
|
```diff
|
||||||
pipeline:
|
pipeline:
|
||||||
terraform_1:
|
terraform_1:
|
||||||
image: jmccann/drone-terraform:1
|
image: jmccann/drone-terraform:5
|
||||||
plan: false
|
|
||||||
+ environment:
|
+ environment:
|
||||||
+ TF_VAR_MY_SECRET: ${TERRAFORM_SECRET}
|
+ TF_VAR_MY_SECRET: ${TERRAFORM_SECRET}
|
||||||
|
|
||||||
terraform_2:
|
terraform_2:
|
||||||
image: jmccann/drone-terraform:1
|
image: jmccann/drone-terraform:5
|
||||||
plan: false
|
plan: false
|
||||||
+ sensitive: true
|
+ sensitive: true
|
||||||
+ vars:
|
+ vars:
|
||||||
@ -71,8 +78,7 @@ what command is actually being ran.
|
|||||||
```diff
|
```diff
|
||||||
pipeline:
|
pipeline:
|
||||||
terraform:
|
terraform:
|
||||||
image: jmccann/drone-terraform:1
|
image: jmccann/drone-terraform:5
|
||||||
plan: false
|
|
||||||
+ sensitive: true
|
+ sensitive: true
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -83,8 +89,7 @@ specified instead of using the embedded version that is included.
|
|||||||
```diff
|
```diff
|
||||||
pipeline:
|
pipeline:
|
||||||
terraform:
|
terraform:
|
||||||
image: jmccann/drone-terraform:1
|
image: jmccann/drone-terraform:5
|
||||||
plan: false
|
|
||||||
+ tf_version: 0.10.3
|
+ tf_version: 0.10.3
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -95,8 +100,7 @@ specified in a `.tf` file. You can then pass additional options via the `.drone
|
|||||||
```diff
|
```diff
|
||||||
pipeline:
|
pipeline:
|
||||||
terraform:
|
terraform:
|
||||||
image: jmccann/drone-terraform:1
|
image: jmccann/drone-terraform:5
|
||||||
plan: false
|
|
||||||
+ init_options:
|
+ init_options:
|
||||||
+ backend-config:
|
+ backend-config:
|
||||||
+ - "bucket=my-terraform-config-bucket"
|
+ - "bucket=my-terraform-config-bucket"
|
||||||
@ -112,8 +116,7 @@ CA Certificate. You can inject your CA Certificate into the plugin by using
|
|||||||
```diff
|
```diff
|
||||||
pipeline:
|
pipeline:
|
||||||
terraform:
|
terraform:
|
||||||
image: jmccann/drone-terraform:1
|
image: jmccann/drone-terraform:5
|
||||||
plan: false
|
|
||||||
+ ca_cert: |
|
+ ca_cert: |
|
||||||
+ -----BEGIN CERTIFICATE-----
|
+ -----BEGIN CERTIFICATE-----
|
||||||
+ asdfsadf
|
+ asdfsadf
|
||||||
@ -130,8 +133,7 @@ See [the discussion](https://github.com/hashicorp/terraform/issues/1275) in the
|
|||||||
```diff
|
```diff
|
||||||
pipeline:
|
pipeline:
|
||||||
terraform:
|
terraform:
|
||||||
image: jmccann/drone-terraform:1
|
image: jmccann/drone-terraform:5
|
||||||
plan: false
|
|
||||||
+ role_arn_to_assume: arn:aws:iam::account-of-role-to-assume:role/name-of-role
|
+ role_arn_to_assume: arn:aws:iam::account-of-role-to-assume:role/name-of-role
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -142,8 +144,7 @@ and you want to use different drone configurations to apply different environmen
|
|||||||
```diff
|
```diff
|
||||||
pipeline:
|
pipeline:
|
||||||
terraform:
|
terraform:
|
||||||
image: jmccann/drone-terraform:1
|
image: jmccann/drone-terraform:5
|
||||||
plan: false
|
|
||||||
+ root_dir: some/path/here
|
+ root_dir: some/path/here
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -154,8 +155,7 @@ all resources will be planned/applied against as the default behavior.
|
|||||||
```diff
|
```diff
|
||||||
pipeline:
|
pipeline:
|
||||||
terraform:
|
terraform:
|
||||||
image: jmccann/drone-terraform:1
|
image: jmccann/drone-terraform:5
|
||||||
plan: false
|
|
||||||
+ targets:
|
+ targets:
|
||||||
+ - aws_security_group.generic_sg
|
+ - aws_security_group.generic_sg
|
||||||
+ - aws_security_group.app_sg
|
+ - aws_security_group.app_sg
|
||||||
@ -167,25 +167,26 @@ If you want to change Terraform's default parallelism (currently equal to 10) th
|
|||||||
```diff
|
```diff
|
||||||
pipeline:
|
pipeline:
|
||||||
terraform:
|
terraform:
|
||||||
image: jmccann/drone-terraform:1
|
image: jmccann/drone-terraform:5
|
||||||
plan: false
|
|
||||||
+ parallelism: 2
|
+ parallelism: 2
|
||||||
```
|
```
|
||||||
|
|
||||||
Destroying the service can be done using the boolean `destory` option. Keep in mind that Fastly won't allow a service with active version be destoryed. Use `force_destroy` option in the service definition for terraform to handle it.
|
Destroying the service can be done by specifying `plan-destroy` and `destroy` actions. Keep in mind that Fastly won't allow a service with active version be destroyed. Use `force_destroy` option in the service definition for terraform to handle it.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
pipeline:
|
pipeline:
|
||||||
destroy:
|
destroy:
|
||||||
image: jmccann/drone-terraform:1
|
image: jmccann/drone-terraform:5
|
||||||
plan: false
|
+ actions:
|
||||||
+ destroy: true
|
+ - plan-destroy
|
||||||
|
+ - destroy
|
||||||
```
|
```
|
||||||
|
|
||||||
# Parameter Reference
|
# Parameter Reference
|
||||||
|
|
||||||
plan
|
actions
|
||||||
: if true, calculates a plan but does __NOT__ apply it.
|
: List of terraform actions to perform with the plugin. List includes:
|
||||||
|
`validate`, `plan`, `apply`, `plan-destroy`, `destroy`.
|
||||||
|
|
||||||
init_options
|
init_options
|
||||||
: contains the configuration for the Terraform backend.
|
: contains the configuration for the Terraform backend.
|
||||||
@ -223,6 +224,3 @@ root_dir
|
|||||||
|
|
||||||
parallelism
|
parallelism
|
||||||
: The number of concurrent operations as Terraform walks its graph.
|
: The number of concurrent operations as Terraform walks its graph.
|
||||||
|
|
||||||
destroy (boolean)
|
|
||||||
: Destroys the service (still requires [`force_destroy`](https://www.terraform.io/docs/providers/fastly/r/service_v1.html#force_destroy) option to be set in the service definition)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user