1. Packages
  2. AWS
  3. API Docs
  4. opsworks
  5. RdsDbInstance
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

aws.opsworks.RdsDbInstance

Explore with Pulumi AI

aws logo
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

    Provides an OpsWorks RDS DB Instance resource.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const myInstance = new aws.opsworks.RdsDbInstance("my_instance", {
        stackId: myStack.id,
        rdsDbInstanceArn: myInstanceAwsDbInstance.arn,
        dbUser: "someUser",
        dbPassword: "somePass",
    });
    
    import pulumi
    import pulumi_aws as aws
    
    my_instance = aws.opsworks.RdsDbInstance("my_instance",
        stack_id=my_stack["id"],
        rds_db_instance_arn=my_instance_aws_db_instance["arn"],
        db_user="someUser",
        db_password="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, "my_instance", &opsworks.RdsDbInstanceArgs{
    			StackId:          pulumi.Any(myStack.Id),
    			RdsDbInstanceArn: pulumi.Any(myInstanceAwsDbInstance.Arn),
    			DbUser:           pulumi.String("someUser"),
    			DbPassword:       pulumi.String("somePass"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Aws = Pulumi.Aws;
    
    return await Deployment.RunAsync(() => 
    {
        var myInstance = new Aws.OpsWorks.RdsDbInstance("my_instance", new()
        {
            StackId = myStack.Id,
            RdsDbInstanceArn = myInstanceAwsDbInstance.Arn,
            DbUser = "someUser",
            DbPassword = "somePass",
        });
    
    });
    
    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(myStack.id())
                .rdsDbInstanceArn(myInstanceAwsDbInstance.arn())
                .dbUser("someUser")
                .dbPassword("somePass")
                .build());
    
        }
    }
    
    resources:
      myInstance:
        type: aws:opsworks:RdsDbInstance
        name: my_instance
        properties:
          stackId: ${myStack.id}
          rdsDbInstanceArn: ${myInstanceAwsDbInstance.arn}
          dbUser: someUser
          dbPassword: somePass
    

    Create RdsDbInstance Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new RdsDbInstance(name: string, args: RdsDbInstanceArgs, opts?: CustomResourceOptions);
    @overload
    def RdsDbInstance(resource_name: str,
                      args: RdsDbInstanceArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @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)
    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.
    
    

    Parameters

    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.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var rdsDbInstanceResource = new Aws.OpsWorks.RdsDbInstance("rdsDbInstanceResource", new()
    {
        DbPassword = "string",
        DbUser = "string",
        RdsDbInstanceArn = "string",
        StackId = "string",
    });
    
    example, err := opsworks.NewRdsDbInstance(ctx, "rdsDbInstanceResource", &opsworks.RdsDbInstanceArgs{
    	DbPassword:       pulumi.String("string"),
    	DbUser:           pulumi.String("string"),
    	RdsDbInstanceArn: pulumi.String("string"),
    	StackId:          pulumi.String("string"),
    })
    
    var rdsDbInstanceResource = new RdsDbInstance("rdsDbInstanceResource", RdsDbInstanceArgs.builder()
        .dbPassword("string")
        .dbUser("string")
        .rdsDbInstanceArn("string")
        .stackId("string")
        .build());
    
    rds_db_instance_resource = aws.opsworks.RdsDbInstance("rdsDbInstanceResource",
        db_password="string",
        db_user="string",
        rds_db_instance_arn="string",
        stack_id="string")
    
    const rdsDbInstanceResource = new aws.opsworks.RdsDbInstance("rdsDbInstanceResource", {
        dbPassword: "string",
        dbUser: "string",
        rdsDbInstanceArn: "string",
        stackId: "string",
    });
    
    type: aws:opsworks:RdsDbInstance
    properties:
        dbPassword: string
        dbUser: string
        rdsDbInstanceArn: string
        stackId: string
    

    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
    AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi