Skip to content

massdriver-cloud/aws-aurora-postgresql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Massdriver

aws-aurora-postgresql

Release Contributors Forks Stargazers Issues MIT License

Amazon Aurora is a fully managed relational database engine that's compatible with PostgreSQL. Aurora includes a high-performance storage subsystem. Its PostgreSQL-compatible database engines are customized to take advantage of that fast distributed storage. The underlying storage grows automatically as needed. An Aurora cluster volume can grow to a maximum size of 128 tebibytes (TiB). Aurora also automates and standardizes database clustering and replication, which are typically among the most challenging aspects of database configuration and administration.


Design

For detailed information, check out our Operator Guide for this bundle.

Usage

Our bundles aren't intended to be used locally, outside of testing. Instead, our bundles are designed to be configured, connected, deployed and monitored in the Massdriver platform.

What are Bundles?

Bundles are the basic building blocks of infrastructure, applications, and architectures in Massdriver. Read more here.

Bundle

Params

Form input parameters for configuring a bundle for deployment.

View

Properties

  • availability (object)
    • autoscaling_mode (string): Default: DISABLED.
      • One of
        • Disabled
        • Database Connections
        • CPU Utilization
    • min_replicas (integer): Replicas and primary are automatically spread across AWS zones. Minimum: 0. Maximum: 15. Default: 0.
  • backup (object)
    • retention_period (integer): The days to retain backups for. Minimum: 1. Maximum: 35. Default: 7.
    • skip_final_snapshot (boolean): Determines whether a final DB snapshot is created before the DB cluster is deleted. If true is specified, no DB snapshot is created. Default: False.
  • database (object)
    • ca_cert_identifier (string): The identifier of the CA certificate for the DB instances. Learn more. Default: rds-ca-rsa2048-g1.

      • One of
        • RSA 2048
        • RSA 4096
        • ECC 384
    • deletion_protection (boolean): Explicitly requires this field to be unset before allowing deletion. Default: True.

    • source_snapshot (string): Cluster or database snapshot ARN. Specifies whether or not to create this cluster from a snapshot. Aurora clusters can be restored from cluster snapshots or database snapshots. Learn more.

      Examples:

      "arn:aws:rds::ACCOUNT_NUMBER:db/prod"
      "arn:aws:ec2::ACCOUNT_NUMBER:vpc/vpc-foo"
    • version (string): Must be one of: ['11.9', '11.12', '11.13', '11.14', '11.15', '11.16', '11.17', '11.18', '12.7', '12.8', '12.9', '12.10', '12.11', '12.12', '12.13', '13.3', '13.4', '13.5', '13.6', '13.7', '13.8', '13.9', '14.3', '14.4', '14.5', '14.6']. Default: 14.6.

  • networking (object)
    • subnet_type (string): Deploy to internal subnets (cannot reach the internet) or private subnets (internet egress traffic allowed). Must be one of: ['internal', 'private']. Default: internal.
  • observability (object)
    • enable_cloudwatch_logs_export (boolean): Default: True.
    • enhanced_monitoring_interval (integer): Monitor the operating system of DB instances in real time. Enhanced Monitoring is stored in Cloudwatch Logs and may incur additional changes. Learn more. Default: 0.
      • One of
        • Disabled
        • 1 second
        • 5 seconds
        • 10 seconds
        • 15 seconds
        • 30 seconds
        • 60 seconds
    • performance_insights_retention_period (integer): Performance Insights is a database performance tuning and monitoring feature that helps you quickly assess the load on your database, and determine when and where to take action. Performance Insights allows non-experts to detect performance problems with an easy-to-understand dashboard that visualizes database load. Default: 0.
      • One of
        • Disabled
        • 1 Week
        • 1 Month
        • 3 Months
        • 6 Months
        • 1 Year
        • 2 Years

Examples

{
    "__name": "Development",
    "availability": {
        "min_replicas": 0
    },
    "backup": {
        "retention_period": 1,
        "skip_final_snapshot": true
    },
    "database": {
        "deletion_protection": false,
        "instance_class": "db.r6g.large",
        "version": "14.6"
    },
    "networking": {
        "subnet_type": "internal"
    },
    "observability": {
        "enable_cloudwatch_logs_export": false,
        "enhanced_monitoring_interval": 0,
        "performance_insights_retention_period": 0
    }
}
{
    "__name": "Development Serverless",
    "availability": {
        "min_replicas": 0
    },
    "backup": {
        "retention_period": 1,
        "skip_final_snapshot": true
    },
    "database": {
        "deletion_protection": false,
        "instance_class": "db.serverless",
        "version": "14.6"
    },
    "networking": {
        "subnet_type": "internal"
    },
    "observability": {
        "enable_cloudwatch_logs_export": false,
        "enhanced_monitoring_interval": 0,
        "performance_insights_retention_period": 0
    }
}
{
    "__name": "Production",
    "availability": {
        "min_replicas": 2
    },
    "backup": {
        "retention_period": 35,
        "skip_final_snapshot": false
    },
    "database": {
        "deletion_protection": true,
        "instance_class": "db.r6g.2xlarge",
        "version": "14.6"
    },
    "networking": {
        "subnet_type": "internal"
    },
    "observability": {
        "enable_cloudwatch_logs_export": true,
        "enhanced_monitoring_interval": 60,
        "performance_insights_retention_period": 372
    }
}

Connections

Connections from other bundles that this bundle depends on.

View

Properties

  • aws_authentication (object): . Cannot contain additional properties.

    • data (object)
      • arn (string): Amazon Resource Name.

        Examples:

        "arn:aws:rds::ACCOUNT_NUMBER:db/prod"
        "arn:aws:ec2::ACCOUNT_NUMBER:vpc/vpc-foo"
      • external_id (string): An external ID is a piece of data that can be passed to the AssumeRole API of the Security Token Service (STS). You can then use the external ID in the condition element in a role's trust policy, allowing the role to be assumed only when a certain value is present in the external ID.

    • specs (object)
      • aws (object): .
        • region (string): AWS Region to provision in.

          Examples:

          "us-west-2"
  • vpc (object): . Cannot contain additional properties.

    • data (object)
      • infrastructure (object)
        • arn (string): Amazon Resource Name.

          Examples:

          "arn:aws:rds::ACCOUNT_NUMBER:db/prod"
          "arn:aws:ec2::ACCOUNT_NUMBER:vpc/vpc-foo"
        • cidr (string)

          Examples:

          "10.100.0.0/16"
          "192.24.12.0/22"
        • internal_subnets (array)

          • Items (object): AWS VCP Subnet.

            • arn (string): Amazon Resource Name.

              Examples:

              "arn:aws:rds::ACCOUNT_NUMBER:db/prod"
              "arn:aws:ec2::ACCOUNT_NUMBER:vpc/vpc-foo"
            • aws_zone (string): AWS Availability Zone.

              Examples:

            • cidr (string)

              Examples:

              "10.100.0.0/16"
              "192.24.12.0/22"

            Examples:

        • private_subnets (array)

          • Items (object): AWS VCP Subnet.

            • arn (string): Amazon Resource Name.

              Examples:

              "arn:aws:rds::ACCOUNT_NUMBER:db/prod"
              "arn:aws:ec2::ACCOUNT_NUMBER:vpc/vpc-foo"
            • aws_zone (string): AWS Availability Zone.

              Examples:

            • cidr (string)

              Examples:

              "10.100.0.0/16"
              "192.24.12.0/22"

            Examples:

        • public_subnets (array)

          • Items (object): AWS VCP Subnet.

            • arn (string): Amazon Resource Name.

              Examples:

              "arn:aws:rds::ACCOUNT_NUMBER:db/prod"
              "arn:aws:ec2::ACCOUNT_NUMBER:vpc/vpc-foo"
            • aws_zone (string): AWS Availability Zone.

              Examples:

            • cidr (string)

              Examples:

              "10.100.0.0/16"
              "192.24.12.0/22"

            Examples:

    • specs (object)
      • aws (object): .
        • region (string): AWS Region to provision in.

          Examples:

          "us-west-2"

Artifacts

Resources created by this bundle that can be connected to other bundles.

View

Properties

  • readers (object): Authentication parameters for a PostgreSQL database. Cannot contain additional properties.

    • data (object): Cannot contain additional properties.

      • authentication (object)
        • hostname (string)
        • password (string)
        • port (integer): Port number. Minimum: 0. Maximum: 65535.
        • username (string)
      • infrastructure (object): Cloud specific PostgreSQL configuration data.
        • One of
          • AWS Infrastructure ARNobject: Minimal AWS Infrastructure Config. Cannot contain additional properties.

            • arn (string): Amazon Resource Name.

              Examples:

              "arn:aws:rds::ACCOUNT_NUMBER:db/prod"
              "arn:aws:ec2::ACCOUNT_NUMBER:vpc/vpc-foo"
          • GCP Infrastructure Nameobject: GCP Infrastructure Config For Resources With A Name Not A GRN. Cannot contain additional properties.

            • name (string): Name Of GCP Resource.

              Examples:

              "my-cloud-function"
              "my-sql-instance"
          • Azure Infrastructure Resource IDobject: Minimal Azure Infrastructure Config. Cannot contain additional properties.

            • ari (string): Azure Resource ID.

              Examples:

              "/subscriptions/12345678-1234-1234-abcd-1234567890ab/resourceGroups/resource-group-name/providers/Microsoft.Network/virtualNetworks/network-name"
          • Kuberenetes infrastructure configobject: . Cannot contain additional properties.

            • kubernetes_namespace (string)
            • kubernetes_service (string)
      • security (object): TBD.
        • Any of
          • AWS Security informationobject: Informs downstream services of network and/or IAM policies. Cannot contain additional properties.
            • iam (object): IAM Policies. Cannot contain additional properties.

              • ^[a-z]+[a-z_]*[a-z]+$ (object)
                • policy_arn (string): AWS IAM policy ARN.

                  Examples:

                  "arn:aws:rds::ACCOUNT_NUMBER:db/prod"
                  "arn:aws:ec2::ACCOUNT_NUMBER:vpc/vpc-foo"
            • identity (object): For instances where IAM policies must be attached to a role attached to an AWS resource, for instance AWS Eventbridge to Firehose, this attribute should be used to allow the downstream to attach it's policies (Firehose) directly to the IAM role created by the upstream (Eventbridge). It is important to remember that connections in massdriver are one way, this scheme perserves the dependency relationship while allowing bundles to control the lifecycles of resources under it's management. Cannot contain additional properties.

              • role_arn (string): ARN for this resources IAM Role.

                Examples:

                "arn:aws:rds::ACCOUNT_NUMBER:db/prod"
                "arn:aws:ec2::ACCOUNT_NUMBER:vpc/vpc-foo"
            • network (object): AWS security group rules to inform downstream services of ports to open for communication. Cannot contain additional properties.

              • ^[a-z-]+$ (object)
                • arn (string): Amazon Resource Name.

                  Examples:

                  "arn:aws:rds::ACCOUNT_NUMBER:db/prod"
                  "arn:aws:ec2::ACCOUNT_NUMBER:vpc/vpc-foo"
                • port (integer): Port number. Minimum: 0. Maximum: 65535.

                • protocol (string): Must be one of: ['tcp', 'udp'].

          • Securityobject: Azure Security Configuration. Cannot contain additional properties.
            • iam (object): IAM Roles And Scopes. Cannot contain additional properties.
              • ^[a-z]+[a-z_]*[a-z]$ (object)
                • role: Azure Role.

                  Examples:

                  "Storage Blob Data Reader"
                • scope (string): Azure IAM Scope.

          • Securityobject: GCP Security Configuration. Cannot contain additional properties.
            • iam (object): IAM Roles And Conditions. Cannot contain additional properties.
              • ^[a-z]+[a-z_]*[a-z]$ (object)
                • condition (string): GCP IAM Condition.

                • role: GCP Role.

                  Examples:

                  "roles/owner"
                  "roles/redis.editor"
                  "roles/storage.objectCreator"
                  "roles/storage.legacyObjectReader"
    • specs (object): Cannot contain additional properties.

      • aws (object): .

        • region (string): AWS Region to provision in.

          Examples:

          "us-west-2"
      • azure (object): .

        • region (string): Select the Azure region you'd like to provision your resources in.
      • gcp (object): .

        • project (string)

        • region (string): The GCP region to provision resources in.

          Examples:

          "us-east1"
          "us-east4"
          "us-west1"
          "us-west2"
          "us-west3"
          "us-west4"
          "us-central1"
      • rdbms (object): Common metadata for relational databases.

        • engine (string): The type of database server.

          Examples:

          "postgresql"
          "mysql"
        • engine_version (string): The cloud provider's database version.

          Examples:

          "5.7.mysql_aurora.2.03.2"
        • version (string): The database version. Default: ``.

          Examples:

          "12.2"
          "5.7"

        Examples:

        {
            "engine": "postgresql",
            "engine_version": "10.14",
            "version": "10.14"
        }
        {
            "engine": "mysql",
            "engine_version": "5.7.mysql_aurora.2.03.2",
            "version": "5.7"
        }
  • writer (object): Authentication parameters for a PostgreSQL database. Cannot contain additional properties.

    • data (object): Cannot contain additional properties.

      • authentication (object)
        • hostname (string)
        • password (string)
        • port (integer): Port number. Minimum: 0. Maximum: 65535.
        • username (string)
      • infrastructure (object): Cloud specific PostgreSQL configuration data.
        • One of
          • AWS Infrastructure ARNobject: Minimal AWS Infrastructure Config. Cannot contain additional properties.

            • arn (string): Amazon Resource Name.

              Examples:

              "arn:aws:rds::ACCOUNT_NUMBER:db/prod"
              "arn:aws:ec2::ACCOUNT_NUMBER:vpc/vpc-foo"
          • GCP Infrastructure Nameobject: GCP Infrastructure Config For Resources With A Name Not A GRN. Cannot contain additional properties.

            • name (string): Name Of GCP Resource.

              Examples:

              "my-cloud-function"
              "my-sql-instance"
          • Azure Infrastructure Resource IDobject: Minimal Azure Infrastructure Config. Cannot contain additional properties.

            • ari (string): Azure Resource ID.

              Examples:

              "/subscriptions/12345678-1234-1234-abcd-1234567890ab/resourceGroups/resource-group-name/providers/Microsoft.Network/virtualNetworks/network-name"
          • Kuberenetes infrastructure configobject: . Cannot contain additional properties.

            • kubernetes_namespace (string)
            • kubernetes_service (string)
      • security (object): TBD.
        • Any of
          • AWS Security informationobject: Informs downstream services of network and/or IAM policies. Cannot contain additional properties.
            • iam (object): IAM Policies. Cannot contain additional properties.

              • ^[a-z]+[a-z_]*[a-z]+$ (object)
                • policy_arn (string): AWS IAM policy ARN.

                  Examples:

                  "arn:aws:rds::ACCOUNT_NUMBER:db/prod"
                  "arn:aws:ec2::ACCOUNT_NUMBER:vpc/vpc-foo"
            • identity (object): For instances where IAM policies must be attached to a role attached to an AWS resource, for instance AWS Eventbridge to Firehose, this attribute should be used to allow the downstream to attach it's policies (Firehose) directly to the IAM role created by the upstream (Eventbridge). It is important to remember that connections in massdriver are one way, this scheme perserves the dependency relationship while allowing bundles to control the lifecycles of resources under it's management. Cannot contain additional properties.

              • role_arn (string): ARN for this resources IAM Role.

                Examples:

                "arn:aws:rds::ACCOUNT_NUMBER:db/prod"
                "arn:aws:ec2::ACCOUNT_NUMBER:vpc/vpc-foo"
            • network (object): AWS security group rules to inform downstream services of ports to open for communication. Cannot contain additional properties.

              • ^[a-z-]+$ (object)
                • arn (string): Amazon Resource Name.

                  Examples:

                  "arn:aws:rds::ACCOUNT_NUMBER:db/prod"
                  "arn:aws:ec2::ACCOUNT_NUMBER:vpc/vpc-foo"
                • port (integer): Port number. Minimum: 0. Maximum: 65535.

                • protocol (string): Must be one of: ['tcp', 'udp'].

          • Securityobject: Azure Security Configuration. Cannot contain additional properties.
            • iam (object): IAM Roles And Scopes. Cannot contain additional properties.
              • ^[a-z]+[a-z_]*[a-z]$ (object)
                • role: Azure Role.

                  Examples:

                  "Storage Blob Data Reader"
                • scope (string): Azure IAM Scope.

          • Securityobject: GCP Security Configuration. Cannot contain additional properties.
            • iam (object): IAM Roles And Conditions. Cannot contain additional properties.
              • ^[a-z]+[a-z_]*[a-z]$ (object)
                • condition (string): GCP IAM Condition.

                • role: GCP Role.

                  Examples:

                  "roles/owner"
                  "roles/redis.editor"
                  "roles/storage.objectCreator"
                  "roles/storage.legacyObjectReader"
    • specs (object): Cannot contain additional properties.

      • aws (object): .

        • region (string): AWS Region to provision in.

          Examples:

          "us-west-2"
      • azure (object): .

        • region (string): Select the Azure region you'd like to provision your resources in.
      • gcp (object): .

        • project (string)

        • region (string): The GCP region to provision resources in.

          Examples:

          "us-east1"
          "us-east4"
          "us-west1"
          "us-west2"
          "us-west3"
          "us-west4"
          "us-central1"
      • rdbms (object): Common metadata for relational databases.

        • engine (string): The type of database server.

          Examples:

          "postgresql"
          "mysql"
        • engine_version (string): The cloud provider's database version.

          Examples:

          "5.7.mysql_aurora.2.03.2"
        • version (string): The database version. Default: ``.

          Examples:

          "12.2"
          "5.7"

        Examples:

        {
            "engine": "postgresql",
            "engine_version": "10.14",
            "version": "10.14"
        }
        {
            "engine": "mysql",
            "engine_version": "5.7.mysql_aurora.2.03.2",
            "version": "5.7"
        }

Contributing

Bug Reports & Feature Requests

Did we miss something? Please submit an issue to report any bugs or request additional features.

Developing

Note: Massdriver bundles are intended to be tightly use-case scoped, intention-based, reusable pieces of IaC for use in the Massdriver platform. For this reason, major feature additions that broaden the scope of an existing bundle are likely to be rejected by the community.

Still want to get involved? First check out our contribution guidelines.

Fix or Fork

If your use-case isn't covered by this bundle, you can still get involved! Massdriver is designed to be an extensible platform. Fork this bundle, or create your own bundle from scratch!

Connect

Questions? Concerns? Adulations? We'd love to hear from you!

Please connect with us!

Email GitHub LinkedIn Twitter YouTube Reddit