The purpose of this module to be provision a sandbox environment for developers to experiment with AWS resources. The module provisions a VPC, subnets, security groups, and other resources to allow developers to experiment with AWS resources in a safe and secure manner. We also provision a nuke service to automatically clean up resources from the accounts.
The intention of the module is to provisioned once per account, per region.
You can find an example of how to use this module below
provider "aws" {
alias = "test_sandbox"a
region = var.region
assume_role_with_web_identity {
role_arn = "arn:aws:iam::${var.aws_accounts["ho-sandbox"]}:role/${local.managed_role_name}"
session_name = var.provider_session_name
web_identity_token_file = var.provider_web_identity_token_file
}
}
module "test_sandbox" {
source = "github.com/appvia/terraform-aws-landing-zone-sandbox?ref=main"
environment = "Sandbox"
owner = "Solutions"
product = "Sandbox"
region = var.region
tags = var.tags
anomaly_detection = {
enable_default_monitors = true
}
providers = {
aws.tenant = aws.test_sandbox
aws.identity = aws.identity
aws.network = aws.network
aws.management = aws.management
}
}
The terraform-docs
utility is used to generate this README. Follow the below steps to update:
- Make changes to the
.terraform-docs.yml
file - Fetch the
terraform-docs
binary (https://terraform-docs.io/user-guide/installation/) - Run
terraform-docs markdown table --output-file ${PWD}/README.md --output-mode inject .
Name | Version |
---|---|
aws.tenant | >= 5.0.0 |
Name | Description | Type | Default | Required |
---|---|---|---|---|
git_repository | The git repository called this module | string |
n/a | yes |
owner | The owner of the product, and injected into all resource tags | string |
n/a | yes |
region | The region we are provisioning the resources for the landing zone | string |
n/a | yes |
tags | A collection of tags to apply to resources | map(string) |
n/a | yes |
cost_center | The cost center of the product, and injected into all resource tags | string |
null |
no |
dns | A collection of DNS zones to provision and associate with networks | map(object({ |
{} |
no |
networks | A collection of networks to provision within the designated region | map(object({ |
{} |
no |
notifications | A collection of notifications to send to users | object({ |
{ |
no |
nuke | Indicates we should enable the automatic cleanup so resources | object({ |
{ |
no |
rbac | Provides the ability to associate one of more groups with a sso role in the account | map(object({ |
{} |
no |
service_control_policies | Provides the ability to associate one of more service control policies with an account | map(object({ |
{} |
no |
Name | Description |
---|---|
account_id | The account id where the pipeline is running |
networks | A map of the network name to network details |
private_hosted_zones_by_id | A map of the hosted zone name to id |
vpc_ids | A map of the network name to vpc id |