Skip to content

Files

Latest commit

 

History

History

rules-only

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Create rules only

Configuration in this directory creates two security groups using native Terraform resources, and then uses the module to add rules.

Data sources are used to discover existing VPC resources (VPC and default security group).

Usage

To run this example you need to execute:

$ terraform init
$ terraform plan
$ terraform apply

Note that this example may create resources which cost money. Run terraform destroy when you don't need these resources.

Requirements

Name Version
terraform >= 1.0
aws >= 3.29

Providers

Name Version
aws >= 3.29

Modules

Name Source Version
rules_one ../../ n/a
rules_two ../../ n/a

Resources

Name Type
aws_security_group.service_one resource
aws_security_group.service_two resource
aws_security_group.default data source
aws_vpc.default data source

Inputs

No inputs.

Outputs

Name Description
service_one_security_group_arn The ARN of the security group for service one
service_one_security_group_id The ID of the security group for service one
service_tow_security_group_arn The ARN of the security group for service two
service_two_security_group_id The ID of the security group for service two