Try AWS Native preview for resources not in the classic version.
aws.opsworks.RdsDbInstance
Explore with Pulumi AI
Try AWS Native preview for resources not in the classic version.
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:
- 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 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.
- 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.
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.
- 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 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.
- 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.
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
aws
Terraform Provider.
Try AWS Native preview for resources not in the classic version.