1. Packages
  2. Harness
  3. API Docs
  4. cloudprovider
  5. Datacenter
Harness v0.0.6 published on Saturday, Jul 1, 2023 by lbrlabs

harness.cloudprovider.Datacenter

Explore with Pulumi AI

harness logo
Harness v0.0.6 published on Saturday, Jul 1, 2023 by lbrlabs

    Resource for creating a physical data center cloud provider. This resource uses the config-as-code API’s. When updating the name or path of this resource you should typically also set the create_before_destroy = true lifecycle setting.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Harness = Lbrlabs.PulumiPackage.Harness;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Harness.Cloudprovider.Datacenter("example");
    
    });
    
    package main
    
    import (
    	"github.com/lbrlabs/pulumi-harness/sdk/go/harness/cloudprovider"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := cloudprovider.NewDatacenter(ctx, "example", nil)
    		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.harness.cloudprovider.Datacenter;
    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 example = new Datacenter("example");
    
        }
    }
    
    import pulumi
    import lbrlabs_pulumi_harness as harness
    
    example = harness.cloudprovider.Datacenter("example")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as harness from "@lbrlabs/pulumi-harness";
    
    const example = new harness.cloudprovider.Datacenter("example", {});
    
    resources:
      example:
        type: harness:cloudprovider:Datacenter
    

    Create Datacenter Resource

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

    Constructor syntax

    new Datacenter(name: string, args?: DatacenterArgs, opts?: CustomResourceOptions);
    @overload
    def Datacenter(resource_name: str,
                   args: Optional[DatacenterArgs] = None,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def Datacenter(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   name: Optional[str] = None,
                   usage_scopes: Optional[Sequence[DatacenterUsageScopeArgs]] = None)
    func NewDatacenter(ctx *Context, name string, args *DatacenterArgs, opts ...ResourceOption) (*Datacenter, error)
    public Datacenter(string name, DatacenterArgs? args = null, CustomResourceOptions? opts = null)
    public Datacenter(String name, DatacenterArgs args)
    public Datacenter(String name, DatacenterArgs args, CustomResourceOptions options)
    
    type: harness:cloudprovider:Datacenter
    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 DatacenterArgs
    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 DatacenterArgs
    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 DatacenterArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DatacenterArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DatacenterArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var datacenterResource = new Harness.Cloudprovider.Datacenter("datacenterResource", new()
    {
        Name = "string",
        UsageScopes = new[]
        {
            new Harness.Cloudprovider.Inputs.DatacenterUsageScopeArgs
            {
                ApplicationId = "string",
                EnvironmentFilterType = "string",
                EnvironmentId = "string",
            },
        },
    });
    
    example, err := cloudprovider.NewDatacenter(ctx, "datacenterResource", &cloudprovider.DatacenterArgs{
    	Name: pulumi.String("string"),
    	UsageScopes: cloudprovider.DatacenterUsageScopeArray{
    		&cloudprovider.DatacenterUsageScopeArgs{
    			ApplicationId:         pulumi.String("string"),
    			EnvironmentFilterType: pulumi.String("string"),
    			EnvironmentId:         pulumi.String("string"),
    		},
    	},
    })
    
    var datacenterResource = new Datacenter("datacenterResource", DatacenterArgs.builder()        
        .name("string")
        .usageScopes(DatacenterUsageScopeArgs.builder()
            .applicationId("string")
            .environmentFilterType("string")
            .environmentId("string")
            .build())
        .build());
    
    datacenter_resource = harness.cloudprovider.Datacenter("datacenterResource",
        name="string",
        usage_scopes=[harness.cloudprovider.DatacenterUsageScopeArgs(
            application_id="string",
            environment_filter_type="string",
            environment_id="string",
        )])
    
    const datacenterResource = new harness.cloudprovider.Datacenter("datacenterResource", {
        name: "string",
        usageScopes: [{
            applicationId: "string",
            environmentFilterType: "string",
            environmentId: "string",
        }],
    });
    
    type: harness:cloudprovider:Datacenter
    properties:
        name: string
        usageScopes:
            - applicationId: string
              environmentFilterType: string
              environmentId: string
    

    Datacenter 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 Datacenter resource accepts the following input properties:

    Name string
    The name of the cloud provider.
    UsageScopes List<Lbrlabs.PulumiPackage.Harness.Cloudprovider.Inputs.DatacenterUsageScope>
    This block is used for scoping the resource to a specific set of applications or environments.
    Name string
    The name of the cloud provider.
    UsageScopes []DatacenterUsageScopeArgs
    This block is used for scoping the resource to a specific set of applications or environments.
    name String
    The name of the cloud provider.
    usageScopes List<DatacenterUsageScope>
    This block is used for scoping the resource to a specific set of applications or environments.
    name string
    The name of the cloud provider.
    usageScopes DatacenterUsageScope[]
    This block is used for scoping the resource to a specific set of applications or environments.
    name str
    The name of the cloud provider.
    usage_scopes Sequence[DatacenterUsageScopeArgs]
    This block is used for scoping the resource to a specific set of applications or environments.
    name String
    The name of the cloud provider.
    usageScopes List<Property Map>
    This block is used for scoping the resource to a specific set of applications or environments.

    Outputs

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

    Get an existing Datacenter 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?: DatacenterState, opts?: CustomResourceOptions): Datacenter
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            name: Optional[str] = None,
            usage_scopes: Optional[Sequence[DatacenterUsageScopeArgs]] = None) -> Datacenter
    func GetDatacenter(ctx *Context, name string, id IDInput, state *DatacenterState, opts ...ResourceOption) (*Datacenter, error)
    public static Datacenter Get(string name, Input<string> id, DatacenterState? state, CustomResourceOptions? opts = null)
    public static Datacenter get(String name, Output<String> id, DatacenterState 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.
    The following state arguments are supported:
    Name string
    The name of the cloud provider.
    UsageScopes List<Lbrlabs.PulumiPackage.Harness.Cloudprovider.Inputs.DatacenterUsageScope>
    This block is used for scoping the resource to a specific set of applications or environments.
    Name string
    The name of the cloud provider.
    UsageScopes []DatacenterUsageScopeArgs
    This block is used for scoping the resource to a specific set of applications or environments.
    name String
    The name of the cloud provider.
    usageScopes List<DatacenterUsageScope>
    This block is used for scoping the resource to a specific set of applications or environments.
    name string
    The name of the cloud provider.
    usageScopes DatacenterUsageScope[]
    This block is used for scoping the resource to a specific set of applications or environments.
    name str
    The name of the cloud provider.
    usage_scopes Sequence[DatacenterUsageScopeArgs]
    This block is used for scoping the resource to a specific set of applications or environments.
    name String
    The name of the cloud provider.
    usageScopes List<Property Map>
    This block is used for scoping the resource to a specific set of applications or environments.

    Supporting Types

    DatacenterUsageScope, DatacenterUsageScopeArgs

    ApplicationId string
    Id of the application to scope to. If empty then this scope applies to all applications.
    EnvironmentFilterType string
    Type of environment filter applied. Cannot be used with environment_id. Valid options are NONPRODUCTIONENVIRONMENTS, PRODUCTION_ENVIRONMENTS.
    EnvironmentId string
    Id of the id of the specific environment to scope to. Cannot be used with environment_filter_type.
    ApplicationId string
    Id of the application to scope to. If empty then this scope applies to all applications.
    EnvironmentFilterType string
    Type of environment filter applied. Cannot be used with environment_id. Valid options are NONPRODUCTIONENVIRONMENTS, PRODUCTION_ENVIRONMENTS.
    EnvironmentId string
    Id of the id of the specific environment to scope to. Cannot be used with environment_filter_type.
    applicationId String
    Id of the application to scope to. If empty then this scope applies to all applications.
    environmentFilterType String
    Type of environment filter applied. Cannot be used with environment_id. Valid options are NONPRODUCTIONENVIRONMENTS, PRODUCTION_ENVIRONMENTS.
    environmentId String
    Id of the id of the specific environment to scope to. Cannot be used with environment_filter_type.
    applicationId string
    Id of the application to scope to. If empty then this scope applies to all applications.
    environmentFilterType string
    Type of environment filter applied. Cannot be used with environment_id. Valid options are NONPRODUCTIONENVIRONMENTS, PRODUCTION_ENVIRONMENTS.
    environmentId string
    Id of the id of the specific environment to scope to. Cannot be used with environment_filter_type.
    application_id str
    Id of the application to scope to. If empty then this scope applies to all applications.
    environment_filter_type str
    Type of environment filter applied. Cannot be used with environment_id. Valid options are NONPRODUCTIONENVIRONMENTS, PRODUCTION_ENVIRONMENTS.
    environment_id str
    Id of the id of the specific environment to scope to. Cannot be used with environment_filter_type.
    applicationId String
    Id of the application to scope to. If empty then this scope applies to all applications.
    environmentFilterType String
    Type of environment filter applied. Cannot be used with environment_id. Valid options are NONPRODUCTIONENVIRONMENTS, PRODUCTION_ENVIRONMENTS.
    environmentId String
    Id of the id of the specific environment to scope to. Cannot be used with environment_filter_type.

    Import

    Import using the Harness datacenter cloud provider id.

     $ pulumi import harness:cloudprovider/datacenter:Datacenter example <provider_id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    harness lbrlabs/pulumi-harness
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the harness Terraform Provider.
    harness logo
    Harness v0.0.6 published on Saturday, Jul 1, 2023 by lbrlabs