vsphere.Datacenter
Provides a VMware vSphere datacenter resource. This can be used as the primary container of inventory objects such as hosts and virtual machines.
Example Usage
Create datacenter on the root folder
using Pulumi;
using VSphere = Pulumi.VSphere;
class MyStack : Stack
{
public MyStack()
{
var prodDatacenter = new VSphere.Datacenter("prodDatacenter", new VSphere.DatacenterArgs
{
});
}
}
package main
import (
"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vsphere.NewDatacenter(ctx, "prodDatacenter", nil)
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_vsphere as vsphere
prod_datacenter = vsphere.Datacenter("prodDatacenter")
import * as pulumi from "@pulumi/pulumi";
import * as vsphere from "@pulumi/vsphere";
const prodDatacenter = new vsphere.Datacenter("prod_datacenter", {});
Coming soon!
Create datacenter on a subfolder
using Pulumi;
using VSphere = Pulumi.VSphere;
class MyStack : Stack
{
public MyStack()
{
var researchDatacenter = new VSphere.Datacenter("researchDatacenter", new VSphere.DatacenterArgs
{
Folder = "/research/",
});
}
}
package main
import (
"github.com/pulumi/pulumi-vsphere/sdk/v4/go/vsphere"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := vsphere.NewDatacenter(ctx, "researchDatacenter", &vsphere.DatacenterArgs{
Folder: pulumi.String("/research/"),
})
if err != nil {
return err
}
return nil
})
}
Coming soon!
import pulumi
import pulumi_vsphere as vsphere
research_datacenter = vsphere.Datacenter("researchDatacenter", folder="/research/")
import * as pulumi from "@pulumi/pulumi";
import * as vsphere from "@pulumi/vsphere";
const researchDatacenter = new vsphere.Datacenter("research_datacenter", {
folder: "/research/",
});
Coming soon!
Create Datacenter Resource
new Datacenter(name: string, args?: DatacenterArgs, opts?: CustomResourceOptions);
@overload
def Datacenter(resource_name: str,
opts: Optional[ResourceOptions] = None,
custom_attributes: Optional[Mapping[str, str]] = None,
folder: Optional[str] = None,
name: Optional[str] = None,
tags: Optional[Sequence[str]] = None)
@overload
def Datacenter(resource_name: str,
args: Optional[DatacenterArgs] = None,
opts: Optional[ResourceOptions] = 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: vsphere:Datacenter
properties: # The arguments to resource properties.
options: # 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.
- 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.
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:
- Custom
Attributes Dictionary<string, string> Map of custom attribute ids to value strings to set for datacenter resource. See [here][docs-setting-custom-attributes] for a reference on how to set values for custom attributes.
- Folder string
The folder where the datacenter should be created. Forces a new resource if changed.
- Name string
The name of the datacenter. This name needs to be unique within the folder. Forces a new resource if changed.
- List<string>
The IDs of any tags to attach to this resource.
- Custom
Attributes map[string]string Map of custom attribute ids to value strings to set for datacenter resource. See [here][docs-setting-custom-attributes] for a reference on how to set values for custom attributes.
- Folder string
The folder where the datacenter should be created. Forces a new resource if changed.
- Name string
The name of the datacenter. This name needs to be unique within the folder. Forces a new resource if changed.
- []string
The IDs of any tags to attach to this resource.
- custom
Attributes Map<String,String> Map of custom attribute ids to value strings to set for datacenter resource. See [here][docs-setting-custom-attributes] for a reference on how to set values for custom attributes.
- folder String
The folder where the datacenter should be created. Forces a new resource if changed.
- name String
The name of the datacenter. This name needs to be unique within the folder. Forces a new resource if changed.
- List<String>
The IDs of any tags to attach to this resource.
- custom
Attributes {[key: string]: string} Map of custom attribute ids to value strings to set for datacenter resource. See [here][docs-setting-custom-attributes] for a reference on how to set values for custom attributes.
- folder string
The folder where the datacenter should be created. Forces a new resource if changed.
- name string
The name of the datacenter. This name needs to be unique within the folder. Forces a new resource if changed.
- string[]
The IDs of any tags to attach to this resource.
- custom_
attributes Mapping[str, str] Map of custom attribute ids to value strings to set for datacenter resource. See [here][docs-setting-custom-attributes] for a reference on how to set values for custom attributes.
- folder str
The folder where the datacenter should be created. Forces a new resource if changed.
- name str
The name of the datacenter. This name needs to be unique within the folder. Forces a new resource if changed.
- Sequence[str]
The IDs of any tags to attach to this resource.
- custom
Attributes Map<String> Map of custom attribute ids to value strings to set for datacenter resource. See [here][docs-setting-custom-attributes] for a reference on how to set values for custom attributes.
- folder String
The folder where the datacenter should be created. Forces a new resource if changed.
- name String
The name of the datacenter. This name needs to be unique within the folder. Forces a new resource if changed.
- List<String>
The IDs of any tags to attach to this resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the Datacenter resource produces the following output properties:
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,
custom_attributes: Optional[Mapping[str, str]] = None,
folder: Optional[str] = None,
moid: Optional[str] = None,
name: Optional[str] = None,
tags: Optional[Sequence[str]] = 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.
- Custom
Attributes Dictionary<string, string> Map of custom attribute ids to value strings to set for datacenter resource. See [here][docs-setting-custom-attributes] for a reference on how to set values for custom attributes.
- Folder string
The folder where the datacenter should be created. Forces a new resource if changed.
- Moid string
Managed object ID of this datacenter.
- Name string
The name of the datacenter. This name needs to be unique within the folder. Forces a new resource if changed.
- List<string>
The IDs of any tags to attach to this resource.
- Custom
Attributes map[string]string Map of custom attribute ids to value strings to set for datacenter resource. See [here][docs-setting-custom-attributes] for a reference on how to set values for custom attributes.
- Folder string
The folder where the datacenter should be created. Forces a new resource if changed.
- Moid string
Managed object ID of this datacenter.
- Name string
The name of the datacenter. This name needs to be unique within the folder. Forces a new resource if changed.
- []string
The IDs of any tags to attach to this resource.
- custom
Attributes Map<String,String> Map of custom attribute ids to value strings to set for datacenter resource. See [here][docs-setting-custom-attributes] for a reference on how to set values for custom attributes.
- folder String
The folder where the datacenter should be created. Forces a new resource if changed.
- moid String
Managed object ID of this datacenter.
- name String
The name of the datacenter. This name needs to be unique within the folder. Forces a new resource if changed.
- List<String>
The IDs of any tags to attach to this resource.
- custom
Attributes {[key: string]: string} Map of custom attribute ids to value strings to set for datacenter resource. See [here][docs-setting-custom-attributes] for a reference on how to set values for custom attributes.
- folder string
The folder where the datacenter should be created. Forces a new resource if changed.
- moid string
Managed object ID of this datacenter.
- name string
The name of the datacenter. This name needs to be unique within the folder. Forces a new resource if changed.
- string[]
The IDs of any tags to attach to this resource.
- custom_
attributes Mapping[str, str] Map of custom attribute ids to value strings to set for datacenter resource. See [here][docs-setting-custom-attributes] for a reference on how to set values for custom attributes.
- folder str
The folder where the datacenter should be created. Forces a new resource if changed.
- moid str
Managed object ID of this datacenter.
- name str
The name of the datacenter. This name needs to be unique within the folder. Forces a new resource if changed.
- Sequence[str]
The IDs of any tags to attach to this resource.
- custom
Attributes Map<String> Map of custom attribute ids to value strings to set for datacenter resource. See [here][docs-setting-custom-attributes] for a reference on how to set values for custom attributes.
- folder String
The folder where the datacenter should be created. Forces a new resource if changed.
- moid String
Managed object ID of this datacenter.
- name String
The name of the datacenter. This name needs to be unique within the folder. Forces a new resource if changed.
- List<String>
The IDs of any tags to attach to this resource.
Package Details
- Repository
- vSphere pulumi/pulumi-vsphere
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
vsphere
Terraform Provider.