-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
Copy pathmain.tf
66 lines (52 loc) · 1.74 KB
/
main.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
provider "aws" {
region = "eu-west-1"
}
##############################################################
# Data sources to get VPC, subnets and security group details
##############################################################
data "aws_vpc" "default" {
default = true
}
data "aws_subnet_ids" "all" {
vpc_id = "${data.aws_vpc.default.id}"
}
data "aws_security_group" "default" {
vpc_id = "${data.aws_vpc.default.id}"
name = "default"
}
#####
# DB
#####
module "db" {
source = "../../"
identifier = "demodb"
engine = "oracle-ee"
engine_version = "12.1.0.2.v8"
instance_class = "db.t2.large"
allocated_storage = 10
storage_encrypted = false
license_model = "bring-your-own-license"
# Make sure that database name is capitalized, otherwise RDS will try to recreate RDS instance every time
name = "DEMODB"
username = "something_like_user"
password = "YourPwdShouldBeLongAndSecure!"
port = "1521"
iam_database_authentication_enabled = false
vpc_security_group_ids = ["${data.aws_security_group.default.id}"]
maintenance_window = "Mon:00:00-Mon:03:00"
backup_window = "03:00-06:00"
# disable backups to create DB faster
backup_retention_period = 0
tags = {
Owner = "user"
Environment = "dev"
}
# DB subnet group
subnet_ids = ["${data.aws_subnet_ids.all.ids}"]
# DB parameter group
family = "oracle-ee-12.1"
# Snapshot name upon DB deletion
final_snapshot_identifier = "demodb"
# See here for support character sets https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.OracleCharacterSets.html
character_set_name = "AL32UTF8"
}