From fc2e122838c6a4f628df3f2173f1c75be09992a1 Mon Sep 17 00:00:00 2001 From: gatici Date: Tue, 13 Feb 2024 17:29:44 +0300 Subject: [PATCH] Addimg missimg relations Signed-off-by: gatici --- .github/workflows/terraform.yaml | 10 ++-------- terraform/README.md | 4 ++-- terraform/outputs.tf | 10 ++++++++++ terraform/variables.tf | 2 +- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/workflows/terraform.yaml b/.github/workflows/terraform.yaml index 596d36a36..ba311f9fd 100644 --- a/.github/workflows/terraform.yaml +++ b/.github/workflows/terraform.yaml @@ -13,8 +13,6 @@ jobs: defaults: run: working-directory: ./terraform - outputs: - CHECK_STATUS: "${{ env.CHECK_STATUS }}" steps: - name: Checkout Repository @@ -34,13 +32,9 @@ jobs: - name: Validate terraform fmt run: | set +e - echo "CHECK_STATUS=0" >> "$GITHUB_ENV" - terraform fmt -recursive -check + terraform fmt -recursive -check -diff FMT_STATUS="$?" if [[ "$FMT_STATUS" -ne 0 ]]; then echo "❌ terraform fmt failed" >> "$GITHUB_STEP_SUMMARY" - echo "CHECK_STATUS=1" >> "$GITHUB_ENV" fi - - name: Process check - if: always() - run: exit "$CHECK_STATUS" \ No newline at end of file + exit "$FMT_STATUS" \ No newline at end of file diff --git a/terraform/README.md b/terraform/README.md index 7a55107fe..42942e6c8 100644 --- a/terraform/README.md +++ b/terraform/README.md @@ -9,8 +9,8 @@ The base module is not intended to be deployed in separation (it is possible tho ## Module structure - **main.tf** - Defines the Juju application to be deployed. -- **variables.tf** - Allows customization of the deployment such as Juju model name, channel or application name and charm configuration. -- **output.tf** - Responsible for integrating the module with other Terraform modules, primarily by defining potential integration endpoints (charm integrations), but also by exposing the application name. +- **variables.tf** - Allows customization of the deployment such as Juju model name, application name, charm's channel and configuration. +- **output.tf** - Responsible for integrating the module with other Terraform modules, primarily by defining potential integration endpoints (charm integrations) together with exposing the application name. - **terraform.tf** - Defines the Terraform provider. ## Using mongodb-k8s base module in higher level modules diff --git a/terraform/outputs.tf b/terraform/outputs.tf index 9906866cc..eff062b29 100644 --- a/terraform/outputs.tf +++ b/terraform/outputs.tf @@ -33,6 +33,16 @@ output "cluster_endpoint" { value = "cluster" } +output "metrics_endpoint" { + description = "Name of the endpoint to provide the prometheus_scrape interface." + value = "metrics-endpoint" +} + +output "grafana_dashboard_endpoint" { + description = "Name of the endpoint to provide the grafana_dashboard interface." + value = "grafana-dashboard" +} + # Required integration endpoints output "certificates_endpoint" { diff --git a/terraform/variables.tf b/terraform/variables.tf index 7a6b2c89f..f42e9e85a 100644 --- a/terraform/variables.tf +++ b/terraform/variables.tf @@ -20,7 +20,7 @@ variable "channel" { } variable "config" { - description = "Additional configuration for the MongoDB. Details about available options can be found at https://charmhub.io/mongodb-k8s/configure?channel=6/edge." + description = "Additional configuration for the MongoDB. Details about available options can be found at https://charmhub.io/mongodb-k8s/configure?channel=6/beta." type = map(string) default = {} } \ No newline at end of file