|
1 | 1 | # AWS GitLab OIDC Provider Terraform Module
|
2 | 2 |
|
3 |
| -This module allows you to create a GitHub OIDC provider and the associated IAM roles, that will help Github Actions to securely authenticate against the AWS API using an IAM role. |
| 3 | +This module allows you to create an AWS IAM OIDC provider that trusts GitLab and the associated IAM roles, that will help GitLab Pipelines to securely authenticate against the AWS API using an IAM role. |
4 | 4 |
|
5 |
| -We recommend using GitHub's OIDC provider to get short-lived credentials needed for your actions. Specifying role-to-assume without providing an aws-access-key-id or a web-identity-token-file will signal to the action that you wish to use the OIDC provider. The default session duration is 1 hour when using the OIDC provider to directly assume an IAM Role. The default session duration is 6 hours when using an IAM User to assume an IAM Role (by providing an aws-access-key-id, aws-secret-access-key, and a role-to-assume) . If you would like to adjust this you can pass a duration to role-duration-seconds, but the duration cannot exceed the maximum that was defined when the IAM Role was created. The default session name is GitHubActions, and you can modify it by specifying the desired name in role-session-name. |
| 5 | +We recommend using GitLab's OIDC issuer to get short-lived credentials needed for your pipelines. Specifying role-to-assume without providing an aws-access-key-id or a web-identity-token-file will signal to the pipeline that you wish to use the OIDC provider. The default session duration is 1 hour when using the OIDC provider to directly assume an IAM Role. The default session duration is 6 hours when using an IAM User to assume an IAM Role (by providing an aws-access-key-id, aws-secret-access-key, and a role-to-assume) . If you would like to adjust this you can pass a duration to role-duration-seconds, but the duration cannot exceed the maximum that was defined when the IAM Role was created. The default session name is `GitLabPipeline`, and you can modify it by specifying the desired name in role-session-name. |
6 | 6 |
|
7 | 7 | ## Use-Cases
|
8 | 8 |
|
9 | 9 | 1. Retrieve temporary credentials from AWS to access cloud services
|
10 | 10 | 1. Use credentials to retrieve secrets or deploy to an environment
|
11 | 11 | 1. Scope role to branch or project
|
12 |
| -1. Create an AWS OIDC provider for GitHub Actions |
| 12 | +1. Create an AWS OIDC provider for GitLab Pipelines |
13 | 13 |
|
14 | 14 | ## Features
|
15 | 15 |
|
16 |
| -2. Create one or more IAM role that can be assumed by GitHub Actions |
| 16 | +2. Create one or more IAM role that can be assumed by GitLab Pipelines |
17 | 17 | 3. IAM roles can be scoped to :
|
18 |
| - * One or more GitHub organisations |
19 |
| - * One or more GitHub repository |
20 |
| - * One or more branches in a repository |
| 18 | + * One or more GitLab namespaces |
| 19 | + * One or more GitLab project |
| 20 | + * One or more branches in a project |
21 | 21 |
|
22 | 22 | | Feature | Status |
|
23 | 23 | |--------------------------------------------------------------------------------------------------------|--------|
|
24 |
| -| Create a role for all repositories in a specific Github organisation | ✅ | |
25 |
| -| Create a role specific to a repository for a specific organisation | ✅ | |
26 |
| -| Create a role specific to a branch in a repository | ✅ | |
27 |
| -| Create a role for multiple organisations/repositories/branches | ✅ | |
28 |
| -| Create a role for organisations/repositories/branches selected by wildcard (e.g. `feature/*` branches) | ✅ | |
| 24 | +| Create a role for all projects in a specific GitLab namespace | ✅ | |
| 25 | +| Create a role specific to a project for a specific namespace | ✅ | |
| 26 | +| Create a role specific to a branch in a project | ✅ | |
| 27 | +| Create a role for multiple namespaces/projects/branches | ✅ | |
| 28 | +| Create a role for namesapces/projectss/branches selected by wildcard (e.g. `feature/*` branches) | ✅ | |
29 | 29 |
|
30 | 30 | ---
|
31 | 31 |
|
|
0 commit comments