SourceFuse AWS Reference Architecture (ARC) Terraform module for querying the most commonly referenced components in the ARC IaC modules.
- VPC
- Public Subnets
- Private Subnets
To see a full example, check out the main.tf file in the example folder.
module "this" {
source = "git::https://github.com/sourcefuse/terraform-aws-arc-common-data"
environment = var.environment
namespace = var.namespace
region = var.region
}
Name | Version |
---|---|
terraform | ~> 1.4 |
aws | ~> 4.0 |
Name | Version |
---|---|
aws | 4.67.0 |
No modules.
Name | Type |
---|---|
aws_subnets.private | data source |
aws_subnets.public | data source |
aws_vpc.vpc | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
environment | ID element. Usually used for region e.g. 'uw2', 'us-west-2', OR role 'prod', 'staging', 'dev', 'UAT' | string |
n/a | yes |
namespace | Namespace for the resources. | string |
n/a | yes |
region | AWS Region | string |
n/a | yes |
Name | Description |
---|---|
private_subnet_ids | Private subnet IDs |
public_subnet_ids | Public subnet IDs |
vpc_id | ID of the VPC |
vpc_name | Name of the VPC |
This project uses a .version
file at the root of the repo which the pipeline reads from and does a git tag.
When you intend to commit to main
, you will need to increment this version. Once the project is merged,
the pipeline will kick off and tag the latest git commit.
- Configure pre-commit hooks
pre-commit install
while Contributing or doing git commit please specify the breaking change in your commit message whether its major,minor or patch
For Example
git commit -m "your commit message #major"
By specifying this , it will bump the version and if you dont specify this in your commit message then by default it will consider patch and will bump that accordingly
- Tests are available in
test
directory - Configure the dependencies
cd test/ go mod init github.com/sourcefuse/terraform-aws-refarch-<module_name> go get github.com/gruntwork-io/terratest/modules/terraform
- Now execute the test
go test -timeout 30m
This project is authored by:
- SourceFuse ARC Team