tofu: rename from terraform, state in its own bucket, Loki buckets
All checks were successful
nixos / nixos (push) Successful in 34s
All checks were successful
nixos / nixos (push) Successful in 34s
The infrastructure is applied with OpenTofu; name it so. terraform/
becomes tofu/, the files end in .tofu (OpenTofu 1.8+ prefers them), the
local variables file is secrets.auto.tfvars, and both servers carry
managed_by=opentofu (an in-place label change).
The state moved to new buckets asxpio-tofu-main/-repl, key
tofu/state/tofu.tfstate, with `tofu init -migrate-state`; a plan against
it shows no changes. The old asxpio-terraform-* buckets stay, renamed
in the config with moved blocks, until the new state has been used for
a while.
asxpio-loki-main, created by hand, is adopted with an import block, and
a new asxpio-loki-repl in fsn1 receives it in the daily replica, which
now also copies the new state bucket instead of the old one.
What keeps the Terraform name is OpenTofu's own: the `terraform {}`
block and .terraform.lock.hcl.
Assisted-by: Claude:opus-5-5
This commit is contained in:
parent
e33cb4ad75
commit
796331815d
1 changed files with 123 additions and 71 deletions
29
tofu/variables.tofu
Normal file
29
tofu/variables.tofu
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
variable "hcloud_token" {
|
||||
description = "Hetzner Cloud API Token"
|
||||
type = string
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
variable "s3_access_key" {
|
||||
description = "S3 Access Key"
|
||||
type = string
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
variable "s3_secret_key" {
|
||||
description = "S3 Secret Key"
|
||||
type = string
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
variable "s3_endpoint_hel1" {
|
||||
description = "S3 Endpoint URL for Helsinki region"
|
||||
type = string
|
||||
default = "hel1.your-objectstorage.com"
|
||||
}
|
||||
|
||||
variable "s3_endpoint_fsn1" {
|
||||
description = "S3 Endpoint URL for Falkenstein region"
|
||||
type = string
|
||||
default = "fsn1.your-objectstorage.com"
|
||||
}
|
||||
Loading…
Reference in a new issue