-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c113c5f
commit ced170a
Showing
6 changed files
with
166 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
provider "aws" { | ||
region = "eu-west-1" | ||
} | ||
|
||
module "vpc" { | ||
source = "clouddrove/vpc/aws" | ||
version = "0.14.0" | ||
name = "vpc" | ||
environment = "test" | ||
label_order = ["name", "environment"] | ||
cidr_block = "10.0.0.0/16" | ||
} | ||
|
||
module "security_group" { | ||
source = "../../" | ||
|
||
name = "security-group" | ||
environment = "test" | ||
label_order = ["name", "environment"] | ||
|
||
enable_security_group = true | ||
vpc_id = module.vpc.vpc_id | ||
protocol = "tcp" | ||
description = "Instance default security group (only egress access is allowed)." | ||
allowed_ip = ["172.16.0.0/16", "10.0.0.0/16"] | ||
allowed_ipv6 = ["2405:201:5e00:3684:cd17:9397:5734:a167/128"] | ||
allowed_ports = [22, 27017] | ||
security_groups = ["sg-xxxxxxxxx"] | ||
prefix_list_ids = ["pl-6da54004"] | ||
|
||
egress_rule = true | ||
egress_allowed_ip = ["172.16.0.0/16", "10.0.0.0/16"] | ||
egress_allowed_ports = [22, 27017] | ||
egress_protocol = "tcp" | ||
egress_allowed_ipv6 = ["2405:201:5e00:3684:cd17:9397:5734:a167/128"] | ||
egress_prefix_list_ids = ["pl-xxxxxxxxx"] | ||
egress_security_groups = ["sg-xxxxxxxxx"] | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
output "tags" { | ||
value = module.security_group.tags | ||
description = "A mapping of tags to assign to the resource." | ||
} | ||
|
||
output "security_group_ids" { | ||
value = module.security_group.security_group_ids | ||
description = "A mapping of security group ids." | ||
} | ||
output "vpc_cidr_block" { | ||
value = module.vpc.vpc_cidr_block | ||
description = "VPC IPV4 CIDR Block." | ||
} | ||
|
||
output "vpc_cidr_block_ipv6" { | ||
value = module.vpc.ipv6_cidr_block | ||
description = "VPC IPV4 CIDR Block." | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters