storage

package
v5.25.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type File

type File struct {
	pulumi.CustomResourceState

	// The content type. If not specified, the content
	// type will be inferred from the file extension. Valid values are:
	ContentType pulumi.StringOutput `pulumi:"contentType"`
	// The datastore id.
	DatastoreId pulumi.StringOutput `pulumi:"datastoreId"`
	// The file modification date (RFC 3339).
	FileModificationDate pulumi.StringOutput `pulumi:"fileModificationDate"`
	// The file name.
	FileName pulumi.StringOutput `pulumi:"fileName"`
	// The file size in bytes.
	FileSize pulumi.IntOutput `pulumi:"fileSize"`
	// The file tag.
	FileTag pulumi.StringOutput `pulumi:"fileTag"`
	// The node name.
	NodeName pulumi.StringOutput `pulumi:"nodeName"`
	// Whether to overwrite an existing file (defaults to
	// `true`).
	Overwrite pulumi.BoolPtrOutput `pulumi:"overwrite"`
	// The source file (conflicts with `sourceRaw`),
	// could be a local file or a URL. If the source file is a URL, the file will
	// be downloaded and stored locally before uploading it to Proxmox VE.
	SourceFile FileSourceFilePtrOutput `pulumi:"sourceFile"`
	// The raw source (conflicts with `sourceFile`).
	SourceRaw FileSourceRawPtrOutput `pulumi:"sourceRaw"`
	// Timeout for uploading ISO/VSTMPL files in
	// seconds (defaults to 1800).
	TimeoutUpload pulumi.IntPtrOutput `pulumi:"timeoutUpload"`
}

Manages a file.

## Example Usage ### Backups (`dump`)

> **Note:** The resource with this content type uses SSH access to the node. You might need to configure the `ssh` option in the `provider` section.

```go package main

import (

"github.com/muhlba91/pulumi-proxmoxve/sdk/v5/go/proxmoxve/Storage"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := Storage.NewFile(ctx, "backup", &Storage.FileArgs{
			ContentType: pulumi.String("dump"),
			DatastoreId: pulumi.String("local"),
			NodeName:    pulumi.String("pve"),
			SourceFile: &storage.FileSourceFileArgs{
				Path: pulumi.String("vzdump-lxc-100-2023_11_08-23_10_05.tar"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

``` ### Images

**Consider using `proxmoxVirtualEnvironmentDownloadFile` resource instead. Using this resource for images is less efficient (requires to transfer uploaded image to node) though still supported.**

```go package main

import (

"github.com/muhlba91/pulumi-proxmoxve/sdk/v5/go/proxmoxve/Storage"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := Storage.NewFile(ctx, "ubuntuContainerTemplate", &Storage.FileArgs{
			ContentType: pulumi.String("iso"),
			DatastoreId: pulumi.String("local"),
			NodeName:    pulumi.String("pve"),
			SourceFile: &storage.FileSourceFileArgs{
				Path: pulumi.String("https://cloud-images.ubuntu.com/jammy/20230929/jammy-server-cloudimg-amd64-disk-kvm.img"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

``` ### Container Template (`vztmpl`)

**Consider using `proxmoxVirtualEnvironmentDownloadFile` resource instead. Using this resource for container images is less efficient (requires to transfer uploaded image to node) though still supported.**

```go package main

import (

"github.com/muhlba91/pulumi-proxmoxve/sdk/v5/go/proxmoxve/Storage"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := Storage.NewFile(ctx, "ubuntuContainerTemplate", &Storage.FileArgs{
			ContentType: pulumi.String("vztmpl"),
			DatastoreId: pulumi.String("local"),
			NodeName:    pulumi.String("first-node"),
			SourceFile: &storage.FileSourceFileArgs{
				Path: pulumi.String("https://download.proxmox.com/images/system/ubuntu-20.04-standard_20.04-1_amd64.tar.gz"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

``` ## Important Notes

The Proxmox VE API endpoint for file uploads does not support chunked transfer encoding, which means that we must first store the source file as a temporary file locally before uploading it.

You must ensure that you have at least `Size-in-MB * 2 + 1` MB of storage space available (twice the size plus overhead because a multipart payload needs to be created as another temporary file).

By default, if the specified file already exists, the resource will unconditionally replace it and take ownership of the resource. On destruction, the file will be deleted as if it did not exist before. If you want to prevent the resource from replacing the file, set `overwrite` to `false`.

## Import

Instances can be imported using the `node_name`, `datastore_id`, `content_type`

and the `file_name` in the following format:

text

node_name:datastore_id/content_type/file_name

Example:

bash

```sh $ pulumi import proxmoxve:Storage/file:File cloud_config pve/local:snippets/example.cloud-config.yaml ```

func GetFile

func GetFile(ctx *pulumi.Context,
	name string, id pulumi.IDInput, state *FileState, opts ...pulumi.ResourceOption) (*File, error)

GetFile gets an existing File resource's state with the given name, ID, and optional state properties that are used to uniquely qualify the lookup (nil if not required).

func NewFile

func NewFile(ctx *pulumi.Context,
	name string, args *FileArgs, opts ...pulumi.ResourceOption) (*File, error)

NewFile registers a new resource with the given unique name, arguments, and options.

func (*File) ElementType

func (*File) ElementType() reflect.Type

func (*File) ToFileOutput

func (i *File) ToFileOutput() FileOutput

func (*File) ToFileOutputWithContext

func (i *File) ToFileOutputWithContext(ctx context.Context) FileOutput

type FileArgs

type FileArgs struct {
	// The content type. If not specified, the content
	// type will be inferred from the file extension. Valid values are:
	ContentType pulumi.StringPtrInput
	// The datastore id.
	DatastoreId pulumi.StringInput
	// The node name.
	NodeName pulumi.StringInput
	// Whether to overwrite an existing file (defaults to
	// `true`).
	Overwrite pulumi.BoolPtrInput
	// The source file (conflicts with `sourceRaw`),
	// could be a local file or a URL. If the source file is a URL, the file will
	// be downloaded and stored locally before uploading it to Proxmox VE.
	SourceFile FileSourceFilePtrInput
	// The raw source (conflicts with `sourceFile`).
	SourceRaw FileSourceRawPtrInput
	// Timeout for uploading ISO/VSTMPL files in
	// seconds (defaults to 1800).
	TimeoutUpload pulumi.IntPtrInput
}

The set of arguments for constructing a File resource.

func (FileArgs) ElementType

func (FileArgs) ElementType() reflect.Type

type FileArray

type FileArray []FileInput

func (FileArray) ElementType

func (FileArray) ElementType() reflect.Type

func (FileArray) ToFileArrayOutput

func (i FileArray) ToFileArrayOutput() FileArrayOutput

func (FileArray) ToFileArrayOutputWithContext

func (i FileArray) ToFileArrayOutputWithContext(ctx context.Context) FileArrayOutput

type FileArrayInput

type FileArrayInput interface {
	pulumi.Input

	ToFileArrayOutput() FileArrayOutput
	ToFileArrayOutputWithContext(context.Context) FileArrayOutput
}

FileArrayInput is an input type that accepts FileArray and FileArrayOutput values. You can construct a concrete instance of `FileArrayInput` via:

FileArray{ FileArgs{...} }

type FileArrayOutput

type FileArrayOutput struct{ *pulumi.OutputState }

func (FileArrayOutput) ElementType

func (FileArrayOutput) ElementType() reflect.Type

func (FileArrayOutput) Index

func (FileArrayOutput) ToFileArrayOutput

func (o FileArrayOutput) ToFileArrayOutput() FileArrayOutput

func (FileArrayOutput) ToFileArrayOutputWithContext

func (o FileArrayOutput) ToFileArrayOutputWithContext(ctx context.Context) FileArrayOutput

type FileInput

type FileInput interface {
	pulumi.Input

	ToFileOutput() FileOutput
	ToFileOutputWithContext(ctx context.Context) FileOutput
}

type FileMap

type FileMap map[string]FileInput

func (FileMap) ElementType

func (FileMap) ElementType() reflect.Type

func (FileMap) ToFileMapOutput

func (i FileMap) ToFileMapOutput() FileMapOutput

func (FileMap) ToFileMapOutputWithContext

func (i FileMap) ToFileMapOutputWithContext(ctx context.Context) FileMapOutput

type FileMapInput

type FileMapInput interface {
	pulumi.Input

	ToFileMapOutput() FileMapOutput
	ToFileMapOutputWithContext(context.Context) FileMapOutput
}

FileMapInput is an input type that accepts FileMap and FileMapOutput values. You can construct a concrete instance of `FileMapInput` via:

FileMap{ "key": FileArgs{...} }

type FileMapOutput

type FileMapOutput struct{ *pulumi.OutputState }

func (FileMapOutput) ElementType

func (FileMapOutput) ElementType() reflect.Type

func (FileMapOutput) MapIndex

func (FileMapOutput) ToFileMapOutput

func (o FileMapOutput) ToFileMapOutput() FileMapOutput

func (FileMapOutput) ToFileMapOutputWithContext

func (o FileMapOutput) ToFileMapOutputWithContext(ctx context.Context) FileMapOutput

type FileOutput

type FileOutput struct{ *pulumi.OutputState }

func (FileOutput) ContentType

func (o FileOutput) ContentType() pulumi.StringOutput

The content type. If not specified, the content type will be inferred from the file extension. Valid values are:

func (FileOutput) DatastoreId

func (o FileOutput) DatastoreId() pulumi.StringOutput

The datastore id.

func (FileOutput) ElementType

func (FileOutput) ElementType() reflect.Type

func (FileOutput) FileModificationDate

func (o FileOutput) FileModificationDate() pulumi.StringOutput

The file modification date (RFC 3339).

func (FileOutput) FileName

func (o FileOutput) FileName() pulumi.StringOutput

The file name.

func (FileOutput) FileSize

func (o FileOutput) FileSize() pulumi.IntOutput

The file size in bytes.

func (FileOutput) FileTag

func (o FileOutput) FileTag() pulumi.StringOutput

The file tag.

func (FileOutput) NodeName

func (o FileOutput) NodeName() pulumi.StringOutput

The node name.

func (FileOutput) Overwrite added in v5.12.3

func (o FileOutput) Overwrite() pulumi.BoolPtrOutput

Whether to overwrite an existing file (defaults to `true`).

func (FileOutput) SourceFile

func (o FileOutput) SourceFile() FileSourceFilePtrOutput

The source file (conflicts with `sourceRaw`), could be a local file or a URL. If the source file is a URL, the file will be downloaded and stored locally before uploading it to Proxmox VE.

func (FileOutput) SourceRaw

func (o FileOutput) SourceRaw() FileSourceRawPtrOutput

The raw source (conflicts with `sourceFile`).

func (FileOutput) TimeoutUpload added in v5.11.0

func (o FileOutput) TimeoutUpload() pulumi.IntPtrOutput

Timeout for uploading ISO/VSTMPL files in seconds (defaults to 1800).

func (FileOutput) ToFileOutput

func (o FileOutput) ToFileOutput() FileOutput

func (FileOutput) ToFileOutputWithContext

func (o FileOutput) ToFileOutputWithContext(ctx context.Context) FileOutput

type FileSourceFile

type FileSourceFile struct {
	// Whether the source file has changed since the last run
	Changed *bool `pulumi:"changed"`
	// The SHA256 checksum of the source file.
	Checksum *string `pulumi:"checksum"`
	// The file name.
	FileName *string `pulumi:"fileName"`
	// Whether to skip the TLS verification step for
	// HTTPS sources (defaults to `false`).
	Insecure *bool `pulumi:"insecure"`
	// The minimum required TLS version for HTTPS
	// sources. "Supported values: `1.0|1.1|1.2|1.3` (defaults to `1.3`).
	MinTls *string `pulumi:"minTls"`
	// A path to a local file or a URL.
	Path string `pulumi:"path"`
}

type FileSourceFileArgs

type FileSourceFileArgs struct {
	// Whether the source file has changed since the last run
	Changed pulumi.BoolPtrInput `pulumi:"changed"`
	// The SHA256 checksum of the source file.
	Checksum pulumi.StringPtrInput `pulumi:"checksum"`
	// The file name.
	FileName pulumi.StringPtrInput `pulumi:"fileName"`
	// Whether to skip the TLS verification step for
	// HTTPS sources (defaults to `false`).
	Insecure pulumi.BoolPtrInput `pulumi:"insecure"`
	// The minimum required TLS version for HTTPS
	// sources. "Supported values: `1.0|1.1|1.2|1.3` (defaults to `1.3`).
	MinTls pulumi.StringPtrInput `pulumi:"minTls"`
	// A path to a local file or a URL.
	Path pulumi.StringInput `pulumi:"path"`
}

func (FileSourceFileArgs) ElementType

func (FileSourceFileArgs) ElementType() reflect.Type

func (FileSourceFileArgs) ToFileSourceFileOutput

func (i FileSourceFileArgs) ToFileSourceFileOutput() FileSourceFileOutput

func (FileSourceFileArgs) ToFileSourceFileOutputWithContext

func (i FileSourceFileArgs) ToFileSourceFileOutputWithContext(ctx context.Context) FileSourceFileOutput

func (FileSourceFileArgs) ToFileSourceFilePtrOutput

func (i FileSourceFileArgs) ToFileSourceFilePtrOutput() FileSourceFilePtrOutput

func (FileSourceFileArgs) ToFileSourceFilePtrOutputWithContext

func (i FileSourceFileArgs) ToFileSourceFilePtrOutputWithContext(ctx context.Context) FileSourceFilePtrOutput

type FileSourceFileInput

type FileSourceFileInput interface {
	pulumi.Input

	ToFileSourceFileOutput() FileSourceFileOutput
	ToFileSourceFileOutputWithContext(context.Context) FileSourceFileOutput
}

FileSourceFileInput is an input type that accepts FileSourceFileArgs and FileSourceFileOutput values. You can construct a concrete instance of `FileSourceFileInput` via:

FileSourceFileArgs{...}

type FileSourceFileOutput

type FileSourceFileOutput struct{ *pulumi.OutputState }

func (FileSourceFileOutput) Changed

Whether the source file has changed since the last run

func (FileSourceFileOutput) Checksum

The SHA256 checksum of the source file.

func (FileSourceFileOutput) ElementType

func (FileSourceFileOutput) ElementType() reflect.Type

func (FileSourceFileOutput) FileName

The file name.

func (FileSourceFileOutput) Insecure

Whether to skip the TLS verification step for HTTPS sources (defaults to `false`).

func (FileSourceFileOutput) MinTls added in v5.22.0

The minimum required TLS version for HTTPS sources. "Supported values: `1.0|1.1|1.2|1.3` (defaults to `1.3`).

func (FileSourceFileOutput) Path

A path to a local file or a URL.

func (FileSourceFileOutput) ToFileSourceFileOutput

func (o FileSourceFileOutput) ToFileSourceFileOutput() FileSourceFileOutput

func (FileSourceFileOutput) ToFileSourceFileOutputWithContext

func (o FileSourceFileOutput) ToFileSourceFileOutputWithContext(ctx context.Context) FileSourceFileOutput

func (FileSourceFileOutput) ToFileSourceFilePtrOutput

func (o FileSourceFileOutput) ToFileSourceFilePtrOutput() FileSourceFilePtrOutput

func (FileSourceFileOutput) ToFileSourceFilePtrOutputWithContext

func (o FileSourceFileOutput) ToFileSourceFilePtrOutputWithContext(ctx context.Context) FileSourceFilePtrOutput

type FileSourceFilePtrInput

type FileSourceFilePtrInput interface {
	pulumi.Input

	ToFileSourceFilePtrOutput() FileSourceFilePtrOutput
	ToFileSourceFilePtrOutputWithContext(context.Context) FileSourceFilePtrOutput
}

FileSourceFilePtrInput is an input type that accepts FileSourceFileArgs, FileSourceFilePtr and FileSourceFilePtrOutput values. You can construct a concrete instance of `FileSourceFilePtrInput` via:

        FileSourceFileArgs{...}

or:

        nil

type FileSourceFilePtrOutput

type FileSourceFilePtrOutput struct{ *pulumi.OutputState }

func (FileSourceFilePtrOutput) Changed

Whether the source file has changed since the last run

func (FileSourceFilePtrOutput) Checksum

The SHA256 checksum of the source file.

func (FileSourceFilePtrOutput) Elem

func (FileSourceFilePtrOutput) ElementType

func (FileSourceFilePtrOutput) ElementType() reflect.Type

func (FileSourceFilePtrOutput) FileName

The file name.

func (FileSourceFilePtrOutput) Insecure

Whether to skip the TLS verification step for HTTPS sources (defaults to `false`).

func (FileSourceFilePtrOutput) MinTls added in v5.22.0

The minimum required TLS version for HTTPS sources. "Supported values: `1.0|1.1|1.2|1.3` (defaults to `1.3`).

func (FileSourceFilePtrOutput) Path

A path to a local file or a URL.

func (FileSourceFilePtrOutput) ToFileSourceFilePtrOutput

func (o FileSourceFilePtrOutput) ToFileSourceFilePtrOutput() FileSourceFilePtrOutput

func (FileSourceFilePtrOutput) ToFileSourceFilePtrOutputWithContext

func (o FileSourceFilePtrOutput) ToFileSourceFilePtrOutputWithContext(ctx context.Context) FileSourceFilePtrOutput

type FileSourceRaw

type FileSourceRaw struct {
	// The raw data.
	Data string `pulumi:"data"`
	// The file name.
	FileName string `pulumi:"fileName"`
	// The number of bytes to resize the file to.
	Resize *int `pulumi:"resize"`
}

type FileSourceRawArgs

type FileSourceRawArgs struct {
	// The raw data.
	Data pulumi.StringInput `pulumi:"data"`
	// The file name.
	FileName pulumi.StringInput `pulumi:"fileName"`
	// The number of bytes to resize the file to.
	Resize pulumi.IntPtrInput `pulumi:"resize"`
}

func (FileSourceRawArgs) ElementType

func (FileSourceRawArgs) ElementType() reflect.Type

func (FileSourceRawArgs) ToFileSourceRawOutput

func (i FileSourceRawArgs) ToFileSourceRawOutput() FileSourceRawOutput

func (FileSourceRawArgs) ToFileSourceRawOutputWithContext

func (i FileSourceRawArgs) ToFileSourceRawOutputWithContext(ctx context.Context) FileSourceRawOutput

func (FileSourceRawArgs) ToFileSourceRawPtrOutput

func (i FileSourceRawArgs) ToFileSourceRawPtrOutput() FileSourceRawPtrOutput

func (FileSourceRawArgs) ToFileSourceRawPtrOutputWithContext

func (i FileSourceRawArgs) ToFileSourceRawPtrOutputWithContext(ctx context.Context) FileSourceRawPtrOutput

type FileSourceRawInput

type FileSourceRawInput interface {
	pulumi.Input

	ToFileSourceRawOutput() FileSourceRawOutput
	ToFileSourceRawOutputWithContext(context.Context) FileSourceRawOutput
}

FileSourceRawInput is an input type that accepts FileSourceRawArgs and FileSourceRawOutput values. You can construct a concrete instance of `FileSourceRawInput` via:

FileSourceRawArgs{...}

type FileSourceRawOutput

type FileSourceRawOutput struct{ *pulumi.OutputState }

func (FileSourceRawOutput) Data

The raw data.

func (FileSourceRawOutput) ElementType

func (FileSourceRawOutput) ElementType() reflect.Type

func (FileSourceRawOutput) FileName

The file name.

func (FileSourceRawOutput) Resize

The number of bytes to resize the file to.

func (FileSourceRawOutput) ToFileSourceRawOutput

func (o FileSourceRawOutput) ToFileSourceRawOutput() FileSourceRawOutput

func (FileSourceRawOutput) ToFileSourceRawOutputWithContext

func (o FileSourceRawOutput) ToFileSourceRawOutputWithContext(ctx context.Context) FileSourceRawOutput

func (FileSourceRawOutput) ToFileSourceRawPtrOutput

func (o FileSourceRawOutput) ToFileSourceRawPtrOutput() FileSourceRawPtrOutput

func (FileSourceRawOutput) ToFileSourceRawPtrOutputWithContext

func (o FileSourceRawOutput) ToFileSourceRawPtrOutputWithContext(ctx context.Context) FileSourceRawPtrOutput

type FileSourceRawPtrInput

type FileSourceRawPtrInput interface {
	pulumi.Input

	ToFileSourceRawPtrOutput() FileSourceRawPtrOutput
	ToFileSourceRawPtrOutputWithContext(context.Context) FileSourceRawPtrOutput
}

FileSourceRawPtrInput is an input type that accepts FileSourceRawArgs, FileSourceRawPtr and FileSourceRawPtrOutput values. You can construct a concrete instance of `FileSourceRawPtrInput` via:

        FileSourceRawArgs{...}

or:

        nil

type FileSourceRawPtrOutput

type FileSourceRawPtrOutput struct{ *pulumi.OutputState }

func (FileSourceRawPtrOutput) Data

The raw data.

func (FileSourceRawPtrOutput) Elem

func (FileSourceRawPtrOutput) ElementType

func (FileSourceRawPtrOutput) ElementType() reflect.Type

func (FileSourceRawPtrOutput) FileName

The file name.

func (FileSourceRawPtrOutput) Resize

The number of bytes to resize the file to.

func (FileSourceRawPtrOutput) ToFileSourceRawPtrOutput

func (o FileSourceRawPtrOutput) ToFileSourceRawPtrOutput() FileSourceRawPtrOutput

func (FileSourceRawPtrOutput) ToFileSourceRawPtrOutputWithContext

func (o FileSourceRawPtrOutput) ToFileSourceRawPtrOutputWithContext(ctx context.Context) FileSourceRawPtrOutput

type FileState

type FileState struct {
	// The content type. If not specified, the content
	// type will be inferred from the file extension. Valid values are:
	ContentType pulumi.StringPtrInput
	// The datastore id.
	DatastoreId pulumi.StringPtrInput
	// The file modification date (RFC 3339).
	FileModificationDate pulumi.StringPtrInput
	// The file name.
	FileName pulumi.StringPtrInput
	// The file size in bytes.
	FileSize pulumi.IntPtrInput
	// The file tag.
	FileTag pulumi.StringPtrInput
	// The node name.
	NodeName pulumi.StringPtrInput
	// Whether to overwrite an existing file (defaults to
	// `true`).
	Overwrite pulumi.BoolPtrInput
	// The source file (conflicts with `sourceRaw`),
	// could be a local file or a URL. If the source file is a URL, the file will
	// be downloaded and stored locally before uploading it to Proxmox VE.
	SourceFile FileSourceFilePtrInput
	// The raw source (conflicts with `sourceFile`).
	SourceRaw FileSourceRawPtrInput
	// Timeout for uploading ISO/VSTMPL files in
	// seconds (defaults to 1800).
	TimeoutUpload pulumi.IntPtrInput
}

func (FileState) ElementType

func (FileState) ElementType() reflect.Type

type GetDatastoresArgs

type GetDatastoresArgs struct {
	// A node name.
	NodeName string `pulumi:"nodeName"`
}

A collection of arguments for invoking getDatastores.

type GetDatastoresOutputArgs

type GetDatastoresOutputArgs struct {
	// A node name.
	NodeName pulumi.StringInput `pulumi:"nodeName"`
}

A collection of arguments for invoking getDatastores.

func (GetDatastoresOutputArgs) ElementType

func (GetDatastoresOutputArgs) ElementType() reflect.Type

type GetDatastoresResult

type GetDatastoresResult struct {
	// Whether the datastore is active.
	Actives []bool `pulumi:"actives"`
	// The allowed content types.
	ContentTypes [][]string `pulumi:"contentTypes"`
	// The datastore identifiers.
	DatastoreIds []string `pulumi:"datastoreIds"`
	// Whether the datastore is enabled.
	Enableds []bool `pulumi:"enableds"`
	// The provider-assigned unique ID for this managed resource.
	Id       string `pulumi:"id"`
	NodeName string `pulumi:"nodeName"`
	// Whether the datastore is shared.
	Shareds []bool `pulumi:"shareds"`
	// The available space in bytes.
	SpaceAvailables []int `pulumi:"spaceAvailables"`
	// The total space in bytes.
	SpaceTotals []int `pulumi:"spaceTotals"`
	// The used space in bytes.
	SpaceUseds []int `pulumi:"spaceUseds"`
	// The storage types.
	Types []string `pulumi:"types"`
}

A collection of values returned by getDatastores.

func GetDatastores

func GetDatastores(ctx *pulumi.Context, args *GetDatastoresArgs, opts ...pulumi.InvokeOption) (*GetDatastoresResult, error)

Retrieves information about all the datastores available to a specific node.

## Example Usage

```go package main

import (

"github.com/muhlba91/pulumi-proxmoxve/sdk/v5/go/proxmoxve/Storage"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"

)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := Storage.GetDatastores(ctx, &storage.GetDatastoresArgs{
			NodeName: "first-node",
		}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}

```

type GetDatastoresResultOutput

type GetDatastoresResultOutput struct{ *pulumi.OutputState }

A collection of values returned by getDatastores.

func (GetDatastoresResultOutput) Actives

Whether the datastore is active.

func (GetDatastoresResultOutput) ContentTypes

The allowed content types.

func (GetDatastoresResultOutput) DatastoreIds

The datastore identifiers.

func (GetDatastoresResultOutput) ElementType

func (GetDatastoresResultOutput) ElementType() reflect.Type

func (GetDatastoresResultOutput) Enableds

Whether the datastore is enabled.

func (GetDatastoresResultOutput) Id

The provider-assigned unique ID for this managed resource.

func (GetDatastoresResultOutput) NodeName

func (GetDatastoresResultOutput) Shareds

Whether the datastore is shared.

func (GetDatastoresResultOutput) SpaceAvailables

func (o GetDatastoresResultOutput) SpaceAvailables() pulumi.IntArrayOutput

The available space in bytes.

func (GetDatastoresResultOutput) SpaceTotals

The total space in bytes.

func (GetDatastoresResultOutput) SpaceUseds

The used space in bytes.

func (GetDatastoresResultOutput) ToGetDatastoresResultOutput

func (o GetDatastoresResultOutput) ToGetDatastoresResultOutput() GetDatastoresResultOutput

func (GetDatastoresResultOutput) ToGetDatastoresResultOutputWithContext

func (o GetDatastoresResultOutput) ToGetDatastoresResultOutputWithContext(ctx context.Context) GetDatastoresResultOutput

func (GetDatastoresResultOutput) Types

The storage types.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL