changed myip service
This commit is contained in:
1 parent
ead44aa1f4
commit
9347f4e8e2
2 files changed
+4
-3
No files matched your search
@@ -72,7 +72,7 @@ terraform apply
|
||||
|
||||
### Key flows
|
||||
|
||||
- **DNS:** Terraform looks up your current IP (`https://api.myip.com/`) and creates `A` records on Cloudflare for every zone/record in `domain_mappings` (unless an IP is pinned).
|
||||
- **DNS:** Terraform looks up your current IP (`https://api.ipify.org?format=json`) and creates `A` records on Cloudflare for every zone/record in `domain_mappings` (unless an IP is pinned via `myip`, in which case the lookup is skipped).
|
||||
- **Plugins:** Terraform uses the `k8s-helm-charts` module to install `external-secrets`, `metallb`, `cert-manager`, `argo-cd`, `tailscale-operator`, and `traefik`. Each lands in its own `plugin-<name>` namespace.
|
||||
- **Infrastructure:** Terraform deploys `charts/infrastructure`, which creates the Argo CD repo credentials, `AppProject main`, the ApplicationSet that watches `charts/apps/*`, the MetalLB IP address pool, and External Secrets ClusterSecretStores.
|
||||
- **GitOps:** The ApplicationSet automatically creates an Argo CD Application for each folder under `charts/apps/`, syncing it to its own namespace. Value files `values.yaml` + `values-<deployment>.yaml` are merged per deployment environment.
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
data "http" "myip" {
|
||||
url = "https://api.myip.com/"
|
||||
count = var.myip == "" ? 1 : 0
|
||||
url = "https://api.ipify.org?format=json"
|
||||
}
|
||||
|
||||
locals {
|
||||
myip = var.myip != "" ? var.myip : jsondecode(data.http.myip.response_body)["ip"]
|
||||
myip = var.myip != "" ? var.myip : jsondecode(data.http.myip[0].response_body)["ip"]
|
||||
}
|
||||
data "cloudflare_zone" "this" {
|
||||
for_each = var.domain_mappings
|
||||
|
||||
Reference in new issue
Block a user