Overview
You may have a requirement to configure a connection back to a GIT repo where you host your Terraform plans. We will walk you through the requirements, how to establish the connection and the options available for your terraform plans.
Considerations
Have configured GIT Repo’s for each terraform plan
Have copied down the GIT Repo you wish to use
Have configured a Personal Authorization Token in github
Procedure
Creating your Personal Authorization Token in github
To create your personal authorization token for use with your github connection, see the github documentation : https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token
Setting up your Git Connection
From your Cloudbolt Admin tab, under External Systems (1) click on Connection Info (2)
Click on New Git Connection Info
Enter the information requested and click on Create.
Name: Name of your new connection (Something relevant)
Host: for github.com connections, simply put github.com
Protocol: This can be HTTP or HTTPS
Username: This is the username you use to log into github.com .
Auth Token: This is your Personal Authorisation Token you have generated from github.com
Labels: For this to work for Terraform plans, you MUST add the label terraform-plan-source. Without this label your terraform action will not resolve your git connectionYou will now have a new git connection created in your connection info list
Creating a Terraform action in a blueprint
Inside your blueprint in the Build tab, click on Action
Click on Terraform Plan
Click on Create a new Terraform Plan action now
Provide a meaningful name for your new Terraform plan and optionally complete the rest of the items until you reach Plan Files
Under Plan Files, place the radio button next to Fetch a git repo from a URL and then enter the git repo name then click on Save .
NOTE: Replace <myaccount> with your github account and <myRepo> with your repo name. You can capture this information from within your github repo by clicking on the Code button and copying out the HTTPS stringOnce it has saved, you will have the Terraform plan on your blueprint
Additional information
CloudBolt Connection Info : https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/connection-info/a/h2__903876181
CloudBolt Terraform Plan Action : https://docs.cloudbolt.io/articles/#!cloudbolt-latest-docs/create-terraform-plan-action/a/h3__1399048011
0 Comments