security-group 생성 중 오류가 나서 질문을 드립니다.
324
작성한 질문수 1

답변 1
0
안녕하세요. alsyean님, 강의 들어주셔서 감사합니다.
질문 내용에 대해 답변드리겠습니다.
Terraform 버전 v1.0.4, v1.0.7 2개의 버전으로 Terraform 의 Security Group 테스트를 해보았습니다.
결과적으로 terraform plan 실행 시에 2개의 Terraform 버전 동일하고 아래와 같이 정상 결과가 나왔습니다.
# aws_security_group.allow_web will be created
+ resource "aws_security_group" "allow_web" {
+ arn = (known after apply)
+ description = "Allow web inbound traffic"
+ egress = [
+ {
+ cidr_blocks = [
+ "0.0.0.0/0",
]
+ description = ""
+ from_port = 0
+ ipv6_cidr_blocks = []
+ prefix_list_ids = []
+ protocol = "-1"
+ security_groups = []
+ self = false
+ to_port = 0
},
]
+ id = (known after apply)
+ ingress = [
+ {
+ cidr_blocks = [
+ "0.0.0.0/0",
]
+ description = "web from VPC"
+ from_port = 0
+ ipv6_cidr_blocks = []
+ prefix_list_ids = []
+ protocol = "-1"
+ security_groups = []
+ self = false
+ to_port = 0
},
]
+ name = "allow_web"
+ name_prefix = (known after apply)
+ owner_id = (known after apply)
+ revoke_rules_on_delete = false
+ tags = {
+ "Name" = "allow_web"
}
+ tags_all = {
+ "Name" = "allow_web"
}
+ vpc_id = "vpc-0707d523c3a075ee0"
}
Plan: 3 to add, 0 to change, 0 to destroy.
───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Note: You didn't use the -out option to save this plan, so Terraform can't guarantee to take exactly these actions if you
run "terraform apply" now.
강의에 나오는 테스트 Security Group 예제를 공유 드립니다.
resource "aws_security_group" "allow_web" {
name = "allow_web"
description = "Allow web inbound traffic"
vpc_id = var.vpc_id
ingress {
description = "web from VPC"
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
}
egress {
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
}
tags = {
Name = "allow_web"
}
}
보안그룹 아웃바운드 규칙
0
6
1
twitterdb 연결이 안돼요
1
24
2
rdb 만들 때 인스턴스 구성시 인스턴스 유형에 활성화 되는 것이 없습니다.
0
15
1
데이터베이스 13번 문제
0
27
2
macOS에서 Windows 실행하는 프로그램
1
19
2
수업기간 연장 부탁드립니다.
0
48
2
6번 질문
0
52
2
강의 자료
1
38
2
현재 시점 기준으로 최신 시험 출제 범위가 반영되었다고보면 될까요?
0
53
2
AWS 네트워크 강의 듣다가 테라폼 강의 결제했는데 동일한 분이 강의하시는거 맞나요?
0
284
1
id / ids / arn / name 등 뒤에 붙이는 기준이 궁금합니다.
0
300
1
ws_autoscaling_group에서 initial_lifecycle_hook 에 대해 추가 설명 부탁드립니다
0
198
1
alb attachment vs asg attachment
0
285
1
ec2.tf를 복사할 때 provider.tf를 별도 생성하는 방향으로 안내해주심이 어떨지
0
237
1
userdata용 리소스 https://bit.ly/Userdata
0
185
1
Error: Reference to undeclared resource
0
713
1
aws_subnet_ids 가 deprecated 예정이라고 합니다.
0
409
1
ec2.tf 실습시 VPC, subnet를 먼저 만들고 진행하는 것이 좋을 것 같습니다
0
213
1
복수개 key pair를 ec2 instance에 적용하는 방법
0
357
1
강의 내용 중 문의 내용이 있어 확인 부탁드립니다.
0
230
1
Terraform으로 Virtual Private Cloud(VPC) 구성 질문입니다.
0
239
1
Quick Start AMI 찾기가 없습니다.
0
376
1
대괄호[]의 의미
0
315
1
강의에서 사용된 tf 파일들은 어떻게 다운 받을 수 없나요?
0
266
1





