From c7972a0a98c9cc40adaca2e18780839436fc5de5 Mon Sep 17 00:00:00 2001 From: Slava Semushin Date: Sun, 1 Dec 2024 21:59:02 +0700 Subject: [PATCH] chore: allow to provision a new server without hardcoded and outdated Ubuntu version [skip ci] --- infra/terraform/my-stamps.tf | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/infra/terraform/my-stamps.tf b/infra/terraform/my-stamps.tf index 3a701b2ff..86742b4fb 100644 --- a/infra/terraform/my-stamps.tf +++ b/infra/terraform/my-stamps.tf @@ -25,11 +25,14 @@ provider "digitalocean" { # Droplet docs: https://registry.terraform.io/providers/digitalocean/digitalocean/2.28.1/docs/resources/droplet.html resource "digitalocean_droplet" "web" { - # "ubuntu-16-04-x64" resolves into Ubuntu 16.04.6 while our server is based on Ubuntu 16.04.1 - image = "18572320" + image = "ubuntu-24-04-x64" name = "my-stamps.ru" region = "fra1" size = "s-1vcpu-1gb" + # https://developer.hashicorp.com/terraform/language/meta-arguments/lifecycle + lifecycle { + ignore_changes = [image] + } } # Domain docs: https://registry.terraform.io/providers/digitalocean/digitalocean/2.28.1/docs/resources/domain.html