Skip to content

AmpereComputing/terraform-gcp-ampere-t2a

Repository files navigation

Ampere Computing

terraform-gcp-ampere-t2a

Source Code documentation workflow Latest version pages-build-deployment GitHub issues Github stars Github last-commit GitHub forks Github forks GitHub License GitHub deployments Website GitHub License License

Requirements

What exactly is Terraform doing

The goal of this code is to supply the minimal ammount of information to quickly have working Ampere Tau2a instances on Google Cloud.

Addtional tasks performed by this code:

  • Dynamically creating sshkeys to use when logging into the instance.
  • Dynamically getting region, availability zone and image id..
  • Creating necessary core networking configurations for the tenancy
  • Rendering metadata to pass into the Ampere A1 instance.
  • Launch multiple Ampere taut2a instances with metadata and ssh keys.
  • Output IP information to connect to the instance.

To get started clone this repository from GitHub locally.

Configuration with terraform.tfvars

The easiest way to configure is to use a terraform.tfvars in the project directory. Please note that Compartment OCID are the same as Tenancy OCID for Root Compartment. The following is an example of what terraform.tfvars should look like:

project_id = "myterraform-123456"
location = "US"

Using as a Module

This can also be used as a terraform module. The examples directory contains example code for module usage showing different operating systems booting with a custom cloud-init templates. Doing a clone of this repository and changing directory to one of the examples, placing a terraform.tfvars into that directory, and running a typical terrafornm workflow will produce a working virtual machine in the os that was specified in the main.tf that is located within the chosen example directory.

Running Terraform

terraform init && terraform plan && terraform apply -auto-approve

Running OpenTofu

tofu init && tofu plan && tofu apply -auto-approve

Logging in

Once everthing as executed, properly you'll need to login. Currently I successfully login via my google cloud email account in the following format. Where the "@" symbal and "." are replaces with underscores.

for example:

ssh -i

OS Images

Reference for OS images https://cloud.google.com/compute/docs/images/os-details

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •