You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: KR_exercises/exercise15-ec2_instance_size_volume.md
+11-11Lines changed: 11 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,20 +2,20 @@
2
2
3
3
## Introduction
4
4
5
-
In this exercise, we will guide you through customizing the size and volume data of an EC2 instance. You will learn how to define variables for the EC2 instance type, add validation to these variables, and create additional variables for volume type and size. With these skills, you'll be able to create an EC2 instance that efficiently utilizes its resources according to your specifications.
5
+
이 연습에서는 EC2 인스턴스의 크기와 볼륨 데이터를 사용자 정의하는 과정을 안내합니다. EC2 인스턴스 유형에 대한 변수를 정의하고, 이러한 변수에 유효성 검사를 추가하고, 볼륨 유형 및 크기에 대한 추가 변수를 생성하는 방법을 배우게 됩니다. 이러한 기술을 익히면 사양에 따라 리소스를 효율적으로 활용하는 EC2 인스턴스를 생성할 수 있습니다.
6
6
7
7
## Desired Outcome
8
8
9
-
If you wish to give it a shot before looking into the detailed step-by-step and the solution videos, here is an overview of what the created solution should deploy:
9
+
자세한 단계별 내용과 솔루션 동영상을 살펴보기 전에 한 번 사용해 보고 싶다면 생성된 솔루션이 배포해야 하는 내용을 간략하게 살펴보세요:
10
10
11
-
1.Create a variable named`ec2_instance_type` that specifies the type of the EC2 instance. This variable should be of type string and default to `t2.micro`.
12
-
2.Add validation to the instance type variable to ensure that the instance type is either `t2.micro`or`t3.micro`. If a different value is used, Terraform should return an error message stating that “Only t2.micro and t3.micro instances are supported”.
13
-
3.Create two additional variables to receive both the EC2 volume type and volume size. These variables should have the correct types, sensible defaults, and relevant descriptions.
14
-
4.Create an EC2 instance that leverages the variables we have created. This instance should retrieve the AMI ID via a data source and use the previously defined variables for the instance type and the root block device settings.
11
+
1.EC2 인스턴스의 유형을 지정하는`ec2_instance_type`이라는 변수를 생성합니다. 이 변수는 문자열 유형이어야 하며 기본값은 `t2.micro`입니다.
12
+
2.인스턴스 유형 변수에 유효성 검사를 추가하여 인스턴스 유형이 `t2.micro`또는`t3.micro`인지 확인합니다. 다른 값을 사용하면 Terraform은 "t2.micro 및 t3.micro 인스턴스만 지원됩니다"라는 오류 메시지를 반환해야 합니다.
13
+
3.EC2 볼륨 유형과 볼륨 크기를 모두 받기 위해 두 개의 변수를 추가로 생성합니다. 이 변수에는 올바른 유형, 합리적인 기본값 및 관련 설명이 있어야 합니다.
14
+
4.생성한 변수를 활용하는 EC2 인스턴스를 생성합니다. 이 인스턴스는 데이터 소스를 통해 AMI ID를 검색하고 인스턴스 유형 및 루트 블록 장치 설정에 대해 이전에 정의한 변수를 사용해야 합니다.
15
15
16
16
## Step-by-Step Guide
17
17
18
-
1.Define a `variable "ec2_instance_type"` that specifies the type of the EC2 instance. Set its type to `string` and its default to `"t2.micro"`. Also add a helpful description.
18
+
1.EC2 인스턴스의 유형을 지정하는 `variable "ec2_instance_type"`을 정의합니다. 유형을 `string`으로 설정하고 기본값은 `"t2.micro"`로 설정합니다. 또한 유용한 설명을 추가합니다.
19
19
20
20
```
21
21
variable "ec2_instance_type" {
@@ -25,7 +25,7 @@ If you wish to give it a shot before looking into the detailed step-by-step and
25
25
}
26
26
```
27
27
28
-
2. Add validation to the instance type variable: Add a `validation` block within the variable to ensure that the instance type is either `t2.micro` or `t3.micro`. If a different value is used, Terraform should return an error message stating that “Only t2.micro and t3.micro instances are supported”. This helps maintain the consistency and integrity of the infrastructure.
28
+
2. 인스턴스 유형 변수에 유효성 검사를 추가합니다: 인스턴스 유형이 `t2.micro` 또는 `t3.micro`인지 확인하기 위해 변수 내에 `validation` 블록을 추가합니다. 다른 값을 사용하면 Terraform은 "t2.micro 및 t3.micro 인스턴스만 지원됩니다"라는 오류 메시지를 반환해야 합니다. 이는 인프라의 일관성과 무결성을 유지하는 데 도움이 됩니다.
29
29
30
30
```
31
31
variable "ec2_instance_type" {
@@ -40,7 +40,7 @@ If you wish to give it a shot before looking into the detailed step-by-step and
40
40
}
41
41
```
42
42
43
-
3. Add two more variables to receive both the ec2 volume type and volume size. Use the correct type, set sensible defaults, and add a relevant description.
43
+
3. ec2 볼륨 유형과 볼륨 크기를 모두 받으려면 변수를 두 개 더 추가합니다. 올바른 유형을 사용하고, 합리적인 기본값을 설정하고, 관련 설명을 추가하세요.
44
44
45
45
```
46
46
variable "ec2_volume_type" {
@@ -56,7 +56,7 @@ If you wish to give it a shot before looking into the detailed step-by-step and
56
56
}
57
57
```
58
58
59
-
4. Create an EC2 instance that leverages the variables we have created. Retrieve the AMI ID via a data source. It uses the previously defined variables for the instance type and the root block device settings. This means that the type and root block device of the instance can be easily customized by adjusting the variables.
59
+
4. 생성한 변수를 활용하는 EC2 인스턴스를 생성합니다. 데이터 소스를 통해 AMI ID를 검색합니다. 인스턴스 유형과 루트 블록 디바이스 설정에 앞서 정의한 변수를 사용합니다. 즉, 변수를 조정하여 인스턴스의 유형과 루트 블록 장치를 쉽게 사용자 정의할 수 있습니다.
60
60
61
61
```
62
62
resource "aws_instance" "compute" {
@@ -73,4 +73,4 @@ If you wish to give it a shot before looking into the detailed step-by-step and
73
73
74
74
## Congratulations on Completing the Exercise!
75
75
76
-
Great job on completing this exercise! Keep practicing and applying these concepts to deepen your understanding and mastery of these skills. Keep up the good work!
76
+
이 연습을 완료해 주셔서 감사합니다! 이러한 개념을 계속 연습하고 적용하여 이러한 기술에 대한 이해와 숙달을 심화하세요. 계속 노력하세요!
Copy file name to clipboardExpand all lines: KR_exercises/exercise16-objects_volume_configuration.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,20 @@
1
-
# Using Objects for Volume Configuration
1
+
# 볼륨 구성에 오브젝트 사용
2
2
3
3
## Introduction
4
4
5
-
In this exercise, we will delve into the use of objects for volume configuration in EC2 instances. This concept allows us to encapsulate related configuration details into a single, more manageable entity. We will also explore how to incorporate additional tags to an EC2 instance, providing us with more flexibility in managing our AWS resources. This exercise will help reinforce your understanding of Terraform variables and resources, and how they can be used to create more efficient and flexible configurations.
5
+
이 연습에서는 EC2 인스턴스에서 볼륨 구성을 위한 객체 사용에 대해 살펴보겠습니다. 이 개념을 사용하면 관련 구성 세부 정보를 보다 관리하기 쉬운 단일 엔티티로 캡슐화할 수 있습니다. 또한 EC2 인스턴스에 추가 태그를 통합하여 AWS 리소스를 보다 유연하게 관리하는 방법도 살펴봅니다. 이 실습을 통해 Terraform 변수와 리소스에 대한 이해를 강화하고, 이를 사용하여 보다 효율적이고 유연한 구성을 만드는 방법을 배울 수 있습니다.
6
6
7
7
## Desired Outcome
8
8
9
-
If you wish to give it a shot before looking into the detailed step-by-step and the solution videos, here is an overview of what the created solution should deploy:
9
+
자세한 단계별 내용과 솔루션 동영상을 살펴보기 전에 한 번 사용해 보고 싶다면 생성된 솔루션이 배포해야 하는 내용을 간략하게 살펴보세요:
10
10
11
-
1.Create a variable `ec2_volume_config`, which contains the volume type and volume type of the root block device for the EC2 instance.
12
-
2.Create a variable `additional_tags`, which allows the user to define additional tags to the EC2 instance.
13
-
3.Update the EC2 instance configuration to leverage the new variables.
11
+
1.EC2 인스턴스에 대한 루트 블록 디바이스의 볼륨 유형과 볼륨 유형이 포함된 변수 `ec2_volume_config`를 생성합니다.
12
+
2.사용자가 EC2 인스턴스에 추가 태그를 정의할 수 있는 `additional_tags` 변수를 생성합니다.
13
+
3.새 변수를 활용하도록 EC2 인스턴스 구성을 업데이트합니다.
14
14
15
15
## Step-by-Step Guide
16
16
17
-
1.Migrate from using the `ec2_volume_type`and`ec2_volume_size`variables to using a single`ec2_volume_config`variable, which is of type `object`. Set sensible defaults and add a helpful description to the new variable.
17
+
1.`ec2_volume_type`및`ec2_volume_size`변수 사용에서 `object` 유형인 단일`ec2_volume_config`변수 사용으로 마이그레이션합니다. 합리적인 기본값을 설정하고 새 변수에 유용한 설명을 추가합니다.
18
18
19
19
```
20
20
variable "ec2_volume_config" {
@@ -31,7 +31,7 @@ If you wish to give it a shot before looking into the detailed step-by-step and
31
31
}
32
32
```
33
33
34
-
2. Add a new `additional_tags` variable, which is of type `map` of strings and is empty by default. This will allow us to add more tags to our resources if needed.
34
+
2. 문자열의 `map` 유형이며 기본적으로 비어 있는 새 `additional_tags` 변수를 추가합니다. 이렇게 하면 필요한 경우 리소스에 태그를 더 추가할 수 있습니다.
35
35
36
36
```
37
37
variable "additional_tags" {
@@ -40,7 +40,7 @@ If you wish to give it a shot before looking into the detailed step-by-step and
40
40
}
41
41
```
42
42
43
-
3. Migrate the EC2 instance resource to use the new variables.
43
+
3. 새 변수를 사용하도록 EC2 인스턴스 리소스를 마이그레이션합니다.
44
44
45
45
```
46
46
resource "aws_instance" "compute" {
@@ -61,4 +61,4 @@ If you wish to give it a shot before looking into the detailed step-by-step and
61
61
62
62
## Congratulations on Completing the Exercise!
63
63
64
-
Great job on completing this exercise! You have successfully learned how to use variables of type `object` and `map`. Keep up the good work!
64
+
이 연습을 완료해 주셔서 감사합니다! `object` 및 `map` 유형의 변수를 사용하는 방법을 성공적으로 배웠습니다. 계속 열심히 공부하세요!
Copy file name to clipboardExpand all lines: KR_exercises/exercise17-tfvars.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,20 +1,20 @@
1
-
# Working with `tfvars`
1
+
# `tfvars`로 작업하기
2
2
3
3
## Introduction
4
4
5
-
In this exercise, we'll explore how to use `.tfvars`files in Terraform to manage and apply variable configurations. We'll be creating files that contain variable configurations and then loading them into our Terraform plan. This is a great way to manage different environments or stages in your infrastructure setup. The entire exercise should give you a hands-on experience of working with `terraform.tfvars`files and how they can be used effectively to manage configurations.
5
+
이 연습에서는 Terraform에서 `.tfvars`파일을 사용하여 변수 구성을 관리하고 적용하는 방법을 살펴보겠습니다. 변수 구성이 포함된 파일을 만든 다음 이를 Terraform 플랜에 로드하겠습니다. 이는 인프라 설정에서 다양한 환경이나 단계를 관리할 수 있는 좋은 방법입니다. 전체 연습을 통해 `terraform.tfvars`파일로 작업하는 방법을 직접 경험하고 구성을 관리하는 데 효과적으로 사용할 수 있습니다.
6
6
7
7
## Desired Outcome
8
8
9
-
If you wish to give it a shot before looking into the detailed step-by-step and the solution videos, here is an overview of what the created solution should deploy:
9
+
자세한 단계별 내용과 솔루션 동영상을 살펴보기 전에 한 번 사용해 보고 싶다면 생성된 솔루션이 배포해야 하는 내용을 간략하게 살펴보세요:
10
10
11
-
1.Create a `terraform.tfvars`file that contains configurations suitable for our defined variables.
12
-
2.Rename the file to `dev.terraform.tfvars`, and check what happens when running Terraform commands.
13
-
3.Create a new`prod.terraform.tfvars`file with different variable values should be created. We should be able to test loading this file into the Terraform plan and apply commands.
11
+
1.정의된 변수에 적합한 구성이 포함된 `terraform.tfvars`파일을 생성합니다.
12
+
2.파일 이름을 `dev.terraform.tfvars`로 변경하고 Terraform 명령을 실행할 때 어떤 일이 발생하는지 확인합니다.
13
+
3.다른 변수 값으로`prod.terraform.tfvars`파일을 새로 생성합니다. 이 파일을 Terraform 플랜에 로드하고 명령을 적용하는 것을 테스트할 수 있어야 합니다.
14
14
15
15
## Step-by-Step Guide
16
16
17
-
1.Create a `terraform.tfvars`file with sensible values for the variables we have defined so far. It’s important that the file is called `terraform.tfvars`, since Terraform automatically looks for this file.
17
+
1.지금까지 정의한 변수에 대한 적절한 값으로 `terraform.tfvars`파일을 생성합니다. 테라폼이 이 파일을 자동으로 찾기 때문에 파일 이름을 `terraform.tfvars`로 지정하는 것이 중요합니다.
18
18
19
19
```
20
20
ec2_instance_type = "t2.micro"
@@ -29,9 +29,9 @@ If you wish to give it a shot before looking into the detailed step-by-step and
29
29
}
30
30
```
31
31
32
-
2. Run the `terraform plan` and `terraform apply` commands to make sure Terraform is correctly loading the values from the `terraform.tfvars` file.
33
-
3. Now rename the file to `dev.terraform.tfvars` and re-run the `terraform plan` and `terraform apply` commands. Is Terraform able to load the values? Terraform does not automatically load `.tfvars` files with other names, but you can pass the `.tfvars` file to the `terraform plan` and `terraform apply` commands using the `-var-file=<filename>` option.
34
-
4. Create a new `prod.terraform.tfvars` file. Set different values for the variables, and test how we can load this file into the `terraform plan` and `terraform apply` commands. Do not apply the configuration below, since it falls outside the free tier!
32
+
2. `terraform plan` 및 `terraform apply` 명령을 실행하여 Terraform이 `terraform.tfvars` 파일에서 값을 올바르게 로드하는지 확인합니다.
33
+
3. 이제 파일 이름을 `dev.terraform.tfvars`로 바꾸고 `terraform plan` 및 `terraform apply` 명령을 다시 실행합니다. Terraform이 값을 로드할 수 있나요? Terraform은 다른 이름의 `.tfvars` 파일을 자동으로 로드하지는 않지만 `-var-file=<파일 이름>` 옵션을 사용하여 `.tfvars` 파일을 `terraform plan` 및 `terraform apply` 명령에 전달할 수 있습니다.
34
+
4. 새 `prod.terraform.tfvars` 파일을 생성합니다. 변수에 대해 다른 값을 설정하고 이 파일을 `terraform plan` 및 `terraform apply` 명령에 로드하는 방법을 테스트합니다. 아래 구성은 무료 티어를 벗어나므로 적용하지 마세요!
35
35
36
36
```
37
37
ec2_instance_type = "t3.large"
@@ -46,8 +46,8 @@ If you wish to give it a shot before looking into the detailed step-by-step and
46
46
}
47
47
```
48
48
49
-
5. Make sure to destroy the resources after you complete all the steps!
49
+
5. 모든 단계를 완료한 후에는 리소스를 반드시 파기하세요!
50
50
51
51
## Congratulations on Completing the Exercise!
52
52
53
-
Congratulations on completing this exercise! You have learned how to use `.tfvars` files in Terraform to manage and apply variable configurations. Keep practicing and continue to enhance your Terraform skills!
53
+
이 연습을 완료한 것을 축하합니다! 여러분은 Terraform에서 `.tfvars` 파일을 사용하여 변수 구성을 관리하고 적용하는 방법을 배웠습니다. 계속 연습하여 여러분의 Terraform 기술을 계속 향상시키세요!
0 commit comments