Skip to content

Instantly share code, notes, and snippets.

@AymenSegni
Last active April 12, 2020 15:53
Embed
What would you like to do?
# VPC Module
module "vpc" {
source = "../modules/shared_vpc"
cidr = var.cidr
azs = var.azs
private_subnets = var.private_subnets
public_subnets = var.public_subnets
environment = "krypton"
ingress_ips = var.ingress_ips
cluster_name = var.cluster_name
}
// terraform.tfvars
cidr = "10.0.0.0/16"
azs = ["eu-central-1a", "eu-central-1b", "eu-central-1c"]
private_subnets = ["10.0.1.0/24", "10.0.2.0/24", "10.0.3.0/24"]
public_subnets = ["10.0.101.0/24", "10.0.102.0/24", "10.0.103.0/24"]
ingress_ips = ["10.0.0.100/32", "10.0.0.101/32", "10.0.0.103/32"]
cluster_name = "aymen.krypton.berlin"
// variables.tf
variable "environment" {
type = string
default = "krypton"
description = "Name prefix"
}
variable "cidr" {
type = string
description = "vpc cidr"
}
variable "azs" {
type = list
description = "Avaibility zones list"
}
variable "private_subnets" {
type = list
description = "list of private subnets in the vpc"
}
variable "public_subnets" {
type = list
description = "public subnets list"
}
variable "ingress_ips" {
type = list
description = "List of Ingress IPs"
}
variable "cluster_name" {
type = string
description = "FQDN cluster name"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment