Skip to content

A DevOps Stack module to use as a template when creating modules

License

Notifications You must be signed in to change notification settings

camptocamp/devops-stack-module-template

Repository files navigation

devops-stack-module-template

A DevOps Stack module to deploy something.

The something chart used by this module is shipped in this repository as well, in order to avoid any unwanted behaviors caused by unsupported versions.

Current Chart Version Original Repository Default Values

1.2.3

Chart

values.yaml (here you can also use artifacthub.io)

Usage

Here you will show examples of how to call this module on your code. Note that the depends_on needs to be adapted to your use case.

You can start by giving a simple example and then show some others with increasing complexity and/or for specific use cases.

module "template" {
  source = "git::https://github.com/camptocamp/devops-stack-module-template.git?ref=<RELEASE>"

  cluster_name            = local.cluster_name
  argocd_namespace        = local.argocd_namespace

  dependency_ids = {
    argocd = module.argocd_bootstrap.id
  }
}

Something Explained Better

If there is some part of the module’s configuration that needs more specific explanations, such as a very particular output on which every other module depends on, maybe consider creating a subsection to improve readability.

Note
The AsciiDoc syntax provides a way to write admonitions such as this one, so use it if you think it is useful. The official documentation for Antora Docs provides more examples.

Technical Reference

This section will contain the more technical details of the module. It is mainly generated automatically by Terraform Docs (everything that is between the comments BEGIN_TF_DOCS / END_TF_DOCS). However, it is recommended to, at the bare minimum, add a dependencies section to explain the reason on why this module could depend on another one from the DevOps Stack.

You can safely delete the content between the comments BEGIN_TF_DOCS / END_TF_DOCS and BEGIN_TF_TABLES / END_TF_TABLES when creating your on module.

Dependencies

module.argocd_bootstrap

This module must be one of the first ones to be deployed and consequently it needs to be deployed after the module argocd_bootstrap.

Requirements

The following requirements are needed by this module:

Providers

The following providers are used by this module:

Resources

The following resources are used by this module:

Required Inputs

The following input variables are required:

Description: Name given to the cluster. Value used for naming some the resources created by the module.

Type: string

Description: Base domain of the cluster. Value used for the ingress' URL of the application.

Type: string

Optional Inputs

The following input variables are optional (have default values):

Description: Name of the Argo CD AppProject where the Application should be created. If not set, the Application will be created in a new AppProject only for this Application.

Type: string

Default: null

Description: Labels to attach to the Argo CD Application resource.

Type: map(string)

Default: {}

Description: Destination cluster where the application should be deployed.

Type: string

Default: "in-cluster"

Description: Override of target revision of the application chart.

Type: string

Default: "v1.0.0"

Description: SSL certificate issuer to use. Usually you would configure this value as letsencrypt-staging or letsencrypt-prod on your root *.tf files.

Type: string

Default: "selfsigned-issuer"

Description: Helm chart value overrides. They should be passed as a list of HCL structures.

Type: any

Default: []

Description: Automated sync options for the Argo CD Application resource.

Type:

object({
    allow_empty = optional(bool)
    prune       = optional(bool)
    self_heal   = optional(bool)
  })

Default:

{
  "allow_empty": false,
  "prune": true,
  "self_heal": true
}

Description: IDs of the other modules on which this module depends on.

Type: map(string)

Default: {}

Outputs

The following outputs are exported:

Description: ID to pass other modules in order to refer to this module as a dependency.

Reference in table format

Show tables

= Requirements

Name Version

>= 5

>= 3

>= 1

= Providers

Name Version

>= 3

>= 5

>= 1

= Resources

Name Type

resource

resource

resource

resource

data source

= Inputs

Name Description Type Default Required

Name given to the cluster. Value used for naming some the resources created by the module.

string

n/a

yes

Base domain of the cluster. Value used for the ingress' URL of the application.

string

n/a

yes

Name of the Argo CD AppProject where the Application should be created. If not set, the Application will be created in a new AppProject only for this Application.

string

null

no

Labels to attach to the Argo CD Application resource.

map(string)

{}

no

Destination cluster where the application should be deployed.

string

"in-cluster"

no

Override of target revision of the application chart.

string

"v1.0.0"

no

SSL certificate issuer to use. Usually you would configure this value as letsencrypt-staging or letsencrypt-prod on your root *.tf files.

string

"selfsigned-issuer"

no

Helm chart value overrides. They should be passed as a list of HCL structures.

any

[]

no

Automated sync options for the Argo CD Application resource.

object({
    allow_empty = optional(bool)
    prune       = optional(bool)
    self_heal   = optional(bool)
  })
{
  "allow_empty": false,
  "prune": true,
  "self_heal": true
}

no

IDs of the other modules on which this module depends on.

map(string)

{}

no

= Outputs

Name Description

id

ID to pass other modules in order to refer to this module as a dependency.

About

A DevOps Stack module to use as a template when creating modules

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages