Skip to content

Commit 4d6eb61

Browse files
committed
Removing provider block
1 parent a7cf8c2 commit 4d6eb61

File tree

5 files changed

+33
-40
lines changed

5 files changed

+33
-40
lines changed

.circleci/config.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,9 @@ jobs:
55
- image: hashicorp/terraform
66
steps:
77
- checkout
8-
- run: terraform init
9-
- run: terraform validate
8+
- run:
9+
working_directory: examples/test
10+
command: terraform init
11+
- run:
12+
working_directory: examples/test
13+
command: terraform validate

examples/test/main.tf

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
provider "aws" {
2+
region = "us-east-1"
3+
}
4+
5+
module "base-network" {
6+
source = "cn-terraform/networking/aws"
7+
version = "2.0.7"
8+
name_preffix = "test-networking"
9+
vpc_cidr_block = "192.168.0.0/16"
10+
availability_zones = [ "us-east-1a", "us-east-1b", "us-east-1c", "us-east-1d" ]
11+
public_subnets_cidrs_per_availability_zone = [ "192.168.0.0/19", "192.168.32.0/19", "192.168.64.0/19", "192.168.96.0/19" ]
12+
private_subnets_cidrs_per_availability_zone = [ "192.168.128.0/19", "192.168.160.0/19", "192.168.192.0/19", "192.168.224.0/19" ]
13+
}
14+
15+
module "test" {
16+
source = "../../"
17+
name_preffix = "test"
18+
vpc_id = module.base-network.vpc_id
19+
container_image = "ubuntu"
20+
container_name = "test"
21+
public_subnets_ids = module.base-network.public_subnets_ids
22+
private_subnets_ids = module.base-network.private_subnets_ids
23+
}

main.tf

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,23 @@
1-
# ---------------------------------------------------------------------------------------------------------------------
2-
# PROVIDER
3-
# ---------------------------------------------------------------------------------------------------------------------
4-
provider "aws" {
5-
profile = var.profile
6-
region = var.region
7-
}
8-
91
# ---------------------------------------------------------------------------------------------------------------------
102
# ECS Cluster
113
# ---------------------------------------------------------------------------------------------------------------------
124
module ecs-cluster {
135
source = "cn-terraform/ecs-cluster/aws"
14-
version = "1.0.3"
6+
version = "1.0.5"
157
# source = "../terraform-aws-ecs-cluster"
168

179
name = "${var.name_preffix}"
18-
profile = var.profile
19-
region = var.region
2010
}
2111

2212
# ---------------------------------------------------------------------------------------------------------------------
2313
# ECS Task Definition
2414
# ---------------------------------------------------------------------------------------------------------------------
2515
module "td" {
2616
source = "cn-terraform/ecs-fargate-task-definition/aws"
27-
version = "1.0.10"
17+
version = "1.0.11"
2818
# source = "../terraform-aws-ecs-fargate-task-definition"
2919

3020
name_preffix = var.name_preffix
31-
profile = var.profile
32-
region = var.region
3321
container_image = var.container_image
3422
container_name = var.container_name
3523
command = var.command
@@ -69,12 +57,10 @@ module "td" {
6957
# ---------------------------------------------------------------------------------------------------------------------
7058
module "ecs-alb" {
7159
source = "cn-terraform/ecs-alb/aws"
72-
version = "0.0.8"
60+
version = "1.0.0"
7361
# source = "../terraform-aws-ecs-alb"
7462

7563
name_preffix = "${var.name_preffix}"
76-
profile = var.profile
77-
region = var.region
7864
vpc_id = var.vpc_id
7965

8066
# Application Load Balancer
@@ -118,12 +104,10 @@ module "ecs-alb" {
118104
# ---------------------------------------------------------------------------------------------------------------------
119105
module "ecs-fargate-service" {
120106
source = "cn-terraform/ecs-fargate-service/aws"
121-
version = "2.0.1"
107+
version = "2.0.2"
122108
# source = "../terraform-aws-ecs-fargate-service"
123109

124110
name_preffix = var.name_preffix
125-
profile = var.profile
126-
region = var.region
127111
vpc_id = var.vpc_id
128112

129113
ecs_cluster_arn = module.ecs-cluster.aws_ecs_cluster_cluster_arn

terraform.tfvars

Lines changed: 0 additions & 7 deletions
This file was deleted.

variables.tf

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,6 @@ variable "name_preffix" {
55
description = "Name preffix for resources on AWS"
66
}
77

8-
# ---------------------------------------------------------------------------------------------------------------------
9-
# AWS CREDENTIALS AND REGION
10-
# ---------------------------------------------------------------------------------------------------------------------
11-
variable "profile" {
12-
description = "AWS API key credentials to use"
13-
}
14-
15-
variable "region" {
16-
description = "AWS Region the infrastructure is hosted in"
17-
}
18-
198
# ---------------------------------------------------------------------------------------------------------------------
209
# AWS Networking
2110
# ---------------------------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)