glesys.ServerDisk
Explore with Pulumi AI
An additional disk associated with a glesys.Server
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as glesys from "@pulumi/glesys";
// Create the server resource
const vm = new glesys.Server("vm", {
bandwidth: 100,
cpu: 1,
datacenter: "Falkenberg",
description: "Server with extra disks",
hostname: "vmware-vm-fbg1-tf-extra-disk",
memory: 1024,
platform: "VMware",
storage: 20,
template: "Debian 12 64-bit",
users: [{
username: "alice",
publickeys: ["ssh-ed25519 AAAAAAmykeyFFFFFF alice@example.com"],
password: "hunter4!",
}],
});
const data = new glesys.ServerDisk("data", {
serverid: vm.serverId,
size: 100,
});
import pulumi
import pulumi_glesys as glesys
# Create the server resource
vm = glesys.Server("vm",
bandwidth=100,
cpu=1,
datacenter="Falkenberg",
description="Server with extra disks",
hostname="vmware-vm-fbg1-tf-extra-disk",
memory=1024,
platform="VMware",
storage=20,
template="Debian 12 64-bit",
users=[{
"username": "alice",
"publickeys": ["ssh-ed25519 AAAAAAmykeyFFFFFF alice@example.com"],
"password": "hunter4!",
}])
data = glesys.ServerDisk("data",
serverid=vm.server_id,
size=100)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/glesys/glesys"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Create the server resource
vm, err := glesys.NewServer(ctx, "vm", &glesys.ServerArgs{
Bandwidth: pulumi.Float64(100),
Cpu: pulumi.Float64(1),
Datacenter: pulumi.String("Falkenberg"),
Description: pulumi.String("Server with extra disks"),
Hostname: pulumi.String("vmware-vm-fbg1-tf-extra-disk"),
Memory: pulumi.Float64(1024),
Platform: pulumi.String("VMware"),
Storage: pulumi.Float64(20),
Template: pulumi.String("Debian 12 64-bit"),
Users: glesys.ServerUserArray{
&glesys.ServerUserArgs{
Username: pulumi.String("alice"),
Publickeys: pulumi.StringArray{
pulumi.String("ssh-ed25519 AAAAAAmykeyFFFFFF alice@example.com"),
},
Password: pulumi.String("hunter4!"),
},
},
})
if err != nil {
return err
}
_, err = glesys.NewServerDisk(ctx, "data", &glesys.ServerDiskArgs{
Serverid: vm.ServerId,
Size: pulumi.Float64(100),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Glesys = Pulumi.Glesys;
return await Deployment.RunAsync(() =>
{
// Create the server resource
var vm = new Glesys.Server("vm", new()
{
Bandwidth = 100,
Cpu = 1,
Datacenter = "Falkenberg",
Description = "Server with extra disks",
Hostname = "vmware-vm-fbg1-tf-extra-disk",
Memory = 1024,
Platform = "VMware",
Storage = 20,
Template = "Debian 12 64-bit",
Users = new[]
{
new Glesys.Inputs.ServerUserArgs
{
Username = "alice",
Publickeys = new[]
{
"ssh-ed25519 AAAAAAmykeyFFFFFF alice@example.com",
},
Password = "hunter4!",
},
},
});
var data = new Glesys.ServerDisk("data", new()
{
Serverid = vm.ServerId,
Size = 100,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.glesys.Server;
import com.pulumi.glesys.ServerArgs;
import com.pulumi.glesys.inputs.ServerUserArgs;
import com.pulumi.glesys.ServerDisk;
import com.pulumi.glesys.ServerDiskArgs;
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) {
// Create the server resource
var vm = new Server("vm", ServerArgs.builder()
.bandwidth(100)
.cpu(1)
.datacenter("Falkenberg")
.description("Server with extra disks")
.hostname("vmware-vm-fbg1-tf-extra-disk")
.memory(1024)
.platform("VMware")
.storage(20)
.template("Debian 12 64-bit")
.users(ServerUserArgs.builder()
.username("alice")
.publickeys("ssh-ed25519 AAAAAAmykeyFFFFFF alice@example.com")
.password("hunter4!")
.build())
.build());
var data = new ServerDisk("data", ServerDiskArgs.builder()
.serverid(vm.serverId())
.size(100)
.build());
}
}
resources:
# Create the server resource
vm:
type: glesys:Server
properties:
bandwidth: 100
cpu: 1
datacenter: Falkenberg
description: Server with extra disks
hostname: vmware-vm-fbg1-tf-extra-disk
memory: 1024
platform: VMware
storage: 20
template: Debian 12 64-bit
users:
- username: alice
publickeys:
- ssh-ed25519 AAAAAAmykeyFFFFFF alice@example.com
password: hunter4!
data:
type: glesys:ServerDisk
properties:
serverid: ${vm.serverId}
size: 100
Create ServerDisk Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ServerDisk(name: string, args: ServerDiskArgs, opts?: CustomResourceOptions);
@overload
def ServerDisk(resource_name: str,
args: ServerDiskArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ServerDisk(resource_name: str,
opts: Optional[ResourceOptions] = None,
serverid: Optional[str] = None,
size: Optional[float] = None,
name: Optional[str] = None,
type: Optional[str] = None)
func NewServerDisk(ctx *Context, name string, args ServerDiskArgs, opts ...ResourceOption) (*ServerDisk, error)
public ServerDisk(string name, ServerDiskArgs args, CustomResourceOptions? opts = null)
public ServerDisk(String name, ServerDiskArgs args)
public ServerDisk(String name, ServerDiskArgs args, CustomResourceOptions options)
type: glesys:ServerDisk
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 ServerDiskArgs
- 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 ServerDiskArgs
- 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 ServerDiskArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ServerDiskArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ServerDiskArgs
- 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 serverDiskResource = new Glesys.ServerDisk("serverDiskResource", new()
{
Serverid = "string",
Size = 0,
Name = "string",
Type = "string",
});
example, err := glesys.NewServerDisk(ctx, "serverDiskResource", &glesys.ServerDiskArgs{
Serverid: pulumi.String("string"),
Size: pulumi.Float64(0),
Name: pulumi.String("string"),
Type: pulumi.String("string"),
})
var serverDiskResource = new ServerDisk("serverDiskResource", ServerDiskArgs.builder()
.serverid("string")
.size(0)
.name("string")
.type("string")
.build());
server_disk_resource = glesys.ServerDisk("serverDiskResource",
serverid="string",
size=0,
name="string",
type="string")
const serverDiskResource = new glesys.ServerDisk("serverDiskResource", {
serverid: "string",
size: 0,
name: "string",
type: "string",
});
type: glesys:ServerDisk
properties:
name: string
serverid: string
size: 0
type: string
ServerDisk 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 ServerDisk resource accepts the following input properties:
Outputs
All input properties are implicitly available as output properties. Additionally, the ServerDisk resource produces the following output properties:
Look up Existing ServerDisk Resource
Get an existing ServerDisk 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?: ServerDiskState, opts?: CustomResourceOptions): ServerDisk
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
name: Optional[str] = None,
scsiid: Optional[float] = None,
serverid: Optional[str] = None,
size: Optional[float] = None,
type: Optional[str] = None) -> ServerDisk
func GetServerDisk(ctx *Context, name string, id IDInput, state *ServerDiskState, opts ...ResourceOption) (*ServerDisk, error)
public static ServerDisk Get(string name, Input<string> id, ServerDiskState? state, CustomResourceOptions? opts = null)
public static ServerDisk get(String name, Output<String> id, ServerDiskState state, CustomResourceOptions options)
resources: _: type: glesys:ServerDisk 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.
Import
ServerDisk import.
$ pulumi import glesys:index/serverDisk:ServerDisk data wps123456,aaaaaa-bbbb-cccc-ddddddddd
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- glesys glesys/terraform-provider-glesys
- License
- Notes
- This Pulumi package is based on the
glesys
Terraform Provider.