mirror of
https://github.com/Dannecron/netology-devops.git
synced 2025-12-25 23:32:37 +03:00
homework 5.5: add task 2-3
This commit is contained in:
30
src/homework/05-virtualization/5.5/terraform/node04.tf
Normal file
30
src/homework/05-virtualization/5.5/terraform/node04.tf
Normal file
@@ -0,0 +1,30 @@
|
||||
resource "yandex_compute_instance" "node04" {
|
||||
name = "node04"
|
||||
zone = "ru-central1-a"
|
||||
hostname = "node04.netology.yc"
|
||||
allow_stopping_for_update = true
|
||||
|
||||
resources {
|
||||
cores = 4
|
||||
memory = 8
|
||||
}
|
||||
|
||||
boot_disk {
|
||||
initialize_params {
|
||||
image_id = "${var.centos-7-base}"
|
||||
name = "root-node04"
|
||||
type = "network-nvme"
|
||||
size = "40"
|
||||
}
|
||||
}
|
||||
|
||||
network_interface {
|
||||
subnet_id = "${yandex_vpc_subnet.default.id}"
|
||||
nat = true
|
||||
ip_address = "192.168.101.14"
|
||||
}
|
||||
|
||||
metadata = {
|
||||
ssh-keys = "centos:${file("~/.ssh/id_rsa.pub")}"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user