File tree Expand file tree Collapse file tree 3 files changed +18
-24
lines changed Expand file tree Collapse file tree 3 files changed +18
-24
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ resource "aws_db_instance" "this" {
14
14
identifier = " soat-tc-rds-db"
15
15
engine = " postgres"
16
16
17
- db_name = " backend "
17
+ db_name = var . db_name
18
18
19
19
allocated_storage = 20
20
20
storage_type = " gp2"
Original file line number Diff line number Diff line change @@ -6,8 +6,8 @@ provider "aws" {
6
6
7
7
default_tags {
8
8
tags = {
9
- Organization = var.repo_owner
10
- Repository = var.repository
9
+ Organization = " soat-tech-challenge "
10
+ Workspace = " database-staging "
11
11
}
12
12
}
13
13
}
Original file line number Diff line number Diff line change 1
- variable "repo_owner" {
2
- type = string
3
- default = " soat-tech-challenge"
4
- }
5
-
6
- variable "repository" {
7
- type = string
8
- default = " soat-tech-challenge/terraform-aws-rds"
1
+ variable "aws_region" {
2
+ description = " AWS Region to create resources on"
3
+ type = string
4
+ default = " us-east-2"
9
5
}
10
6
11
7
variable "aws_access_key" {
@@ -18,28 +14,26 @@ variable "aws_secret_key" {
18
14
type = string
19
15
}
20
16
21
- variable "db_port" {
22
- description = " Porta da instância RDS"
23
- type = string
24
- default = " 5432"
25
- }
26
-
27
17
variable "db_username" {
28
- description = " Nome de usuário do banco de dados "
18
+ description = " Database username "
29
19
type = string
30
- default = " postgres"
31
20
}
32
21
33
22
variable "db_password" {
34
- description = " Senha do banco de dados "
23
+ description = " Database password "
35
24
type = string
36
- default = " postgres"
37
25
}
38
26
39
- variable "aws_region " {
40
- description = " Região AWS onde criar a instância RDS "
27
+ variable "db_name " {
28
+ description = " Database name "
41
29
type = string
42
- default = " us-east-2"
30
+ default = " backend_db"
31
+ }
32
+
33
+ variable "db_port" {
34
+ description = " Database port"
35
+ type = number
36
+ default = 5432
43
37
}
44
38
45
39
variable "vpc_name" {
You can’t perform that action at this time.
0 commit comments