diff --git a/instance-scripts/cloud-init.yml b/instance-scripts/cloud-init.yml index fc615af79baaa305a20a3e000b716eae378486e7..3ed0a8a2519c28cfc2e11fbc598c77cc7e44d402 100644 --- a/instance-scripts/cloud-init.yml +++ b/instance-scripts/cloud-init.yml @@ -85,4 +85,4 @@ runcmd: # # Run Webtop Container # - - "docker run -d --name=webtop --security-opt seccomp=unconfined -e PIAUSER=user -e PIAPASS=$(scw-userdata user_password) -e PUID=0 -e PGID=0 -e TZ=Europe/Paris -e SUBFOLDER=/ -e KEYBOARD=fr-fr-azerty -e AUTO_LOGIN=false -p 8081:3000 -v /root/webtop_data/:/config -v /var/run/docker.sock:/var/run/docker.sock --shm-size=8gb --cap-add=NET_ADMIN --privileged --restart unless-stopped --sysctl net.ipv6.conf.all.disable_ipv6=0 lscr.io/linuxserver/webtop:ubuntu-xfce" + - "docker run -d --name=webtop --security-opt seccomp=unconfined -e PUID=0 -e PGID=0 -e TZ=Europe/Paris -e SUBFOLDER=/ -e KEYBOARD=fr-fr-azerty -e AUTO_LOGIN=false -p 8081:3000 -v /root/webtop_data/:/config -v /var/run/docker.sock:/var/run/docker.sock --shm-size=8gb --cap-add=NET_ADMIN --privileged --restart unless-stopped --sysctl net.ipv6.conf.all.disable_ipv6=0 lscr.io/linuxserver/webtop:ubuntu-xfce" diff --git a/terraform/main.tf b/terraform/main.tf index 1d2eab3f53b1b5fd845f9d08a1af15553b3bcfd9..faac9c21d98679bd7c7a4e62fab78b171f14965b 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -14,7 +14,7 @@ resource "scaleway_instance_ip" "public_ip" { resource "scaleway_domain_record" "subdomain_record" { count = var.INSTANCES_COUNT dns_zone = "daag.alpha.grandlyon.com" - name = "lab-${count.index}-${var.ENVIRONMENT}" + name = "${count.index}-${var.ENVIRONMENT}" type = "A" data = scaleway_instance_ip.public_ip[count.index].address ttl = 3600 @@ -23,7 +23,7 @@ resource "scaleway_domain_record" "subdomain_record" { resource "scaleway_domain_record" "host_subdomain_record" { count = var.INSTANCES_COUNT dns_zone = "daag.alpha.grandlyon.com" - name = "*.lab-${count.index}-${var.ENVIRONMENT}" + name = "*.${count.index}-${var.ENVIRONMENT}" type = "A" data = scaleway_instance_ip.public_ip[count.index].address ttl = 3600 @@ -35,7 +35,7 @@ resource "scaleway_domain_record" "host_subdomain_record" { resource "scaleway_instance_security_group" "www" { project_id = var.SCW_PROJECT_ID - name = "security-group-lab-${var.ENVIRONMENT}" + name = "security-group-${var.ENVIRONMENT}" inbound_default_policy = "drop" outbound_default_policy = "accept" @@ -44,6 +44,11 @@ resource "scaleway_instance_security_group" "www" { port = "443" } + inbound_rule { + action = "accept" + port = "22" + } + } ############################## @@ -53,7 +58,7 @@ resource "scaleway_instance_security_group" "www" { resource "scaleway_instance_server" "user_instance_server" { count = var.INSTANCES_COUNT project_id = var.SCW_PROJECT_ID - name = "instance-${count.index}-lab-${var.ENVIRONMENT}" + name = "instance${count.index}-${var.ENVIRONMENT}" type = "DEV1-L" image = "ubuntu_jammy" ip_id = scaleway_instance_ip.public_ip[count.index].id