Skip to content
Beside the Wheel
Search
Ctrl
K
Cancel
Email
GitHub
Select theme
Dark
Light
Auto
공부
(5)
spot 인스턴스에서 서버 가용성 개선하기
eBPF로 서버 성능 Profiling하는 법: Pyroscope의 구현 살펴보기
정수론부터 RSA까지
strace로 shaka-packager 버그 추적
Kubernetes The Hard Way
TIL
(956)
AI
(43)
DevOps
(230)
Network
(61)
OS
(155)
개발
(113)
데이터베이스
(64)
서버
(72)
수학
(20)
알고리즘
(24)
암호학
(32)
언어
(113)
컴퓨터구조
(5)
코드
(24)
독후감
(43)
과학
(1)
사회
(2)
산문
(3)
소설
(12)
인문
(11)
자기계발
(7)
철학
(7)
생각
(6)
고민
변화에 대하여
의식의 영역에 대하여
본질을 보려면
짧은 생각들
소유냐 존재냐
회고
(14)
2022.03-04 대덕소마고 입학소감/다짐
2022.05-08 프로젝트와 인간관계
2022.09-2023.02 불안과 판단
2023.03-07 DMS 리더 회고
2023.08-11 나는 누구인가?
2023.12 더 많은 걸 배우기 위한 경험
2024.01-02 회사 인턴 회고
2024.03-04 고3 근황
2024.05-07 고등학교 마무리
2024.08-12 첫 회사
2025.01-03 입출력
2025.03-08 효능감이란 무엇일까
2025.09-12 연말회고
2026.01-08 담론
Email
GitHub
Select theme
Dark
Light
Auto
태그: terraform
총 7개의 글이 있습니다.
aws 서버 네트워크 구축
terraform
2024. 3. 13.
1. 네트워크 구성 hcl resource "aws_vpc" "scenario_1_vpc" { cidr_block = "172.16.0.0/26" tags = { Name = "scenario-1-vpc" } } VPC는 AWS에서 다루는 네트워크의 기본단위이다. 사용자들이 앞으로 만들 서버와 인터넷을 통해 통신하기 위해선 네트워크 구축이 필요한데 가장 먼저 VPC를 만들어주어야 한다. cidr_block을 통해 어떤 ip 대역을 사용할지 결정한다. 보통 `10.0.0.0/8`, `172.16.0.0/16`, `192.168.0.0/24`의 private ip 대역을 사용하지만 공인 ip 대역 역시 사용이 가능하다. 다만 공인 ip 대역 사용시 인터넷을 통한 통신이 불가
Terraform
terraform
2024. 3. 13.
Terraform is an open source “Infrastructure as Code” tool, created by HashiCorp. A declarative coding tool, Terraform enables developers to use a high-level configuration language called HCL (HashiCorp Configuration Language) to describe the desired “end-state” cloud or on-premises infrastructure for running an application. It then generates a plan for reaching that end-state and executes the plan
Terraform import와 Terraforming
terraform
2024. 3. 13.
이미 사용하고 있는 인프라를 Terraform으로 가져오려면 import 명령어를 사용해야한다. The current implementation of Terraform import can only import resources into the state. It does not generate configuration. A future version of Terraform will also generate configuration. import 명령어를 사용하면 상태 파일에 기존 리소스의 상태가 적용된다. import는 아래와 같이 사용할 수 있다. bash $ terraform import {유형}.{이름} {식별자} $ terraform import aws_instance.web i-123456
Terraform taint
terraform
2024. 3. 13.
terraform taint는 특정 리소스를 "tainted" 상태로 표시하여, 다음 terraform apply 때 해당 리소스를 강제로 다시 만들게 한다. 특정 리소스를 교체해서 테스트하거나 디버깅해보고 싶을때 taint를 이용할 수 있다. 예제 igw에 장애가 있다고 가정해보자. 우선 `tf state list`를 통해 state 목록을 출력한다. bash $ tf state list module.route_table__private.aws_resourcegroups_group.this[0] module.route_table__private.aws_route_table.this module.route_table__private.aws_route_table_association.subnets
Terraform with AWS
terraform
2024. 3. 13.
AWS Provider로 간단한 인프라를 구성해보자. 우선 AWS IAM에 가서 Terraform이 사용할 계정을 만들고, 사용할 서비스 VPC, EC2에 대한 권한을 부여한다. 생성된 계정에 할당된 access key와 secret key로 다음과 같은 aws.tf 파일을 생성한다. hcl provider "aws" { access_key = "ACCESS-KEY" secret_key = "SECRET-KEY" region = "ap-northeast-2" } 이제 AWS 리소스를 정의할 때 이 파일을 이용하게 된다. Terraform을 사용하면 API Gateway, App Autoscaleing, CloudFomation, CloudFront, CloudWatch
Terraform 키워드
terraform
2024. 3. 13.
resource는 테라폼에서 가장 중요한 요소이다. resource 블록은 하나 이상의 인프라스트럭처의 오브젝트를 기술한다. 아래는 providers로 AWS를 사용하고 있을 때 인스턴스를 사용하는 예제이다. hcl resource "aws_instance" "web" { ami = "ami-a1b2c3d4" instance_type = "t2.micro" } 위에 첫 번째 라인을 살펴보면 resource 옆에 첫 번째 자리는 리소스 타입으로 “aws_instance”를 써주고 두 번째 자리에는 “web”을 적어줬다. 리소스 타입은 사전에 정의된 AWS 리소스 이름이다. 여기서 “aws_instance”는 인스턴스를 나타내고 있다. aws라는 프로바이더 정보를 pre
Terratest
terraform
2024. 3. 13.
Terratest has a pretty simple premise. It is ans open-source testing framework created by Terragrunt the includes helper functions for testing terraform code by providing a simple, reusable, and easy-to-use interface for creating and running automated tests on cloud resources. It's able to apply terraform code, provision the resources, run the test cases, and then destroy everything. Terratest is