From 53c322e4614f648f4db9ad0211fa77fd6bfc4b1f Mon Sep 17 00:00:00 2001 From: QuanDinh99 Date: Tue, 2 Jun 2020 17:20:06 -0500 Subject: [PATCH] Fix typo and code --- docs/05-terraform.md | 4 ++-- docs/06-ansible.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/05-terraform.md b/docs/05-terraform.md index 5cb121f..e12600e 100644 --- a/docs/05-terraform.md +++ b/docs/05-terraform.md @@ -202,7 +202,7 @@ resource "google_compute_instance" "raddit" { } resource "google_compute_project_metadata" "raddit" { - metadata { + metadata = { ssh-keys = "raddit-user:${file("~/.ssh/raddit-user.pub")}" // path to ssh key file } } @@ -240,7 +240,7 @@ Create another configuration file inside `terraform` directory and call it `outp ``` output "raddit_public_ip" { - value = "${google_compute_instance.raddit.network_interface.0.access_config.0.assigned_nat_ip}" + value = "${google_compute_instance.raddit.network_interface.0.access_config.0.nat_ip}" } ``` diff --git a/docs/06-ansible.md b/docs/06-ansible.md index 726bf2d..8182f74 100644 --- a/docs/06-ansible.md +++ b/docs/06-ansible.md @@ -198,7 +198,7 @@ $ ansible-playbook deploy.yml Access the application in your browser by its public IP (don't forget to specify the port 9292) and make sure application has been deployed and is functional. -## Futher Learning Ansible +## Further Learning Ansible There's a whole lot to learn about Ansible. Try playing around with it more and create a `playbook` which provides the same system configuration as your `configuration.sh` script. Save it under the name `configuration.yml` inside the `ansible` folder, then use it inside [ansible provisioner](https://www.packer.io/docs/provisioners/ansible.html) instead of shell in your Packer template.