netbox.VirtualChassis
Explore with Pulumi AI
From the official documentation:
> Sometimes it is necessary to model a set of physical devices as sharing a single management plane. Perhaps the most common example of such a scenario is stackable switches. These can be modeled as virtual chassis in NetBox, with one device acting as the chassis master and the rest as members. All components of member devices will appear on the master.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as netbox from "@pulumi/netbox";
const example = new netbox.VirtualChassis("example", {
description: "virtual chassis",
domain: "domain",
});
import pulumi
import pulumi_netbox as netbox
example = netbox.VirtualChassis("example",
description="virtual chassis",
domain="domain")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/netbox/v3/netbox"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := netbox.NewVirtualChassis(ctx, "example", &netbox.VirtualChassisArgs{
Description: pulumi.String("virtual chassis"),
Domain: pulumi.String("domain"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Netbox = Pulumi.Netbox;
return await Deployment.RunAsync(() =>
{
var example = new Netbox.VirtualChassis("example", new()
{
Description = "virtual chassis",
Domain = "domain",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.netbox.VirtualChassis;
import com.pulumi.netbox.VirtualChassisArgs;
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 VirtualChassis("example", VirtualChassisArgs.builder()
.description("virtual chassis")
.domain("domain")
.build());
}
}
resources:
example:
type: netbox:VirtualChassis
properties:
description: virtual chassis
domain: domain
Create VirtualChassis Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new VirtualChassis(name: string, args?: VirtualChassisArgs, opts?: CustomResourceOptions);
@overload
def VirtualChassis(resource_name: str,
args: Optional[VirtualChassisArgs] = None,
opts: Optional[ResourceOptions] = None)
@overload
def VirtualChassis(resource_name: str,
opts: Optional[ResourceOptions] = None,
comments: Optional[str] = None,
custom_fields: Optional[Mapping[str, str]] = None,
description: Optional[str] = None,
domain: Optional[str] = None,
name: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
virtual_chassis_id: Optional[str] = None)
func NewVirtualChassis(ctx *Context, name string, args *VirtualChassisArgs, opts ...ResourceOption) (*VirtualChassis, error)
public VirtualChassis(string name, VirtualChassisArgs? args = null, CustomResourceOptions? opts = null)
public VirtualChassis(String name, VirtualChassisArgs args)
public VirtualChassis(String name, VirtualChassisArgs args, CustomResourceOptions options)
type: netbox:VirtualChassis
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 VirtualChassisArgs
- 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 VirtualChassisArgs
- 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 VirtualChassisArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args VirtualChassisArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args VirtualChassisArgs
- 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 virtualChassisResource = new Netbox.VirtualChassis("virtualChassisResource", new()
{
Comments = "string",
CustomFields =
{
{ "string", "string" },
},
Description = "string",
Domain = "string",
Name = "string",
Tags = new[]
{
"string",
},
VirtualChassisId = "string",
});
example, err := netbox.NewVirtualChassis(ctx, "virtualChassisResource", &netbox.VirtualChassisArgs{
Comments: pulumi.String("string"),
CustomFields: pulumi.StringMap{
"string": pulumi.String("string"),
},
Description: pulumi.String("string"),
Domain: pulumi.String("string"),
Name: pulumi.String("string"),
Tags: pulumi.StringArray{
pulumi.String("string"),
},
VirtualChassisId: pulumi.String("string"),
})
var virtualChassisResource = new VirtualChassis("virtualChassisResource", VirtualChassisArgs.builder()
.comments("string")
.customFields(Map.of("string", "string"))
.description("string")
.domain("string")
.name("string")
.tags("string")
.virtualChassisId("string")
.build());
virtual_chassis_resource = netbox.VirtualChassis("virtualChassisResource",
comments="string",
custom_fields={
"string": "string",
},
description="string",
domain="string",
name="string",
tags=["string"],
virtual_chassis_id="string")
const virtualChassisResource = new netbox.VirtualChassis("virtualChassisResource", {
comments: "string",
customFields: {
string: "string",
},
description: "string",
domain: "string",
name: "string",
tags: ["string"],
virtualChassisId: "string",
});
type: netbox:VirtualChassis
properties:
comments: string
customFields:
string: string
description: string
domain: string
name: string
tags:
- string
virtualChassisId: string
VirtualChassis 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 VirtualChassis resource accepts the following input properties:
- Comments string
- Custom
Fields Dictionary<string, string> - Description string
- Domain string
- Name string
- List<string>
- Virtual
Chassis stringId - The ID of this resource.
- Comments string
- Custom
Fields map[string]string - Description string
- Domain string
- Name string
- []string
- Virtual
Chassis stringId - The ID of this resource.
- comments String
- custom
Fields Map<String,String> - description String
- domain String
- name String
- List<String>
- virtual
Chassis StringId - The ID of this resource.
- comments string
- custom
Fields {[key: string]: string} - description string
- domain string
- name string
- string[]
- virtual
Chassis stringId - The ID of this resource.
- comments str
- custom_
fields Mapping[str, str] - description str
- domain str
- name str
- Sequence[str]
- virtual_
chassis_ strid - The ID of this resource.
- comments String
- custom
Fields Map<String> - description String
- domain String
- name String
- List<String>
- virtual
Chassis StringId - The ID of this resource.
Outputs
All input properties are implicitly available as output properties. Additionally, the VirtualChassis 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 VirtualChassis Resource
Get an existing VirtualChassis 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?: VirtualChassisState, opts?: CustomResourceOptions): VirtualChassis
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
comments: Optional[str] = None,
custom_fields: Optional[Mapping[str, str]] = None,
description: Optional[str] = None,
domain: Optional[str] = None,
name: Optional[str] = None,
tags: Optional[Sequence[str]] = None,
virtual_chassis_id: Optional[str] = None) -> VirtualChassis
func GetVirtualChassis(ctx *Context, name string, id IDInput, state *VirtualChassisState, opts ...ResourceOption) (*VirtualChassis, error)
public static VirtualChassis Get(string name, Input<string> id, VirtualChassisState? state, CustomResourceOptions? opts = null)
public static VirtualChassis get(String name, Output<String> id, VirtualChassisState state, CustomResourceOptions options)
resources: _: type: netbox:VirtualChassis 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.
- Comments string
- Custom
Fields Dictionary<string, string> - Description string
- Domain string
- Name string
- List<string>
- Virtual
Chassis stringId - The ID of this resource.
- Comments string
- Custom
Fields map[string]string - Description string
- Domain string
- Name string
- []string
- Virtual
Chassis stringId - The ID of this resource.
- comments String
- custom
Fields Map<String,String> - description String
- domain String
- name String
- List<String>
- virtual
Chassis StringId - The ID of this resource.
- comments string
- custom
Fields {[key: string]: string} - description string
- domain string
- name string
- string[]
- virtual
Chassis stringId - The ID of this resource.
- comments str
- custom_
fields Mapping[str, str] - description str
- domain str
- name str
- Sequence[str]
- virtual_
chassis_ strid - The ID of this resource.
- comments String
- custom
Fields Map<String> - description String
- domain String
- name String
- List<String>
- virtual
Chassis StringId - The ID of this resource.
Package Details
- Repository
- netbox e-breuninger/terraform-provider-netbox
- License
- Notes
- This Pulumi package is based on the
netbox
Terraform Provider.