You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This guide provides comprehensive instructions for integrating [Gruntwork Pipelines](https://gruntwork.io/products/pipelines/) into an existing GitLab project with Infrastructure as Code (IaC). This is designed for Gruntwork customers who want to add Pipelines to their current infrastructure projects for streamlined CI/CD management.
9
12
@@ -32,67 +35,11 @@ This step only applies if you are using a self-hosted GitLab instance that is no
32
35
33
36
## Prerequisites
34
37
35
-
Before starting, ensure you have:
36
-
37
-
-**An active Gruntwork subscription** with Pipelines access. Verify by checking the [Gruntwork Developer Portal](https://app.gruntwork.io/account) and confirming access to "pipelines" repositories in your GitHub team.
38
-
-**Cloud provider credentials** with permissions to create OIDC providers and IAM roles in accounts where Pipelines will manage infrastructure.
39
-
-**Git installed** locally for cloning and managing your project.
40
-
-**Existing IaC project** with Terragrunt configurations you want to manage with Pipelines (if you are using OpenTofu/Terraform, and want to start using Terragrunt, read the [Quickstart Guide](https://terragrunt.gruntwork.io/docs/getting-started/quick-start)).
38
+
<InstallationPrerequisitesscmPlatform="GitLab" />
41
39
42
40
## Planning Your Pipelines Setup
43
41
44
-
Before implementing Pipelines, it's crucial to plan your setup by identifying all the environments and cloud resources you need to manage.
45
-
46
-
### Identify Your Environments
47
-
48
-
Review your existing project structure and identify:
49
-
50
-
1.**All environments** you want to manage with Pipelines (e.g., `dev`, `staging`, `prod`)
51
-
2.**Cloud accounts/subscriptions** associated with each environment
52
-
3.**Directory paths** in your project that contain Terragrunt units for each environment
53
-
4.**Existing OIDC resources** that may already be provisioned in your accounts
54
-
55
-
:::note Progress Checklist
56
-
57
-
<PersistentCheckboxid="inventory-environments"label="Create an inventory of all environments you want to manage with Pipelines." />
58
-
<PersistentCheckboxid="map-cloud-accounts"label="Map each environment to its corresponding AWS Account / Azure Subscription." />
59
-
<PersistentCheckboxid="identify-directory-paths"label="Identify the directory paths in your project for each environment's Terragrunt units." />
60
-
<PersistentCheckboxid="check-existing-oidc"label="Check if OIDC providers and IAM roles already exist in your cloud accounts." />
61
-
62
-
:::
63
-
64
-
### Determine Required OIDC Roles
65
-
66
-
For each AWS Account / Azure Subscription you want to manage, you might already have some or all of the following resources provisioned.
67
-
68
-
<TabsgroupId="cloud-provider">
69
-
<TabItemvalue="aws"label="AWS"default>
70
-
71
-
**Required AWS Resources:**
72
-
73
-
- An OIDC provider for GitLab
74
-
- An IAM role for Pipelines to assume when running Terragrunt plan commands
75
-
- An IAM role for Pipelines to assume when running Terragrunt apply commands
76
-
77
-
</TabItem>
78
-
<TabItemvalue="azure"label="Azure">
79
-
80
-
**Required Azure Resources:**
81
-
82
-
- Entra ID Application for plans with Federated Identity Credential
83
-
- Entra ID Application for applies with Federated Identity Credential
84
-
- Service Principals with appropriate role assignments
85
-
- Storage Account and Container for Terragrunt state storage (if not already existing)
86
-
87
-
</TabItem>
88
-
</Tabs>
89
-
90
-
:::note Progress Checklist
91
-
92
-
<PersistentCheckboxid="list-required-oidc-roles"label="Create a list of all OIDC roles and resources needed for each AWS Account / Azure Subscription." />
93
-
<PersistentCheckboxid="identify-existing-resources"label="Identify which resources already exist and which need to be created." />
94
-
95
-
:::
42
+
<PlanningPipelinesSetupscmPlatform="GitLab" />
96
43
97
44
## Configuring SCM Access
98
45
@@ -108,81 +55,7 @@ To create machine users for GitLab access, follow our [machine users guide](/2.0
108
55
109
56
## Bootstrapping Cloud Infrastructure
110
57
111
-
If your AWS accounts / Azure subscriptions don't already have all the required OIDC and state management resources, you'll need to bootstrap them. This section provides the infrastructure code needed to set up these resources.
112
-
113
-
:::tip
114
-
115
-
If you already have all the resources listed, you can skip this section.
116
-
117
-
If you have some of them provisioned, but not all, you can decide to either destroy the resources you already have provisioned and recreate them or import them into state. If you are not sure, please contact [Gruntwork support](/support).
118
-
119
-
:::
120
-
121
-
### Prepare Your Project
122
-
123
-
Clone your project to your local machine using [Git](https://docs.gitlab.com/user/project/repository/index.html#clone-a-repository) if you haven't already.
124
-
125
-
:::tip
126
-
127
-
If you don't have Git installed, you can install it by following the official guide for [Git installation](https://git-scm.com/downloads).
<PersistentCheckboxid="clone-repository"label="Clone your project locally (if not already done)." />
141
-
<PersistentCheckboxid="cd-into-repository"label="Navigate into your project." />
142
-
143
-
:::
144
-
145
-
To bootstrap your project, we'll use Boilerplate to scaffold it with the necessary IaC code to provision the infrastructure necessary for Pipelines to function.
146
-
147
-
The easiest way to install Boilerplate is to use `mise` to install it.
148
-
149
-
:::tip
150
-
151
-
If you don't have `mise` installed, you can install it by following the official guide for [mise installation](https://mise.jdx.dev/getting-started.html).
152
-
153
-
:::
154
-
155
-
```bash
156
-
mise use -g boilerplate@latest
157
-
```
158
-
159
-
:::tip
160
-
161
-
If you'd rather install a specific version of Boilerplate, you can use the `ls-remote` command to list the available versions.
This guide provides comprehensive instructions for integrating [Gruntwork Pipelines](https://gruntwork.io/products/pipelines/) into an existing repository with Infrastructure as Code (IaC). This is designed for Gruntwork customers who want to add Pipelines to their current infrastructure repositories for streamlined CI/CD management.
8
11
@@ -17,67 +20,11 @@ To configure Gruntwork Pipelines in an existing repository, complete the followi
17
20
18
21
## Prerequisites
19
22
20
-
Before starting, ensure you have:
21
-
22
-
-**An active Gruntwork subscription** with Pipelines access. Verify by checking the [Gruntwork Developer Portal](https://app.gruntwork.io/account) and confirming access to "pipelines" repositories in your GitHub team.
23
-
-**Cloud provider credentials** with permissions to create OIDC providers and IAM roles in accounts where Pipelines will manage infrastructure.
24
-
-**Git installed** locally for cloning and managing your repository.
25
-
-**Existing IaC repository** with Terragrunt configurations you want to manage with Pipelines (if you are using OpenTofu/Terraform, and want to start using Terragrunt, read the [Quickstart Guide](https://terragrunt.gruntwork.io/docs/getting-started/quick-start)).
23
+
<InstallationPrerequisitesscmPlatform="GitHub" />
26
24
27
25
## Planning Your Pipelines Setup
28
26
29
-
Before implementing Pipelines, it's crucial to plan your setup by identifying all the environments and cloud resources you need to manage.
30
-
31
-
### Identify Your Environments
32
-
33
-
Review your existing repository structure and identify:
34
-
35
-
1.**All environments** you want to manage with Pipelines (e.g., `dev`, `staging`, `prod`)
36
-
2.**Cloud accounts/subscriptions** associated with each environment
37
-
3.**Directory paths** in your repository that contain Terragrunt units for each environment
38
-
4.**Existing OIDC resources** that may already be provisioned in your accounts
39
-
40
-
:::note Progress Checklist
41
-
42
-
<PersistentCheckboxid="inventory-environments"label="Create an inventory of all environments you want to manage with Pipelines." />
43
-
<PersistentCheckboxid="map-cloud-accounts"label="Map each environment to its corresponding AWS Account / Azure Subscription." />
44
-
<PersistentCheckboxid="identify-directory-paths"label="Identify the directory paths in your repository for each environment's Terragrunt units." />
45
-
<PersistentCheckboxid="check-existing-oidc"label="Check if OIDC providers and IAM roles already exist in your cloud accounts." />
46
-
47
-
:::
48
-
49
-
### Determine Required OIDC Roles
50
-
51
-
For each AWS Account / Azure Subscription you want to manage, you might already have some or all of the following resources provisioned.
52
-
53
-
<TabsgroupId="cloud-provider">
54
-
<TabItemvalue="aws"label="AWS"default>
55
-
56
-
**Required AWS Resources:**
57
-
58
-
- An OIDC provider for GitHub Actions
59
-
- An IAM role for Pipelines to assume when running Terragrunt plan commands
60
-
- An IAM role for Pipelines to assume when running Terragrunt apply commands
61
-
62
-
</TabItem>
63
-
<TabItemvalue="azure"label="Azure">
64
-
65
-
**Required Azure Resources:**
66
-
67
-
- Entra ID Application for plans with Federated Identity Credential
68
-
- Entra ID Application for applies with Federated Identity Credential
69
-
- Service Principals with appropriate role assignments
70
-
- Storage Account and Container for Terragrunt state storage (if not already existing)
71
-
72
-
</TabItem>
73
-
</Tabs>
74
-
75
-
:::note Progress Checklist
76
-
77
-
<PersistentCheckboxid="list-required-oidc-roles"label="Create a list of all OIDC roles and resources needed for each AWS Account / Azure Subscription." />
78
-
<PersistentCheckboxid="identify-existing-resources"label="Identify which resources already exist and which need to be created." />
79
-
80
-
:::
27
+
<PlanningPipelinesSetupscmPlatform="GitHub" />
81
28
82
29
## Configuring SCM Access
83
30
@@ -96,81 +43,7 @@ There are two ways to configure SCM access for Pipelines:
96
43
97
44
## Bootstrapping Cloud Infrastructure
98
45
99
-
If your AWS accounts / Azure subscriptions don't already have all the required OIDC and state management resources, you'll need to bootstrap them. This section provides the infrastructure code needed to set up these resources.
100
-
101
-
:::tip
102
-
103
-
If you already have all the resources listed, you can skip this section.
104
-
105
-
If you have some of them provisioned, but not all, you can decide to either destroy the resources you already have provisioned and recreate them or import them into state. If you are not sure, please contact [Gruntwork support](/support).
106
-
107
-
:::
108
-
109
-
### Prepare Your Repository
110
-
111
-
Clone your repository to your local machine using [Git](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository) if you haven't already.
112
-
113
-
:::tip
114
-
115
-
If you don't have Git installed, you can install it by following the official guide for [Git installation](https://git-scm.com/downloads).
<PersistentCheckboxid="clone-repository"label="Clone your repository locally (if not already done)." />
129
-
<PersistentCheckboxid="cd-into-repository"label="Navigate into your repository." />
130
-
131
-
:::
132
-
133
-
To bootstrap your repository, we'll use Boilerplate to scaffold it with the necessary IaC code to provision the infrastructure necessary for Pipelines to function.
134
-
135
-
The easiest way to install Boilerplate is to use `mise` to install it.
136
-
137
-
:::tip
138
-
139
-
If you don't have `mise` installed, you can install it by following the official guide for [mise installation](https://mise.jdx.dev/getting-started.html).
140
-
141
-
:::
142
-
143
-
```bash
144
-
mise use -g boilerplate@latest
145
-
```
146
-
147
-
:::tip
148
-
149
-
If you'd rather install a specific version of Boilerplate, you can use the `ls-remote` command to list the available versions.
0 commit comments