From 89c8ec68cac960729fb6755294e205bee63449a8 Mon Sep 17 00:00:00 2001 From: Udhav Date: Wed, 15 Sep 2021 03:48:31 -0700 Subject: [PATCH 1/5] Devops exercises : Adding 2 Terraform questions on import (#149) * Add terraform import question * Add how to use terraform import question * Add example on how to use terraform import question --- README.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/README.md b/README.md index 95d887e..31b8048 100644 --- a/README.md +++ b/README.md @@ -5583,6 +5583,35 @@ The Terraform Registry provides a centralized location for official and communit It is also common in the community to use a tool called terragrunt to explicitly inject variables between modules. +
+What is Terraform import?
+ +Terraform import is used to import existing infrastucture. It allows you to bring resources created by some other means (eg. manually launched cloud resources) and bring it under Terraform management. +
+ +
+How do you import existing resource using Terraform import?
+ +1. Identify which resource you want to import. +2. Write terraform code matching configuration of that resource. +3. Run terraform command terraform import RESOURCE ID
+ +eg. Let's say you want to import an aws instance. Then you'll perform following: +1. Identify that aws instance in console +2. Refer to it's configuration and write Terraform code which will look something like: +``` +resource "aws_instance" "tf_aws_instance" { + ami = data.aws_ami.ubuntu.id + instance_type = "t3.micro" + + tags = { + Name = "import-me" + } +} +``` +3. Run terraform command terraform import aws_instance.tf_aws_instance i-12345678 +
+ ## Containers ### Containers Exercises From 54ad724241bb842684831254132f8ef1af738030 Mon Sep 17 00:00:00 2001 From: Nilesh Londhe Date: Wed, 15 Sep 2021 03:48:49 -0700 Subject: [PATCH 2/5] Update fork_101.md (#150) --- exercises/os/fork_101.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/exercises/os/fork_101.md b/exercises/os/fork_101.md index 6aeaa7b..5dd612b 100644 --- a/exercises/os/fork_101.md +++ b/exercises/os/fork_101.md @@ -4,12 +4,12 @@ Answer the questions given the following program (without running it): ``` #include - +#include int main() { -fork(); -printf("\nyay\n"); -return 0; + fork(); + printf("\nyay\n"); + return 0; } ``` From ed85173a0b669483e35edddd87f605acfd58a851 Mon Sep 17 00:00:00 2001 From: Nilesh Londhe Date: Wed, 15 Sep 2021 03:49:07 -0700 Subject: [PATCH 3/5] Update fork_102.md (#151) This include is needed ``` #include ``` --- exercises/os/fork_102.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/exercises/os/fork_102.md b/exercises/os/fork_102.md index 6ad5408..c41dd6d 100644 --- a/exercises/os/fork_102.md +++ b/exercises/os/fork_102.md @@ -4,13 +4,14 @@ Answer the questions given the following program (without running it): ``` #include +#include int main() { -fork(); -fork(); -printf("\nyay\n"); -return 0; + fork(); + fork(); + printf("\nyay\n"); + return 0; } ``` From a1a1f366992a7fd981878926e25fbf37f7ef1f82 Mon Sep 17 00:00:00 2001 From: Anne Douwe Bouma Date: Fri, 17 Sep 2021 17:08:09 +0200 Subject: [PATCH 4/5] Use correct command for Ansible documentation (#155) Ansible modules are documented using the `ansible-doc` command. Not using the `ansible` command, this command executes the ad-hoc commands. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 31b8048..a43ad9a 100644 --- a/README.md +++ b/README.md @@ -4719,7 +4719,7 @@ additional check is implemented or explicit names are provided) while other tool How do you list all modules and how can you see details on a specific module?

1. Ansible online docs -2. `ansible-doc -l` for list of modules and `ansible [module_name]` for detailed information on a specific module +2. `ansible-doc -l` for list of modules and `ansible-doc [module_name]` for detailed information on a specific module #### Ansible - Inventory From 10643a0c69b3fcf148a296552bd1474bee080b71 Mon Sep 17 00:00:00 2001 From: abogolepov <47416231+abogolepov@users.noreply.github.com> Date: Thu, 23 Sep 2021 11:42:16 +0300 Subject: [PATCH 5/5] fix typo (#158) --- certificates/ckad.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/certificates/ckad.md b/certificates/ckad.md index 0326d8c..3336591 100644 --- a/certificates/ckad.md +++ b/certificates/ckad.md @@ -27,7 +27,7 @@ kubectl get ns
List all the pods in the namespace 'neverland'
-kubectl get ns -n neverland +kubectl get po -n neverland