Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add terraform autodiscovery #1162

Merged
merged 1 commit into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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">}}
----