Something went wrong. Try again.
A tool for managing custom bluesky feeds
Something went wrong. Try again.
1.5 kB · 75 lines
at main
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576variable "project_id" { type = string description = "The project ID"}
variable "dns_zone" { type = string description = "The DNS zone to host your record into"}
variable "hostname" { type = string description = "The hostname (not including dns_zone)"}
resource "scaleway_instance_ip" "public_ip" { project_id = var.project_id}
resource "scaleway_block_volume" "data" { project_id = var.project_id size_in_gb = 30 iops = 5000}
resource "scaleway_instance_security_group" "www" { project_id = var.project_id inbound_default_policy = "drop" stateful = true outbound_default_policy = "accept"
inbound_rule { action = "accept" port = "22" ip_range = "0.0.0.0/0" }
inbound_rule { action = "accept" port = "80" }
inbound_rule { action = "accept" port = "443" }}
resource "scaleway_instance_server" "web" { project_id = var.project_id type = "DEV1-M" image = "ubuntu_resolute"
ip_id = scaleway_instance_ip.public_ip.id
additional_volume_ids = [scaleway_block_volume.data.id]
root_volume { size_in_gb = 50 }
security_group_id = scaleway_instance_security_group.www.id}
resource "scaleway_domain_record" "www" { dns_zone = var.dns_zone name = var.hostname type = "A" data = scaleway_instance_ip.public_ip.address ttl = 60}
output "instance_ip" { value = scaleway_instance_ip.public_ip.address}