Skip to content

Repository files navigation

Compatibility

This module requires Terraform 0.13.1 or later. Older Terraform versions are not supported.

AWS Gitlab OIDC Provider Terraform Module

Purpose

This module allows you to create a Gitlab OIDC provider for your AWS account, that will help Gitlab Actions to securely authenticate against the AWS API using an IAM role

Requirements

Name Version
terraform >= 0.13.1
aws >= 3.63
tls 4.0.4

Providers

Name Version
aws >= 3.63
tls 4.0.4

Modules

No modules.

Resources

Name Type
aws_iam_openid_connect_provider.this resource
aws_iam_role.this resource
aws_iam_role_policy_attachment.this resource
aws_iam_policy_document.this data source
tls_certificate.gitlab data source

Inputs

Name Description Type Default Required
aud_value (Required) A list of client IDs (also known as audiences). When a mobile or web app registers with an OpenID Connect provider, they establish a value that identifies the application. (This is the value that's sent as the client_id parameter on OAuth requests.) list(string)
[
"https://gitlab.com"
]
no
create_oidc_provider Whether or not to create the associated oidc provider. If false, variable 'oidc_provider_arn' is required bool true no
create_oidc_role Whether or not to create the OIDC attached role bool true no
max_session_duration Maximum session duration in seconds. number 3600 no
oidc_provider_arn If create_oidc_provider is false configure OpenID provider ARN. string null no
oidc_provider_url If create_oidc_provider is false configure OpenID provider URL. string null no
oidc_role_attach_policies Attach policies to OIDC role. list(string) [] no
repositories List of GitLab organization/repository names authorized to assume the role. list(string) [] no
role_description (Optional) Description of the role. string "Role assumed by the Gitlab OIDC provider." no
role_name (Optional, Forces new resource) Friendly name of the role. string "gitlab-oidc-provider-aws" no
tags A mapping of tags to assign to all resources map(string) {} no
tls_certificate_url GitLab OpenID TLS certificate URL. The address of your GitLab instance, such as https://gitlab.com or http://gitlab.example.com. string "https://gitlab.com/oauth/discovery/keys" no
url GitLab OpenID URL. The address of your GitLab instance, such as https://gitlab.com or http://gitlab.example.com. string "https://gitlab.com" no

Outputs

Name Description
oidc_provider_arn OIDC provider ARN
oidc_provider_url OIDC provider URL
oidc_role IAM role.
thumbprint TLS endpoint certificate SHA1 Fingerprint

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages