Skip to content

Commit

Permalink
Merge pull request #72 from sourcefuse/70-upgrade-upstream-module-ver…
Browse files Browse the repository at this point in the history
…sions

70 upgrade upstream module versions
  • Loading branch information
tsaucier-sf authored Apr 24, 2024
2 parents b914a27 + a985dcf commit e7ef8d4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 46 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2022 SourceFuse
Copyright 2022-2024 SourceFuse

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
37 changes: 0 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,43 +14,6 @@ For more information about this repository and its usage, please see [Terraform

To see a full example, check out the [main.tf](https://github.com/sourcefuse/terraform-aws-arc-db/blob/main/example/main.tf) file in the example folder.

```hcl
module "aurora" {
source = "sourcefuse/arc-db/aws"
version = "3.0.0"
environment = "dev"
namespace = "arc"
vpc_id = "vpc-000111222333444"
aurora_cluster_enabled = true
aurora_cluster_name = "aurora-example"
enhanced_monitoring_name = "aurora-example-enhanced-monitoring"
aurora_db_admin_username = "example_db_admin"
aurora_db_name = "example"
aurora_allow_major_version_upgrade = true
aurora_auto_minor_version_upgrade = true
aurora_cluster_size = 0
aurora_instance_type = "db.serverless"
aurora_subnets = [
"subnet-0001112223334441",
"subnet-0001112223334442",
]
aurora_security_groups = [
"sg-0001112223334441",
"sg-0001112223334442"
]
aurora_allowed_cidr_blocks = [
"10.0.0.0/16"
]
aurora_serverlessv2_scaling_configuration = {
max_capacity = 16
min_capacity = 2
}
}
```

<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
## Requirements

Expand Down
16 changes: 9 additions & 7 deletions example/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ module "rds_sql_server" {
additional_ingress_rules_rds = var.additional_ingress_rules_rds
}

## sql server rds instance
## postgresql rds instance
module "rds_postgresql" {
source = "../"

Expand All @@ -109,12 +109,14 @@ module "rds_postgresql" {
region = var.region
vpc_id = data.aws_vpc.vpc.id

account_id = data.aws_caller_identity.this.id
rds_instance_enabled = true
rds_instance_name = "postgresql-example"
enhanced_monitoring_name = "postgresql-example-enhanced-monitoring"
rds_instance_database_name = "arc"
rds_instance_database_user = "example_db_admin"
account_id = data.aws_caller_identity.this.id
rds_instance_enabled = true
rds_instance_name = "postgresql-example"
performance_insights_enabled = true
enhanced_monitoring_name = "postgresql-example-enhanced-monitoring"
enhanced_monitoring_arn = "arn:aws:iam::aws:policy/service-role/AmazonRDSEnhancedMonitoringRole"
rds_instance_database_name = "arc"
rds_instance_database_user = "example_db_admin"

rds_instance_security_group_ids = data.aws_security_groups.db_sg.ids
rds_instance_allowed_cidr_blocks = [data.aws_vpc.vpc.cidr_block]
Expand Down
3 changes: 2 additions & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -379,9 +379,10 @@ module "rds_instance" {
license_model = var.rds_instance_license_model
deletion_protection = var.deletion_protection
iops = var.rds_instance_iops
# monitoring_role_arn = aws_iam_role.enhanced_monitoring.arn // TODO - make this conditional

enabled_cloudwatch_logs_exports = var.rds_enabled_cloudwatch_logs_exports
monitoring_interval = var.rds_monitoring_interval
monitoring_role_arn = var.rds_monitoring_interval > 0 ? aws_iam_role.enhanced_monitoring.arn : null
performance_insights_enabled = var.performance_insights_enabled
performance_insights_kms_key_id = var.performance_insights_kms_key_id
performance_insights_retention_period = var.performance_insights_retention_period
Expand Down

0 comments on commit e7ef8d4

Please sign in to comment.