diff --git a/packer/packer.json b/packer/packer.json new file mode 100644 index 0000000..6191ba6 --- /dev/null +++ b/packer/packer.json @@ -0,0 +1,27 @@ +{ + "builders": [ + { + "type": "googlecompute", + "account_file": "/stemn/credentials/development-environment.json", + "source_image_family": "ubuntu-minimal-1810", + "project_id": "stemnapp", + "zone": "australia-southeast1-a", + "instance_name": "packer-development-environment-{{timestamp}}", + "image_name": "development-environment", + "ssh_username": "root" + } + ], + "provisioners": [ + { + "type": "file", + "source": "../docker/scripts/bootstrap.sh", + "destination": "/bootstrap.sh" + }, + { + "type": "shell", + "inline": [ + "/bootstrap.sh" + ] + } + ] +} diff --git a/terraform/desktop-environment.tf b/terraform/desktop-environment.tf index 4b9b1ad..d787d37 100644 --- a/terraform/desktop-environment.tf +++ b/terraform/desktop-environment.tf @@ -21,7 +21,7 @@ resource "google_compute_instance" "desktop-environment" { boot_disk { initialize_params { - image = "ubuntu-minimal-1810" + image = "stemnapp/desktop-environment" type = "pd-ssd" size = "80" }