gcp.compute.DiskAsyncReplication
Explore with Pulumi AI
Starts and stops asynchronous persistent disk replication. For more information see the official documentation and the API.
Example Usage
resource "google_compute_disk" "primary-disk" {
name = "primary-disk"
type = "pd-ssd"
zone = "europe-west4-a"
physical_block_size_bytes = 4096
}
resource "google_compute_disk" "secondary-disk" {
name = "secondary-disk"
type = "pd-ssd"
zone = "europe-west3-a"
async_primary_disk {
disk = google_compute_disk.primary-disk.id
}
physical_block_size_bytes = 4096
}
resource "google_compute_disk_async_replication" "replication" {
primary_disk = google_compute_disk.primary-disk.id
secondary_disk {
disk = google_compute_disk.secondary-disk.id
}
}
Create DiskAsyncReplication Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new DiskAsyncReplication(name: string, args: DiskAsyncReplicationArgs, opts?: CustomResourceOptions);
@overload
def DiskAsyncReplication(resource_name: str,
args: DiskAsyncReplicationArgs,
opts: Optional[ResourceOptions] = None)
@overload
def DiskAsyncReplication(resource_name: str,
opts: Optional[ResourceOptions] = None,
primary_disk: Optional[str] = None,
secondary_disk: Optional[DiskAsyncReplicationSecondaryDiskArgs] = None)
func NewDiskAsyncReplication(ctx *Context, name string, args DiskAsyncReplicationArgs, opts ...ResourceOption) (*DiskAsyncReplication, error)
public DiskAsyncReplication(string name, DiskAsyncReplicationArgs args, CustomResourceOptions? opts = null)
public DiskAsyncReplication(String name, DiskAsyncReplicationArgs args)
public DiskAsyncReplication(String name, DiskAsyncReplicationArgs args, CustomResourceOptions options)
type: gcp:compute:DiskAsyncReplication
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 DiskAsyncReplicationArgs
- 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 DiskAsyncReplicationArgs
- 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 DiskAsyncReplicationArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args DiskAsyncReplicationArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args DiskAsyncReplicationArgs
- 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 diskAsyncReplicationResource = new Gcp.Compute.DiskAsyncReplication("diskAsyncReplicationResource", new()
{
PrimaryDisk = "string",
SecondaryDisk = new Gcp.Compute.Inputs.DiskAsyncReplicationSecondaryDiskArgs
{
Disk = "string",
State = "string",
},
});
example, err := compute.NewDiskAsyncReplication(ctx, "diskAsyncReplicationResource", &compute.DiskAsyncReplicationArgs{
PrimaryDisk: pulumi.String("string"),
SecondaryDisk: &compute.DiskAsyncReplicationSecondaryDiskArgs{
Disk: pulumi.String("string"),
State: pulumi.String("string"),
},
})
var diskAsyncReplicationResource = new DiskAsyncReplication("diskAsyncReplicationResource", DiskAsyncReplicationArgs.builder()
.primaryDisk("string")
.secondaryDisk(DiskAsyncReplicationSecondaryDiskArgs.builder()
.disk("string")
.state("string")
.build())
.build());
disk_async_replication_resource = gcp.compute.DiskAsyncReplication("diskAsyncReplicationResource",
primary_disk="string",
secondary_disk=gcp.compute.DiskAsyncReplicationSecondaryDiskArgs(
disk="string",
state="string",
))
const diskAsyncReplicationResource = new gcp.compute.DiskAsyncReplication("diskAsyncReplicationResource", {
primaryDisk: "string",
secondaryDisk: {
disk: "string",
state: "string",
},
});
type: gcp:compute:DiskAsyncReplication
properties:
primaryDisk: string
secondaryDisk:
disk: string
state: string
DiskAsyncReplication 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 DiskAsyncReplication resource accepts the following input properties:
- Primary
Disk string - The primary disk (source of replication).
- Secondary
Disk DiskAsync Replication Secondary Disk The secondary disk (target of replication). You can specify only one value. Structure is documented below.
The
secondary_disk
block includes:
- Primary
Disk string - The primary disk (source of replication).
- Secondary
Disk DiskAsync Replication Secondary Disk Args The secondary disk (target of replication). You can specify only one value. Structure is documented below.
The
secondary_disk
block includes:
- primary
Disk String - The primary disk (source of replication).
- secondary
Disk DiskAsync Replication Secondary Disk The secondary disk (target of replication). You can specify only one value. Structure is documented below.
The
secondary_disk
block includes:
- primary
Disk string - The primary disk (source of replication).
- secondary
Disk DiskAsync Replication Secondary Disk The secondary disk (target of replication). You can specify only one value. Structure is documented below.
The
secondary_disk
block includes:
- primary_
disk str - The primary disk (source of replication).
- secondary_
disk DiskAsync Replication Secondary Disk Args The secondary disk (target of replication). You can specify only one value. Structure is documented below.
The
secondary_disk
block includes:
- primary
Disk String - The primary disk (source of replication).
- secondary
Disk Property Map The secondary disk (target of replication). You can specify only one value. Structure is documented below.
The
secondary_disk
block includes:
Outputs
All input properties are implicitly available as output properties. Additionally, the DiskAsyncReplication 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 DiskAsyncReplication Resource
Get an existing DiskAsyncReplication 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?: DiskAsyncReplicationState, opts?: CustomResourceOptions): DiskAsyncReplication
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
primary_disk: Optional[str] = None,
secondary_disk: Optional[DiskAsyncReplicationSecondaryDiskArgs] = None) -> DiskAsyncReplication
func GetDiskAsyncReplication(ctx *Context, name string, id IDInput, state *DiskAsyncReplicationState, opts ...ResourceOption) (*DiskAsyncReplication, error)
public static DiskAsyncReplication Get(string name, Input<string> id, DiskAsyncReplicationState? state, CustomResourceOptions? opts = null)
public static DiskAsyncReplication get(String name, Output<String> id, DiskAsyncReplicationState 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.
- Primary
Disk string - The primary disk (source of replication).
- Secondary
Disk DiskAsync Replication Secondary Disk The secondary disk (target of replication). You can specify only one value. Structure is documented below.
The
secondary_disk
block includes:
- Primary
Disk string - The primary disk (source of replication).
- Secondary
Disk DiskAsync Replication Secondary Disk Args The secondary disk (target of replication). You can specify only one value. Structure is documented below.
The
secondary_disk
block includes:
- primary
Disk String - The primary disk (source of replication).
- secondary
Disk DiskAsync Replication Secondary Disk The secondary disk (target of replication). You can specify only one value. Structure is documented below.
The
secondary_disk
block includes:
- primary
Disk string - The primary disk (source of replication).
- secondary
Disk DiskAsync Replication Secondary Disk The secondary disk (target of replication). You can specify only one value. Structure is documented below.
The
secondary_disk
block includes:
- primary_
disk str - The primary disk (source of replication).
- secondary_
disk DiskAsync Replication Secondary Disk Args The secondary disk (target of replication). You can specify only one value. Structure is documented below.
The
secondary_disk
block includes:
- primary
Disk String - The primary disk (source of replication).
- secondary
Disk Property Map The secondary disk (target of replication). You can specify only one value. Structure is documented below.
The
secondary_disk
block includes:
Supporting Types
DiskAsyncReplicationSecondaryDisk, DiskAsyncReplicationSecondaryDiskArgs
Package Details
- Repository
- Google Cloud (GCP) Classic pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-beta
Terraform Provider.