import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Provides an RDS DB proxy resource. For additional information, see the [RDS User Guide](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/rds-proxy.html). * * > **Note:** Not all Availability Zones (AZs) support DB proxies. Specifying `vpcSubnetIds` for AZs that do not support proxies will not trigger an error as long as at least one `vpcSubnetId` is valid. However, this will cause Terraform to continuously detect differences between the configuration and the actual infrastructure. Refer to the Unsupported Availability Zones section below for potential workarounds. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.rds.Proxy("example", { * auths: [{ * authScheme: "SECRETS", * description: "example", * iamAuth: "DISABLED", * secretArn: exampleAwsSecretsmanagerSecret.arn, * }], * name: "example", * debugLogging: false, * engineFamily: "MYSQL", * idleClientTimeout: 1800, * requireTls: true, * roleArn: exampleAwsIamRole.arn, * vpcSecurityGroupIds: [exampleAwsSecurityGroup.id], * vpcSubnetIds: [exampleAwsSubnet.id], * tags: { * Name: "example", * Key: "value", * }, * }); * ``` * * ### Unsupported Availability Zones * * Terraform may report constant differences if you use `vpcSubnetIds` that correspond to Availability Zones (AZs) that do not support a DB proxy. While this typically does not result in an error, AWS only returns `vpcSubnetIds` for AZs that support DB proxies. As a result, Terraform detects a mismatch between your configuration and the actual infrastructure, leading it to report that changes are required. Below are some ways to avoid this issue. * * One solution is to exclude AZs that do not support DB proxies by using the `aws.getAvailabilityZones` data source. The example below demonstrates how to configure this for the `us-east-1` region, excluding the `use1-az3` AZ. (Keep in mind that AZ names can vary between accounts, while AZ IDs remain consistent.) If the `us-east-1` region has six AZs in total and you aim to configure the maximum number of subnets, you would exclude one AZ and configure five subnets: * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * import * as std from "@pulumi/std"; * * const available = aws.getAvailabilityZones({ * filters: [{ * name: "opt-in-status", * values: ["opt-in-not-required"], * }], * excludeZoneIds: ["use1-az3"], * state: "available", * }); * const example = new aws.ec2.Vpc("example", {cidrBlock: "10.0.0.0/16"}); * const exampleSubnet: aws.ec2.Subnet[] = []; * for (let range = 0; range < 5; range++) { * exampleSubnet.push(new aws.ec2.Subnet(`example-${range}`, { * cidrBlock: std.cidrsubnetOutput({ * input: example.cidrBlock, * newbits: 8, * netnum: range, * }).result, * availabilityZone: available.then(available => available.names[range]), * vpcId: example.id, * })); * } * const exampleProxy = new aws.rds.Proxy("example", { * name: "example", * vpcSubnetIds: [exampleSubnet.id], * }); * ``` * * Another approach is to use the `lifecycle` `ignoreChanges` meta-argument. With this method, Terraform will stop detecting differences for the `vpcSubnetIds` argument. However, note that this approach disables Terraform's ability to track and manage updates to `vpcSubnetIds`, so use it carefully to avoid unintended drift between your configuration and the actual infrastructure. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const example = new aws.rds.Proxy("example", { * name: "example", * vpcSubnetIds: [exampleAwsSubnet.id], * }, { * ignoreChanges: ["vpcSubnetIds"], * }); * ``` * * ## Import * * Using `pulumi import`, import DB proxies using the `name`. For example: * * ```sh * $ pulumi import aws:rds/proxy:Proxy example example * ``` */ export declare class Proxy extends pulumi.CustomResource { /** * Get an existing Proxy resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: ProxyState, opts?: pulumi.CustomResourceOptions): Proxy; /** * Returns true if the given object is an instance of Proxy. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Proxy; /** * ARN for the proxy. */ readonly arn: pulumi.Output; /** * Configuration block(s) with authorization mechanisms to connect to the associated instances or clusters. Required when `defaultAuthScheme` is `NONE` or unspecified. See the `auth` block below. */ readonly auths: pulumi.Output; /** * Whether the proxy includes detailed information about SQL statements in its logs. This information helps you to debug issues involving SQL behavior or the performance and scalability of the proxy connections. The debug information includes the text of SQL statements that you submit through the proxy. Thus, only enable this setting when needed for debugging, and only when you have security measures in place to safeguard any sensitive information that appears in the logs. */ readonly debugLogging: pulumi.Output; /** * Default authentication scheme that the proxy uses for client connections to the proxy and connections from the proxy to the underlying database. Valid values are `NONE` and `IAM_AUTH`. Defaults to `NONE`. */ readonly defaultAuthScheme: pulumi.Output; /** * Endpoint that you can use to connect to the proxy. You include the endpoint value in the connection string for a database client application. */ readonly endpoint: pulumi.Output; /** * Network type of the DB proxy endpoint. Valid values are `IPV4`, `IPV6` and `DUAL`. Defaults to `IPV4`. If `IPV6` is specified, the subnets associated with the proxy must be IPv6-only, and `targetConnectionNetworkType` must be `IPV6`. */ readonly endpointNetworkType: pulumi.Output; /** * Kinds of databases that the proxy can connect to. This value determines which database network protocol the proxy recognizes when it interprets network traffic to and from the database. For Aurora MySQL, RDS for MariaDB, and RDS for MySQL databases, specify `MYSQL`. For Aurora PostgreSQL and RDS for PostgreSQL databases, specify `POSTGRESQL`. For RDS for Microsoft SQL Server, specify `SQLSERVER`. Valid values are `MYSQL`, `POSTGRESQL`, and `SQLSERVER`. */ readonly engineFamily: pulumi.Output; /** * Number of seconds that a connection to the proxy can be inactive before the proxy disconnects it. You can set this value higher or lower than the connection timeout limit for the associated database. */ readonly idleClientTimeout: pulumi.Output; /** * Identifier for the proxy. This name must be unique for all proxies owned by your AWS account in the specified AWS Region. An identifier must begin with a letter and must contain only ASCII letters, digits, and hyphens; it can't end with a hyphen or contain two consecutive hyphens. */ readonly name: pulumi.Output; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ readonly region: pulumi.Output; /** * Whether TLS encryption is required for connections to the proxy. Enabling this setting enforces encrypted TLS connections to the proxy. */ readonly requireTls: pulumi.Output; /** * ARN of the IAM role that the proxy uses to access secrets in AWS Secrets Manager. */ readonly roleArn: pulumi.Output; /** * Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ readonly tags: pulumi.Output<{ [key: string]: string; } | undefined>; /** * Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ readonly tagsAll: pulumi.Output<{ [key: string]: string; }>; /** * Network type that the proxy uses to connect to the target database. Valid values are `IPV4` and `IPV6`. Defaults to `IPV4`. */ readonly targetConnectionNetworkType: pulumi.Output; /** * One or more VPC security group IDs to associate with the new proxy. */ readonly vpcSecurityGroupIds: pulumi.Output; /** * One or more VPC subnet IDs to associate with the new proxy. */ readonly vpcSubnetIds: pulumi.Output; /** * Create a Proxy resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: ProxyArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Proxy resources. */ export interface ProxyState { /** * ARN for the proxy. */ arn?: pulumi.Input; /** * Configuration block(s) with authorization mechanisms to connect to the associated instances or clusters. Required when `defaultAuthScheme` is `NONE` or unspecified. See the `auth` block below. */ auths?: pulumi.Input[] | undefined>; /** * Whether the proxy includes detailed information about SQL statements in its logs. This information helps you to debug issues involving SQL behavior or the performance and scalability of the proxy connections. The debug information includes the text of SQL statements that you submit through the proxy. Thus, only enable this setting when needed for debugging, and only when you have security measures in place to safeguard any sensitive information that appears in the logs. */ debugLogging?: pulumi.Input; /** * Default authentication scheme that the proxy uses for client connections to the proxy and connections from the proxy to the underlying database. Valid values are `NONE` and `IAM_AUTH`. Defaults to `NONE`. */ defaultAuthScheme?: pulumi.Input; /** * Endpoint that you can use to connect to the proxy. You include the endpoint value in the connection string for a database client application. */ endpoint?: pulumi.Input; /** * Network type of the DB proxy endpoint. Valid values are `IPV4`, `IPV6` and `DUAL`. Defaults to `IPV4`. If `IPV6` is specified, the subnets associated with the proxy must be IPv6-only, and `targetConnectionNetworkType` must be `IPV6`. */ endpointNetworkType?: pulumi.Input; /** * Kinds of databases that the proxy can connect to. This value determines which database network protocol the proxy recognizes when it interprets network traffic to and from the database. For Aurora MySQL, RDS for MariaDB, and RDS for MySQL databases, specify `MYSQL`. For Aurora PostgreSQL and RDS for PostgreSQL databases, specify `POSTGRESQL`. For RDS for Microsoft SQL Server, specify `SQLSERVER`. Valid values are `MYSQL`, `POSTGRESQL`, and `SQLSERVER`. */ engineFamily?: pulumi.Input; /** * Number of seconds that a connection to the proxy can be inactive before the proxy disconnects it. You can set this value higher or lower than the connection timeout limit for the associated database. */ idleClientTimeout?: pulumi.Input; /** * Identifier for the proxy. This name must be unique for all proxies owned by your AWS account in the specified AWS Region. An identifier must begin with a letter and must contain only ASCII letters, digits, and hyphens; it can't end with a hyphen or contain two consecutive hyphens. */ name?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * Whether TLS encryption is required for connections to the proxy. Enabling this setting enforces encrypted TLS connections to the proxy. */ requireTls?: pulumi.Input; /** * ARN of the IAM role that the proxy uses to access secrets in AWS Secrets Manager. */ roleArn?: pulumi.Input; /** * Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Map of tags assigned to the resource, including those inherited from the provider `defaultTags` configuration block. */ tagsAll?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Network type that the proxy uses to connect to the target database. Valid values are `IPV4` and `IPV6`. Defaults to `IPV4`. */ targetConnectionNetworkType?: pulumi.Input; /** * One or more VPC security group IDs to associate with the new proxy. */ vpcSecurityGroupIds?: pulumi.Input[] | undefined>; /** * One or more VPC subnet IDs to associate with the new proxy. */ vpcSubnetIds?: pulumi.Input[] | undefined>; } /** * The set of arguments for constructing a Proxy resource. */ export interface ProxyArgs { /** * Configuration block(s) with authorization mechanisms to connect to the associated instances or clusters. Required when `defaultAuthScheme` is `NONE` or unspecified. See the `auth` block below. */ auths?: pulumi.Input[] | undefined>; /** * Whether the proxy includes detailed information about SQL statements in its logs. This information helps you to debug issues involving SQL behavior or the performance and scalability of the proxy connections. The debug information includes the text of SQL statements that you submit through the proxy. Thus, only enable this setting when needed for debugging, and only when you have security measures in place to safeguard any sensitive information that appears in the logs. */ debugLogging?: pulumi.Input; /** * Default authentication scheme that the proxy uses for client connections to the proxy and connections from the proxy to the underlying database. Valid values are `NONE` and `IAM_AUTH`. Defaults to `NONE`. */ defaultAuthScheme?: pulumi.Input; /** * Network type of the DB proxy endpoint. Valid values are `IPV4`, `IPV6` and `DUAL`. Defaults to `IPV4`. If `IPV6` is specified, the subnets associated with the proxy must be IPv6-only, and `targetConnectionNetworkType` must be `IPV6`. */ endpointNetworkType?: pulumi.Input; /** * Kinds of databases that the proxy can connect to. This value determines which database network protocol the proxy recognizes when it interprets network traffic to and from the database. For Aurora MySQL, RDS for MariaDB, and RDS for MySQL databases, specify `MYSQL`. For Aurora PostgreSQL and RDS for PostgreSQL databases, specify `POSTGRESQL`. For RDS for Microsoft SQL Server, specify `SQLSERVER`. Valid values are `MYSQL`, `POSTGRESQL`, and `SQLSERVER`. */ engineFamily: pulumi.Input; /** * Number of seconds that a connection to the proxy can be inactive before the proxy disconnects it. You can set this value higher or lower than the connection timeout limit for the associated database. */ idleClientTimeout?: pulumi.Input; /** * Identifier for the proxy. This name must be unique for all proxies owned by your AWS account in the specified AWS Region. An identifier must begin with a letter and must contain only ASCII letters, digits, and hyphens; it can't end with a hyphen or contain two consecutive hyphens. */ name?: pulumi.Input; /** * Region where this resource will be [managed](https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints). Defaults to the Region set in the provider configuration. */ region?: pulumi.Input; /** * Whether TLS encryption is required for connections to the proxy. Enabling this setting enforces encrypted TLS connections to the proxy. */ requireTls?: pulumi.Input; /** * ARN of the IAM role that the proxy uses to access secrets in AWS Secrets Manager. */ roleArn: pulumi.Input; /** * Map of tags to assign to the resource. If configured with a provider `defaultTags` configuration block present, tags with matching keys will overwrite those defined at the provider-level. */ tags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * Network type that the proxy uses to connect to the target database. Valid values are `IPV4` and `IPV6`. Defaults to `IPV4`. */ targetConnectionNetworkType?: pulumi.Input; /** * One or more VPC security group IDs to associate with the new proxy. */ vpcSecurityGroupIds?: pulumi.Input[] | undefined>; /** * One or more VPC subnet IDs to associate with the new proxy. */ vpcSubnetIds: pulumi.Input[]>; } //# sourceMappingURL=proxy.d.ts.map