diff --git a/README.md b/README.md index e7a7d40..d51fa90 100644 --- a/README.md +++ b/README.md @@ -61,6 +61,9 @@ for example: ``` ssh -i ``` +### OS Images +Reference for OS images +[https://cloud.google.com/compute/docs/images/os-details](https://cloud.google.com/compute/docs/images/os-details) ## Providers diff --git a/examples/sles15/cloud-init.yaml.tpl b/examples/sles15/cloud-init.yaml.tpl new file mode 100644 index 0000000..cbd596e --- /dev/null +++ b/examples/sles15/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/sles15/main.tf b/examples/sles15/main.tf new file mode 100644 index 0000000..ca116b5 --- /dev/null +++ b/examples/sles15/main.tf @@ -0,0 +1,30 @@ +variable "project_id" {} +variable "location" {} + +locals { + cloud_init_template_path = "${path.cwd}/cloud-init.yaml.tpl" +} + +module "gcp-ampere-tau-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 = "sles15" + instance_prefix = "ampere-t2a-sles15" + startup_script_template_file = null + cloud_init_template_file = local.cloud_init_template_path +} + +output "gcp_ampere_tau_t2a_private_ips" { + value = module.gcp-ampere-tau-t2a.ampere_taut2a_private_ips +} +output "gcp_ampere_tau_t2a_public_ips" { + value = module.gcp-ampere-tau-t2a.ampere_taut2a_public_ips +}