Skip to content

Commit

Permalink
Adding missing relations
Browse files Browse the repository at this point in the history
Signed-off-by: gatici <[email protected]>
  • Loading branch information
gatici committed Feb 14, 2024
1 parent 6fdcadf commit b5c17a6
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
12 changes: 2 additions & 10 deletions .github/workflows/terraform.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ jobs:
defaults:
run:
working-directory: ./terraform
outputs:
CHECK_STATUS: "${{ env.CHECK_STATUS }}"

steps:
- name: Checkout Repository
Expand All @@ -24,23 +22,17 @@ jobs:
uses: hashicorp/setup-terraform@v3

- name: Initialize Terraform Module
id: init
run: terraform init

- name: Validate Terraform Module
id: validate
run: terraform validate -no-color

- 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"
exit "$FMT_STATUS"
4 changes: 2 additions & 2 deletions terraform/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions terraform/outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down
2 changes: 1 addition & 1 deletion terraform/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {}
}

0 comments on commit b5c17a6

Please sign in to comment.