sg, eks, iam 모듈추가
This commit is contained in:
11
modules/sg-rule-add/main.tf
Normal file
11
modules/sg-rule-add/main.tf
Normal file
@ -0,0 +1,11 @@
|
||||
resource "aws_security_group_rule" "sg-rule-add" {
|
||||
description = "Security groups rule add"
|
||||
|
||||
type = var.type
|
||||
from_port = var.set_ports.http
|
||||
to_port = var.set_ports.http
|
||||
protocol = var.set_ports.protocol_tcp #tcp
|
||||
cidr_blocks = var.cidr_blocks
|
||||
security_group_id = var.sg_id
|
||||
|
||||
}
|
10
modules/sg-rule-add/outputs.tf
Normal file
10
modules/sg-rule-add/outputs.tf
Normal file
@ -0,0 +1,10 @@
|
||||
//sg-output
|
||||
output "vpc_hq_id" {
|
||||
description = "The name of vpc hq id"
|
||||
value = aws_vpc.vpc-hq.id
|
||||
}
|
||||
|
||||
output "vpc_name" {
|
||||
value = var.tag_name
|
||||
}
|
||||
|
8
modules/sg-rule-add/variables.tf
Normal file
8
modules/sg-rule-add/variables.tf
Normal file
@ -0,0 +1,8 @@
|
||||
variable "type" {
|
||||
description = "security rule type"
|
||||
type = string
|
||||
}
|
||||
variable "from_port" {
|
||||
description = "from port"
|
||||
type = number
|
||||
}
|
Reference in New Issue
Block a user