mirror of
https://github.com/thegeeklab/wp-opentofu.git
synced 2024-11-24 23:30:39 +00:00
Update DOCS to move CA Cert example to an Advanced Config section
Also fixed 'vars' key example in main example as it was under 'remote' and should be at the base of 'terraform'.
This commit is contained in:
parent
8d46f853c5
commit
66dcad9108
42
DOCS.md
42
DOCS.md
@ -4,8 +4,9 @@ Use the Terraform plugin to apply the infrastructure configuration contained wit
|
|||||||
* `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.
|
||||||
* `ca_cert` - ca cert to add to your environment to allow terraform to use internal/private resources
|
* `vars` - a map of variables to pass to the Terraform `plan` and `apply` commands. Each value is passed as a `-var
|
||||||
* `vars` - a map of variables to pass to the Terraform `plan` and `apply` commands. Each value is passed as a `-var <key>=<value>` option.
|
<key>=<value>` option.
|
||||||
|
* `ca_cert` - ca cert to add to your environment to allow terraform to use internal/private resources
|
||||||
|
|
||||||
The following is a sample Terraform configuration in your .drone.yml file:
|
The following is a sample Terraform configuration in your .drone.yml file:
|
||||||
|
|
||||||
@ -15,16 +16,37 @@ deploy:
|
|||||||
plan: false
|
plan: false
|
||||||
remote:
|
remote:
|
||||||
backend: S3
|
backend: S3
|
||||||
ca_cert: |
|
|
||||||
-----BEGIN CERTIFICATE-----
|
|
||||||
asdfsadf
|
|
||||||
asdfsadf
|
|
||||||
-----END CERTIFICATE-----
|
|
||||||
config:
|
config:
|
||||||
bucket: my-terraform-config-bucket
|
bucket: my-terraform-config-bucket
|
||||||
key: tf-states/my-project
|
key: tf-states/my-project
|
||||||
region: us-east-1
|
region: us-east-1
|
||||||
vars:
|
vars:
|
||||||
app_name: my-project
|
app_name: my-project
|
||||||
app_version: 1.0.0
|
app_version: 1.0.0
|
||||||
|
```
|
||||||
|
|
||||||
|
# Advanced Configuration
|
||||||
|
|
||||||
|
## CA Certs
|
||||||
|
You may want to run terraform against internal resources, like an internal
|
||||||
|
OpenStack deployment. Usually these resources are signed by an internal
|
||||||
|
CA Certificate. You can inject your CA Certificate into the plugin by using
|
||||||
|
`ca_certs` key as described above. Below is an example.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
deploy:
|
||||||
|
terraform:
|
||||||
|
dry_run: false
|
||||||
|
remote:
|
||||||
|
backend: swift
|
||||||
|
config:
|
||||||
|
path: drone/terraform
|
||||||
|
vars:
|
||||||
|
app_name: my-project
|
||||||
|
app_version: 1.0.0
|
||||||
|
ca_cert: |
|
||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
asdfsadf
|
||||||
|
asdfsadf
|
||||||
|
-----END CERTIFICATE-----
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user