Skip to content

Commit

Permalink
feat: crate apigateway-v2 terraform module
Browse files Browse the repository at this point in the history
  • Loading branch information
theprashantyadav committed Jul 4, 2023
1 parent 8e46dd6 commit 58729c9
Show file tree
Hide file tree
Showing 11 changed files with 404 additions and 976 deletions.
86 changes: 0 additions & 86 deletions _example/basic/example.tf

This file was deleted.

17 changes: 0 additions & 17 deletions _example/basic/outputs.tf

This file was deleted.

11 changes: 0 additions & 11 deletions _example/basic/versions.tf

This file was deleted.

111 changes: 0 additions & 111 deletions _example/complete/example.tf

This file was deleted.

6 changes: 0 additions & 6 deletions _example/complete/outputs.tf

This file was deleted.

80 changes: 80 additions & 0 deletions _example/example.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
####----------------------------------------------------------------------------------
## Provider block added, Use the Amazon Web Services (AWS) provider to interact with the many resources supported by AWS.
####----------------------------------------------------------------------------------
provider "aws" {
region = "eu-west-1"
}
####----------------------------------------------------------------------------------
## A VPC is a virtual network that closely resembles a traditional network that you'd operate in your own data center.
####----------------------------------------------------------------------------------
module "vpc" {
source = "clouddrove/vpc/aws"
version = "1.3.1"

name = "vpc"
environment = "test"
label_order = ["name", "environment"]

cidr_block = "172.16.0.0/16"
}

####----------------------------------------------------------------------------------
## A subnet is a range of IP addresses in your VPC.
####----------------------------------------------------------------------------------
module "public_subnets" {
source = "clouddrove/subnet/aws"
version = "1.3.0"

name = "public-subnet"
environment = "test"
label_order = ["name", "environment"]

availability_zones = ["eu-west-1b", "eu-west-1c"]
vpc_id = module.vpc.vpc_id
cidr_block = module.vpc.vpc_cidr_block
type = "public"
igw_id = module.vpc.igw_id
ipv6_cidr_block = module.vpc.ipv6_cidr_block
}

module "security_group" {
source = "clouddrove/security-group/aws"
version = "1.3.0"

name = "security-group"
environment = "test"
protocol = "tcp"
label_order = ["environment", "name"]
vpc_id = module.vpc.vpc_id
allowed_ip = ["0.0.0.0/0"]
allowed_ports = [3306]
}

module "acm" {
source = "clouddrove/acm/aws"
version = "1.3.0"

name = "certificate"
environment = "test"
label_order = ["name", "environment"]

enable_aws_certificate = true
domain_name = "test-clouddrove.com"
subject_alternative_names = ["www.test-clouddrove.com"]
validation_method = "DNS"
enable_dns_validation = false
}

module "api_gateway" {
source = "./../"

name = "api"
environment = "test"
label_order = ["environment", "name"]

protocol_type = "HTTP"
domain_name = "test-clouddrove.com"
domain_name_certificate_arn = module.acm.arn
subnet_ids = tolist(module.public_subnets.public_subnet_id)
security_group_ids = [module.security_group.security_group_ids]
}
Empty file added _example/outputs.tf
Empty file.
Loading

0 comments on commit 58729c9

Please sign in to comment.