Resource: aws_db_proxy

Provides an RDS DB proxy resource. For additional information, see the RDS User Guide.

Example Usage

resource "aws_db_proxy" "example" {
  name                   = "example"
  debug_logging          = false
  engine_family          = "MYSQL"
  idle_client_timeout    = 1800
  require_tls            = true
  role_arn               = aws_iam_role.example.arn
  vpc_security_group_ids = [aws_security_group.example.id]
  vpc_subnet_ids         = [aws_subnet.example.id]

  auth {
    auth_scheme = "SECRETS"
    description = "example"
    iam_auth    = "DISABLED"
    secret_arn  = aws_secretsmanager_secret.example.arn
  }

  tags = {
    Name = "example"
    Key  = "value"
  }
}

Argument Reference

This resource supports the following arguments:

auth blocks support the following:

Attribute Reference

This resource exports the following attributes in addition to the arguments above:

Timeouts

Configuration options:

Import

In Terraform v1.5.0 and later, use an import block to import DB proxies using the name. For example:

import {
  to = aws_db_proxy.example
  id = "example"
}

Using terraform import, import DB proxies using the name. For example:

% terraform import aws_db_proxy.example example