Terraform Provider
kind: terraform/provider
On this page
source | condition | target |
---|---|---|
✗ | ✔ | ✔ |
Description
condition
The terraform/provider "condition" tests that a version in the required_provider
block matches the value for a given provider.
target
The terraform/provider "target" ensures that a version is the required_provider
block is update to date for given provider.
Parameter
Name | Type | Description | Required |
---|---|---|---|
file | string | “file” defines the file path to interact with.
| |
files | array | “files” defines the list of files path to interact with.
| |
provider | string | “provider” is the terraform provider you wish to update.
| |
value | string | “value” is the value associated with a terraform provider.
|
Example
The example uses an additional resource plugin: terraform/registry
.
# updatecli.yaml
name: Terraform Provider
sources:
kubernetes:
name: Get version from registry
kind: terraform/registry
spec:
type: provider
namespace: hashicorp
name: kubernetes
conditions:
using-value:
name: Condition using value
kind: terraform/provider
disablesourceinput: true
spec:
file: versions.tf
provider: kubernetes
value: 2.22.0
targets:
update-file-from-source:
name: Update files content from value
kind: terraform/provider
sourceid: kubernetes
spec:
file: versions.tf
provider: kubernetes