Skip to content

Commit 358effa

Browse files
authored
GitLab Account factory docs (#2677)
* Initial docs for GitLab devops-foundations template * Additional gitlab account factory update * Rest of account-factory setup * Fix build * Update sidebar and page titles * Review suggestions * Update account vending instructions
1 parent 1827c2e commit 358effa

File tree

14 files changed

+746
-30
lines changed

14 files changed

+746
-30
lines changed

babel.config.js

Lines changed: 0 additions & 3 deletions
This file was deleted.

docs/2.0/docs/accountfactory/guides/vend-aws-account.md

Lines changed: 40 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,66 @@
1+
import Tabs from '@theme/Tabs';
2+
import TabItem from '@theme/TabItem';
3+
14
# Using the Account Factory Workflow
25

3-
## Introduction
6+
## Generate the account-request file
47

5-
The Account Factory Workflow in your `infrastructure-live-root` repository can be used to create new AWS accounts. It requires a single input—a JSON payload—generated from the `account-factory-inputs.html` web page.
8+
There are currently two ways to generate the account-request file:
69

7-
The JSON payload approach provides greater flexibility for account vending, overcoming the GitHub workflow restriction of a 10-input maximum.
10+
1. Using the [Gruntwork Developer Portal](/2.0/docs/accountfactory/guides/vend-aws-account?account-creation-method=ui#using-the-gruntwork-developer-portal) (**GitLab and GitHub non-enterprise customers**)
11+
2. Using the [Account Factory workflow in your repository](/2.0/docs/accountfactory/guides/vend-aws-account?account-creation-method=workflow#using-the-account-factory-workflow-in-your-repository) (**GitHub only**)
12+
13+
14+
<Tabs groupId="account-creation-method" queryString="account-creation-method">
15+
<TabItem value="ui" label="Using Portal UI">
16+
17+
### Using the Gruntwork Developer Portal
18+
19+
1. Navigate to the [Account Request](https://app.gruntwork.io/account-factory/request-generator) page in the Gruntwork Developer Portal, as an authenticated user, to access the request generator UI.
820

9-
:::note
21+
![Account Request Generator](/img/accountfactory/dev-portal-request-generator.png)
1022

11-
This guide focuses on non-delegated repositories. Enterprise customers can also [use Account Factory to create new Delegated Repositories](/2.0/docs/accountfactory/guides/delegated-repositories).
23+
1. If the form is disabled for filling out, request that an Admin in your Gruntwork Developer Account configures the Account factory settings.
24+
1. Fill out the form with the required information and click on the "Generate Account Request" button.
25+
1. Use the "Download" button to download the account-request file or the "Copy" button to copy the account-request file to your clipboard.
26+
1. Navigate to your repository and create a new branch.
27+
1. Create a new file in the `_new-account-requests` directory by moving the downloaded file to the directory or by creating a new file with the content of your clipboard. If copying content, ensure that the file is created with the correct name displayed in the generator output.
28+
1. Commit your changes and open a Pull Request to the main branch.
1229

30+
</TabItem>
31+
<TabItem value="workflow" label="Using Workflow in Repo">
32+
33+
### Using the Account Factory workflow in your repository
34+
35+
:::info
36+
Only available for GitHub customers. This guide focuses on non-delegated repositories. Enterprise GitHub customers can also [use Account Factory to create new Delegated Repositories](/2.0/docs/accountfactory/guides/delegated-repositories).
1337
:::
1438

39+
The Account Factory Workflow in your `infrastructure-live-root` repository can be used to create new AWS accounts. It requires a single input—a JSON payload—generated from the `account-factory-inputs.html` web page.
1540

16-
### Step 1 - Download the file
41+
The JSON payload approach provides greater flexibility for account vending, overcoming the GitHub workflow restriction of a 10-input maximum.
42+
43+
#### Step 1 - Download the file
1744

1845
Locate the inputs web page in your `infrastructure-live-root` repository at `.github/workflows/account-factory-inputs.html` and download it to your local machine.
1946

20-
### Step 2 - Populate the values
47+
#### Step 2 - Populate the values
2148

2249
Open the downloaded `account-factory-inputs.html` file in a web browser and populate the input fields as required.
2350

2451
Once all values are filled, click "Generate" and copy the resulting JSON output to your clipboard.
2552

26-
### Step 3 - Run the Account Factory workflow
53+
#### Step 3 - Run the Account Factory workflow
2754

2855
Access the Actions tab in your `infrastructure-live-root` repository on GitHub and select `Account factory` from the left-hand pane.
2956

3057
Click "Run workflow" on the right, paste the generated JSON payload into the dropdown, and click the green "Run workflow" button to initiate the workflow.
58+
After the workflow is complete, a new Pull Request will be created in the `infrastructure-live-root` repository. This PR will add an account request to the `_new-account-requests` directory.
3159

32-
### Step 4 - Merge the account request PR
60+
</TabItem>
61+
</Tabs>
3362

34-
After the workflow is complete, a new Pull Request will be created in the `infrastructure-live-root` repository. This PR will add an account request to the `_new-account-requests` directory.
63+
## Review and merge the account request PR
3564

3665
Review and merge the Pull Request to begin the account creation process.
3766

@@ -43,7 +72,7 @@ Once the account request PR merges into the main branch, Pipelines will initiate
4372

4473
When the account is successfully created, Pipelines will open another Pull Request to baseline the account.
4574

46-
### Step 5 - Merge the Account Baseline PR
75+
## Review and merge the Account Baseline PR
4776

4877
Review and merge the Account Baseline Pull Request. This PR contains essential infrastructure for enabling your delegated repository to plan and apply infrastructure changes in AWS. It also includes account baselines and configured account-specific infrastructure, such as a VPC.
4978

docs/2.0/docs/overview/getting-started/index.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,15 @@ Set up authentication for Pipelines to enable secure automation of infrastructur
1919

2020
<PersistentCheckbox id="install-df-3" label="Pipelines Auth Configured" />
2121

22-
### Step 4: [Create new Pipelines repositories](/2.0/docs/pipelines/installation/addingnewrepo)
22+
### Step 4: Create new Pipelines repositories
2323

24-
Alternatively, you can [add Pipelines to an existing repository](/2.0/docs/pipelines/installation/addingexistingrepo).
24+
- [New GitHub repository](/2.0/docs/pipelines/installation/addingnewrepo)
25+
- [New GitLab repository](/2.0/docs/pipelines/installation/addingnewgitlabrepo)
26+
27+
Alternatively, you can add Pipelines to an existing repository:
28+
29+
- [Existing GitHub repository](/2.0/docs/pipelines/installation/addingexistingrepo)
30+
- [Existing GitLab repository](/2.0/docs/pipelines/installation/addinggitlabrepo)
2531

2632
<PersistentCheckbox id="install-df-4" label="Pipelines Repositories Ready" />
2733

docs/2.0/docs/pipelines/installation/addinggitlabrepo.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import CustomizableValue from '/src/components/CustomizableValue';
22

3-
# Adding Pipelines to a GitLab Project
3+
# Adding Pipelines to an existing GitLab Project
44

55
This guide walks you through the process of adding Gruntwork Pipelines to a GitLab project. By the end, you'll have a fully configured GitLab CI/CD pipeline that can deploy infrastructure changes automatically.
66

@@ -11,7 +11,7 @@ Before you begin, make sure you have:
1111
- Basic familiarity with Git, GitLab, and infrastructure as code concepts
1212
- Access to one (or many) AWS account(s) where you have permission to create IAM roles and OIDC providers
1313
- Completed the [Pipelines Auth setup for GitLab](/2.0/docs/pipelines/installation/viamachineusers#gitlab) and setup a machine user with appropriate PAT tokens
14-
- Local access to Gruntwork's GitHub repositories, specifically [boilerplate](https://github.com/gruntwork-io/boilerplate) and the [architecture catalog](https://github.com/gruntwork-io/terraform-aws-architecture-catalog/)
14+
- Local access to Gruntwork's GitHub repositories, specifically the [architecture catalog](https://github.com/gruntwork-io/terraform-aws-architecture-catalog/)
1515

1616
:::info
1717

0 commit comments

Comments
 (0)