diff --git a/README.md b/README.md index 29a8a75..2e70bcf 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 @@ -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 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
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; } ``` 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; } ```