전체 글 204

[AWS Terraform 기초]10. 라우팅 테이블과 서브넷 연결(private)

1. Terraform Docs 예시 https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route_table_association Terraform Registry registry.terraform.io 예시: 인수: 2. Terraform 코드 작성 # 09_natrtass.tf resource "aws_route_table_association" "pmh_natrtassa" { subnet_id = aws_subnet.pmh_wasa.id route_table_id = aws_route_table.pmh_natgwrt.id } resource "aws_route_table_association" "pmh_natrta..

AWS/Terraform 2023.07.11

[AWS Terraform 기초]9. NAT Gateway Route Table 생성

1. Terraform Docs 예시 https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route_table Terraform Registry registry.terraform.io 예시: 인수: 2. Terraform 코드 작성 # 08_natgwrt.tf resource "aws_route_table" "pmh_natgwrt" { vpc_id = aws_vpc.pmh_vpc.id route { cidr_block = "0.0.0.0/0" gateway_id = aws_nat_gateway.pmh_natgw.id } tags = { Name = "pmh-natgwrt" } } resource "aws_route_tab..

AWS/Terraform 2023.07.11

[AWS Terraform 기초]7. 라우팅 테이블과 서브넷 연결(public)

1. Terraform Docs 예시 https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/route_table_association Terraform Registry registry.terraform.io 예시: 인수: 2. Terraform 코드 작성 # 06_rtass.tf resource "aws_route_table_association" "pmh_rtassa" { subnet_id = aws_subnet.pmh_puba.id route_table_id = aws_route_table.pmh_rt.id } resource "aws_route_table_association" "pmh_rtassc" { subnet_..

AWS/Terraform 2023.07.11

[AWS Terraform 기초]5. Internet Gateway 생성

1. Terraform Docs 예시 https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/internet_gateway Terraform Registry registry.terraform.io 예시: 인수: 2. Terraform 코드 작성 # 04_ig.tf resource "aws_internet_gateway" "pmh_ig" { vpc_id = aws_vpc.pmh_vpc.id tags = { Name = "pmh-ig" } } resource "aws_internet_gateway" "pmh_ig" pmh_ig 라는 이름의 aws_internet_gateway 리소스를 정의 vpc_id 인터넷 게이트웨이가 연결될..

AWS/Terraform 2023.07.11

Wordpress 설치 에러: front to the wordpress application. this file doesn't do anything, but loads

문제 발생 이유 php 설치가 안됨 해결 방법 1: php 설치 나의 경우에는 인스턴스 생성 시 php가 설치 차제가 안됐다. 이하 EC2 인스턴스 사용자 데이터(user data) 코드 #! /bin/bash yum install -y httpd amazon-linux-extras enable php7.4 yum install -y php php-cli php-pdo php-fpm php-json php-mysqlnd mariadb wget https://ko.wordpress.org/wordpress-5.7.8-ko_KR.tar.gz tar xvfz wordpress-5.7.8-ko_KR.tar.gz cp -a ./wordpress/* /var/www/html/ chown apache.apache /..

AWS/※에러※ 2023.07.11