This is a template for Terraform modules.
It is part of our XOAP Automation Forces Open Source community library to give you a quick start into Infrastructure as Code deployments with Terraform.
We have a lot of Terraform modules that are Open Source and maintained by the XOAP staff.
Please check the links for more info, including usage information and full documentation:
We are using the following guidelines to write code and make it easier for everyone to follow a destinctive guideline. Please check these links before starting to work on changes.
Git Naming Conventions are an important part of the development process. They descrtibe how Branched, Commit Messages, Pull Requests and Tags should look like to make the easily understandebla for everybody in the development chain.
he Conventional Commits specification is a lightweight convention on top of commit messages. It provides an easy set of rules for creating an explicit commit history; which makes it easier to write automated tools on top of.
The better a Pull Request description is, the better a review can understand and decide on how to review the changes. This improves implementation speed and reduces communication between the requester and the reviewer resulting in much less overhead.
Wiriting A Great Pull Request Description
Versioning is a crucial part for Terraform Stacks and Modules. Without version tags you cannot clearly create a stable environment and be sure that your latest changes won't crash your production environment (sure it still can happen, but we are trying our best to implement everything that we can to reduce the risk)
Naming Conventions for Terraform resources must be used.
For the first ime using this template necessary tools need to be installed. A script for PowerShell Core is provided under ./build/init.ps1
This script will install following dependencies:
This script configures:
- global git template under ~/.git-template
- global pre-commit hooks for prepare-commit-msg and commit-msg under ~/.git-template/hooks
- github actions:
- linting and checks for pull requests from dev to master/main
- automatic tagging and release creation on pushes to master/main
- dependabot updates
It currently supports the automated installation for macOS. Support for Windows and Linux will be available soon.
We provided a script under ./build/sync_template.ps1 to fetch the latest changes from this template repository. Please be aware that this is mainly a copy operation which means all your current changes have to be committed first and after running the script you have to merge this changes into your codebase.
Name | Version |
---|---|
terraform | >= 0.14.8 |
Name | Version |
---|---|
kubernetes | n/a |
Name | Source | Version |
---|---|---|
this_label | git::github.com/xoap-io/terraform-aws-misc-label | v0.1.0 |
Name | Type |
---|---|
kubernetes_manifest.argo_application | resource |
Name | Description | Type | Default | Required |
---|---|---|---|---|
argocd_namespace | The name of the target ArgoCD Namespace | string |
n/a | yes |
automated_prune | Specifies if resources should be pruned during auto-syncing | bool |
false |
no |
automated_self_heal | Specifies if partial app sync should be executed when resources are changed only in target Kubernetes cluster and no git change detected | bool |
false |
no |
cascade_delete | Set to true if this application should cascade delete | bool |
false |
no |
chart | The name of the Helm chart | string |
n/a | yes |
context | Default context for naming and tagging purpose | object({ |
n/a | yes |
destination_server | n/a | string |
"https://kubernetes.default.svc" |
no |
helm_parameters | Parameters that will override helm_values | list(object({ |
[] |
no |
helm_values | Helm values as a block of yaml | any |
{} |
no |
ignore_differences | Ignore differences at the specified json pointers | list(object({ kind : string, group : string, name : string, jsonPointers : list(string) })) |
[] |
no |
labels | n/a | map(string) |
{} |
no |
name | The name of this application | string |
n/a | yes |
namespace | n/a | string |
n/a | yes |
path | n/a | string |
"" |
no |
project | The project that this ArgoCD application will be placed into. | string |
n/a | yes |
release_name | Release name override (defaults to application name) | string |
null |
no |
repo_url | Source of the Helm application manifests | string |
n/a | yes |
retry_backoff_duration | The amount to back off. Default unit is seconds, but could also be a duration (e.g. 2m , 1h ) |
string |
"5s" |
no |
retry_backoff_factor | A factor to multiply the base duration after each failed retry | number |
2 |
no |
retry_backoff_max_duration | The maximum amount of time allowed for the backoff strategy | string |
"3m" |
no |
retry_limit | Number of failed sync attempt retries; unlimited number of attempts if less than 0 | number |
5 |
no |
sync_option_create_namespace | Namespace Auto-Creation ensures that namespace specified as the application destination exists in the destination cluster. | bool |
true |
no |
sync_option_validate | disables resource validation (equivalent to 'kubectl apply --validate=true') | bool |
false |
no |
sync_options | A list of sync options to apply to the application | list(string) |
[] |
no |
target_revision | Revision of the Helm application manifests to use | string |
"" |
no |
No outputs.