Skip to content

miquido/terraform-gitlab-cicd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

miquido-terraform-gitlab-cicd

Provide gitlab oidc provider and roles for terraform

Usage

Terraform:

module "cicd-tf-dev" {
providers = {
  aws = aws.dev
}
source                       = "https://github.com/miquido/terraform-gitlab-cicd.git"
environment                  = "dev"
gitlab_tf_admin_oidc_subs    = ["project_path:test/repo:ref_type:branch:ref:dev"]
gitlab_tf_readonly_oidc_subs = ["project_path:test/repo:ref_type:branch:ref:*"]
}

Makefile Targets

Available targets:

  help                                Help screen
  help/all                            Display help for all targets
  help/short                          This help short screen
  lint                                Lint terraform code

Requirements

No requirements.

Providers

Name Version
aws n/a

Modules

No modules.

Resources

Name Type
aws_iam_openid_connect_provider.gitlab resource
aws_iam_policy.terraform resource
aws_iam_policy.terraform-readonly resource
aws_iam_role.terraform resource
aws_iam_role.terraform-readonly resource
aws_iam_role_policy_attachment.terraform resource
aws_iam_role_policy_attachment.terraform-readonly resource
aws_caller_identity.current data source
aws_iam_policy_document.gitlab-tf data source
aws_iam_policy_document.gitlab-tf-readonly data source
aws_iam_policy_document.terraform data source
aws_iam_policy_document.terraform-readonly data source

Inputs

Name Description Type Default Required
environment Environment name string n/a yes
gitlab_tf_admin_oidc_subs Allow gitlab to assume tf admin roles list(string) n/a yes
gitlab_tf_readonly_oidc_subs Allow gitlab to assume tf readonly roles list(string) n/a yes

Outputs

Name Description
tf_admin_role_arn n/a
tf_readonly_role_arn n/a

Related Projects

Check out these related projects.

License

License: MIT

The MIT License (MIT)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Source: <https://opensource.org/licenses/MIT>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published