AWS Amazon RDS Cluster Parameter Group

This page shows how to write Terraform and CloudFormation for Amazon RDS Cluster Parameter Group and write them securely.

aws_rds_cluster_parameter_group (Terraform)

The Cluster Parameter Group in Amazon RDS can be configured in Terraform with the resource name aws_rds_cluster_parameter_group. The following sections describe 5 examples of how to use the resource and its parameters.

Example Usage from GitHub

parameter-groups.tf#L4
resource "aws_rds_cluster_parameter_group" "aurora_cluster_postgres_parameter_group" {
  count       = var.db_cluster_parameter_group_name == "" && var.engine == "aurora-postgresql" ? 1 : 0
  name        = "aurora-postgres10-cluster-parameter-group"
  family      = "aurora-postgresql10"
  description = "aurora-postgres10-cluster-parameter-group"
}
rds.tf#L14
resource "aws_rds_cluster_parameter_group" "pass" {
  name        = "rds-cluster-pg-pass"
  family      = "aurora-postgresql11"
  description = "RDS default cluster parameter group"

  parameter {
rds.tf#L14
resource "aws_rds_cluster_parameter_group" "pass" {
  name        = "rds-cluster-pg-pass"
  family      = "aurora-postgresql11"
  description = "RDS default cluster parameter group"

  parameter {
main.tf#L16
resource "aws_rds_cluster_parameter_group" "this_no_prefix" {
  count = var.use_name_prefix ? 0 : 1

  name        = var.name
  description = var.description
  family      = var.family
parameter_group.tf#L1
resource "aws_rds_cluster_parameter_group" "slowquery_source_dbcluster_aurora_postgresql" {
  name        = "slowquery-source-dbcluster-aurora-postgresql"
  description = "slowquery-source-dbcluster-aurora-postgresql"
  family      = "aurora-postgresql10"

  parameter {

Review your Terraform file for AWS best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).

Parameters

Explanation in Terraform Registry

Provides an RDS DB cluster parameter group resource. Documentation of the available parameters for various Aurora engines can be found at:

Tips: Best Practices for The Other AWS Amazon RDS Resources

In addition to the aws_db_instance, AWS Amazon RDS has the other resources that should be configured for security reasons. Please check some examples of those resources and precautions.

risk-label

aws_db_instance

Ensure backup retension of your RDS instance is specified

It's better to set it explicitly to reduce the risk of availability issues.

risk-label

aws_rds_cluster

Ensure backup retension of your RDS cluster is specified

It's better to set it explicitly to reduce the risk of availability issues.

risk-label

aws_rds_cluster_instance

Ensure your RDS cluster instance blocks unwanted access

It's better to limit accessibily to the minimum that is required for the application to work.

Review your AWS Amazon RDS settings

In addition to the above, there are other security points you should be aware of making sure that your .tf files are protected in Shisho Cloud.

AWS::RDS::DBClusterParameterGroup (CloudFormation)

The DBClusterParameterGroup in RDS can be configured in CloudFormation with the resource name AWS::RDS::DBClusterParameterGroup. The following sections describe 10 examples of how to use the resource and its parameters.

Example Usage from GitHub

AuroraRDSClusterParameter.yml#L1
Type: AWS::RDS::DBClusterParameterGroup
Properties:
  Description: Parameter group for the Serverless Aurora RDS DB.
  Family: aurora5.6
  Parameters:
AuroraRDSClusterParameter.yml#L1
Type: AWS::RDS::DBClusterParameterGroup
Properties:
  Description: Parameter group for the Serverless Aurora RDS DB.
  Family: aurora5.6
  Parameters:
AuroraRDSClusterParameter.yml#L1
Type: AWS::RDS::DBClusterParameterGroup
Properties:
  Description: Parameter group for the Serverless Aurora RDS DB.
  Family: aurora5.6
  Parameters:
AuroraRDSClusterParameter.yml#L1
Type: AWS::RDS::DBClusterParameterGroup
Properties:
  Description: Parameter group for the Serverless Aurora RDS DB.
  Family: aurora5.6
  Parameters:
AuroraRDSClusterParameter.yml#L1
Type: AWS::RDS::DBClusterParameterGroup
Properties:
  Description: Parameter group for the Serverless Aurora RDS DB.
  Family: aurora-postgresql11
  Parameters:
Step6Code.json#L46
      "Type" : "AWS::RDS::DBClusterParameterGroup",
      "Properties" : {
        "Parameters" : {
          "aurora_load_from_s3_role" : { "Fn::GetAtt" : [ "IAMRoleAurora", "Arn" ] }
        },
        "Family" : "aurora5.6",
rdsclusterparamsgroup.json#L4
  "Type" : "AWS::RDS::DBClusterParameterGroup",
  "Properties" : {
    "Description" : "{{settings["description"]}}",
    "Family" : "{{settings["family"]}}",
    "Parameters" : {
    {% for k, v in settings["parameters"].iteritems() %}
negative2.json#L13
      "Type": "AWS::RDS::DBClusterParameterGroup"
    },
    "RDSDBInstance1": {
      "Properties": {
        "PubliclyAccessible": "true",
        "AvailabilityZone": "eu-west-1b",
positive4.json#L12
      "Type": "AWS::RDS::DBClusterParameterGroup"
    },
    "RDSDBInstance1": {
      "Type": "AWS::RDS::DBInstance",
      "Properties": {
        "PubliclyAccessible": "true",
cloudformation-list-stack-resources.aurora.json#L10
            "ResourceType": "AWS::RDS::DBClusterParameterGroup",
            "ResourceStatus": "UPDATE_COMPLETE"
        },
        {
            "PhysicalResourceId": "auroraClusterRole",
            "ResourceType": "AWS::IAM::Role",

Parameters

Explanation in CloudFormation Registry

The AWS::RDS::DBClusterParameterGroup resource creates a new Amazon RDS DB cluster parameter group.

For information about configuring parameters for Amazon Aurora DB instances, see Working with DB parameter groups and DB cluster parameter groups in the Amazon Aurora User Guide.

Note If you apply a parameter group to a DB cluster, then its DB instances might need to reboot. This can result in an outage while the DB instances are rebooting. If you apply a change to parameter group associated with a stopped DB cluster, then the update stack waits until the DB cluster is started.

Frequently asked questions

What is AWS Amazon RDS Cluster Parameter Group?

AWS Amazon RDS Cluster Parameter Group is a resource for Amazon RDS of Amazon Web Service. Settings can be wrote in Terraform and CloudFormation.

Where can I find the example code for the AWS Amazon RDS Cluster Parameter Group?

For Terraform, the QuiNovas/terraform-aws-aurora-serverless, bridgecrewio/checkov and bridgecrewio/checkov source code examples are useful. See the Terraform Example section for further details.

For CloudFormation, the sathishrajendran565/Arizon-CRM, Teslenk0/lambda-examples and 124um/serverless source code examples are useful. See the CloudFormation Example section for further details.