Skip to content

Commit

Permalink
Changes bastion image to centos
Browse files Browse the repository at this point in the history
  • Loading branch information
jlerche committed Aug 6, 2019
1 parent 7480cdd commit c801a64
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions deploy/modules/gcp/bastion/bastion.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,16 @@ resource "google_compute_instance" "bastion" {

boot_disk {
initialize_params {
image = "ubuntu-os-cloud/ubuntu-1804-lts"
image = data.google_compute_image.bastion_image.self_link
}
}

network_interface {
subnetwork = var.public_subnet_name
access_config {}
}

tags = ["bastion"]

metadata_startup_script = "sudo apt-get install -y mysql-client && curl -s https://packagecloud.io/install/repositories/akopytov/sysbench/script.deb.sh | bash && sudo apt-get -y install sysbench"
metadata_startup_script = "sudo yum install -y mysql && curl -s https://packagecloud.io/install/repositories/akopytov/sysbench/script.rpm.sh | sudo bash && sudo yum -y install sysbench"
}
4 changes: 4 additions & 0 deletions deploy/modules/gcp/bastion/data.tf
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
data "google_compute_zones" "available" {}
data "google_compute_image" "bastion_image" {
family = "centos-7"
project = "centos-cloud"
}

0 comments on commit c801a64

Please sign in to comment.