-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
website/integrations: add terraform cloud #17610
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
bacc149
website/integrations: add terraform cloud
dominic-r 6c4be01
Added extra section and clarified verification section
dewi-tik 1b12e58
Update website/integrations/infrastructure/terraform-cloud/index.md
dominic-r 4cad4c5
Update website/integrations/infrastructure/terraform-cloud/index.md
dominic-r f4dc031
Update website/integrations/infrastructure/terraform-cloud/index.md
dominic-r 6d4a2cb
Update website/integrations/infrastructure/terraform-cloud/index.md
dominic-r File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
76 changes: 76 additions & 0 deletions
76
website/integrations/infrastructure/terraform-cloud/index.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| --- | ||
| title: Integrate with Terraform Cloud | ||
| sidebar_label: Terraform Cloud | ||
| support_level: community | ||
| --- | ||
|
|
||
| ## What is Terraform Cloud | ||
|
|
||
| > Terraform Cloud is a managed SaaS platform by HashiCorp that enables teams to collaborate on infrastructure-as-code by running, storing state, enforcing policies, and automating workflows for Terraform configurations. | ||
| > | ||
| > -- https://terraform.io/cloud | ||
|
|
||
| ## Preparation | ||
|
|
||
| The following placeholders are used in this guide: | ||
|
|
||
| - `authentik.company` is the FQDN of the authentik installation. | ||
|
|
||
| :::info | ||
| This documentation lists only the settings that you need to change from their default values. Be aware that any changes other than those explicitly mentioned in this guide could cause issues accessing your application. | ||
| ::: | ||
|
|
||
| ## authentik configuration | ||
|
|
||
| To support the integration of Terraform with authentik, you need to create an application/provider pair in authentik. | ||
|
|
||
| ### Create an application and provider in authentik | ||
|
|
||
| 1. Log in to authentik as an administrator and open the authentik Admin interface. | ||
| 2. Navigate to **Applications** > **Applications** and click **Create with Provider** to create an application and provider pair. (Alternatively you can first create a provider separately, then create the application and connect it with the provider.) | ||
| - **Application**: provide a descriptive name, an optional group for the type of application, the policy engine mode, and optional UI settings. | ||
| - **Choose a Provider type**: select **SAML Provider** as the provider type. | ||
| - **Configure the Provider**: provide a name (or accept the auto-provided name), the authorization flow to use for this provider, and the following required configurations: | ||
| - Set the **ACS URL** to `https://temporary.domain`. | ||
| - Set the **Issuer** to `https://authentik.company`. | ||
| - Set the **Service Provider Binding** to `Post`. | ||
| - Set the **Audience** to `https://temporary.domain`. | ||
| - Under **Advanced protocol settings**, select an available **Signing Certificate**. | ||
| - **Configure Bindings** _(optional)_: you can create a [binding](/docs/add-secure-apps/flows-stages/bindings/) (policy, group, or user) to manage the listing and access to applications on a user's **My applications** page. | ||
|
|
||
| 3. Click **Submit** to save the new application and provider. | ||
|
|
||
| ### Copy the metadata URL | ||
|
|
||
| 1. Log in to authentik as an administrator and open the authentik Admin interface. | ||
| 2. Navigate to **Applications** > **Providers** and click the provider that you created in the previous step. | ||
| 3. Under **Related objects**, click **Copy download URL** and take note of the URL as it will be used in the next step. | ||
|
|
||
| ## Terraform Cloud configuration | ||
|
|
||
| 1. Log in to [Terraform Cloud](https://app.terraform.io) as an administrator. | ||
| 2. Select your organization from the dropdown menu in the top left, then click **Settings** > **SSO**. | ||
| 3. Click **Setup SSO**, click **SAML**, then **Next**, and set the **Metadata URL** to the URL copied in the previous step. | ||
| 4. Click **Save Settings**. | ||
| 5. Under **HCP Terraform**, take note of the **Entity ID (Audience)** and **Assertion Consumer URL** values. Do not close this window. | ||
|
|
||
| ## Configure the remaining information in authentik | ||
|
|
||
| 1. Log in to authentik as an administrator and open the authentik Admin interface. | ||
| 2. Navigate to **Applications** > **Providers** and provider that you created in the previous step. | ||
| 3. Click **Edit**. | ||
| 4. Under **Protocol settings**, set the value of the **ACS URL** to the **Assertion Consumer URL** value from the previous step. Then, set the value of the **Audience** to the **Entity ID (Audience)** value from the previous step. | ||
| 5. Click **Update**. | ||
|
|
||
| ## Enabling Terraform Cloud SSO | ||
|
|
||
| 1. In Terraform Cloud, under **Settings** > **SSO**, click **Test**. Successfully authenticating will result in a green checkmark and **Successful** appearing. Then, to enable SSO, click **Enable**. | ||
| 2. Read the warning message that appears and click **Enable SAML**. | ||
dominic-r marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ## Configuration verification | ||
|
|
||
| To verify that authentik is correctly integrated with Terraform Cloud, first log out of Terrafom Cloud. Open the [Terraform Cloud login page](https://app.terraform.io/) and click **Sign in with Terraform SSO**. Enter the name of your organization, click **Next**, and you'll be redirected to authentik. Once authenticated, you will be signed into Terraform Cloud. | ||
|
|
||
| ## Resources | ||
|
|
||
| - [Terraform Cloud Docs - Use single sign-on with SAML](https://developer.hashicorp.com/terraform/cloud-docs/users-teams-organizations/single-sign-on/saml) | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.