Skip to content

mcdermg/gcp-service-account-key-cicd-automation

Repository files navigation

Project Title

Service account and associated key and stored in a GitHub secret.

Description

Testing the creation of a service account and associated key and passing it to GitHub secret.

Requirements

Terraform

Requirements

Name Version
terraform 1.1.8

Providers

Name Version
null 3.1.1

Modules

Name Source Version
project-factory-sa terraform-google-modules/service-accounts/google 4.1.1

Resources

Name Type
null_resource.circleci_context_secret resource

Inputs

Name Description Type Default Required
billing_account_id The billing account ID to associate with the project. string n/a yes
circelci_vcs Circleci VCS either github or bitbucket string n/a yes
circleci_context Name ofd the CircleCI context to use string n/a yes
circleci_context_secret_name Name of the secret to create in the CircleCI context string n/a yes
circleci_org Name of the Github Org used in CircleCI string n/a yes
github_owner GitHub organization to use string n/a yes
github_token GitHub api token string n/a yes
org_id The GCP organization ID string n/a yes
prefix Prefix applied to service account names. string "" no
project_id The ID of the project in which to provision resources. string n/a yes

Outputs

No outputs.

Github

TODO GitHub provider and details

CircleCI

messing with local execs to sort this, seems to work but needs CircelCI cli. That requires an API key and running certain commands to setup.

install as per the Circelci docs

curl -fLSs https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/master/install.sh | bash
circleci setup
circleci context create github mcdermg testing

Deployment

  • How to run the
terraform init
terraform plan
terrafrom apply

pre-commit

This repo is using pre-commit for Terraform to ensure some standardization for Terraform layout & standards. See pre-commit hooks for Terraform. There are some dependencies that are detailed here. The repository uses the following pre commit hooks:

Run pre-commit install to enable.

Authors

Gary Mc Dermott

Github Profile

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages