diff --git a/examples/opensuse/cloud-init.yaml.tpl b/examples/opensuse/cloud-init.yaml.tpl new file mode 100644 index 0000000..cbd596e --- /dev/null +++ b/examples/opensuse/cloud-init.yaml.tpl @@ -0,0 +1,18 @@ +#cloud-config + +package_update: true +package_upgrade: true + +packages: + - tmux + - rsync + - git + +groups: + - docker +system_info: + default_user: + groups: [docker] + +runcmd: + - echo 'Ampere T2A SLES 15 Example' >> /etc/motd diff --git a/examples/opensuse/main.tf b/examples/opensuse/main.tf new file mode 100644 index 0000000..87cea54 --- /dev/null +++ b/examples/opensuse/main.tf @@ -0,0 +1,31 @@ +variable "project_id" {} +variable "location" {} + +locals { + cloud_init_template_path = "${path.cwd}/cloud-init.yaml.tpl" +} + +module "ampere-t2a" { + source = "github.com/amperecomputing/terraform-gcp-ampere-tau-t2a" + project_id = var.project_id + # Optional + # virtual_network_name = var.virtual_network_name + # address_space = var.address_space + # subnet_prefix = var.subnet_prefix + location = "US" + region = "us-central1" + zone = "us-central1-a" + gcp_vm_count = 1 + gcp_os_image = "opensuse" + instance_prefix = "ampere-t2a-openseuse-leap" + startup_script_template_file = null + cloud_init_template_file = local.cloud_init_template_path +} + +output "ampere_t2a_private_ips" { + value = module.ampere-t2a.ampere_t2a_private_ips +} +output "ampere_t2a_public_ips" { + value = module.ampere-t2a.ampere_t2a_public_ips +} +~ diff --git a/images.tf b/images.tf index 329a94f..db0c034 100644 --- a/images.tf +++ b/images.tf @@ -51,7 +51,6 @@ locals { default_os_user = "opensuse" startup_script = null } - } sles15 = { os_image = "sles-15-arm64" default_os_user = "suse"