From 7169d18aab7a088021b0dd3333433c376f123a29 Mon Sep 17 00:00:00 2001 From: x p k Date: Sun, 28 Jun 2020 16:14:23 +0800 Subject: [PATCH] UPD: minor updates --- tf-modulised/vpc-subnets/vpc.tf | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/tf-modulised/vpc-subnets/vpc.tf b/tf-modulised/vpc-subnets/vpc.tf index 74f1a4b..3e8f89f 100644 --- a/tf-modulised/vpc-subnets/vpc.tf +++ b/tf-modulised/vpc-subnets/vpc.tf @@ -1,15 +1,20 @@ data "aws_availability_zones" "available" {} -resource "random_string" "suffix" { - length = 4 - special = false +#resource "random_string" "suffix" { +# length = 4 +# special = false +#} + +resource "random_integer" "suffix" { + min = 1000 + max = 9999 } module "vpc" { source = "terraform-aws-modules/vpc/aws" version = "2.6.0" - name = "demo-vpc-${random_string.suffix.result}" + name = "demo-vpc-${random_integer.suffix.result}" cidr = "172.16.0.0/16" azs = data.aws_availability_zones.available.names private_subnets = ["172.16.1.0/24", "172.16.2.0/24", "172.16.3.0/24"]