OptionGroup

class OptionGroup : KotlinCustomResource

Provides an RDS DB option group resource. Documentation of the available options for various RDS engines can be found at:

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = new aws.rds.OptionGroup("example", {
name: "option-group-test",
optionGroupDescription: "Option Group",
engineName: "sqlserver-ee",
majorEngineVersion: "11.00",
options: [
{
optionName: "Timezone",
optionSettings: [{
name: "TIME_ZONE",
value: "UTC",
}],
},
{
optionName: "SQLSERVER_BACKUP_RESTORE",
optionSettings: [{
name: "IAM_ROLE_ARN",
value: exampleAwsIamRole.arn,
}],
},
{
optionName: "TDE",
},
],
});
import pulumi
import pulumi_aws as aws
example = aws.rds.OptionGroup("example",
name="option-group-test",
option_group_description="Option Group",
engine_name="sqlserver-ee",
major_engine_version="11.00",
options=[
{
"option_name": "Timezone",
"option_settings": [{
"name": "TIME_ZONE",
"value": "UTC",
}],
},
{
"option_name": "SQLSERVER_BACKUP_RESTORE",
"option_settings": [{
"name": "IAM_ROLE_ARN",
"value": example_aws_iam_role["arn"],
}],
},
{
"option_name": "TDE",
},
])
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() =>
{
var example = new Aws.Rds.OptionGroup("example", new()
{
Name = "option-group-test",
OptionGroupDescription = "Option Group",
EngineName = "sqlserver-ee",
MajorEngineVersion = "11.00",
Options = new[]
{
new Aws.Rds.Inputs.OptionGroupOptionArgs
{
OptionName = "Timezone",
OptionSettings = new[]
{
new Aws.Rds.Inputs.OptionGroupOptionOptionSettingArgs
{
Name = "TIME_ZONE",
Value = "UTC",
},
},
},
new Aws.Rds.Inputs.OptionGroupOptionArgs
{
OptionName = "SQLSERVER_BACKUP_RESTORE",
OptionSettings = new[]
{
new Aws.Rds.Inputs.OptionGroupOptionOptionSettingArgs
{
Name = "IAM_ROLE_ARN",
Value = exampleAwsIamRole.Arn,
},
},
},
new Aws.Rds.Inputs.OptionGroupOptionArgs
{
OptionName = "TDE",
},
},
});
});
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/rds"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := rds.NewOptionGroup(ctx, "example", &rds.OptionGroupArgs{
Name: pulumi.String("option-group-test"),
OptionGroupDescription: pulumi.String("Option Group"),
EngineName: pulumi.String("sqlserver-ee"),
MajorEngineVersion: pulumi.String("11.00"),
Options: rds.OptionGroupOptionArray{
&rds.OptionGroupOptionArgs{
OptionName: pulumi.String("Timezone"),
OptionSettings: rds.OptionGroupOptionOptionSettingArray{
&rds.OptionGroupOptionOptionSettingArgs{
Name: pulumi.String("TIME_ZONE"),
Value: pulumi.String("UTC"),
},
},
},
&rds.OptionGroupOptionArgs{
OptionName: pulumi.String("SQLSERVER_BACKUP_RESTORE"),
OptionSettings: rds.OptionGroupOptionOptionSettingArray{
&rds.OptionGroupOptionOptionSettingArgs{
Name: pulumi.String("IAM_ROLE_ARN"),
Value: pulumi.Any(exampleAwsIamRole.Arn),
},
},
},
&rds.OptionGroupOptionArgs{
OptionName: pulumi.String("TDE"),
},
},
})
if err != nil {
return err
}
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.rds.OptionGroup;
import com.pulumi.aws.rds.OptionGroupArgs;
import com.pulumi.aws.rds.inputs.OptionGroupOptionArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new OptionGroup("example", OptionGroupArgs.builder()
.name("option-group-test")
.optionGroupDescription("Option Group")
.engineName("sqlserver-ee")
.majorEngineVersion("11.00")
.options(
OptionGroupOptionArgs.builder()
.optionName("Timezone")
.optionSettings(OptionGroupOptionOptionSettingArgs.builder()
.name("TIME_ZONE")
.value("UTC")
.build())
.build(),
OptionGroupOptionArgs.builder()
.optionName("SQLSERVER_BACKUP_RESTORE")
.optionSettings(OptionGroupOptionOptionSettingArgs.builder()
.name("IAM_ROLE_ARN")
.value(exampleAwsIamRole.arn())
.build())
.build(),
OptionGroupOptionArgs.builder()
.optionName("TDE")
.build())
.build());
}
}
resources:
example:
type: aws:rds:OptionGroup
properties:
name: option-group-test
optionGroupDescription: Option Group
engineName: sqlserver-ee
majorEngineVersion: '11.00'
options:
- optionName: Timezone
optionSettings:
- name: TIME_ZONE
value: UTC
- optionName: SQLSERVER_BACKUP_RESTORE
optionSettings:
- name: IAM_ROLE_ARN
value: ${exampleAwsIamRole.arn}
- optionName: TDE

Note: Any modifications to the aws.rds.OptionGroup are set to happen immediately as we default to applying immediately. WARNING: You can perform a destroy on a aws.rds.OptionGroup, as long as it is not associated with any Amazon RDS resource. An option group can be associated with a DB instance, a manual DB snapshot, or an automated DB snapshot. If you try to delete an option group that is associated with an Amazon RDS resource, an error similar to the following is returned: An error occurred (InvalidOptionGroupStateFault) when calling the DeleteOptionGroup operation: The option group 'optionGroupName' cannot be deleted because it is in use. More information about this can be found here.

Import

Using pulumi import, import DB option groups using the name. For example:

$ pulumi import aws:rds/optionGroup:OptionGroup example mysql-option-group

Properties

Link copied to clipboard
val arn: Output<String>

ARN of the DB option group.

Link copied to clipboard
val engineName: Output<String>

Specifies the name of the engine that this option group should be associated with.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

Specifies the major version of the engine that this option group should be associated with.

Link copied to clipboard
val name: Output<String>

Name of the option group. If omitted, the provider will assign a random, unique name. Must be lowercase, to match as it is stored in AWS.

Link copied to clipboard
val namePrefix: Output<String>

Creates a unique name beginning with the specified prefix. Conflicts with name. Must be lowercase, to match as it is stored in AWS.

Link copied to clipboard

Description of the option group. Defaults to "Managed by Pulumi".

Link copied to clipboard

The options to apply. See option Block below for more details.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val skipDestroy: Output<Boolean>?

Set to true if you do not wish the option group to be deleted at destroy time, and instead just remove the option group from the Pulumi state.

Link copied to clipboard
val tags: Output<Map<String, String>>?

Map of tags to assign to the resource. If configured with a provider default_tags configuration block present, tags with matching keys will overwrite those defined at the provider-level.

Link copied to clipboard
val tagsAll: Output<Map<String, String>>

Map of tags assigned to the resource, including those inherited from the provider default_tags configuration block.

Link copied to clipboard
val urn: Output<String>