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

website/integrations: terrakube: document #12662

Merged
64 changes: 64 additions & 0 deletions website/integrations/services/terrakube/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
title: Integrate Terrakube
dominic-r marked this conversation as resolved.
Show resolved Hide resolved
sidebar_label: Terrakube
---

# Terrakube

<span class="badge badge--secondary">Support level: Community</span>

## What is Terrakube

> Terrakube is an open-source collaboration platform designed for managing remote Infrastructure-as-Code (IaC) operations with Terraform. It serves as a alternative to proprietary tools like Terraform Enterprise.
>
> -- https://terrakube.io/

## Preparation

The following placeholders are used in this guide:

- `terrakube-dex.company` is the FQDN of the [Dex](https://dexidp.io/) container of the Terrakube install.
tanberry marked this conversation as resolved.
Show resolved Hide resolved
dominic-r marked this conversation as resolved.
Show resolved Hide resolved
- `authentik.company` is the FQDN of the authentik install.
tanberry marked this conversation as resolved.
Show resolved Hide resolved
dominic-r marked this conversation as resolved.
Show resolved Hide resolved

## authentik configuration

1. From the Admin interface, navigate to **Applications** -> **Applications**.
2. Use the wizard to create a new application and provider. During this process:
- Note the **Client ID**, **Client Secret**, and **slug** values because they will be required later.
- Set a `Strict` redirect URI to ` https://terrakube-dex.company/dex/callback`.
- Select any available signing key.

## Terrakube configuration

This guide assumes you have environment variables `$TERRAKUBE_OIDC_CLIENT_ID` and `$TERRAKUBE_OIDC_CLIENT_SECRET` set up. While you can hardcode values if your setup doesn’t support environment variables, doing so is not recommended for security reasons.
dominic-r marked this conversation as resolved.
Show resolved Hide resolved

1. **Locate the Dex Configuration File**
Find the Dex configuration file, typically named `config.yaml` or `config.docker.yaml`. It’s usually located in the `/etc/dex` directory or the corresponding directory for a containerized setup.

2. **Update the Dex Configuration**
Open the configuration file and add the following block to define the Terrakube OIDC connector:
dominic-r marked this conversation as resolved.
Show resolved Hide resolved

```yaml
connectors:
- type: oidc
id: TerrakubeClient
name: TerrakubeClient
config:
issuer: "https://authentik.company/application/o/<Your application slug>/"
clientID: $TERRAKUBE_OIDC_CLIENT_ID
clientSecret: $TERRAKUBE_OIDC_CLIENT_SECRET
redirectURI: "https://terrakube-dex.company/dex/callback"
insecureEnableGroups: true
```

3. **Set Environment Variables**
Add the following variables to your `.env` file, replacing them with the appropriate values for your Client ID and Client Secret:

```env
TERRAKUBE_OIDC_CLIENT_ID=<Your Client ID>
dominic-r marked this conversation as resolved.
Show resolved Hide resolved
TERRAKUBE_OIDC_CLIENT_SECRET=<Your Client Secret>
dominic-r marked this conversation as resolved.
Show resolved Hide resolved
```

## Configuration verification

To ensure that authentik is correctly configured with Terrakube, log out and log back in through authentik. Depending on the number of connectors you have set up, you should either be redirected to authentik or see a new button appear on the Dex login page.
1 change: 1 addition & 0 deletions website/sidebarsIntegrations.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ module.exports = {
"services/skyhigh/index",
"services/snipe-it/index",
"services/sssd/index",
"services/terrakube/index",
"services/truecommand/index",
"services/veeam-enterprise-manager/index",
"services/zammad/index",
Expand Down
Loading