gcp.backupdisasterrecovery.ManagementServer
Explore with Pulumi AI
Example Usage
Backup Dr Management Server
import * as pulumi from "@pulumi/pulumi";
import * as gcp from "@pulumi/gcp";
const _default = new gcp.compute.Network("default", {name: "vpc-network"});
const privateIpAddress = new gcp.compute.GlobalAddress("private_ip_address", {
name: "vpc-network",
addressType: "INTERNAL",
purpose: "VPC_PEERING",
prefixLength: 20,
network: _default.id,
});
const defaultConnection = new gcp.servicenetworking.Connection("default", {
network: _default.id,
service: "servicenetworking.googleapis.com",
reservedPeeringRanges: [privateIpAddress.name],
});
const ms_console = new gcp.backupdisasterrecovery.ManagementServer("ms-console", {
location: "us-central1",
name: "ms-console",
type: "BACKUP_RESTORE",
networks: [{
network: _default.id,
peeringMode: "PRIVATE_SERVICE_ACCESS",
}],
}, {
dependsOn: [defaultConnection],
});
import pulumi
import pulumi_gcp as gcp
default = gcp.compute.Network("default", name="vpc-network")
private_ip_address = gcp.compute.GlobalAddress("private_ip_address",
name="vpc-network",
address_type="INTERNAL",
purpose="VPC_PEERING",
prefix_length=20,
network=default.id)
default_connection = gcp.servicenetworking.Connection("default",
network=default.id,
service="servicenetworking.googleapis.com",
reserved_peering_ranges=[private_ip_address.name])
ms_console = gcp.backupdisasterrecovery.ManagementServer("ms-console",
location="us-central1",
name="ms-console",
type="BACKUP_RESTORE",
networks=[{
"network": default.id,
"peering_mode": "PRIVATE_SERVICE_ACCESS",
}],
opts = pulumi.ResourceOptions(depends_on=[default_connection]))
package main
import (
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/backupdisasterrecovery"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/compute"
"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/servicenetworking"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := compute.NewNetwork(ctx, "default", &compute.NetworkArgs{
Name: pulumi.String("vpc-network"),
})
if err != nil {
return err
}
privateIpAddress, err := compute.NewGlobalAddress(ctx, "private_ip_address", &compute.GlobalAddressArgs{
Name: pulumi.String("vpc-network"),
AddressType: pulumi.String("INTERNAL"),
Purpose: pulumi.String("VPC_PEERING"),
PrefixLength: pulumi.Int(20),
Network: _default.ID(),
})
if err != nil {
return err
}
defaultConnection, err := servicenetworking.NewConnection(ctx, "default", &servicenetworking.ConnectionArgs{
Network: _default.ID(),
Service: pulumi.String("servicenetworking.googleapis.com"),
ReservedPeeringRanges: pulumi.StringArray{
privateIpAddress.Name,
},
})
if err != nil {
return err
}
_, err = backupdisasterrecovery.NewManagementServer(ctx, "ms-console", &backupdisasterrecovery.ManagementServerArgs{
Location: pulumi.String("us-central1"),
Name: pulumi.String("ms-console"),
Type: pulumi.String("BACKUP_RESTORE"),
Networks: backupdisasterrecovery.ManagementServerNetworkArray{
&backupdisasterrecovery.ManagementServerNetworkArgs{
Network: _default.ID(),
PeeringMode: pulumi.String("PRIVATE_SERVICE_ACCESS"),
},
},
}, pulumi.DependsOn([]pulumi.Resource{
defaultConnection,
}))
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Gcp = Pulumi.Gcp;
return await Deployment.RunAsync(() =>
{
var @default = new Gcp.Compute.Network("default", new()
{
Name = "vpc-network",
});
var privateIpAddress = new Gcp.Compute.GlobalAddress("private_ip_address", new()
{
Name = "vpc-network",
AddressType = "INTERNAL",
Purpose = "VPC_PEERING",
PrefixLength = 20,
Network = @default.Id,
});
var defaultConnection = new Gcp.ServiceNetworking.Connection("default", new()
{
Network = @default.Id,
Service = "servicenetworking.googleapis.com",
ReservedPeeringRanges = new[]
{
privateIpAddress.Name,
},
});
var ms_console = new Gcp.BackupDisasterRecovery.ManagementServer("ms-console", new()
{
Location = "us-central1",
Name = "ms-console",
Type = "BACKUP_RESTORE",
Networks = new[]
{
new Gcp.BackupDisasterRecovery.Inputs.ManagementServerNetworkArgs
{
Network = @default.Id,
PeeringMode = "PRIVATE_SERVICE_ACCESS",
},
},
}, new CustomResourceOptions
{
DependsOn =
{
defaultConnection,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.gcp.compute.Network;
import com.pulumi.gcp.compute.NetworkArgs;
import com.pulumi.gcp.compute.GlobalAddress;
import com.pulumi.gcp.compute.GlobalAddressArgs;
import com.pulumi.gcp.servicenetworking.Connection;
import com.pulumi.gcp.servicenetworking.ConnectionArgs;
import com.pulumi.gcp.backupdisasterrecovery.ManagementServer;
import com.pulumi.gcp.backupdisasterrecovery.ManagementServerArgs;
import com.pulumi.gcp.backupdisasterrecovery.inputs.ManagementServerNetworkArgs;
import com.pulumi.resources.CustomResourceOptions;
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 default_ = new Network("default", NetworkArgs.builder()
.name("vpc-network")
.build());
var privateIpAddress = new GlobalAddress("privateIpAddress", GlobalAddressArgs.builder()
.name("vpc-network")
.addressType("INTERNAL")
.purpose("VPC_PEERING")
.prefixLength(20)
.network(default_.id())
.build());
var defaultConnection = new Connection("defaultConnection", ConnectionArgs.builder()
.network(default_.id())
.service("servicenetworking.googleapis.com")
.reservedPeeringRanges(privateIpAddress.name())
.build());
var ms_console = new ManagementServer("ms-console", ManagementServerArgs.builder()
.location("us-central1")
.name("ms-console")
.type("BACKUP_RESTORE")
.networks(ManagementServerNetworkArgs.builder()
.network(default_.id())
.peeringMode("PRIVATE_SERVICE_ACCESS")
.build())
.build(), CustomResourceOptions.builder()
.dependsOn(defaultConnection)
.build());
}
}
resources:
default:
type: gcp:compute:Network
properties:
name: vpc-network
privateIpAddress:
type: gcp:compute:GlobalAddress
name: private_ip_address
properties:
name: vpc-network
addressType: INTERNAL
purpose: VPC_PEERING
prefixLength: 20
network: ${default.id}
defaultConnection:
type: gcp:servicenetworking:Connection
name: default
properties:
network: ${default.id}
service: servicenetworking.googleapis.com
reservedPeeringRanges:
- ${privateIpAddress.name}
ms-console:
type: gcp:backupdisasterrecovery:ManagementServer
properties:
location: us-central1
name: ms-console
type: BACKUP_RESTORE
networks:
- network: ${default.id}
peeringMode: PRIVATE_SERVICE_ACCESS
options:
dependson:
- ${defaultConnection}
Create ManagementServer Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ManagementServer(name: string, args: ManagementServerArgs, opts?: CustomResourceOptions);
@overload
def ManagementServer(resource_name: str,
args: ManagementServerArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ManagementServer(resource_name: str,
opts: Optional[ResourceOptions] = None,
location: Optional[str] = None,
networks: Optional[Sequence[ManagementServerNetworkArgs]] = None,
name: Optional[str] = None,
project: Optional[str] = None,
type: Optional[str] = None)
func NewManagementServer(ctx *Context, name string, args ManagementServerArgs, opts ...ResourceOption) (*ManagementServer, error)
public ManagementServer(string name, ManagementServerArgs args, CustomResourceOptions? opts = null)
public ManagementServer(String name, ManagementServerArgs args)
public ManagementServer(String name, ManagementServerArgs args, CustomResourceOptions options)
type: gcp:backupdisasterrecovery:ManagementServer
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 ManagementServerArgs
- 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 ManagementServerArgs
- 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 ManagementServerArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ManagementServerArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ManagementServerArgs
- 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 managementServerResource = new Gcp.BackupDisasterRecovery.ManagementServer("managementServerResource", new()
{
Location = "string",
Networks = new[]
{
new Gcp.BackupDisasterRecovery.Inputs.ManagementServerNetworkArgs
{
Network = "string",
PeeringMode = "string",
},
},
Name = "string",
Project = "string",
Type = "string",
});
example, err := backupdisasterrecovery.NewManagementServer(ctx, "managementServerResource", &backupdisasterrecovery.ManagementServerArgs{
Location: pulumi.String("string"),
Networks: backupdisasterrecovery.ManagementServerNetworkArray{
&backupdisasterrecovery.ManagementServerNetworkArgs{
Network: pulumi.String("string"),
PeeringMode: pulumi.String("string"),
},
},
Name: pulumi.String("string"),
Project: pulumi.String("string"),
Type: pulumi.String("string"),
})
var managementServerResource = new ManagementServer("managementServerResource", ManagementServerArgs.builder()
.location("string")
.networks(ManagementServerNetworkArgs.builder()
.network("string")
.peeringMode("string")
.build())
.name("string")
.project("string")
.type("string")
.build());
management_server_resource = gcp.backupdisasterrecovery.ManagementServer("managementServerResource",
location="string",
networks=[{
"network": "string",
"peeringMode": "string",
}],
name="string",
project="string",
type="string")
const managementServerResource = new gcp.backupdisasterrecovery.ManagementServer("managementServerResource", {
location: "string",
networks: [{
network: "string",
peeringMode: "string",
}],
name: "string",
project: "string",
type: "string",
});
type: gcp:backupdisasterrecovery:ManagementServer
properties:
location: string
name: string
networks:
- network: string
peeringMode: string
project: string
type: string
ManagementServer 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 ManagementServer resource accepts the following input properties:
- Location string
- The location for the management server (management console)
- Networks
List<Management
Server Network> - Network details to create management server (management console). Structure is documented below.
- Name string
- The name of management server (management console)
- Project string
- Type string
- The type of management server (management console). Default value: "BACKUP_RESTORE" Possible values: ["BACKUP_RESTORE"]
- Location string
- The location for the management server (management console)
- Networks
[]Management
Server Network Args - Network details to create management server (management console). Structure is documented below.
- Name string
- The name of management server (management console)
- Project string
- Type string
- The type of management server (management console). Default value: "BACKUP_RESTORE" Possible values: ["BACKUP_RESTORE"]
- location String
- The location for the management server (management console)
- networks
List<Management
Server Network> - Network details to create management server (management console). Structure is documented below.
- name String
- The name of management server (management console)
- project String
- type String
- The type of management server (management console). Default value: "BACKUP_RESTORE" Possible values: ["BACKUP_RESTORE"]
- location string
- The location for the management server (management console)
- networks
Management
Server Network[] - Network details to create management server (management console). Structure is documented below.
- name string
- The name of management server (management console)
- project string
- type string
- The type of management server (management console). Default value: "BACKUP_RESTORE" Possible values: ["BACKUP_RESTORE"]
- location str
- The location for the management server (management console)
- networks
Sequence[Management
Server Network Args] - Network details to create management server (management console). Structure is documented below.
- name str
- The name of management server (management console)
- project str
- type str
- The type of management server (management console). Default value: "BACKUP_RESTORE" Possible values: ["BACKUP_RESTORE"]
- location String
- The location for the management server (management console)
- networks List<Property Map>
- Network details to create management server (management console). Structure is documented below.
- name String
- The name of management server (management console)
- project String
- type String
- The type of management server (management console). Default value: "BACKUP_RESTORE" Possible values: ["BACKUP_RESTORE"]
Outputs
All input properties are implicitly available as output properties. Additionally, the ManagementServer resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Management
Uris List<ManagementServer Management Uri> - The management console URI Structure is documented below.
- Oauth2Client
Id string - The oauth2ClientId of management console.
- Id string
- The provider-assigned unique ID for this managed resource.
- Management
Uris []ManagementServer Management Uri - The management console URI Structure is documented below.
- Oauth2Client
Id string - The oauth2ClientId of management console.
- id String
- The provider-assigned unique ID for this managed resource.
- management
Uris List<ManagementServer Management Uri> - The management console URI Structure is documented below.
- oauth2Client
Id String - The oauth2ClientId of management console.
- id string
- The provider-assigned unique ID for this managed resource.
- management
Uris ManagementServer Management Uri[] - The management console URI Structure is documented below.
- oauth2Client
Id string - The oauth2ClientId of management console.
- id str
- The provider-assigned unique ID for this managed resource.
- management_
uris Sequence[ManagementServer Management Uri] - The management console URI Structure is documented below.
- oauth2_
client_ strid - The oauth2ClientId of management console.
- id String
- The provider-assigned unique ID for this managed resource.
- management
Uris List<Property Map> - The management console URI Structure is documented below.
- oauth2Client
Id String - The oauth2ClientId of management console.
Look up Existing ManagementServer Resource
Get an existing ManagementServer 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?: ManagementServerState, opts?: CustomResourceOptions): ManagementServer
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
location: Optional[str] = None,
management_uris: Optional[Sequence[ManagementServerManagementUriArgs]] = None,
name: Optional[str] = None,
networks: Optional[Sequence[ManagementServerNetworkArgs]] = None,
oauth2_client_id: Optional[str] = None,
project: Optional[str] = None,
type: Optional[str] = None) -> ManagementServer
func GetManagementServer(ctx *Context, name string, id IDInput, state *ManagementServerState, opts ...ResourceOption) (*ManagementServer, error)
public static ManagementServer Get(string name, Input<string> id, ManagementServerState? state, CustomResourceOptions? opts = null)
public static ManagementServer get(String name, Output<String> id, ManagementServerState 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.
- Location string
- The location for the management server (management console)
- Management
Uris List<ManagementServer Management Uri> - The management console URI Structure is documented below.
- Name string
- The name of management server (management console)
- Networks
List<Management
Server Network> - Network details to create management server (management console). Structure is documented below.
- Oauth2Client
Id string - The oauth2ClientId of management console.
- Project string
- Type string
- The type of management server (management console). Default value: "BACKUP_RESTORE" Possible values: ["BACKUP_RESTORE"]
- Location string
- The location for the management server (management console)
- Management
Uris []ManagementServer Management Uri Args - The management console URI Structure is documented below.
- Name string
- The name of management server (management console)
- Networks
[]Management
Server Network Args - Network details to create management server (management console). Structure is documented below.
- Oauth2Client
Id string - The oauth2ClientId of management console.
- Project string
- Type string
- The type of management server (management console). Default value: "BACKUP_RESTORE" Possible values: ["BACKUP_RESTORE"]
- location String
- The location for the management server (management console)
- management
Uris List<ManagementServer Management Uri> - The management console URI Structure is documented below.
- name String
- The name of management server (management console)
- networks
List<Management
Server Network> - Network details to create management server (management console). Structure is documented below.
- oauth2Client
Id String - The oauth2ClientId of management console.
- project String
- type String
- The type of management server (management console). Default value: "BACKUP_RESTORE" Possible values: ["BACKUP_RESTORE"]
- location string
- The location for the management server (management console)
- management
Uris ManagementServer Management Uri[] - The management console URI Structure is documented below.
- name string
- The name of management server (management console)
- networks
Management
Server Network[] - Network details to create management server (management console). Structure is documented below.
- oauth2Client
Id string - The oauth2ClientId of management console.
- project string
- type string
- The type of management server (management console). Default value: "BACKUP_RESTORE" Possible values: ["BACKUP_RESTORE"]
- location str
- The location for the management server (management console)
- management_
uris Sequence[ManagementServer Management Uri Args] - The management console URI Structure is documented below.
- name str
- The name of management server (management console)
- networks
Sequence[Management
Server Network Args] - Network details to create management server (management console). Structure is documented below.
- oauth2_
client_ strid - The oauth2ClientId of management console.
- project str
- type str
- The type of management server (management console). Default value: "BACKUP_RESTORE" Possible values: ["BACKUP_RESTORE"]
- location String
- The location for the management server (management console)
- management
Uris List<Property Map> - The management console URI Structure is documented below.
- name String
- The name of management server (management console)
- networks List<Property Map>
- Network details to create management server (management console). Structure is documented below.
- oauth2Client
Id String - The oauth2ClientId of management console.
- project String
- type String
- The type of management server (management console). Default value: "BACKUP_RESTORE" Possible values: ["BACKUP_RESTORE"]
Supporting Types
ManagementServerManagementUri, ManagementServerManagementUriArgs
ManagementServerNetwork, ManagementServerNetworkArgs
- Network string
- Network with format
projects/{{project_id}}/global/networks/{{network_id}}
- Peering
Mode string - Type of Network peeringMode
Default value is
PRIVATE_SERVICE_ACCESS
. Possible values are:PRIVATE_SERVICE_ACCESS
.
- Network string
- Network with format
projects/{{project_id}}/global/networks/{{network_id}}
- Peering
Mode string - Type of Network peeringMode
Default value is
PRIVATE_SERVICE_ACCESS
. Possible values are:PRIVATE_SERVICE_ACCESS
.
- network String
- Network with format
projects/{{project_id}}/global/networks/{{network_id}}
- peering
Mode String - Type of Network peeringMode
Default value is
PRIVATE_SERVICE_ACCESS
. Possible values are:PRIVATE_SERVICE_ACCESS
.
- network string
- Network with format
projects/{{project_id}}/global/networks/{{network_id}}
- peering
Mode string - Type of Network peeringMode
Default value is
PRIVATE_SERVICE_ACCESS
. Possible values are:PRIVATE_SERVICE_ACCESS
.
- network str
- Network with format
projects/{{project_id}}/global/networks/{{network_id}}
- peering_
mode str - Type of Network peeringMode
Default value is
PRIVATE_SERVICE_ACCESS
. Possible values are:PRIVATE_SERVICE_ACCESS
.
- network String
- Network with format
projects/{{project_id}}/global/networks/{{network_id}}
- peering
Mode String - Type of Network peeringMode
Default value is
PRIVATE_SERVICE_ACCESS
. Possible values are:PRIVATE_SERVICE_ACCESS
.
Import
ManagementServer can be imported using any of these accepted formats:
projects/{{project}}/locations/{{location}}/managementServers/{{name}}
{{project}}/{{location}}/{{name}}
{{location}}/{{name}}
When using the pulumi import
command, ManagementServer can be imported using one of the formats above. For example:
$ pulumi import gcp:backupdisasterrecovery/managementServer:ManagementServer default projects/{{project}}/locations/{{location}}/managementServers/{{name}}
$ pulumi import gcp:backupdisasterrecovery/managementServer:ManagementServer default {{project}}/{{location}}/{{name}}
$ pulumi import gcp:backupdisasterrecovery/managementServer:ManagementServer default {{location}}/{{name}}
To learn more about importing existing cloud resources, see Importing resources.
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.