RdsDbInstance
Provides an OpsWorks RDS DB Instance resource.
Note: All arguments including the username and password will be stored in the raw state as plain-text.
Example Usage
using Pulumi;
using Aws = Pulumi.Aws;
class MyStack : Stack
{
public MyStack()
{
var myInstance = new Aws.OpsWorks.RdsDbInstance("myInstance", new Aws.OpsWorks.RdsDbInstanceArgs
{
DbPassword = "somePass",
DbUser = "someUser",
RdsDbInstanceArn = aws_db_instance.My_instance.Arn,
StackId = aws_opsworks_stack.My_stack.Id,
});
}
}
package main
import (
"github.com/pulumi/pulumi-aws/sdk/v2/go/aws/opsworks"
"github.com/pulumi/pulumi/sdk/v2/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := opsworks.NewRdsDbInstance(ctx, "myInstance", &opsworks.RdsDbInstanceArgs{
DbPassword: pulumi.String("somePass"),
DbUser: pulumi.String("someUser"),
RdsDbInstanceArn: pulumi.String(aws_db_instance.My_instance.Arn),
StackId: pulumi.String(aws_opsworks_stack.My_stack.Id),
})
if err != nil {
return err
}
return nil
})
}import pulumi
import pulumi_aws as aws
my_instance = aws.opsworks.RdsDbInstance("myInstance",
db_password="somePass",
db_user="someUser",
rds_db_instance_arn=aws_db_instance["my_instance"]["arn"],
stack_id=aws_opsworks_stack["my_stack"]["id"])import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const myInstance = new aws.opsworks.RdsDbInstance("my_instance", {
dbPassword: "somePass",
dbUser: "someUser",
rdsDbInstanceArn: aws_db_instance_my_instance.arn,
stackId: aws_opsworks_stack_my_stack.id,
});Create a RdsDbInstance Resource
new RdsDbInstance(name: string, args: RdsDbInstanceArgs, opts?: CustomResourceOptions);def RdsDbInstance(resource_name, opts=None, db_password=None, db_user=None, rds_db_instance_arn=None, stack_id=None, __props__=None);func NewRdsDbInstance(ctx *Context, name string, args RdsDbInstanceArgs, opts ...ResourceOption) (*RdsDbInstance, error)public RdsDbInstance(string name, RdsDbInstanceArgs args, CustomResourceOptions? opts = null)- 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.
- opts ResourceOptions
- A bag of options that control this 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.
RdsDbInstance Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.
Inputs
The RdsDbInstance resource accepts the following input properties:
- Db
Password string A db password
- Db
User string A db username
- Rds
Db stringInstance Arn The db instance to register for this stack. Changing this will force a new resource.
- Stack
Id string The stack to register a db instance for. Changing this will force a new resource.
- Db
Password string A db password
- Db
User string A db username
- Rds
Db stringInstance Arn The db instance to register for this stack. Changing this will force a new resource.
- Stack
Id string The stack to register a db instance for. Changing this will force a new resource.
- db
Password string A db password
- db
User string A db username
- rds
Db stringInstance Arn The db instance to register for this stack. Changing this will force a new resource.
- stack
Id 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_ strinstance_ arn 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the RdsDbInstance resource produces the following output properties:
Look up an 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): RdsDbInstancestatic get(resource_name, id, opts=None, db_password=None, db_user=None, rds_db_instance_arn=None, stack_id=None, __props__=None);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)- 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.
The following state arguments are supported:
- Db
Password string A db password
- Db
User string A db username
- Rds
Db stringInstance Arn The db instance to register for this stack. Changing this will force a new resource.
- Stack
Id string The stack to register a db instance for. Changing this will force a new resource.
- Db
Password string A db password
- Db
User string A db username
- Rds
Db stringInstance Arn The db instance to register for this stack. Changing this will force a new resource.
- Stack
Id string The stack to register a db instance for. Changing this will force a new resource.
- db
Password string A db password
- db
User string A db username
- rds
Db stringInstance Arn The db instance to register for this stack. Changing this will force a new resource.
- stack
Id 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_ strinstance_ arn 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.
Package Details
- Repository
- https://github.com/pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
awsTerraform Provider.