aboutsummaryrefslogtreecommitdiffstats
path: root/fdio.infra.terraform/terraform-aws-subnet/example
diff options
context:
space:
mode:
authorPeter Mikus <pmikus@cisco.com>2022-03-24 14:13:32 +0100
committerPeter Mikus <pmikus@cisco.com>2022-03-25 08:17:41 +0000
commit0deec65be1ef39f37090f2b5b851eb4b34c116f9 (patch)
tree409feeeb125116ba60f0eea3f9c872f98e9e23ea /fdio.infra.terraform/terraform-aws-subnet/example
parentc5181ae1627fed20b79a829bf2330f3ee9d8a0f6 (diff)
feat(terraform): AWS Subnet
Signed-off-by: Peter Mikus <pmikus@cisco.com> Change-Id: I11d10c4c734354f112a7b6bf4a8f3c0febfc0862
Diffstat (limited to 'fdio.infra.terraform/terraform-aws-subnet/example')
-rw-r--r--fdio.infra.terraform/terraform-aws-subnet/example/main.tf17
-rw-r--r--fdio.infra.terraform/terraform-aws-subnet/example/output.tf0
-rw-r--r--fdio.infra.terraform/terraform-aws-subnet/example/providers.tf3
-rw-r--r--fdio.infra.terraform/terraform-aws-subnet/example/variables.tf5
-rw-r--r--fdio.infra.terraform/terraform-aws-subnet/example/versions.tf9
5 files changed, 34 insertions, 0 deletions
diff --git a/fdio.infra.terraform/terraform-aws-subnet/example/main.tf b/fdio.infra.terraform/terraform-aws-subnet/example/main.tf
new file mode 100644
index 0000000000..98f8613876
--- /dev/null
+++ b/fdio.infra.terraform/terraform-aws-subnet/example/main.tf
@@ -0,0 +1,17 @@
+module "vpc" {
+ source = "../../terraform-aws-vpc"
+ security_group_name = "terraform-sg"
+ subnet_availability_zone = "us-east-1a"
+ tags_name = "terraform-vpc"
+ tags_environment = "terraform-vpc-environment"
+}
+
+module "subnet" {
+ source = "../"
+ subnet_cidr_block = "192.168.10.0/24"
+ subnet_ipv6_cidr_block = cidrsubnet(module.vpc.vpc_ipv6_cidr_block, 8, 1)
+ subnet_availability_zone = "us-east-1a"
+ tags_name = "terraform-subnet"
+ tags_environment = "terraform-subnet-environment"
+ subnet_vpc_id = module.vpc.vpc_id
+}
diff --git a/fdio.infra.terraform/terraform-aws-subnet/example/output.tf b/fdio.infra.terraform/terraform-aws-subnet/example/output.tf
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/fdio.infra.terraform/terraform-aws-subnet/example/output.tf
diff --git a/fdio.infra.terraform/terraform-aws-subnet/example/providers.tf b/fdio.infra.terraform/terraform-aws-subnet/example/providers.tf
new file mode 100644
index 0000000000..5ff54f0d65
--- /dev/null
+++ b/fdio.infra.terraform/terraform-aws-subnet/example/providers.tf
@@ -0,0 +1,3 @@
+provider "aws" {
+ region = var.region
+} \ No newline at end of file
diff --git a/fdio.infra.terraform/terraform-aws-subnet/example/variables.tf b/fdio.infra.terraform/terraform-aws-subnet/example/variables.tf
new file mode 100644
index 0000000000..f75f3d547f
--- /dev/null
+++ b/fdio.infra.terraform/terraform-aws-subnet/example/variables.tf
@@ -0,0 +1,5 @@
+variable "region" {
+ description = "AWS Region."
+ type = string
+ default = "us-east-1"
+}
diff --git a/fdio.infra.terraform/terraform-aws-subnet/example/versions.tf b/fdio.infra.terraform/terraform-aws-subnet/example/versions.tf
new file mode 100644
index 0000000000..af1be4a4e1
--- /dev/null
+++ b/fdio.infra.terraform/terraform-aws-subnet/example/versions.tf
@@ -0,0 +1,9 @@
+terraform {
+ required_providers {
+ aws = {
+ source = "hashicorp/aws"
+ version = ">= 4.3.0"
+ }
+ }
+ required_version = ">= 1.1.4"
+}