-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Terraform Check Module Version with make tsvc_<plan_name> (#33)
* Add Terraform Check Module Version with make tsvc_<plan_name> * typo * remove configure.yaml file * Use gitlab dotenv for creds pass (#45) * Update gitlab-ci jinja template to use dotenv report artifact and dependencies keywork to pass credentials between jobs * add dependencies to needs * Add aws-creds as job dependency for apply_all job * Update needs to match dependencies * Add gitlab ci pipeline for testing * Fix typo in pipeline code * Uncommit gitlab pipeline * Change gitlabi place --------- Co-authored-by: Eddy PEPY <eddy.pepy.ext@orange.com> * Add Terraform Check Module Version with make tsvc_<plan_name> * typo --------- Co-authored-by: arongate <eddy.arrel@gmail.com> Co-authored-by: Eddy PEPY <eddy.pepy.ext@orange.com>
- Loading branch information
1 parent
2c55cfd
commit a770423
Showing
9 changed files
with
189 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
######################################################################################################################## | ||
# ENV Variables used for local development | ||
# Use the command $make dotenv_linter to validate this file | ||
######################################################################################################################## | ||
PROJECT_NAME: starterkit | ||
COMPOSE_PROJECT_NAME: starterkit | ||
REGION: eu-west-3 | ||
# Name of the output of the terraform plan | ||
PLAN_BINARY_FILE: tfplan.binary | ||
PLAN_JSON_FILE: tfplan.json | ||
|
||
######################################################################################################################## | ||
# Docker Compose image tags to use | ||
######################################################################################################################## | ||
TFENV_IMAGE_TAG: latest | ||
TFLINT_IMAGE_TAG: v0.39.3 | ||
PRECOMMIT_IMAGE_TAG: v1.74.1 | ||
DRIFTCTL_IMAGE_TAG: latest | ||
DOTENV_LINTER_IMAGE_TAG: latest | ||
MARKDOWN_LINTER_IMAGE_TAG: latest | ||
SHELL_LINTER_IMAGE_TAG: latest | ||
YAML_LINTER_IMAGE_TAG: latest | ||
POWERSHELL_LINTER_IMAGE_TAG: latest | ||
JSON_LINTER_IMAGE_TAG: latest | ||
TRIVY_IMAGE_TAG: latest | ||
TERRASCAN_IMAGE_TAG: latest | ||
TERRAFORM_VERSION_CHECK_IMAGE_TAG: latest | ||
|
||
######################################################################################################################## | ||
# GITLAB CI | ||
# Use to validate the .gitlab-ci.yml file with the command $make gitlab_linter | ||
######################################################################################################################## | ||
GENERATE_GITLAB_CI: False | ||
|
||
CICD_RUNNER_TAGS: | ||
- aws | ||
|
||
GITLAB_JOBS: | ||
aws-creds: True | ||
terraform-lint: True | ||
precommit: True | ||
terraform-format: True | ||
terraform-validate: True | ||
terraform-terrascan: True | ||
md-lint: True | ||
shell-lint: True | ||
yaml-lint: True | ||
terraform-trivy: True | ||
driftctl: True | ||
plan_all: True | ||
apply_all: True | ||
delete_all: True | ||
|
||
CICD_ROLE_NAME: XXXXXX-CiCd-CrossAccountRole | ||
CICD_ACCOUNT_ID: 123546789123 | ||
|
||
# Run Terraform apply only on main branch | ||
TF_APPLY_ONLY_MAIN: True | ||
|
||
# Set Terraform Token key and value to access Terraform Modules stored into private GitLab repo | ||
TF_TOKEN_MODULE_ACCESS: False | ||
TF_TOKEN_MODULE_ACCESS_KEY: | ||
TF_TOKEN_MODULE_ACCESS_VALUE: | ||
|
||
######################################################################################################################## | ||
# CUSTOM ENV | ||
######################################################################################################################## | ||
#CUSTOM_ENV: | ||
# MYAPI: test | ||
|
||
######################################################################################################################## | ||
# Terraform Logs | ||
######################################################################################################################## | ||
TF_LOG: TRACE | ||
TF_LOG_PATH: /tmp/terraform_logs | ||
|
||
######################################################################################################################## | ||
# Terraform S3 Backend Configuration | ||
######################################################################################################################## | ||
# Leave empty if you want to customize the Terraform backend config into the Terraform plans | ||
TF_VAR_backend_bucket_name: <AWS_S3_BUCKET_NAME> | ||
TF_VAR_backend_bucket_region: <AWS_REGION_CODE> | ||
TF_VAR_backend_dynamodb_table: <AWS_DYNAMODB_TABLE_NAME> | ||
TF_VAR_backend_bucket_access_role: arn:aws:iam::<AWS_ACCOUNT_ID>:role/<AWS_IAM_ROLE_NAME> | ||
|
||
# Customize Terraform backend bucket key | ||
# True: set the key in the Terraform plan remote state confgirutation | ||
# False: Terraform backend bucket key is automatically generated | ||
CUSTOM_BACKEND_BUCKET_KEY: False | ||
|
||
######################################################################################################################## | ||
# LOCAL DEVELOPMENT | ||
######################################################################################################################## | ||
LOCAL_ROLE_NAME: <AWS_IAM_ROLE_NAME> | ||
TF_VAR_assume_role: <AWS_IAM_ROLE_NAME> | ||
|
||
######################################################################################################################## | ||
# PLANS | ||
######################################################################################################################## | ||
# List the folder for each Terraform Plan to install, respect the order of installation | ||
plans: | ||
- terraform/demo | ||
|
||
# AWS Account ID in which your plan are deployed and containing the backend bucket | ||
# SSO Account | ||
ACCOUNT_ID: <AWS_ACCOUNT_ID> | ||
|
||
######################################################################################################################## | ||
# PROXY | ||
######################################################################################################################## | ||
HTTP_PROXY: "" | ||
HTTPS_PROXY: "" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters