Skip to content

Commit

Permalink
Add outputs to the terraform/ configuration
Browse files Browse the repository at this point in the history
Output information about the CyHy VPC and the two security groups that
exist for use by Lambda functions deployed in the CyHy VPC. This will
allow Lambda functions to have their Terraform configuration stored
external to the configuration in this project but still provide the
necessary information for operation within the environment.
  • Loading branch information
mcdonnnj committed Nov 28, 2023
1 parent 81b302e commit d4eb1b0
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
9 changes: 8 additions & 1 deletion terraform/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,14 @@ terraform apply -var-file=<your_workspace>.tfvars

## Outputs ##

No outputs.
| Name | Description |
|------|-------------|
| cyhy\_lambda\_https\_sg | The security group that allows HTTPS egress to anywhere for Lambda functions in the CyHy VPC. |
| cyhy\_lambda\_mongodb\_sg | The security group that allows ingress to the CyHy MongoDB server for Lambda functions in the CyHy VPC. |
| cyhy\_private\_sg | The security group for the private portion of the CyHy VPC. |
| cyhy\_private\_subnet | The private subnet of the CyHy VPC. |
| cyhy\_public\_subnet | The public subnet of the CyHy VPC. |
| cyhy\_vpc | The CyHy VPC. |
<!-- END_TF_DOCS -->

## License ##
Expand Down
29 changes: 29 additions & 0 deletions terraform/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
output "cyhy_lambda_https_sg" {
description = "The security group that allows HTTPS egress to anywhere for Lambda functions in the CyHy VPC."
value = aws_security_group.lambda_https_sg
}

output "cyhy_lambda_mongodb_sg" {
description = "The security group that allows ingress to the CyHy MongoDB server for Lambda functions in the CyHy VPC."
value = aws_security_group.lambda_mongodb_sg
}

output "cyhy_private_sg" {
description = "The security group for the private portion of the CyHy VPC."
value = aws_security_group.cyhy_private_sg
}

output "cyhy_private_subnet" {
description = "The private subnet of the CyHy VPC."
value = aws_subnet.cyhy_private_subnet
}

output "cyhy_public_subnet" {
description = "The public subnet of the CyHy VPC."
value = aws_subnet.cyhy_public_subnet
}

output "cyhy_vpc" {
description = "The CyHy VPC."
value = aws_vpc.cyhy_vpc
}

0 comments on commit d4eb1b0

Please sign in to comment.