1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. backupdisasterrecovery
  5. ServiceConfig
Google Cloud v8.39.0 published on Tuesday, Jul 22, 2025 by Pulumi

gcp.backupdisasterrecovery.ServiceConfig

Explore with Pulumi AI

gcp logo
Google Cloud v8.39.0 published on Tuesday, Jul 22, 2025 by Pulumi

    Initializes a Project-level default Backupdr config. It creates default Backupvault and default Backup Plan in same project for customers to protect instances.

    To get more information about ServiceConfig, see:

    Example Usage

    Backup Dr Service Config

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const bpa1 = new gcp.backupdisasterrecovery.ServiceConfig("bpa1", {
        location: "us-central1",
        resourceType: "compute.googleapis.com/Instance",
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    bpa1 = gcp.backupdisasterrecovery.ServiceConfig("bpa1",
        location="us-central1",
        resource_type="compute.googleapis.com/Instance")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v8/go/gcp/backupdisasterrecovery"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := backupdisasterrecovery.NewServiceConfig(ctx, "bpa1", &backupdisasterrecovery.ServiceConfigArgs{
    			Location:     pulumi.String("us-central1"),
    			ResourceType: pulumi.String("compute.googleapis.com/Instance"),
    		})
    		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 bpa1 = new Gcp.BackupDisasterRecovery.ServiceConfig("bpa1", new()
        {
            Location = "us-central1",
            ResourceType = "compute.googleapis.com/Instance",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.backupdisasterrecovery.ServiceConfig;
    import com.pulumi.gcp.backupdisasterrecovery.ServiceConfigArgs;
    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 bpa1 = new ServiceConfig("bpa1", ServiceConfigArgs.builder()
                .location("us-central1")
                .resourceType("compute.googleapis.com/Instance")
                .build());
    
        }
    }
    
    resources:
      bpa1:
        type: gcp:backupdisasterrecovery:ServiceConfig
        properties:
          location: us-central1
          resourceType: compute.googleapis.com/Instance
    

    Create ServiceConfig Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ServiceConfig(name: string, args: ServiceConfigArgs, opts?: CustomResourceOptions);
    @overload
    def ServiceConfig(resource_name: str,
                      args: ServiceConfigArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def ServiceConfig(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      location: Optional[str] = None,
                      resource_type: Optional[str] = None,
                      project: Optional[str] = None)
    func NewServiceConfig(ctx *Context, name string, args ServiceConfigArgs, opts ...ResourceOption) (*ServiceConfig, error)
    public ServiceConfig(string name, ServiceConfigArgs args, CustomResourceOptions? opts = null)
    public ServiceConfig(String name, ServiceConfigArgs args)
    public ServiceConfig(String name, ServiceConfigArgs args, CustomResourceOptions options)
    
    type: gcp:backupdisasterrecovery:ServiceConfig
    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 ServiceConfigArgs
    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 ServiceConfigArgs
    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 ServiceConfigArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ServiceConfigArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ServiceConfigArgs
    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 serviceConfigResource = new Gcp.BackupDisasterRecovery.ServiceConfig("serviceConfigResource", new()
    {
        Location = "string",
        ResourceType = "string",
        Project = "string",
    });
    
    example, err := backupdisasterrecovery.NewServiceConfig(ctx, "serviceConfigResource", &backupdisasterrecovery.ServiceConfigArgs{
    	Location:     pulumi.String("string"),
    	ResourceType: pulumi.String("string"),
    	Project:      pulumi.String("string"),
    })
    
    var serviceConfigResource = new ServiceConfig("serviceConfigResource", ServiceConfigArgs.builder()
        .location("string")
        .resourceType("string")
        .project("string")
        .build());
    
    service_config_resource = gcp.backupdisasterrecovery.ServiceConfig("serviceConfigResource",
        location="string",
        resource_type="string",
        project="string")
    
    const serviceConfigResource = new gcp.backupdisasterrecovery.ServiceConfig("serviceConfigResource", {
        location: "string",
        resourceType: "string",
        project: "string",
    });
    
    type: gcp:backupdisasterrecovery:ServiceConfig
    properties:
        location: string
        project: string
        resourceType: string
    

    ServiceConfig Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The ServiceConfig resource accepts the following input properties:

    Location string
    The location in which the Service config is to be initialized.
    ResourceType string
    The resource type to which the default service config will be applied.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    Location string
    The location in which the Service config is to be initialized.
    ResourceType string
    The resource type to which the default service config will be applied.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    location String
    The location in which the Service config is to be initialized.
    resourceType String
    The resource type to which the default service config will be applied.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    location string
    The location in which the Service config is to be initialized.
    resourceType string
    The resource type to which the default service config will be applied.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    location str
    The location in which the Service config is to be initialized.
    resource_type str
    The resource type to which the default service config will be applied.
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    location String
    The location in which the Service config is to be initialized.
    resourceType String
    The resource type to which the default service config will be applied.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ServiceConfig 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 ServiceConfig Resource

    Get an existing ServiceConfig 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?: ServiceConfigState, opts?: CustomResourceOptions): ServiceConfig
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            location: Optional[str] = None,
            project: Optional[str] = None,
            resource_type: Optional[str] = None) -> ServiceConfig
    func GetServiceConfig(ctx *Context, name string, id IDInput, state *ServiceConfigState, opts ...ResourceOption) (*ServiceConfig, error)
    public static ServiceConfig Get(string name, Input<string> id, ServiceConfigState? state, CustomResourceOptions? opts = null)
    public static ServiceConfig get(String name, Output<String> id, ServiceConfigState state, CustomResourceOptions options)
    resources:  _:    type: gcp:backupdisasterrecovery:ServiceConfig    get:      id: ${id}
    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.
    The following state arguments are supported:
    Location string
    The location in which the Service config is to be initialized.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    ResourceType string
    The resource type to which the default service config will be applied.
    Location string
    The location in which the Service config is to be initialized.
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    ResourceType string
    The resource type to which the default service config will be applied.
    location String
    The location in which the Service config is to be initialized.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    resourceType String
    The resource type to which the default service config will be applied.
    location string
    The location in which the Service config is to be initialized.
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    resourceType string
    The resource type to which the default service config will be applied.
    location str
    The location in which the Service config is to be initialized.
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    resource_type str
    The resource type to which the default service config will be applied.
    location String
    The location in which the Service config is to be initialized.
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    resourceType String
    The resource type to which the default service config will be applied.

    Import

    This resource does not support import.

    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.
    gcp logo
    Google Cloud v8.39.0 published on Tuesday, Jul 22, 2025 by Pulumi