Skip to content

feat: extensible terraform config

Boros Gábor requested to merge gabor/additional-terraform-config into main

Description

This MR implements a way to plug-in additional custom terraform resources to be managed by Grove.

Supporting information

https://tasks.opencraft.com/browse/SE-5925

Testing instructions

Steps to test the changes:

  1. Checkout grove in an existing cluster repo
  2. Create a new directory called infrastructure in the cluster root
  3. Create a new file called passwd.tf with the content below:
    resource "random_password" "password" {
      length   = 16
      special  = false
    }
  4. Go to the control directory
  5. Run ./tf plan and validate you see the new resource showing up

You should see something like this:

# module.plugin.random_password.password will be created
  + resource "random_password" "password" {
      + bcrypt_hash = (sensitive value)
      + id          = (known after apply)
      + length      = 16
      + lower       = true
      + min_lower   = 0
      + min_numeric = 0
      + min_special = 0
      + min_upper   = 0
      + number      = true
      + numeric     = true
      + result      = (sensitive value)
      + special     = false
      + upper       = true
    }

Dependencies

N/A

Screenshots

N/A

Checklist

If any of the items below is not applicable, do not remove them, but put a check in it.

  • All providers include the new feature/change
  • All affected providers can provision new clusters
  • Unit tests are added/updated
  • Documentation is added/updated
  • The TOOLS_CONTAINER_IMAGE_VERSION in ci_vars.yml is updated
  • The grove-template repository is updated

Additional context

N/A

Edited by Boros Gábor

Merge request reports