Skip to content

Commit

Permalink
docs: add terraform autodiscovery (#1162)
Browse files Browse the repository at this point in the history
  • Loading branch information
mcwarman committed Sep 29, 2023
1 parent 6f092e6 commit 60ec58a
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 0 deletions.
@@ -0,0 +1,37 @@
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"


35 changes: 35 additions & 0 deletions content/en/docs/plugins/autodiscovery/terraform.adoc
@@ -0,0 +1,35 @@
---
title: "Terraform"
description: "Discover Terraform provider update"
lead: "kind: terraform"
draft: false
images: []
menu:
docs:
parent: "plugin-autodiscovery"
weight: 130
toc: true
plugins:
- autodiscovery
---

== 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 link:{{< ref "registry" >}}[`terraform/registry`] as the source and
link:{{< ref "registry" >}}[`terraform/lock`] as the target.

== Manifest
=== Parameters

{{< autodiscoveryparameters "terraform" >}}

==== Example

[source,yaml]
----
# updatecli.d/default.yaml
{{<include "assets/code_example/docs/plugins/autodiscovery/terraform/updatecli.d/default.yaml">}}
----

0 comments on commit 60ec58a

Please sign in to comment.