Skip to content

Commit

Permalink
change the name of the vpc example
Browse files Browse the repository at this point in the history
  • Loading branch information
tsaucier-sf committed May 19, 2023
1 parent 51e79cf commit ffa375f
Show file tree
Hide file tree
Showing 6 changed files with 278 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/simple/.terraform-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
latest:^1.3
139 changes: 139 additions & 0 deletions examples/simple/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 40 additions & 0 deletions examples/simple/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements

| Name | Version |
|------|---------|
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | ~> 1.3 |
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | ~> 4.9 |

## Providers

No providers.

## Modules

| Name | Source | Version |
|------|--------|---------|
| <a name="module_network"></a> [network](#module\_network) | ../. | n/a |
| <a name="module_tags"></a> [tags](#module\_tags) | git::https://github.com/sourcefuse/terraform-aws-refarch-tags.git | 1.1.0 |

## Resources

No resources.

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_availability_zones"></a> [availability\_zones](#input\_availability\_zones) | List of availability zones to deploy resources in. | `list(string)` | <pre>[<br> "us-east-1a",<br> "us-east-1b"<br>]</pre> | no |
| <a name="input_environment"></a> [environment](#input\_environment) | Name of the environment, i.e. dev, stage, prod | `string` | `"dev"` | no |
| <a name="input_namespace"></a> [namespace](#input\_namespace) | Namespace of the project, i.e. refarch | `string` | `"example"` | no |
| <a name="input_profile"></a> [profile](#input\_profile) | AWS profile | `string` | `"default"` | no |
| <a name="input_region"></a> [region](#input\_region) | AWS Region | `string` | `"us-east-1"` | no |
| <a name="input_vpc_ipv4_primary_cidr_block"></a> [vpc\_ipv4\_primary\_cidr\_block](#input\_vpc\_ipv4\_primary\_cidr\_block) | IPv4 CIDR block for the VPC to use. | `string` | `"10.9.0.0/16"` | no |

## Outputs

| Name | Description |
|------|-------------|
| <a name="output_vpn_endpoint_dns_name"></a> [vpn\_endpoint\_dns\_name](#output\_vpn\_endpoint\_dns\_name) | The DNS Name of the Client VPN Endpoint Connection. |
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
50 changes: 50 additions & 0 deletions examples/simple/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
################################################################
## defaults
################################################################
terraform {
required_version = ">= 1.3"

required_providers {
aws = {
source = "hashicorp/aws"
version = ">= 4.0"
}
}
}

provider "aws" {
region = var.region
}

module "tags" {
source = "git::https://github.com/sourcefuse/terraform-aws-refarch-tags.git?ref=1.1.0"

environment = var.environment
project = "terraform-aws-ref-arch-network"

extra_tags = {
Example = "True"
}
}

################################################################
## network
################################################################
module "network" {
source = "../."

namespace = var.namespace
environment = var.environment
availability_zones = var.availability_zones
vpc_ipv4_primary_cidr_block = var.vpc_ipv4_primary_cidr_block
client_vpn_enabled = true
tags = module.tags.tags
client_vpn_authorization_rules = [
{
target_network_cidr = var.vpc_ipv4_primary_cidr_block
authorize_all_groups = true
description = "default authorization group to allow all authenticated clients to access the vpc"
}
]

}
4 changes: 4 additions & 0 deletions examples/simple/outputs.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
output "vpn_endpoint_dns_name" {
value = module.network.vpn_endpoint_dns_name
description = "The DNS Name of the Client VPN Endpoint Connection."
}
44 changes: 44 additions & 0 deletions examples/simple/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
################################################################
## shared
################################################################
variable "environment" {
type = string
description = "Name of the environment, i.e. dev, stage, prod"
default = "dev"
}

variable "region" {
type = string
description = "AWS Region"
default = "us-east-1"
}

variable "namespace" {
type = string
description = "Namespace of the project, i.e. refarch"
default = "example"
}

variable "profile" {
type = string
description = "AWS profile"
default = "default"
}

################################################################
## network
################################################################
variable "availability_zones" {
type = list(string)
description = "List of availability zones to deploy resources in."
default = [
"us-east-1a",
"us-east-1b"
]
}

variable "vpc_ipv4_primary_cidr_block" {
type = string
description = "IPv4 CIDR block for the VPC to use."
default = "10.9.0.0/16"
}

0 comments on commit ffa375f

Please sign in to comment.