[MXS-2768] Investigate Teraform and Google cloud interaction Created: 2019-11-12  Updated: 2020-01-09  Resolved: 2020-01-07

Status: Closed
Project: MariaDB MaxScale
Component/s: test
Affects Version/s: None
Fix Version/s: N/A

Type: Task Priority: Major
Reporter: Timofey Turenko Assignee: Timofey Turenko
Resolution: Fixed Votes: 0
Labels: None

Sprint: MXS-SPRINT-94, MXS-SPRINT-95, MXS-SPRINT-96, MXS-SPRINT-97

 Comments   
Comment by Timofey Turenko [ 2019-12-16 ]

working config:

variable "gce_ssh_pub_key_file"

Unknown macro: { type = string default = "~/.ssh/id_rsa.pub" }

variable "account_file"

Unknown macro: { type = string default = "account.json" }

variable "project"

Unknown macro: { type = string default = "mariadb-maxscale-test" }

provider "google"

Unknown macro: { credentials = file(var.account_file) project = var.project region = "us-central1" zone = "us-central1-a" }

resource "google_compute_instance" "vm_instance" {
name = "my-terraform-instance"
machine_type = "f1-micro"

tags = ["iap"]

boot_disk {
initialize_params

Unknown macro: { image = "centos-cloud/centos-7" }

}

network_interface {
network = "default"
access_config {
}
}

metadata = {
ssh-keys = "timofey_turenko_mariadb_com:${file(var.gce_ssh_pub_key_file)}"
enable-oslogin = "FALSE"
}
}

output "ip" {
value = "${google_compute_instance.vm_instance.network_interface.0.access_config.0.nat_ip}"
}

Generated at Thu Feb 08 04:16:32 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.