scaleway.DatabaseReadReplica
Explore with Pulumi AI
Creates and manages Read Replicas. For more information refer to the API documentation.
Example Usage
Basic
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";
const instance = new scaleway.DatabaseInstance("instance", {
nodeType: "db-dev-s",
engine: "PostgreSQL-14",
isHaCluster: false,
disableBackup: true,
userName: "my_initial_user",
password: "thiZ_is_v&ry_s3cret",
tags: [
"terraform-test",
"scaleway_rdb_read_replica",
"minimal",
],
});
const replica = new scaleway.DatabaseReadReplica("replica", {
instanceId: instance.id,
directAccess: {},
});
import pulumi
import pulumiverse_scaleway as scaleway
instance = scaleway.DatabaseInstance("instance",
node_type="db-dev-s",
engine="PostgreSQL-14",
is_ha_cluster=False,
disable_backup=True,
user_name="my_initial_user",
password="thiZ_is_v&ry_s3cret",
tags=[
"terraform-test",
"scaleway_rdb_read_replica",
"minimal",
])
replica = scaleway.DatabaseReadReplica("replica",
instance_id=instance.id,
direct_access=scaleway.DatabaseReadReplicaDirectAccessArgs())
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
instance, err := scaleway.NewDatabaseInstance(ctx, "instance", &scaleway.DatabaseInstanceArgs{
NodeType: pulumi.String("db-dev-s"),
Engine: pulumi.String("PostgreSQL-14"),
IsHaCluster: pulumi.Bool(false),
DisableBackup: pulumi.Bool(true),
UserName: pulumi.String("my_initial_user"),
Password: pulumi.String("thiZ_is_v&ry_s3cret"),
Tags: pulumi.StringArray{
pulumi.String("terraform-test"),
pulumi.String("scaleway_rdb_read_replica"),
pulumi.String("minimal"),
},
})
if err != nil {
return err
}
_, err = scaleway.NewDatabaseReadReplica(ctx, "replica", &scaleway.DatabaseReadReplicaArgs{
InstanceId: instance.ID(),
DirectAccess: nil,
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumiverse.Scaleway;
return await Deployment.RunAsync(() =>
{
var instance = new Scaleway.DatabaseInstance("instance", new()
{
NodeType = "db-dev-s",
Engine = "PostgreSQL-14",
IsHaCluster = false,
DisableBackup = true,
UserName = "my_initial_user",
Password = "thiZ_is_v&ry_s3cret",
Tags = new[]
{
"terraform-test",
"scaleway_rdb_read_replica",
"minimal",
},
});
var replica = new Scaleway.DatabaseReadReplica("replica", new()
{
InstanceId = instance.Id,
DirectAccess = null,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.DatabaseInstance;
import com.pulumi.scaleway.DatabaseInstanceArgs;
import com.pulumi.scaleway.DatabaseReadReplica;
import com.pulumi.scaleway.DatabaseReadReplicaArgs;
import com.pulumi.scaleway.inputs.DatabaseReadReplicaDirectAccessArgs;
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 instance = new DatabaseInstance("instance", DatabaseInstanceArgs.builder()
.nodeType("db-dev-s")
.engine("PostgreSQL-14")
.isHaCluster(false)
.disableBackup(true)
.userName("my_initial_user")
.password("thiZ_is_v&ry_s3cret")
.tags(
"terraform-test",
"scaleway_rdb_read_replica",
"minimal")
.build());
var replica = new DatabaseReadReplica("replica", DatabaseReadReplicaArgs.builder()
.instanceId(instance.id())
.directAccess()
.build());
}
}
resources:
instance:
type: scaleway:DatabaseInstance
properties:
nodeType: db-dev-s
engine: PostgreSQL-14
isHaCluster: false
disableBackup: true
userName: my_initial_user
password: thiZ_is_v&ry_s3cret
tags:
- terraform-test
- scaleway_rdb_read_replica
- minimal
replica:
type: scaleway:DatabaseReadReplica
properties:
instanceId: ${instance.id}
directAccess: {}
Private network with static endpoint
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";
const instance = new scaleway.DatabaseInstance("instance", {
nodeType: "db-dev-s",
engine: "PostgreSQL-14",
isHaCluster: false,
disableBackup: true,
userName: "my_initial_user",
password: "thiZ_is_v&ry_s3cret",
});
const pn = new scaleway.VpcPrivateNetwork("pn", {});
const replica = new scaleway.DatabaseReadReplica("replica", {
instanceId: instance.id,
privateNetwork: {
privateNetworkId: pn.id,
serviceIp: "192.168.1.254/24",
},
});
import pulumi
import pulumiverse_scaleway as scaleway
instance = scaleway.DatabaseInstance("instance",
node_type="db-dev-s",
engine="PostgreSQL-14",
is_ha_cluster=False,
disable_backup=True,
user_name="my_initial_user",
password="thiZ_is_v&ry_s3cret")
pn = scaleway.VpcPrivateNetwork("pn")
replica = scaleway.DatabaseReadReplica("replica",
instance_id=instance.id,
private_network=scaleway.DatabaseReadReplicaPrivateNetworkArgs(
private_network_id=pn.id,
service_ip="192.168.1.254/24",
))
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
instance, err := scaleway.NewDatabaseInstance(ctx, "instance", &scaleway.DatabaseInstanceArgs{
NodeType: pulumi.String("db-dev-s"),
Engine: pulumi.String("PostgreSQL-14"),
IsHaCluster: pulumi.Bool(false),
DisableBackup: pulumi.Bool(true),
UserName: pulumi.String("my_initial_user"),
Password: pulumi.String("thiZ_is_v&ry_s3cret"),
})
if err != nil {
return err
}
pn, err := scaleway.NewVpcPrivateNetwork(ctx, "pn", nil)
if err != nil {
return err
}
_, err = scaleway.NewDatabaseReadReplica(ctx, "replica", &scaleway.DatabaseReadReplicaArgs{
InstanceId: instance.ID(),
PrivateNetwork: &scaleway.DatabaseReadReplicaPrivateNetworkArgs{
PrivateNetworkId: pn.ID(),
ServiceIp: pulumi.String("192.168.1.254/24"),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumiverse.Scaleway;
return await Deployment.RunAsync(() =>
{
var instance = new Scaleway.DatabaseInstance("instance", new()
{
NodeType = "db-dev-s",
Engine = "PostgreSQL-14",
IsHaCluster = false,
DisableBackup = true,
UserName = "my_initial_user",
Password = "thiZ_is_v&ry_s3cret",
});
var pn = new Scaleway.VpcPrivateNetwork("pn");
var replica = new Scaleway.DatabaseReadReplica("replica", new()
{
InstanceId = instance.Id,
PrivateNetwork = new Scaleway.Inputs.DatabaseReadReplicaPrivateNetworkArgs
{
PrivateNetworkId = pn.Id,
ServiceIp = "192.168.1.254/24",
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.DatabaseInstance;
import com.pulumi.scaleway.DatabaseInstanceArgs;
import com.pulumi.scaleway.VpcPrivateNetwork;
import com.pulumi.scaleway.DatabaseReadReplica;
import com.pulumi.scaleway.DatabaseReadReplicaArgs;
import com.pulumi.scaleway.inputs.DatabaseReadReplicaPrivateNetworkArgs;
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 instance = new DatabaseInstance("instance", DatabaseInstanceArgs.builder()
.nodeType("db-dev-s")
.engine("PostgreSQL-14")
.isHaCluster(false)
.disableBackup(true)
.userName("my_initial_user")
.password("thiZ_is_v&ry_s3cret")
.build());
var pn = new VpcPrivateNetwork("pn");
var replica = new DatabaseReadReplica("replica", DatabaseReadReplicaArgs.builder()
.instanceId(instance.id())
.privateNetwork(DatabaseReadReplicaPrivateNetworkArgs.builder()
.privateNetworkId(pn.id())
.serviceIp("192.168.1.254/24")
.build())
.build());
}
}
resources:
instance:
type: scaleway:DatabaseInstance
properties:
nodeType: db-dev-s
engine: PostgreSQL-14
isHaCluster: false
disableBackup: true
userName: my_initial_user
password: thiZ_is_v&ry_s3cret
pn:
type: scaleway:VpcPrivateNetwork
replica:
type: scaleway:DatabaseReadReplica
properties:
instanceId: ${instance.id}
privateNetwork:
privateNetworkId: ${pn.id}
serviceIp: 192.168.1.254/24
Private network with IPAM
import * as pulumi from "@pulumi/pulumi";
import * as scaleway from "@pulumiverse/scaleway";
const instance = new scaleway.DatabaseInstance("instance", {
nodeType: "db-dev-s",
engine: "PostgreSQL-14",
isHaCluster: false,
disableBackup: true,
userName: "my_initial_user",
password: "thiZ_is_v&ry_s3cret",
});
const pn = new scaleway.VpcPrivateNetwork("pn", {});
const replica = new scaleway.DatabaseReadReplica("replica", {
instanceId: instance.id,
privateNetwork: {
privateNetworkId: pn.id,
enableIpam: true,
},
});
import pulumi
import pulumiverse_scaleway as scaleway
instance = scaleway.DatabaseInstance("instance",
node_type="db-dev-s",
engine="PostgreSQL-14",
is_ha_cluster=False,
disable_backup=True,
user_name="my_initial_user",
password="thiZ_is_v&ry_s3cret")
pn = scaleway.VpcPrivateNetwork("pn")
replica = scaleway.DatabaseReadReplica("replica",
instance_id=instance.id,
private_network=scaleway.DatabaseReadReplicaPrivateNetworkArgs(
private_network_id=pn.id,
enable_ipam=True,
))
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-scaleway/sdk/go/scaleway"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
instance, err := scaleway.NewDatabaseInstance(ctx, "instance", &scaleway.DatabaseInstanceArgs{
NodeType: pulumi.String("db-dev-s"),
Engine: pulumi.String("PostgreSQL-14"),
IsHaCluster: pulumi.Bool(false),
DisableBackup: pulumi.Bool(true),
UserName: pulumi.String("my_initial_user"),
Password: pulumi.String("thiZ_is_v&ry_s3cret"),
})
if err != nil {
return err
}
pn, err := scaleway.NewVpcPrivateNetwork(ctx, "pn", nil)
if err != nil {
return err
}
_, err = scaleway.NewDatabaseReadReplica(ctx, "replica", &scaleway.DatabaseReadReplicaArgs{
InstanceId: instance.ID(),
PrivateNetwork: &scaleway.DatabaseReadReplicaPrivateNetworkArgs{
PrivateNetworkId: pn.ID(),
EnableIpam: pulumi.Bool(true),
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Scaleway = Pulumiverse.Scaleway;
return await Deployment.RunAsync(() =>
{
var instance = new Scaleway.DatabaseInstance("instance", new()
{
NodeType = "db-dev-s",
Engine = "PostgreSQL-14",
IsHaCluster = false,
DisableBackup = true,
UserName = "my_initial_user",
Password = "thiZ_is_v&ry_s3cret",
});
var pn = new Scaleway.VpcPrivateNetwork("pn");
var replica = new Scaleway.DatabaseReadReplica("replica", new()
{
InstanceId = instance.Id,
PrivateNetwork = new Scaleway.Inputs.DatabaseReadReplicaPrivateNetworkArgs
{
PrivateNetworkId = pn.Id,
EnableIpam = true,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.scaleway.DatabaseInstance;
import com.pulumi.scaleway.DatabaseInstanceArgs;
import com.pulumi.scaleway.VpcPrivateNetwork;
import com.pulumi.scaleway.DatabaseReadReplica;
import com.pulumi.scaleway.DatabaseReadReplicaArgs;
import com.pulumi.scaleway.inputs.DatabaseReadReplicaPrivateNetworkArgs;
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 instance = new DatabaseInstance("instance", DatabaseInstanceArgs.builder()
.nodeType("db-dev-s")
.engine("PostgreSQL-14")
.isHaCluster(false)
.disableBackup(true)
.userName("my_initial_user")
.password("thiZ_is_v&ry_s3cret")
.build());
var pn = new VpcPrivateNetwork("pn");
var replica = new DatabaseReadReplica("replica", DatabaseReadReplicaArgs.builder()
.instanceId(instance.id())
.privateNetwork(DatabaseReadReplicaPrivateNetworkArgs.builder()
.privateNetworkId(pn.id())
.enableIpam(true)
.build())
.build());
}
}
resources:
instance:
type: scaleway:DatabaseInstance
properties:
nodeType: db-dev-s
engine: PostgreSQL-14
isHaCluster: false
disableBackup: true
userName: my_initial_user
password: thiZ_is_v&ry_s3cret
pn:
type: scaleway:VpcPrivateNetwork
replica:
type: scaleway:DatabaseReadReplica
properties:
instanceId: ${instance.id}
privateNetwork:
privateNetworkId: ${pn.id}
enableIpam: true
Create DatabaseReadReplica Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DatabaseReadReplica(name: string, args: DatabaseReadReplicaArgs, opts?: CustomResourceOptions);
@overload
def DatabaseReadReplica(resource_name: str,
args: DatabaseReadReplicaArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DatabaseReadReplica(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_id: Optional[str] = None,
direct_access: Optional[DatabaseReadReplicaDirectAccessArgs] = None,
private_network: Optional[DatabaseReadReplicaPrivateNetworkArgs] = None,
region: Optional[str] = None,
same_zone: Optional[bool] = None)
func NewDatabaseReadReplica(ctx *Context, name string, args DatabaseReadReplicaArgs, opts ...ResourceOption) (*DatabaseReadReplica, error)
public DatabaseReadReplica(string name, DatabaseReadReplicaArgs args, CustomResourceOptions? opts = null)
public DatabaseReadReplica(String name, DatabaseReadReplicaArgs args)
public DatabaseReadReplica(String name, DatabaseReadReplicaArgs args, CustomResourceOptions options)
type: scaleway:DatabaseReadReplica
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 DatabaseReadReplicaArgs
- 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 DatabaseReadReplicaArgs
- 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 DatabaseReadReplicaArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DatabaseReadReplicaArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DatabaseReadReplicaArgs
- 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 databaseReadReplicaResource = new Scaleway.DatabaseReadReplica("databaseReadReplicaResource", new()
{
InstanceId = "string",
DirectAccess = new Scaleway.Inputs.DatabaseReadReplicaDirectAccessArgs
{
EndpointId = "string",
Hostname = "string",
Ip = "string",
Name = "string",
Port = 0,
},
PrivateNetwork = new Scaleway.Inputs.DatabaseReadReplicaPrivateNetworkArgs
{
PrivateNetworkId = "string",
EnableIpam = false,
EndpointId = "string",
Hostname = "string",
Ip = "string",
Name = "string",
Port = 0,
ServiceIp = "string",
Zone = "string",
},
Region = "string",
SameZone = false,
});
example, err := scaleway.NewDatabaseReadReplica(ctx, "databaseReadReplicaResource", &scaleway.DatabaseReadReplicaArgs{
InstanceId: pulumi.String("string"),
DirectAccess: &scaleway.DatabaseReadReplicaDirectAccessArgs{
EndpointId: pulumi.String("string"),
Hostname: pulumi.String("string"),
Ip: pulumi.String("string"),
Name: pulumi.String("string"),
Port: pulumi.Int(0),
},
PrivateNetwork: &scaleway.DatabaseReadReplicaPrivateNetworkArgs{
PrivateNetworkId: pulumi.String("string"),
EnableIpam: pulumi.Bool(false),
EndpointId: pulumi.String("string"),
Hostname: pulumi.String("string"),
Ip: pulumi.String("string"),
Name: pulumi.String("string"),
Port: pulumi.Int(0),
ServiceIp: pulumi.String("string"),
Zone: pulumi.String("string"),
},
Region: pulumi.String("string"),
SameZone: pulumi.Bool(false),
})
var databaseReadReplicaResource = new DatabaseReadReplica("databaseReadReplicaResource", DatabaseReadReplicaArgs.builder()
.instanceId("string")
.directAccess(DatabaseReadReplicaDirectAccessArgs.builder()
.endpointId("string")
.hostname("string")
.ip("string")
.name("string")
.port(0)
.build())
.privateNetwork(DatabaseReadReplicaPrivateNetworkArgs.builder()
.privateNetworkId("string")
.enableIpam(false)
.endpointId("string")
.hostname("string")
.ip("string")
.name("string")
.port(0)
.serviceIp("string")
.zone("string")
.build())
.region("string")
.sameZone(false)
.build());
database_read_replica_resource = scaleway.DatabaseReadReplica("databaseReadReplicaResource",
instance_id="string",
direct_access=scaleway.DatabaseReadReplicaDirectAccessArgs(
endpoint_id="string",
hostname="string",
ip="string",
name="string",
port=0,
),
private_network=scaleway.DatabaseReadReplicaPrivateNetworkArgs(
private_network_id="string",
enable_ipam=False,
endpoint_id="string",
hostname="string",
ip="string",
name="string",
port=0,
service_ip="string",
zone="string",
),
region="string",
same_zone=False)
const databaseReadReplicaResource = new scaleway.DatabaseReadReplica("databaseReadReplicaResource", {
instanceId: "string",
directAccess: {
endpointId: "string",
hostname: "string",
ip: "string",
name: "string",
port: 0,
},
privateNetwork: {
privateNetworkId: "string",
enableIpam: false,
endpointId: "string",
hostname: "string",
ip: "string",
name: "string",
port: 0,
serviceIp: "string",
zone: "string",
},
region: "string",
sameZone: false,
});
type: scaleway:DatabaseReadReplica
properties:
directAccess:
endpointId: string
hostname: string
ip: string
name: string
port: 0
instanceId: string
privateNetwork:
enableIpam: false
endpointId: string
hostname: string
ip: string
name: string
port: 0
privateNetworkId: string
serviceIp: string
zone: string
region: string
sameZone: false
DatabaseReadReplica 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 DatabaseReadReplica resource accepts the following input properties:
- Instance
Id string UUID of the rdb instance.
Important: The replica musts contains at least one
direct_access
orprivate_network
. It can contain both.- Direct
Access Pulumiverse.Scaleway. Inputs. Database Read Replica Direct Access - Creates a direct access endpoint to rdb replica.
- Private
Network Pulumiverse.Scaleway. Inputs. Database Read Replica Private Network - Create an endpoint in a Private Netork.
- Region string
region
) The region in which the Read Replica should be created.- Same
Zone bool - Defines whether to create the replica in the same availability zone as the main instance nodes or not.
- Instance
Id string UUID of the rdb instance.
Important: The replica musts contains at least one
direct_access
orprivate_network
. It can contain both.- Direct
Access DatabaseRead Replica Direct Access Args - Creates a direct access endpoint to rdb replica.
- Private
Network DatabaseRead Replica Private Network Args - Create an endpoint in a Private Netork.
- Region string
region
) The region in which the Read Replica should be created.- Same
Zone bool - Defines whether to create the replica in the same availability zone as the main instance nodes or not.
- instance
Id String UUID of the rdb instance.
Important: The replica musts contains at least one
direct_access
orprivate_network
. It can contain both.- direct
Access DatabaseRead Replica Direct Access - Creates a direct access endpoint to rdb replica.
- private
Network DatabaseRead Replica Private Network - Create an endpoint in a Private Netork.
- region String
region
) The region in which the Read Replica should be created.- same
Zone Boolean - Defines whether to create the replica in the same availability zone as the main instance nodes or not.
- instance
Id string UUID of the rdb instance.
Important: The replica musts contains at least one
direct_access
orprivate_network
. It can contain both.- direct
Access DatabaseRead Replica Direct Access - Creates a direct access endpoint to rdb replica.
- private
Network DatabaseRead Replica Private Network - Create an endpoint in a Private Netork.
- region string
region
) The region in which the Read Replica should be created.- same
Zone boolean - Defines whether to create the replica in the same availability zone as the main instance nodes or not.
- instance_
id str UUID of the rdb instance.
Important: The replica musts contains at least one
direct_access
orprivate_network
. It can contain both.- direct_
access DatabaseRead Replica Direct Access Args - Creates a direct access endpoint to rdb replica.
- private_
network DatabaseRead Replica Private Network Args - Create an endpoint in a Private Netork.
- region str
region
) The region in which the Read Replica should be created.- same_
zone bool - Defines whether to create the replica in the same availability zone as the main instance nodes or not.
- instance
Id String UUID of the rdb instance.
Important: The replica musts contains at least one
direct_access
orprivate_network
. It can contain both.- direct
Access Property Map - Creates a direct access endpoint to rdb replica.
- private
Network Property Map - Create an endpoint in a Private Netork.
- region String
region
) The region in which the Read Replica should be created.- same
Zone Boolean - Defines whether to create the replica in the same availability zone as the main instance nodes or not.
Outputs
All input properties are implicitly available as output properties. Additionally, the DatabaseReadReplica 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 DatabaseReadReplica Resource
Get an existing DatabaseReadReplica 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?: DatabaseReadReplicaState, opts?: CustomResourceOptions): DatabaseReadReplica
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
direct_access: Optional[DatabaseReadReplicaDirectAccessArgs] = None,
instance_id: Optional[str] = None,
private_network: Optional[DatabaseReadReplicaPrivateNetworkArgs] = None,
region: Optional[str] = None,
same_zone: Optional[bool] = None) -> DatabaseReadReplica
func GetDatabaseReadReplica(ctx *Context, name string, id IDInput, state *DatabaseReadReplicaState, opts ...ResourceOption) (*DatabaseReadReplica, error)
public static DatabaseReadReplica Get(string name, Input<string> id, DatabaseReadReplicaState? state, CustomResourceOptions? opts = null)
public static DatabaseReadReplica get(String name, Output<String> id, DatabaseReadReplicaState 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.
- Direct
Access Pulumiverse.Scaleway. Inputs. Database Read Replica Direct Access - Creates a direct access endpoint to rdb replica.
- Instance
Id string UUID of the rdb instance.
Important: The replica musts contains at least one
direct_access
orprivate_network
. It can contain both.- Private
Network Pulumiverse.Scaleway. Inputs. Database Read Replica Private Network - Create an endpoint in a Private Netork.
- Region string
region
) The region in which the Read Replica should be created.- Same
Zone bool - Defines whether to create the replica in the same availability zone as the main instance nodes or not.
- Direct
Access DatabaseRead Replica Direct Access Args - Creates a direct access endpoint to rdb replica.
- Instance
Id string UUID of the rdb instance.
Important: The replica musts contains at least one
direct_access
orprivate_network
. It can contain both.- Private
Network DatabaseRead Replica Private Network Args - Create an endpoint in a Private Netork.
- Region string
region
) The region in which the Read Replica should be created.- Same
Zone bool - Defines whether to create the replica in the same availability zone as the main instance nodes or not.
- direct
Access DatabaseRead Replica Direct Access - Creates a direct access endpoint to rdb replica.
- instance
Id String UUID of the rdb instance.
Important: The replica musts contains at least one
direct_access
orprivate_network
. It can contain both.- private
Network DatabaseRead Replica Private Network - Create an endpoint in a Private Netork.
- region String
region
) The region in which the Read Replica should be created.- same
Zone Boolean - Defines whether to create the replica in the same availability zone as the main instance nodes or not.
- direct
Access DatabaseRead Replica Direct Access - Creates a direct access endpoint to rdb replica.
- instance
Id string UUID of the rdb instance.
Important: The replica musts contains at least one
direct_access
orprivate_network
. It can contain both.- private
Network DatabaseRead Replica Private Network - Create an endpoint in a Private Netork.
- region string
region
) The region in which the Read Replica should be created.- same
Zone boolean - Defines whether to create the replica in the same availability zone as the main instance nodes or not.
- direct_
access DatabaseRead Replica Direct Access Args - Creates a direct access endpoint to rdb replica.
- instance_
id str UUID of the rdb instance.
Important: The replica musts contains at least one
direct_access
orprivate_network
. It can contain both.- private_
network DatabaseRead Replica Private Network Args - Create an endpoint in a Private Netork.
- region str
region
) The region in which the Read Replica should be created.- same_
zone bool - Defines whether to create the replica in the same availability zone as the main instance nodes or not.
- direct
Access Property Map - Creates a direct access endpoint to rdb replica.
- instance
Id String UUID of the rdb instance.
Important: The replica musts contains at least one
direct_access
orprivate_network
. It can contain both.- private
Network Property Map - Create an endpoint in a Private Netork.
- region String
region
) The region in which the Read Replica should be created.- same
Zone Boolean - Defines whether to create the replica in the same availability zone as the main instance nodes or not.
Supporting Types
DatabaseReadReplicaDirectAccess, DatabaseReadReplicaDirectAccessArgs
- Endpoint
Id string - The ID of the endpoint of the Read Replica.
- Hostname string
- Hostname of the endpoint. Only one of IP and hostname may be set.
- Ip string
- IPv4 address of the endpoint (IP address). Only one of IP and hostname may be set.
- Name string
- Name of the endpoint.
- Port int
- TCP port of the endpoint.
- Endpoint
Id string - The ID of the endpoint of the Read Replica.
- Hostname string
- Hostname of the endpoint. Only one of IP and hostname may be set.
- Ip string
- IPv4 address of the endpoint (IP address). Only one of IP and hostname may be set.
- Name string
- Name of the endpoint.
- Port int
- TCP port of the endpoint.
- endpoint
Id String - The ID of the endpoint of the Read Replica.
- hostname String
- Hostname of the endpoint. Only one of IP and hostname may be set.
- ip String
- IPv4 address of the endpoint (IP address). Only one of IP and hostname may be set.
- name String
- Name of the endpoint.
- port Integer
- TCP port of the endpoint.
- endpoint
Id string - The ID of the endpoint of the Read Replica.
- hostname string
- Hostname of the endpoint. Only one of IP and hostname may be set.
- ip string
- IPv4 address of the endpoint (IP address). Only one of IP and hostname may be set.
- name string
- Name of the endpoint.
- port number
- TCP port of the endpoint.
- endpoint_
id str - The ID of the endpoint of the Read Replica.
- hostname str
- Hostname of the endpoint. Only one of IP and hostname may be set.
- ip str
- IPv4 address of the endpoint (IP address). Only one of IP and hostname may be set.
- name str
- Name of the endpoint.
- port int
- TCP port of the endpoint.
- endpoint
Id String - The ID of the endpoint of the Read Replica.
- hostname String
- Hostname of the endpoint. Only one of IP and hostname may be set.
- ip String
- IPv4 address of the endpoint (IP address). Only one of IP and hostname may be set.
- name String
- Name of the endpoint.
- port Number
- TCP port of the endpoint.
DatabaseReadReplicaPrivateNetwork, DatabaseReadReplicaPrivateNetworkArgs
- Private
Network stringId - UUID of the Private Netork to be connected to the Read Replica.
- Enable
Ipam bool If true, the IP network address within the private subnet is determined by the IP Address Management (IPAM) service.
Important: One of
service_ip
orenable_ipam=true
must be set.- Endpoint
Id string - The ID of the endpoint of the Read Replica.
- Hostname string
- Hostname of the endpoint. Only one of IP and hostname may be set.
- Ip string
- IPv4 address of the endpoint (IP address). Only one of IP and hostname may be set.
- Name string
- Name of the endpoint.
- Port int
- TCP port of the endpoint.
- Service
Ip string - The IP network address within the private subnet. This must be an IPv4 address with a CIDR notation. If not set, The IP network address within the private subnet is determined by the IP Address Management (IPAM) service.
- Zone string
- Private network zone
- Private
Network stringId - UUID of the Private Netork to be connected to the Read Replica.
- Enable
Ipam bool If true, the IP network address within the private subnet is determined by the IP Address Management (IPAM) service.
Important: One of
service_ip
orenable_ipam=true
must be set.- Endpoint
Id string - The ID of the endpoint of the Read Replica.
- Hostname string
- Hostname of the endpoint. Only one of IP and hostname may be set.
- Ip string
- IPv4 address of the endpoint (IP address). Only one of IP and hostname may be set.
- Name string
- Name of the endpoint.
- Port int
- TCP port of the endpoint.
- Service
Ip string - The IP network address within the private subnet. This must be an IPv4 address with a CIDR notation. If not set, The IP network address within the private subnet is determined by the IP Address Management (IPAM) service.
- Zone string
- Private network zone
- private
Network StringId - UUID of the Private Netork to be connected to the Read Replica.
- enable
Ipam Boolean If true, the IP network address within the private subnet is determined by the IP Address Management (IPAM) service.
Important: One of
service_ip
orenable_ipam=true
must be set.- endpoint
Id String - The ID of the endpoint of the Read Replica.
- hostname String
- Hostname of the endpoint. Only one of IP and hostname may be set.
- ip String
- IPv4 address of the endpoint (IP address). Only one of IP and hostname may be set.
- name String
- Name of the endpoint.
- port Integer
- TCP port of the endpoint.
- service
Ip String - The IP network address within the private subnet. This must be an IPv4 address with a CIDR notation. If not set, The IP network address within the private subnet is determined by the IP Address Management (IPAM) service.
- zone String
- Private network zone
- private
Network stringId - UUID of the Private Netork to be connected to the Read Replica.
- enable
Ipam boolean If true, the IP network address within the private subnet is determined by the IP Address Management (IPAM) service.
Important: One of
service_ip
orenable_ipam=true
must be set.- endpoint
Id string - The ID of the endpoint of the Read Replica.
- hostname string
- Hostname of the endpoint. Only one of IP and hostname may be set.
- ip string
- IPv4 address of the endpoint (IP address). Only one of IP and hostname may be set.
- name string
- Name of the endpoint.
- port number
- TCP port of the endpoint.
- service
Ip string - The IP network address within the private subnet. This must be an IPv4 address with a CIDR notation. If not set, The IP network address within the private subnet is determined by the IP Address Management (IPAM) service.
- zone string
- Private network zone
- private_
network_ strid - UUID of the Private Netork to be connected to the Read Replica.
- enable_
ipam bool If true, the IP network address within the private subnet is determined by the IP Address Management (IPAM) service.
Important: One of
service_ip
orenable_ipam=true
must be set.- endpoint_
id str - The ID of the endpoint of the Read Replica.
- hostname str
- Hostname of the endpoint. Only one of IP and hostname may be set.
- ip str
- IPv4 address of the endpoint (IP address). Only one of IP and hostname may be set.
- name str
- Name of the endpoint.
- port int
- TCP port of the endpoint.
- service_
ip str - The IP network address within the private subnet. This must be an IPv4 address with a CIDR notation. If not set, The IP network address within the private subnet is determined by the IP Address Management (IPAM) service.
- zone str
- Private network zone
- private
Network StringId - UUID of the Private Netork to be connected to the Read Replica.
- enable
Ipam Boolean If true, the IP network address within the private subnet is determined by the IP Address Management (IPAM) service.
Important: One of
service_ip
orenable_ipam=true
must be set.- endpoint
Id String - The ID of the endpoint of the Read Replica.
- hostname String
- Hostname of the endpoint. Only one of IP and hostname may be set.
- ip String
- IPv4 address of the endpoint (IP address). Only one of IP and hostname may be set.
- name String
- Name of the endpoint.
- port Number
- TCP port of the endpoint.
- service
Ip String - The IP network address within the private subnet. This must be an IPv4 address with a CIDR notation. If not set, The IP network address within the private subnet is determined by the IP Address Management (IPAM) service.
- zone String
- Private network zone
Import
Read Replicas can be imported using the {region}/{id}
, e.g.
bash
$ pulumi import scaleway:index/databaseReadReplica:DatabaseReadReplica rr fr-par/11111111-1111-1111-1111-111111111111
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- scaleway pulumiverse/pulumi-scaleway
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
scaleway
Terraform Provider.