# Required env vars: # SCW_ACCESS_KEY # SCW_SECRET_KEY # SCW_DEFAULT_ORGANIZATION_ID # SCW_DEFAULT_REGION # SCW_DEFAULT_ZONE provider "scaleway" {} variable "ssh_key_url" { type = string description = "URL of the ssh public key used for ssh access" } resource "scaleway_account_project" "project" { name = var.project_name } resource "scaleway_account_ssh_key" "default" { name = "default" public_key = data.http.ssh_key.response_body } data "http" "ssh_key" { url = var.ssh_key_url } resource "scaleway_instance_ip" "default" { type = "routed_ipv6" } resource "scaleway_instance_server" "default" { type = "STARDUST1-S" image = "debian_trixie" ip_ids = [scaleway_instance_ip.default.id] } resource "scaleway_billing_budget" "default" { consumption_limit = 100 # 100 Euro cents enabled = true } resource "scaleway_billing_budget_alert" "default" { budget_id = scaleway_billing_budget.default.id threshold = 100 } resource "scaleway_billing_budget_alert_notification" "default" { budget_alert_id = scaleway_billing_budget_alert.default.id email_addresses = [var.axiom_notification_email] }