Terraform

kind: terraform

Description

The Terraform crawler looks recursively for all Terraform provider updates from a specific root directory. Then for each of them, it tries to automate them.

Automation is done by using two resources terraform/registry as the source and terraform/lock as the target.

Manifest

Parameters

NameTypeDescriptionRequired
ignorearrayignore specifies rule to ignore .terraform.lock.hcl update.
    pathstringpath specifies a .terraform.lock.hcl path pattern, the pattern requires to match all of name, not just a substring.
    providersobject

providers specifies a map of providers, the key is provider url as seen in the .terraform.lock.hcl, the value is an optional semver version constraint.

	examples:
	```
	- providers:
	  # Ignoring provider updates for this provider
	  registry.terraform.io/hashicorp/aws:
	  # Ignore provider updates for this version
	  registry.terraform.io/hashicorp/kubernetes: "1.x"
	```
onlyarrayonly specify required rule to restrict .terraform.lock.hcl update.
    pathstringpath specifies a .terraform.lock.hcl path pattern, the pattern requires to match all of name, not just a substring.
    providersobject

providers specifies a map of providers, the key is provider url as seen in the .terraform.lock.hcl, the value is an optional semver version constraint.

	examples:
	```
	- providers:
	  # Ignoring provider updates for this provider
	  registry.terraform.io/hashicorp/aws:
	  # Ignore provider updates for this version
	  registry.terraform.io/hashicorp/kubernetes: "1.x"
	```
platformsarray

platforms is the target platforms to request package checksums for.

	remarks:
	* Fallback is linux_amd64, linux_arm64, darwin_amd64, darwin_arm64
rootdirstringrootdir defines the root directory used to recursively search for .terraform.lock.hcl
versionfilterobject

versionfilter provides parameters to specify the version pattern to use when generating manifest.

	kind - semver
		versionfilter of kind `semver` uses semantic versioning as version filtering
		pattern accepts one of:
			`patch` - patch only update patch version
			`minor` - minor only update minor version
			`major` - major only update major versions
			`a version constraint` such as `>= 1.0.0`

	kind - regex
		versionfilter of kind `regex` uses regular expression as version filtering
		pattern accepts a valid regular expression

	example:
	```
		versionfilter:
			kind: semver
			pattern: minor
	```

	and its type like regex, semver, or just latest.
    kindstringspecifies the version kind such as semver, regex, or latest
    patternstringspecifies the version pattern according the version kind
    strictbooleanstrict enforce strict versioning rule. Only used for semantic versioning at this time
⚠ This table is generated from the Updatecli codebase and may contain inaccurate data. Feel free to report them on github.com/updatecli/updatecli

Example

# updatecli.d/default.yaml
name: "Terraform autodiscovery using git scm"
scms:
  default:
    kind: git
    spec:
      url: https://github.com/updatecli-test/jenkins-infra-aws.git
      branch: main

autodiscovery:
  # scmid is applied to all crawlers
  scmid: default
  crawlers:
    terraform:
      # platforms to request package checksums for, defaults to:
      platforms:
        - linux_amd64
        - linux_arm64
        - darwin_amd64
        - darwin_arm64
      # To ignore specific path
      #ignore:
      #  - path: <filepath relative to scm repository>
      #  - providers:
      #      # Ignoring provider updates for this provider
      #      registry.terraform.io/hashicorp/aws:
      #      # Ignore provider updates for this version
      #      registry.terraform.io/hashicorp/kubernetes: "1.x"

      ignore:
      #  - path: <filepath relative to scm repository>
      #  - providers:
      #      # Ignoring provider updates for this provider
      #      registry.terraform.io/hashicorp/aws:
      #      # Ignore provider updates for this version
      #      registry.terraform.io/hashicorp/kubernetes: "1.x"


Top