-
-
Notifications
You must be signed in to change notification settings - Fork 36
Terragrunt Example Configuration #523
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| # Plan: Implement ACME Challenge LB Rules for Bestnet | ||
|
|
||
| We will add OpenStack Load Balancer resources to `nomadclient.tf` to handle ACME challenges, creating a dedicated pool and L7 rules to redirect `.well-known/acme-challenge/` traffic. A new variable will be introduced to handle the port difference between environments (8081 default, 8080 for prod-bestnet). | ||
|
|
||
| ## Proposed Changes | ||
|
|
||
| ### 1. Modify `nomadclient.tf` | ||
| - Add `variable "nomadclient_acme_port"` with a default value of `8081`. | ||
| - Add the following resources (adapted from the ticket snippet): | ||
| - `openstack_lb_pool_v2.nomadclient_challenge_acme` | ||
| - `openstack_lb_member_v2.nomadclient_challenge_acme` (using `var.nomadclient_acme_port`) | ||
| - `openstack_lb_monitor_v2.acme_healthmonitor` | ||
| - `openstack_lb_l7policy_v2.acme_challenge_policy` | ||
| - `openstack_lb_l7rule_v2.acme_challenge_rule` | ||
|
|
||
| ### 2. Modify `environments/prod-bestnet.tfvars` | ||
| - Add `nomadclient_acme_port = 8080` to override the default for the production environment, aligning with the ticket's note. | ||
|
|
||
| ## Rationale | ||
| - The ticket explicitly provides the Terraform configuration needed to support the new Vault-based Let's Encrypt integration. | ||
| - The comment "in prod_bestnet protocol_port = 8080" indicates a deviation from the snippet's 8081 for the production environment. Using a variable allows us to apply the standard configuration while respecting the environment-specific requirement. | ||
| - Existing `nomadclient` resources in `nomadclient.tf` confirm the resource names match the snippet (e.g., `openstack_compute_instance_v2.nomadclient`). | ||
|
|
||
| ## Verification | ||
| - Verify that `nomadclient.tf` successfully validates. | ||
| - Ensure `prod-bestnet.tfvars` correctly overrides the port. | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # Terragrunt Example | ||
|
|
||
| This directory contains a simple Terragrunt configuration that creates a local file. | ||
|
|
||
| ## Usage | ||
|
|
||
| After creating "terragrunt.hcl", run the following commands: | ||
|
||
|
|
||
| ```fish | ||
| terragrunt plan --log-format bare | ||
| terragrunt apply | ||
| ``` | ||
|
|
||
| For variable input, run the following: | ||
|
|
||
| ```fish | ||
| terragrunt apply -auto-approve -var content='Hello, Terragrunt!' | ||
| ``` | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Hello, Terragrunt! | ||
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,6 @@ | ||||||||||||
| variable "content" {} | ||||||||||||
|
||||||||||||
| variable "content" {} | |
| variable "content" { | |
| type = string | |
| description = "Content to write to the hi.txt local file." | |
| } |
Copilot
AI
Jan 20, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The entire contents of the foo and bar directories are identical, creating significant code duplication. This violates the DRY (Don't Repeat Yourself) principle. Consider using a single shared Terraform module or consolidating these into one example directory, or differentiate them if they are meant to serve different purposes.
| filename = "${path.module}/hi.txt" | |
| filename = "${path.module}/hi-bar.txt" |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| # Terragrunt Example | ||
|
|
||
| This directory contains a simple Terragrunt configuration that creates a local file. | ||
|
|
||
| ## Usage | ||
|
|
||
| After creating "terragrunt.hcl", run the following commands: | ||
|
||
|
|
||
| ```fish | ||
| terragrunt plan --log-format bare | ||
| terragrunt apply | ||
| ``` | ||
|
|
||
| For variable input, run the following: | ||
|
|
||
| ```fish | ||
| terragrunt apply -auto-approve -var content='Hello, Terragrunt!' | ||
| ``` | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Hello, Terragrunt! | ||
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,6 @@ | ||||||||||||
| variable "content" {} | ||||||||||||
|
||||||||||||
| variable "content" {} | |
| variable "content" { | |
| type = string | |
| description = "Content to write into the hi.txt local file." | |
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file appears to be unrelated to the PR's stated purpose of creating Terragrunt example configurations. It describes implementing ACME Challenge LB Rules for Bestnet with OpenStack resources, which is a different feature entirely. This file may have been included accidentally and should likely be removed from this PR or committed separately.