1. Packages
  2. AWS Classic
  3. API Docs
  4. opsworks
  5. RdsDbInstance

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.2.1 published on Friday, Sep 22, 2023 by Pulumi

aws.opsworks.RdsDbInstance

Explore with Pulumi AI

aws logo

Try AWS Native preview for resources not in the classic version.

AWS Classic v6.2.1 published on Friday, Sep 22, 2023 by Pulumi

    Provides an OpsWorks RDS DB Instance resource.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var myInstance = new Aws.OpsWorks.RdsDbInstance("myInstance", new()
        {
            StackId = aws_opsworks_stack.My_stack.Id,
            RdsDbInstanceArn = aws_db_instance.My_instance.Arn,
            DbUser = "someUser",
            DbPassword = "somePass",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/opsworks"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := opsworks.NewRdsDbInstance(ctx, "myInstance", &opsworks.RdsDbInstanceArgs{
    			StackId:          pulumi.Any(aws_opsworks_stack.My_stack.Id),
    			RdsDbInstanceArn: pulumi.Any(aws_db_instance.My_instance.Arn),
    			DbUser:           pulumi.String("someUser"),
    			DbPassword:       pulumi.String("somePass"),
    		})
    		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.opsworks.RdsDbInstance;
    import com.pulumi.aws.opsworks.RdsDbInstanceArgs;
    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 myInstance = new RdsDbInstance("myInstance", RdsDbInstanceArgs.builder()        
                .stackId(aws_opsworks_stack.my_stack().id())
                .rdsDbInstanceArn(aws_db_instance.my_instance().arn())
                .dbUser("someUser")
                .dbPassword("somePass")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_aws as aws
    
    my_instance = aws.opsworks.RdsDbInstance("myInstance",
        stack_id=aws_opsworks_stack["my_stack"]["id"],
        rds_db_instance_arn=aws_db_instance["my_instance"]["arn"],
        db_user="someUser",
        db_password="somePass")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const myInstance = new aws.opsworks.RdsDbInstance("myInstance", {
        stackId: aws_opsworks_stack.my_stack.id,
        rdsDbInstanceArn: aws_db_instance.my_instance.arn,
        dbUser: "someUser",
        dbPassword: "somePass",
    });
    
    resources:
      myInstance:
        type: aws:opsworks:RdsDbInstance
        properties:
          stackId: ${aws_opsworks_stack.my_stack.id}
          rdsDbInstanceArn: ${aws_db_instance.my_instance.arn}
          dbUser: someUser
          dbPassword: somePass
    

    Create RdsDbInstance Resource

    new RdsDbInstance(name: string, args: RdsDbInstanceArgs, opts?: CustomResourceOptions);
    @overload
    def RdsDbInstance(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      db_password: Optional[str] = None,
                      db_user: Optional[str] = None,
                      rds_db_instance_arn: Optional[str] = None,
                      stack_id: Optional[str] = None)
    @overload
    def RdsDbInstance(resource_name: str,
                      args: RdsDbInstanceArgs,
                      opts: Optional[ResourceOptions] = None)
    func NewRdsDbInstance(ctx *Context, name string, args RdsDbInstanceArgs, opts ...ResourceOption) (*RdsDbInstance, error)
    public RdsDbInstance(string name, RdsDbInstanceArgs args, CustomResourceOptions? opts = null)
    public RdsDbInstance(String name, RdsDbInstanceArgs args)
    public RdsDbInstance(String name, RdsDbInstanceArgs args, CustomResourceOptions options)
    
    type: aws:opsworks:RdsDbInstance
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args RdsDbInstanceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args RdsDbInstanceArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args RdsDbInstanceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RdsDbInstanceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RdsDbInstanceArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    RdsDbInstance Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The RdsDbInstance resource accepts the following input properties:

    DbPassword string

    A db password

    DbUser string

    A db username

    RdsDbInstanceArn string

    The db instance to register for this stack. Changing this will force a new resource.

    StackId string

    The stack to register a db instance for. Changing this will force a new resource.

    DbPassword string

    A db password

    DbUser string

    A db username

    RdsDbInstanceArn string

    The db instance to register for this stack. Changing this will force a new resource.

    StackId string

    The stack to register a db instance for. Changing this will force a new resource.

    dbPassword String

    A db password

    dbUser String

    A db username

    rdsDbInstanceArn String

    The db instance to register for this stack. Changing this will force a new resource.

    stackId String

    The stack to register a db instance for. Changing this will force a new resource.

    dbPassword string

    A db password

    dbUser string

    A db username

    rdsDbInstanceArn string

    The db instance to register for this stack. Changing this will force a new resource.

    stackId string

    The stack to register a db instance for. Changing this will force a new resource.

    db_password str

    A db password

    db_user str

    A db username

    rds_db_instance_arn str

    The db instance to register for this stack. Changing this will force a new resource.

    stack_id str

    The stack to register a db instance for. Changing this will force a new resource.

    dbPassword String

    A db password

    dbUser String

    A db username

    rdsDbInstanceArn String

    The db instance to register for this stack. Changing this will force a new resource.

    stackId String

    The stack to register a db instance for. Changing this will force a new resource.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the RdsDbInstance resource produces the following output properties:

    Id string

    The provider-assigned unique ID for this managed resource.

    Id string

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    id string

    The provider-assigned unique ID for this managed resource.

    id str

    The provider-assigned unique ID for this managed resource.

    id String

    The provider-assigned unique ID for this managed resource.

    Look up Existing RdsDbInstance Resource

    Get an existing RdsDbInstance resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: RdsDbInstanceState, opts?: CustomResourceOptions): RdsDbInstance
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            db_password: Optional[str] = None,
            db_user: Optional[str] = None,
            rds_db_instance_arn: Optional[str] = None,
            stack_id: Optional[str] = None) -> RdsDbInstance
    func GetRdsDbInstance(ctx *Context, name string, id IDInput, state *RdsDbInstanceState, opts ...ResourceOption) (*RdsDbInstance, error)
    public static RdsDbInstance Get(string name, Input<string> id, RdsDbInstanceState? state, CustomResourceOptions? opts = null)
    public static RdsDbInstance get(String name, Output<String> id, RdsDbInstanceState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    DbPassword string

    A db password

    DbUser string

    A db username

    RdsDbInstanceArn string

    The db instance to register for this stack. Changing this will force a new resource.

    StackId string

    The stack to register a db instance for. Changing this will force a new resource.

    DbPassword string

    A db password

    DbUser string

    A db username

    RdsDbInstanceArn string

    The db instance to register for this stack. Changing this will force a new resource.

    StackId string

    The stack to register a db instance for. Changing this will force a new resource.

    dbPassword String

    A db password

    dbUser String

    A db username

    rdsDbInstanceArn String

    The db instance to register for this stack. Changing this will force a new resource.

    stackId String

    The stack to register a db instance for. Changing this will force a new resource.

    dbPassword string

    A db password

    dbUser string

    A db username

    rdsDbInstanceArn string

    The db instance to register for this stack. Changing this will force a new resource.

    stackId string

    The stack to register a db instance for. Changing this will force a new resource.

    db_password str

    A db password

    db_user str

    A db username

    rds_db_instance_arn str

    The db instance to register for this stack. Changing this will force a new resource.

    stack_id str

    The stack to register a db instance for. Changing this will force a new resource.

    dbPassword String

    A db password

    dbUser String

    A db username

    rdsDbInstanceArn String

    The db instance to register for this stack. Changing this will force a new resource.

    stackId String

    The stack to register a db instance for. Changing this will force a new resource.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes

    This Pulumi package is based on the aws Terraform Provider.

    aws logo

    Try AWS Native preview for resources not in the classic version.

    AWS Classic v6.2.1 published on Friday, Sep 22, 2023 by Pulumi