Merge branch 'master' of github.com:bregman-arie/devops-exercises
This commit is contained in:
commit
8a510bb304
31
README.md
31
README.md
@ -4719,7 +4719,7 @@ additional check is implemented or explicit names are provided) while other tool
|
||||
<summary>How do you list all modules and how can you see details on a specific module?</summary><br><br>
|
||||
|
||||
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
|
||||
</b></details>
|
||||
|
||||
#### 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 <code>terragrunt</code> to explicitly inject variables between modules.
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>What is Terraform import?</summary><br><b>
|
||||
|
||||
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.
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>How do you import existing resource using Terraform import?</summary><br><b>
|
||||
|
||||
1. Identify which resource you want to import.
|
||||
2. Write terraform code matching configuration of that resource.
|
||||
3. Run terraform command <code>terraform import RESOURCE ID</code><br>
|
||||
|
||||
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 <code>terraform import aws_instance.tf_aws_instance i-12345678</code>
|
||||
</b></details>
|
||||
|
||||
## Containers
|
||||
|
||||
### Containers Exercises
|
||||
|
@ -27,7 +27,7 @@ kubectl get ns
|
||||
<details>
|
||||
<summary>List all the pods in the namespace 'neverland'</code></summary><br><b>
|
||||
|
||||
kubectl get ns -n neverland
|
||||
kubectl get po -n neverland
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
|
@ -4,12 +4,12 @@ Answer the questions given the following program (without running it):
|
||||
|
||||
```
|
||||
#include<stdio.h>
|
||||
|
||||
#include <unistd.h>
|
||||
int main()
|
||||
{
|
||||
fork();
|
||||
printf("\nyay\n");
|
||||
return 0;
|
||||
fork();
|
||||
printf("\nyay\n");
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -4,13 +4,14 @@ Answer the questions given the following program (without running it):
|
||||
|
||||
```
|
||||
#include<stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
fork();
|
||||
fork();
|
||||
printf("\nyay\n");
|
||||
return 0;
|
||||
fork();
|
||||
fork();
|
||||
printf("\nyay\n");
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user