-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add point in time recovery support * Add full set of examples * re-add data sources
- Loading branch information
1 parent
258bf46
commit 24e3f2c
Showing
10 changed files
with
157 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
provider "aws" { | ||
region = "eu-west-1" | ||
} | ||
|
||
##### | ||
# VPC and subnets | ||
##### | ||
module "vpc" { | ||
source = "terraform-aws-modules/vpc/aws" | ||
version = "~> 2.64" | ||
|
||
name = "simple-vpc-aurora-postgres" | ||
|
||
cidr = "10.0.0.0/16" | ||
|
||
azs = ["eu-west-1a", "eu-west-1b", "eu-west-1c"] | ||
public_subnets = ["10.0.101.0/24", "10.0.102.0/24", "10.0.103.0/24"] | ||
|
||
enable_nat_gateway = false | ||
|
||
tags = { | ||
Environment = "test" | ||
} | ||
} | ||
|
||
module "aurora-postgresql" { | ||
source = "../.." | ||
|
||
name_prefix = "example-aurora-postgresql" | ||
|
||
engine = "aurora-postgresql" | ||
engine_version = "11.8" | ||
engine_parameter_family = "aurora-postgresql11" | ||
|
||
apply_immediately = true | ||
allow_major_version_upgrade = true | ||
skip_final_snapshot = true | ||
|
||
iam_database_authentication_enabled = true | ||
|
||
enabled_cloudwatch_logs_exports = [ | ||
{ | ||
name = "postgresql" | ||
} | ||
] | ||
|
||
|
||
vpc_id = module.vpc.vpc_id | ||
subnets = module.vpc.public_subnets | ||
|
||
replica_count = 1 | ||
instance_type = "db.t3.medium" | ||
|
||
allowed_cidr_blocks = ["10.10.0.0/24", "10.20.0.0/24", "10.30.0.0/24"] | ||
|
||
tags = { | ||
Environment = "test" | ||
Engine = "aurora-postgresql" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
provider "aws" { | ||
region = "eu-west-1" | ||
} | ||
|
||
##### | ||
# VPC and subnets | ||
##### | ||
module "vpc" { | ||
source = "terraform-aws-modules/vpc/aws" | ||
version = "~> 2.64" | ||
|
||
name = "simple-vpc-aurora-serverless" | ||
|
||
cidr = "10.0.0.0/16" | ||
|
||
azs = ["eu-west-1a", "eu-west-1b", "eu-west-1c"] | ||
public_subnets = ["10.0.101.0/24", "10.0.102.0/24", "10.0.103.0/24"] | ||
|
||
enable_nat_gateway = false | ||
|
||
tags = { | ||
Environment = "test" | ||
} | ||
} | ||
|
||
module "aurora-serverless" { | ||
source = "../../" | ||
|
||
name_prefix = "example-aurora-serverless" | ||
|
||
engine = "aurora" | ||
engine_mode = "serverless" | ||
engine_parameter_family = "aurora5.6" | ||
|
||
replica_count = 0 | ||
|
||
vpc_id = module.vpc.vpc_id | ||
subnets = module.vpc.public_subnets | ||
|
||
instance_type = "db.t3.medium" | ||
apply_immediately = true | ||
skip_final_snapshot = true | ||
storage_encrypted = true | ||
|
||
iam_database_authentication_enabled = false # can't be set to true yet | ||
|
||
scaling_configuration = { | ||
auto_pause = true | ||
max_capacity = 256 | ||
min_capacity = 2 | ||
seconds_until_auto_pause = 300 | ||
timeout_action = "ForceApplyCapacityChange" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters