From 339f0e84846c15a79a8bbb661999302a8f3e854f Mon Sep 17 00:00:00 2001 From: jack Date: Fri, 27 Mar 2026 19:18:26 +0700 Subject: [PATCH] terraform: remove tools server and outline bucket, add docmost bucket - Remove twc_server.tools (tools server decommissioned) - Remove twc_s3_bucket.outline (walava-outline deleted) - Add twc_s3_bucket.docmost (walava-docmost, ID 481385) - Update main server comment, remove tools_ip output - Removed from state: twc_server.tools, twc_s3_bucket.outline - Imported into state: twc_s3_bucket.docmost --- terraform/outputs.tf | 5 - terraform/servers.tf | 14 +- terraform/storage.tf | 6 +- terraform/terraform.tfstate.1774613804.backup | 177 ++++++++++++++++++ 4 files changed, 181 insertions(+), 21 deletions(-) create mode 100644 terraform/terraform.tfstate.1774613804.backup diff --git a/terraform/outputs.tf b/terraform/outputs.tf index 1896a03..79d0433 100644 --- a/terraform/outputs.tf +++ b/terraform/outputs.tf @@ -2,8 +2,3 @@ output "main_ip" { description = "IP main-сервера" value = "87.249.49.32" } - -output "tools_ip" { - description = "IP tools-сервера" - value = "85.193.83.9" -} diff --git a/terraform/servers.tf b/terraform/servers.tf index d0c7846..69e627c 100644 --- a/terraform/servers.tf +++ b/terraform/servers.tf @@ -2,7 +2,7 @@ resource "twc_server" "main" { name = "main" - comment = "Основной: Traefik, Forgejo, Plane, Vaultwarden, Outline, n8n, CI/CD" + comment = "Основной: Traefik, Forgejo, Plane, Docmost, n8n, CI/CD" os_id = 99 preset_id = 2453 @@ -11,15 +11,3 @@ resource "twc_server" "main" { ignore_changes = [is_root_password_required] } } - -resource "twc_server" "tools" { - name = "tools" - comment = "Мониторинг: Grafana, Prometheus, Loki, AlertManager, Uptime Kuma" - os_id = 99 - preset_id = 2449 - - lifecycle { - prevent_destroy = true - ignore_changes = [is_root_password_required] - } -} diff --git a/terraform/storage.tf b/terraform/storage.tf index ccf420c..fb615ca 100644 --- a/terraform/storage.tf +++ b/terraform/storage.tf @@ -1,7 +1,7 @@ # ── S3 Object Storage ───────────────────────────────────────────────────────── # Импортировано через: # terraform import twc_s3_bucket.backup 481333 -# terraform import twc_s3_bucket.outline 481335 +# terraform import twc_s3_bucket.docmost 481385 resource "twc_s3_bucket" "backup" { name = "walava-backup" @@ -15,8 +15,8 @@ resource "twc_s3_bucket" "backup" { } } -resource "twc_s3_bucket" "outline" { - name = "walava-outline" +resource "twc_s3_bucket" "docmost" { + name = "walava-docmost" type = "private" preset_id = 2669 diff --git a/terraform/terraform.tfstate.1774613804.backup b/terraform/terraform.tfstate.1774613804.backup new file mode 100644 index 0000000..ef9ae42 --- /dev/null +++ b/terraform/terraform.tfstate.1774613804.backup @@ -0,0 +1,177 @@ +{ + "version": 4, + "terraform_version": "1.5.7", + "serial": 19, + "lineage": "8a98c971-56a4-747f-b1c3-68a24dfeedb7", + "outputs": { + "main_ip": { + "value": "87.249.49.32", + "type": "string" + }, + "tools_ip": { + "value": "85.193.83.9", + "type": "string" + } + }, + "resources": [ + { + "mode": "managed", + "type": "twc_s3_bucket", + "name": "backup", + "provider": "provider[\"registry.terraform.io/timeweb-cloud/timeweb-cloud\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "access_key": "D716EO0P22RHAIT0AVZ4", + "configuration": [], + "configurator_id": 0, + "disk_stats": [ + { + "size": 10485760, + "used": 2756412.5 + } + ], + "full_name": "walava-backup", + "hostname": "https://s3.twcstorage.ru", + "id": "481333", + "location": "ru-1", + "name": null, + "object_amount": 49, + "preset_id": 2669, + "project_id": 2295431, + "secret_key": "sLku5YzLfXvV2BHj7Q7lWpmsgDkJYu7ACenUAyVl", + "status": "created", + "type": null + }, + "sensitive_attributes": [], + "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjAifQ==" + } + ] + }, + { + "mode": "managed", + "type": "twc_s3_bucket", + "name": "outline", + "provider": "provider[\"registry.terraform.io/timeweb-cloud/timeweb-cloud\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "access_key": "D716EO0P22RHAIT0AVZ4", + "configuration": [], + "configurator_id": 0, + "disk_stats": [ + { + "size": 10485760, + "used": 0 + } + ], + "full_name": "walava-outline", + "hostname": "https://s3.twcstorage.ru", + "id": "481335", + "location": "ru-1", + "name": null, + "object_amount": 0, + "preset_id": 2669, + "project_id": 2295431, + "secret_key": "sLku5YzLfXvV2BHj7Q7lWpmsgDkJYu7ACenUAyVl", + "status": "created", + "type": null + }, + "sensitive_attributes": [], + "private": "eyJzY2hlbWFfdmVyc2lvbiI6IjAifQ==" + } + ] + }, + { + "mode": "managed", + "type": "twc_server", + "name": "main", + "provider": "provider[\"registry.terraform.io/timeweb-cloud/timeweb-cloud\"]", + "instances": [ + { + "schema_version": 0, + "attributes": { + "availability_zone": "spb-3", + "avatar_id": "", + "bandwidth": null, + "boot_mode": "std", + "cloud_init": null, + "comment": "Основной: Traefik, Forgejo, Plane, Vaultwarden, Outline, n8n, CI/CD", + "configuration": [], + "configurator_id": 0, + "cpu": 2, + "cpu_frequency": "3.3", + "disks": [ + { + "id": 23660199, + "is_mounted": true, + "is_system": true, + "size": 51200, + "status": "done", + "system_name": "vda", + "type": "nvme", + "used": 28490 + } + ], + "floating_ip_id": null, + "hostname": null, + "id": "7004701", + "image_id": null, + "is_ddos_guard": false, + "is_root_password_required": true, + "local_network": [], + "location": "ru-1", + "main_ipv4": "87.249.49.32", + "name": "main", + "networks": [ + { + "bandwidth": 1000, + "ips": [ + { + "ip": "2a03:6f01:1:2::1:d115", + "is_main": true, + "ptr": "", + "type": "ipv6" + }, + { + "ip": "87.249.49.32", + "is_main": true, + "ptr": "mail.csrx.ru", + "type": "ipv4" + } + ], + "is_ddos_guard": false, + "nat_mode": "", + "type": "public" + } + ], + "os": [ + { + "id": 99, + "name": "ubuntu", + "version": "24.04" + } + ], + "os_id": 99, + "preset_id": 2453, + "project_id": 2295431, + "ram": 4096, + "root_pass": "u@jZ5CYd^.4K-v", + "software": [], + "software_id": null, + "source_server_id": null, + "ssh_keys_ids": null, + "start_at": "2026-03-26T21:26:32.000Z", + "status": "on", + "vnc_pass": "" + }, + "sensitive_attributes": [], + "private": "bnVsbA==" + } + ] + } + ], + "check_results": null +}