File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -399,3 +399,30 @@ module "only_rules" {
399399 },
400400 ]
401401}
402+
403+ # ################################
404+ # Security group using prefix list
405+ # ################################
406+ resource "aws_ec2_managed_prefix_list" "prefix_list_sg_example" {
407+ address_family = " IPv4"
408+ max_entries = 1
409+ name = " prefix-list-sg-example"
410+
411+ entry {
412+ cidr = module. vpc . vpc_cidr_block
413+ description = " VPC CIDR"
414+ }
415+ }
416+
417+ module "prefix_list_sg" {
418+ source = " ../../"
419+
420+ name = " prefix-list-sg"
421+ description = " Security group using prefix list"
422+ vpc_id = data. aws_vpc . default . id
423+
424+ use_name_prefix = false
425+
426+ ingress_prefix_list_ids = [aws_ec2_managed_prefix_list . prefix_list_sg_example . id ]
427+ ingress_rules = [" https-443-tcp" ]
428+ }
You can’t perform that action at this time.
0 commit comments