From fce339acf9cc1b18f5ce59b300bf90b56ac4a49a Mon Sep 17 00:00:00 2001 From: Timo Furrer <tuxtimo@gmail.com> Date: Fri, 28 Feb 2025 11:53:42 +0100 Subject: [PATCH] Make use of some beautiful GitLab markdown alerts --- .gitlab/README.md.template | 35 +++++++++++++++++++++++++---------- README.md | 35 +++++++++++++++++++++++++---------- 2 files changed, 50 insertions(+), 20 deletions(-) diff --git a/.gitlab/README.md.template b/.gitlab/README.md.template index 523109b..1793fc3 100644 --- a/.gitlab/README.md.template +++ b/.gitlab/README.md.template @@ -4,21 +4,27 @@ This project is home to the **OpenTofu CI/CD component** and it's related assets like the `gitlab-tofu` wrapper script and OCI images containing that script together with an OpenTofu version. -Read more: - -- [CI/CD components](https://docs.gitlab.com/ee/ci/components) -- [Development guide for GitLab CI/CD components](https://docs.gitlab.com/ee/development/cicd/components) -- [CI/CD Catalog](https://docs.gitlab.com/ee/ci/components/index.html#cicd-catalog) - -**Note**: Please make sure to use a released version of this CI/CD component. -You find all releases on the [Releases Overview Page](https://gitlab.com/components/opentofu/-/releases). - -♻️ **Migrating from the Terraform CI/CD templates?** Check **[this](#migrating-from-the-terraform-cicd-templates)** out. +> [!note] +> Please make sure to use a released version of this CI/CD component. +> You find all releases on the [Releases Overview Page](https://gitlab.com/components/opentofu/-/releases). + +> [!tip] +> GitLab CI/CD components and the CI/CD catalog are fairly recent additions to GitLab. +> You can learn more about them here: +> +> - [CI/CD components](https://docs.gitlab.com/ee/ci/components) +> - [Development guide for GitLab CI/CD components](https://docs.gitlab.com/ee/development/cicd/components) +> - [CI/CD Catalog](https://docs.gitlab.com/ee/ci/components/index.html#cicd-catalog) +> +>♻️ **Migrating from the Terraform CI/CD templates?** Check **[this](#migrating-from-the-terraform-cicd-templates)** out. [[_TOC_]] ## Usage +> [!tip] +> The usage examples use `<...>` pattern for placeholders that you must replace with your desired values. + ```yaml include: - component: $CI_SERVER_FQDN/components/opentofu/full-pipeline@<VERSION> @@ -124,6 +130,10 @@ The base image OS can be specified with the `base_os` input. ### GitLab-managed Terraform state backend +> [!tip] +> Consider using `auto_define_backend: true` to let the component automatically set up +> the OpenTofu HTTP backend configuration block. + This component - by leveraging the [`gitlab-tofu`](src/gitlab-tofu.sh) CLI internally - can automatically define and configure the [GitLab-managed Terraform state backend](https://docs.gitlab.com/ee/user/infrastructure/iac/terraform_state.html). @@ -142,6 +152,11 @@ However, you may simply enable the `auto_define_backend` so that the component t ### State and Plan Encryption +> [!tip] +> State and Plan encryption is not enabled by default which may impact security negatively +> for your use case. Please consider using it. The example below gives you a good sense +> of how easy it is to enable. + We recommend that you configure the OpenTofu [State and Plan Encryption](https://opentofu.org/docs/language/state/encryption). diff --git a/README.md b/README.md index 82e05fa..6c89664 100644 --- a/README.md +++ b/README.md @@ -6,21 +6,27 @@ This project is home to the **OpenTofu CI/CD component** and it's related assets like the `gitlab-tofu` wrapper script and OCI images containing that script together with an OpenTofu version. -Read more: - -- [CI/CD components](https://docs.gitlab.com/ee/ci/components) -- [Development guide for GitLab CI/CD components](https://docs.gitlab.com/ee/development/cicd/components) -- [CI/CD Catalog](https://docs.gitlab.com/ee/ci/components/index.html#cicd-catalog) - -**Note**: Please make sure to use a released version of this CI/CD component. -You find all releases on the [Releases Overview Page](https://gitlab.com/components/opentofu/-/releases). - -♻️ **Migrating from the Terraform CI/CD templates?** Check **[this](#migrating-from-the-terraform-cicd-templates)** out. +> [!note] +> Please make sure to use a released version of this CI/CD component. +> You find all releases on the [Releases Overview Page](https://gitlab.com/components/opentofu/-/releases). + +> [!tip] +> GitLab CI/CD components and the CI/CD catalog are fairly recent additions to GitLab. +> You can learn more about them here: +> +> - [CI/CD components](https://docs.gitlab.com/ee/ci/components) +> - [Development guide for GitLab CI/CD components](https://docs.gitlab.com/ee/development/cicd/components) +> - [CI/CD Catalog](https://docs.gitlab.com/ee/ci/components/index.html#cicd-catalog) +> +>♻️ **Migrating from the Terraform CI/CD templates?** Check **[this](#migrating-from-the-terraform-cicd-templates)** out. [[_TOC_]] ## Usage +> [!tip] +> The usage examples use `<...>` pattern for placeholders that you must replace with your desired values. + ```yaml include: - component: $CI_SERVER_FQDN/components/opentofu/full-pipeline@<VERSION> @@ -126,6 +132,10 @@ The base image OS can be specified with the `base_os` input. ### GitLab-managed Terraform state backend +> [!tip] +> Consider using `auto_define_backend: true` to let the component automatically set up +> the OpenTofu HTTP backend configuration block. + This component - by leveraging the [`gitlab-tofu`](src/gitlab-tofu.sh) CLI internally - can automatically define and configure the [GitLab-managed Terraform state backend](https://docs.gitlab.com/ee/user/infrastructure/iac/terraform_state.html). @@ -144,6 +154,11 @@ However, you may simply enable the `auto_define_backend` so that the component t ### State and Plan Encryption +> [!tip] +> State and Plan encryption is not enabled by default which may impact security negatively +> for your use case. Please consider using it. The example below gives you a good sense +> of how easy it is to enable. + We recommend that you configure the OpenTofu [State and Plan Encryption](https://opentofu.org/docs/language/state/encryption). -- GitLab