import * as pulumi from "@pulumi/pulumi"; import * as inputs from "../types/input"; import * as outputs from "../types/output"; /** * Provides an RDS DB parameter group resource. Documentation of the available parameters for various RDS engines can be found at: * * * [Aurora MySQL Parameters](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AuroraMySQL.Reference.html) * * [Aurora PostgreSQL Parameters](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/AuroraPostgreSQL.Reference.html) * * [MariaDB Parameters](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.MariaDB.Parameters.html) * * [Oracle Parameters](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ModifyInstance.Oracle.html#USER_ModifyInstance.Oracle.sqlnet) * * [PostgreSQL Parameters](https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Appendix.PostgreSQL.CommonDBATasks.html#Appendix.PostgreSQL.CommonDBATasks.Parameters) * * > **Hands-on:** For an example of the `aws.rds.ParameterGroup` in use, follow the Manage AWS RDS Instances tutorial on HashiCorp Learn. * * > **NOTE:** If you encounter a pulumi preview showing parameter changes after an apply (_i.e._, _perpetual diffs_), see the Problematic Plan Changes example below for additional guidance. * * ## Example Usage * * ### Basic Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const _default = new aws.rds.ParameterGroup("default", { * parameters: [ * { * name: "character_set_server", * value: "utf8", * }, * { * name: "character_set_client", * value: "utf8", * }, * ], * name: "rds-pg", * family: "mysql5.6", * }); * ``` * * ### Example of Problematic Configuration * * The following Terraform configuration includes a parameter that overlaps with an AWS default parameter, using the same `name` (`defaultPasswordLifetime`) and `value` (`0`). However: * * - AWS sets the default `applyMethod` for this parameter to `pending-reboot`. * - The AWS Provider defaults all parameters' `applyMethod` to `immediate`. * * This configuration attempts to change _only_ the `applyMethod` from `pending-reboot` to `immediate`, which is not allowed by AWS. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const test = new aws.rds.ParameterGroup("test", { * parameters: [{ * name: "default_password_lifetime", * value: "0", * }], * name: "random-test-parameter", * family: "mysql5.7", * }); * ``` * * ### Solution 1: Remove the Default Parameter * * Exclude the default parameter, such as `defaultPasswordLifetime` in this example, from your configuration entirely. This ensures Terraform does not attempt to modify the parameter, leaving it with AWS's default settings. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const test = new aws.rds.ParameterGroup("test", { * name: "random-test-parameter", * family: "mysql5.7", * }); * ``` * * ### Solution 2: Modify the Parameter's Value Also * * Change the `value` of the parameter along with its `applyMethod`. Since the AWS default `value` is `0`, selecting any other valid value (_e.g._, `1`) will resolve the issue. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const test = new aws.rds.ParameterGroup("test", { * parameters: [{ * name: "default_password_lifetime", * value: "1", * }], * name: "random-test-parameter", * family: "mysql5.7", * }); * ``` * * ### Solution 3: Align `applyMethod` with AWS Defaults * * Explicitly set the `applyMethod` to match AWS's default value for this parameter (`pending-reboot`). This prevents conflicts between Terraform's default (`immediate`) and AWS's default where the `value` is not changing. * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * * const test = new aws.rds.ParameterGroup("test", { * parameters: [{ * applyMethod: "pending-reboot", * name: "default_password_lifetime", * value: "0", * }], * name: "random-test-parameter", * family: "mysql5.7", * }); * ``` * * ## Import * * ### Identity Schema * * #### Required * * - `name` (String) Name of the DB parameter group. * * #### Optional * * - `accountId` (String) AWS Account where this resource is managed. * - `region` (String) Region where this resource is managed. * * Using `pulumi import`, import DB Parameter groups using the `name`. For example: * * ```sh * $ pulumi import aws:rds/parameterGroup:ParameterGroup example rds-pg * ``` */ export declare class ParameterGroup extends pulumi.CustomResource { /** * Get an existing ParameterGroup 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?: ParameterGroupState, opts?: pulumi.CustomResourceOptions): ParameterGroup; /** * Returns true if the given object is an instance of ParameterGroup. 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 ParameterGroup; /** * ARN of the db parameter group. */ readonly arn: pulumi.Output; /** * Description of the DB parameter group. Defaults to "Managed by Pulumi". */ readonly description: pulumi.Output; /** * Family of the DB parameter group. */ readonly family: pulumi.Output; /** * Name of the DB parameter group. If omitted, the provider will assign a random, unique name. */ readonly name: pulumi.Output; /** * Creates a unique name beginning with the specified prefix. Conflicts with `name`. */ readonly namePrefix: pulumi.Output; /** * DB parameters to apply. See `parameter` Block below for more details. Note that parameters may differ from a family to an other. Full list of all parameters can be discovered via [`aws rds describe-db-parameters`](https://docs.aws.amazon.com/cli/latest/reference/rds/describe-db-parameters.html) after initial creation of the group. */ readonly parameters: 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; /** * Set to true if you do not wish the parameter group to be deleted at destroy time, and instead just remove the parameter group from the Terraform state. */ readonly skipDestroy: 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; }>; /** * Create a ParameterGroup 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: ParameterGroupArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering ParameterGroup resources. */ export interface ParameterGroupState { /** * ARN of the db parameter group. */ arn?: pulumi.Input; /** * Description of the DB parameter group. Defaults to "Managed by Pulumi". */ description?: pulumi.Input; /** * Family of the DB parameter group. */ family?: pulumi.Input; /** * Name of the DB parameter group. If omitted, the provider will assign a random, unique name. */ name?: pulumi.Input; /** * Creates a unique name beginning with the specified prefix. Conflicts with `name`. */ namePrefix?: pulumi.Input; /** * DB parameters to apply. See `parameter` Block below for more details. Note that parameters may differ from a family to an other. Full list of all parameters can be discovered via [`aws rds describe-db-parameters`](https://docs.aws.amazon.com/cli/latest/reference/rds/describe-db-parameters.html) after initial creation of the group. */ parameters?: pulumi.Input[] | undefined>; /** * 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; /** * Set to true if you do not wish the parameter group to be deleted at destroy time, and instead just remove the parameter group from the Terraform state. */ skipDestroy?: 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>; } /** * The set of arguments for constructing a ParameterGroup resource. */ export interface ParameterGroupArgs { /** * Description of the DB parameter group. Defaults to "Managed by Pulumi". */ description?: pulumi.Input; /** * Family of the DB parameter group. */ family: pulumi.Input; /** * Name of the DB parameter group. If omitted, the provider will assign a random, unique name. */ name?: pulumi.Input; /** * Creates a unique name beginning with the specified prefix. Conflicts with `name`. */ namePrefix?: pulumi.Input; /** * DB parameters to apply. See `parameter` Block below for more details. Note that parameters may differ from a family to an other. Full list of all parameters can be discovered via [`aws rds describe-db-parameters`](https://docs.aws.amazon.com/cli/latest/reference/rds/describe-db-parameters.html) after initial creation of the group. */ parameters?: pulumi.Input[] | undefined>; /** * 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; /** * Set to true if you do not wish the parameter group to be deleted at destroy time, and instead just remove the parameter group from the Terraform state. */ skipDestroy?: 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>; } //# sourceMappingURL=parameterGroup.d.ts.map