1. Packages
  2. Opennebula Provider
  3. API Docs
  4. Datastore
opennebula 1.4.1 published on Monday, Apr 14, 2025 by opennebula

opennebula.Datastore

Explore with Pulumi AI

opennebula logo
opennebula 1.4.1 published on Monday, Apr 14, 2025 by opennebula

    Provides an OpenNebula datastore resource.

    This resource allows you to manage datastores.

    Example Usage

    Create a custom datastore:

    import * as pulumi from "@pulumi/pulumi";
    import * as opennebula from "@pulumi/opennebula";
    
    const example = new opennebula.Datastore("example", {
        customs: [{
            datastore: "dummy",
            transfer: "dummy",
        }],
        tags: {
            environment: "example",
        },
        type: "image",
    });
    
    import pulumi
    import pulumi_opennebula as opennebula
    
    example = opennebula.Datastore("example",
        customs=[{
            "datastore": "dummy",
            "transfer": "dummy",
        }],
        tags={
            "environment": "example",
        },
        type="image")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/opennebula/opennebula"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := opennebula.NewDatastore(ctx, "example", &opennebula.DatastoreArgs{
    			Customs: opennebula.DatastoreCustomArray{
    				&opennebula.DatastoreCustomArgs{
    					Datastore: pulumi.String("dummy"),
    					Transfer:  pulumi.String("dummy"),
    				},
    			},
    			Tags: pulumi.StringMap{
    				"environment": pulumi.String("example"),
    			},
    			Type: pulumi.String("image"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Opennebula = Pulumi.Opennebula;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Opennebula.Datastore("example", new()
        {
            Customs = new[]
            {
                new Opennebula.Inputs.DatastoreCustomArgs
                {
                    Datastore = "dummy",
                    Transfer = "dummy",
                },
            },
            Tags = 
            {
                { "environment", "example" },
            },
            Type = "image",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.opennebula.Datastore;
    import com.pulumi.opennebula.DatastoreArgs;
    import com.pulumi.opennebula.inputs.DatastoreCustomArgs;
    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 Datastore("example", DatastoreArgs.builder()
                .customs(DatastoreCustomArgs.builder()
                    .datastore("dummy")
                    .transfer("dummy")
                    .build())
                .tags(Map.of("environment", "example"))
                .type("image")
                .build());
    
        }
    }
    
    resources:
      example:
        type: opennebula:Datastore
        properties:
          customs:
            - datastore: dummy
              transfer: dummy
          tags:
            environment: example
          type: image
    

    Create Datastore Resource

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

    Constructor syntax

    new Datastore(name: string, args: DatastoreArgs, opts?: CustomResourceOptions);
    @overload
    def Datastore(resource_name: str,
                  args: DatastoreArgs,
                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def Datastore(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  type: Optional[str] = None,
                  name: Optional[str] = None,
                  restricted_directories: Optional[str] = None,
                  cluster_ids: Optional[Sequence[float]] = None,
                  compatible_system_datastores: Optional[Sequence[str]] = None,
                  customs: Optional[Sequence[DatastoreCustomArgs]] = None,
                  datastore_id: Optional[str] = None,
                  check_available_capacity: Optional[bool] = None,
                  driver: Optional[str] = None,
                  no_decompress: Optional[bool] = None,
                  bridge_lists: Optional[Sequence[str]] = None,
                  safe_directories: Optional[str] = None,
                  staging_dir: Optional[str] = None,
                  storage_usage_limit: Optional[float] = None,
                  tags: Optional[Mapping[str, str]] = None,
                  transfer_bandwith_limit: Optional[float] = None,
                  cephs: Optional[Sequence[DatastoreCephArgs]] = None)
    func NewDatastore(ctx *Context, name string, args DatastoreArgs, opts ...ResourceOption) (*Datastore, error)
    public Datastore(string name, DatastoreArgs args, CustomResourceOptions? opts = null)
    public Datastore(String name, DatastoreArgs args)
    public Datastore(String name, DatastoreArgs args, CustomResourceOptions options)
    
    type: opennebula:Datastore
    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 DatastoreArgs
    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 DatastoreArgs
    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 DatastoreArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DatastoreArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DatastoreArgs
    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 datastoreResource = new Opennebula.Datastore("datastoreResource", new()
    {
        Type = "string",
        Name = "string",
        RestrictedDirectories = "string",
        ClusterIds = new[]
        {
            0,
        },
        CompatibleSystemDatastores = new[]
        {
            "string",
        },
        Customs = new[]
        {
            new Opennebula.Inputs.DatastoreCustomArgs
            {
                Transfer = "string",
                Datastore = "string",
            },
        },
        DatastoreId = "string",
        CheckAvailableCapacity = false,
        Driver = "string",
        NoDecompress = false,
        BridgeLists = new[]
        {
            "string",
        },
        SafeDirectories = "string",
        StagingDir = "string",
        StorageUsageLimit = 0,
        Tags = 
        {
            { "string", "string" },
        },
        TransferBandwithLimit = 0,
        Cephs = new[]
        {
            new Opennebula.Inputs.DatastoreCephArgs
            {
                Config = "string",
                Hosts = new[]
                {
                    "string",
                },
                Key = "string",
                LocalStorage = false,
                PoolName = "string",
                RbdFormat = "string",
                Secret = "string",
                Trash = false,
                User = "string",
            },
        },
    });
    
    example, err := opennebula.NewDatastore(ctx, "datastoreResource", &opennebula.DatastoreArgs{
    	Type:                  pulumi.String("string"),
    	Name:                  pulumi.String("string"),
    	RestrictedDirectories: pulumi.String("string"),
    	ClusterIds: pulumi.Float64Array{
    		pulumi.Float64(0),
    	},
    	CompatibleSystemDatastores: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Customs: opennebula.DatastoreCustomArray{
    		&opennebula.DatastoreCustomArgs{
    			Transfer:  pulumi.String("string"),
    			Datastore: pulumi.String("string"),
    		},
    	},
    	DatastoreId:            pulumi.String("string"),
    	CheckAvailableCapacity: pulumi.Bool(false),
    	Driver:                 pulumi.String("string"),
    	NoDecompress:           pulumi.Bool(false),
    	BridgeLists: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	SafeDirectories:   pulumi.String("string"),
    	StagingDir:        pulumi.String("string"),
    	StorageUsageLimit: pulumi.Float64(0),
    	Tags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	TransferBandwithLimit: pulumi.Float64(0),
    	Cephs: opennebula.DatastoreCephArray{
    		&opennebula.DatastoreCephArgs{
    			Config: pulumi.String("string"),
    			Hosts: pulumi.StringArray{
    				pulumi.String("string"),
    			},
    			Key:          pulumi.String("string"),
    			LocalStorage: pulumi.Bool(false),
    			PoolName:     pulumi.String("string"),
    			RbdFormat:    pulumi.String("string"),
    			Secret:       pulumi.String("string"),
    			Trash:        pulumi.Bool(false),
    			User:         pulumi.String("string"),
    		},
    	},
    })
    
    var datastoreResource = new Datastore("datastoreResource", DatastoreArgs.builder()
        .type("string")
        .name("string")
        .restrictedDirectories("string")
        .clusterIds(0)
        .compatibleSystemDatastores("string")
        .customs(DatastoreCustomArgs.builder()
            .transfer("string")
            .datastore("string")
            .build())
        .datastoreId("string")
        .checkAvailableCapacity(false)
        .driver("string")
        .noDecompress(false)
        .bridgeLists("string")
        .safeDirectories("string")
        .stagingDir("string")
        .storageUsageLimit(0)
        .tags(Map.of("string", "string"))
        .transferBandwithLimit(0)
        .cephs(DatastoreCephArgs.builder()
            .config("string")
            .hosts("string")
            .key("string")
            .localStorage(false)
            .poolName("string")
            .rbdFormat("string")
            .secret("string")
            .trash(false)
            .user("string")
            .build())
        .build());
    
    datastore_resource = opennebula.Datastore("datastoreResource",
        type="string",
        name="string",
        restricted_directories="string",
        cluster_ids=[0],
        compatible_system_datastores=["string"],
        customs=[{
            "transfer": "string",
            "datastore": "string",
        }],
        datastore_id="string",
        check_available_capacity=False,
        driver="string",
        no_decompress=False,
        bridge_lists=["string"],
        safe_directories="string",
        staging_dir="string",
        storage_usage_limit=0,
        tags={
            "string": "string",
        },
        transfer_bandwith_limit=0,
        cephs=[{
            "config": "string",
            "hosts": ["string"],
            "key": "string",
            "local_storage": False,
            "pool_name": "string",
            "rbd_format": "string",
            "secret": "string",
            "trash": False,
            "user": "string",
        }])
    
    const datastoreResource = new opennebula.Datastore("datastoreResource", {
        type: "string",
        name: "string",
        restrictedDirectories: "string",
        clusterIds: [0],
        compatibleSystemDatastores: ["string"],
        customs: [{
            transfer: "string",
            datastore: "string",
        }],
        datastoreId: "string",
        checkAvailableCapacity: false,
        driver: "string",
        noDecompress: false,
        bridgeLists: ["string"],
        safeDirectories: "string",
        stagingDir: "string",
        storageUsageLimit: 0,
        tags: {
            string: "string",
        },
        transferBandwithLimit: 0,
        cephs: [{
            config: "string",
            hosts: ["string"],
            key: "string",
            localStorage: false,
            poolName: "string",
            rbdFormat: "string",
            secret: "string",
            trash: false,
            user: "string",
        }],
    });
    
    type: opennebula:Datastore
    properties:
        bridgeLists:
            - string
        cephs:
            - config: string
              hosts:
                - string
              key: string
              localStorage: false
              poolName: string
              rbdFormat: string
              secret: string
              trash: false
              user: string
        checkAvailableCapacity: false
        clusterIds:
            - 0
        compatibleSystemDatastores:
            - string
        customs:
            - datastore: string
              transfer: string
        datastoreId: string
        driver: string
        name: string
        noDecompress: false
        restrictedDirectories: string
        safeDirectories: string
        stagingDir: string
        storageUsageLimit: 0
        tags:
            string: string
        transferBandwithLimit: 0
        type: string
    

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

    Type string
    Type of the new datastore: image, system, file.
    BridgeLists List<string>
    List of hosts that have access to the storage to add new images to the datastore.
    Cephs List<DatastoreCeph>
    See Ceph section for details.
    CheckAvailableCapacity bool
    If yes, the available capacity of the Datastore is checked before creating a new image.
    ClusterIds List<double>
    IDs of the clusters the datastore is part of. Minimum 1 item.
    CompatibleSystemDatastores List<string>
    Specify the compatible system datastores.
    Customs List<DatastoreCustom>
    See Custom section for details.
    DatastoreId string
    ID of the datastore.
    Driver string
    Specific image mapping driver enforcement. If present it overrides image DRIVER set in the image attributes and VM template.
    Name string
    The name of the datastore.
    NoDecompress bool
    Boolean, do not try to untar or decompress the file to be registered.
    RestrictedDirectories string
    Paths that cannot be used to register images. A space separated list of paths.
    SafeDirectories string
    If you need to allow a directory listed under RESTRICTED_DIRS. A space separated list of paths.
    StagingDir string
    Path in the storage bridge host to copy an Image before moving it to its final destination.
    StorageUsageLimit double
    The maximum capacity allowed for the Datastore in MB.
    Tags Dictionary<string, string>
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    TransferBandwithLimit double
    Specify the maximum transfer rate in bytes/second when downloading images from a http/https URL. Suffixes K, M or G can be used.
    Type string
    Type of the new datastore: image, system, file.
    BridgeLists []string
    List of hosts that have access to the storage to add new images to the datastore.
    Cephs []DatastoreCephArgs
    See Ceph section for details.
    CheckAvailableCapacity bool
    If yes, the available capacity of the Datastore is checked before creating a new image.
    ClusterIds []float64
    IDs of the clusters the datastore is part of. Minimum 1 item.
    CompatibleSystemDatastores []string
    Specify the compatible system datastores.
    Customs []DatastoreCustomArgs
    See Custom section for details.
    DatastoreId string
    ID of the datastore.
    Driver string
    Specific image mapping driver enforcement. If present it overrides image DRIVER set in the image attributes and VM template.
    Name string
    The name of the datastore.
    NoDecompress bool
    Boolean, do not try to untar or decompress the file to be registered.
    RestrictedDirectories string
    Paths that cannot be used to register images. A space separated list of paths.
    SafeDirectories string
    If you need to allow a directory listed under RESTRICTED_DIRS. A space separated list of paths.
    StagingDir string
    Path in the storage bridge host to copy an Image before moving it to its final destination.
    StorageUsageLimit float64
    The maximum capacity allowed for the Datastore in MB.
    Tags map[string]string
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    TransferBandwithLimit float64
    Specify the maximum transfer rate in bytes/second when downloading images from a http/https URL. Suffixes K, M or G can be used.
    type String
    Type of the new datastore: image, system, file.
    bridgeLists List<String>
    List of hosts that have access to the storage to add new images to the datastore.
    cephs List<DatastoreCeph>
    See Ceph section for details.
    checkAvailableCapacity Boolean
    If yes, the available capacity of the Datastore is checked before creating a new image.
    clusterIds List<Double>
    IDs of the clusters the datastore is part of. Minimum 1 item.
    compatibleSystemDatastores List<String>
    Specify the compatible system datastores.
    customs List<DatastoreCustom>
    See Custom section for details.
    datastoreId String
    ID of the datastore.
    driver String
    Specific image mapping driver enforcement. If present it overrides image DRIVER set in the image attributes and VM template.
    name String
    The name of the datastore.
    noDecompress Boolean
    Boolean, do not try to untar or decompress the file to be registered.
    restrictedDirectories String
    Paths that cannot be used to register images. A space separated list of paths.
    safeDirectories String
    If you need to allow a directory listed under RESTRICTED_DIRS. A space separated list of paths.
    stagingDir String
    Path in the storage bridge host to copy an Image before moving it to its final destination.
    storageUsageLimit Double
    The maximum capacity allowed for the Datastore in MB.
    tags Map<String,String>
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    transferBandwithLimit Double
    Specify the maximum transfer rate in bytes/second when downloading images from a http/https URL. Suffixes K, M or G can be used.
    type string
    Type of the new datastore: image, system, file.
    bridgeLists string[]
    List of hosts that have access to the storage to add new images to the datastore.
    cephs DatastoreCeph[]
    See Ceph section for details.
    checkAvailableCapacity boolean
    If yes, the available capacity of the Datastore is checked before creating a new image.
    clusterIds number[]
    IDs of the clusters the datastore is part of. Minimum 1 item.
    compatibleSystemDatastores string[]
    Specify the compatible system datastores.
    customs DatastoreCustom[]
    See Custom section for details.
    datastoreId string
    ID of the datastore.
    driver string
    Specific image mapping driver enforcement. If present it overrides image DRIVER set in the image attributes and VM template.
    name string
    The name of the datastore.
    noDecompress boolean
    Boolean, do not try to untar or decompress the file to be registered.
    restrictedDirectories string
    Paths that cannot be used to register images. A space separated list of paths.
    safeDirectories string
    If you need to allow a directory listed under RESTRICTED_DIRS. A space separated list of paths.
    stagingDir string
    Path in the storage bridge host to copy an Image before moving it to its final destination.
    storageUsageLimit number
    The maximum capacity allowed for the Datastore in MB.
    tags {[key: string]: string}
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    transferBandwithLimit number
    Specify the maximum transfer rate in bytes/second when downloading images from a http/https URL. Suffixes K, M or G can be used.
    type str
    Type of the new datastore: image, system, file.
    bridge_lists Sequence[str]
    List of hosts that have access to the storage to add new images to the datastore.
    cephs Sequence[DatastoreCephArgs]
    See Ceph section for details.
    check_available_capacity bool
    If yes, the available capacity of the Datastore is checked before creating a new image.
    cluster_ids Sequence[float]
    IDs of the clusters the datastore is part of. Minimum 1 item.
    compatible_system_datastores Sequence[str]
    Specify the compatible system datastores.
    customs Sequence[DatastoreCustomArgs]
    See Custom section for details.
    datastore_id str
    ID of the datastore.
    driver str
    Specific image mapping driver enforcement. If present it overrides image DRIVER set in the image attributes and VM template.
    name str
    The name of the datastore.
    no_decompress bool
    Boolean, do not try to untar or decompress the file to be registered.
    restricted_directories str
    Paths that cannot be used to register images. A space separated list of paths.
    safe_directories str
    If you need to allow a directory listed under RESTRICTED_DIRS. A space separated list of paths.
    staging_dir str
    Path in the storage bridge host to copy an Image before moving it to its final destination.
    storage_usage_limit float
    The maximum capacity allowed for the Datastore in MB.
    tags Mapping[str, str]
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    transfer_bandwith_limit float
    Specify the maximum transfer rate in bytes/second when downloading images from a http/https URL. Suffixes K, M or G can be used.
    type String
    Type of the new datastore: image, system, file.
    bridgeLists List<String>
    List of hosts that have access to the storage to add new images to the datastore.
    cephs List<Property Map>
    See Ceph section for details.
    checkAvailableCapacity Boolean
    If yes, the available capacity of the Datastore is checked before creating a new image.
    clusterIds List<Number>
    IDs of the clusters the datastore is part of. Minimum 1 item.
    compatibleSystemDatastores List<String>
    Specify the compatible system datastores.
    customs List<Property Map>
    See Custom section for details.
    datastoreId String
    ID of the datastore.
    driver String
    Specific image mapping driver enforcement. If present it overrides image DRIVER set in the image attributes and VM template.
    name String
    The name of the datastore.
    noDecompress Boolean
    Boolean, do not try to untar or decompress the file to be registered.
    restrictedDirectories String
    Paths that cannot be used to register images. A space separated list of paths.
    safeDirectories String
    If you need to allow a directory listed under RESTRICTED_DIRS. A space separated list of paths.
    stagingDir String
    Path in the storage bridge host to copy an Image before moving it to its final destination.
    storageUsageLimit Number
    The maximum capacity allowed for the Datastore in MB.
    tags Map<String>
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    transferBandwithLimit Number
    Specify the maximum transfer rate in bytes/second when downloading images from a http/https URL. Suffixes K, M or G can be used.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Datastore resource produces the following output properties:

    DefaultTags Dictionary<string, string>
    Default tags defined in the provider configuration.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll Dictionary<string, string>
    Result of the applied default_tags and then resource tags.
    DefaultTags map[string]string
    Default tags defined in the provider configuration.
    Id string
    The provider-assigned unique ID for this managed resource.
    TagsAll map[string]string
    Result of the applied default_tags and then resource tags.
    defaultTags Map<String,String>
    Default tags defined in the provider configuration.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String,String>
    Result of the applied default_tags and then resource tags.
    defaultTags {[key: string]: string}
    Default tags defined in the provider configuration.
    id string
    The provider-assigned unique ID for this managed resource.
    tagsAll {[key: string]: string}
    Result of the applied default_tags and then resource tags.
    default_tags Mapping[str, str]
    Default tags defined in the provider configuration.
    id str
    The provider-assigned unique ID for this managed resource.
    tags_all Mapping[str, str]
    Result of the applied default_tags and then resource tags.
    defaultTags Map<String>
    Default tags defined in the provider configuration.
    id String
    The provider-assigned unique ID for this managed resource.
    tagsAll Map<String>
    Result of the applied default_tags and then resource tags.

    Look up Existing Datastore Resource

    Get an existing Datastore 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?: DatastoreState, opts?: CustomResourceOptions): Datastore
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            bridge_lists: Optional[Sequence[str]] = None,
            cephs: Optional[Sequence[DatastoreCephArgs]] = None,
            check_available_capacity: Optional[bool] = None,
            cluster_ids: Optional[Sequence[float]] = None,
            compatible_system_datastores: Optional[Sequence[str]] = None,
            customs: Optional[Sequence[DatastoreCustomArgs]] = None,
            datastore_id: Optional[str] = None,
            default_tags: Optional[Mapping[str, str]] = None,
            driver: Optional[str] = None,
            name: Optional[str] = None,
            no_decompress: Optional[bool] = None,
            restricted_directories: Optional[str] = None,
            safe_directories: Optional[str] = None,
            staging_dir: Optional[str] = None,
            storage_usage_limit: Optional[float] = None,
            tags: Optional[Mapping[str, str]] = None,
            tags_all: Optional[Mapping[str, str]] = None,
            transfer_bandwith_limit: Optional[float] = None,
            type: Optional[str] = None) -> Datastore
    func GetDatastore(ctx *Context, name string, id IDInput, state *DatastoreState, opts ...ResourceOption) (*Datastore, error)
    public static Datastore Get(string name, Input<string> id, DatastoreState? state, CustomResourceOptions? opts = null)
    public static Datastore get(String name, Output<String> id, DatastoreState state, CustomResourceOptions options)
    resources:  _:    type: opennebula:Datastore    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.
    The following state arguments are supported:
    BridgeLists List<string>
    List of hosts that have access to the storage to add new images to the datastore.
    Cephs List<DatastoreCeph>
    See Ceph section for details.
    CheckAvailableCapacity bool
    If yes, the available capacity of the Datastore is checked before creating a new image.
    ClusterIds List<double>
    IDs of the clusters the datastore is part of. Minimum 1 item.
    CompatibleSystemDatastores List<string>
    Specify the compatible system datastores.
    Customs List<DatastoreCustom>
    See Custom section for details.
    DatastoreId string
    ID of the datastore.
    DefaultTags Dictionary<string, string>
    Default tags defined in the provider configuration.
    Driver string
    Specific image mapping driver enforcement. If present it overrides image DRIVER set in the image attributes and VM template.
    Name string
    The name of the datastore.
    NoDecompress bool
    Boolean, do not try to untar or decompress the file to be registered.
    RestrictedDirectories string
    Paths that cannot be used to register images. A space separated list of paths.
    SafeDirectories string
    If you need to allow a directory listed under RESTRICTED_DIRS. A space separated list of paths.
    StagingDir string
    Path in the storage bridge host to copy an Image before moving it to its final destination.
    StorageUsageLimit double
    The maximum capacity allowed for the Datastore in MB.
    Tags Dictionary<string, string>
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    TagsAll Dictionary<string, string>
    Result of the applied default_tags and then resource tags.
    TransferBandwithLimit double
    Specify the maximum transfer rate in bytes/second when downloading images from a http/https URL. Suffixes K, M or G can be used.
    Type string
    Type of the new datastore: image, system, file.
    BridgeLists []string
    List of hosts that have access to the storage to add new images to the datastore.
    Cephs []DatastoreCephArgs
    See Ceph section for details.
    CheckAvailableCapacity bool
    If yes, the available capacity of the Datastore is checked before creating a new image.
    ClusterIds []float64
    IDs of the clusters the datastore is part of. Minimum 1 item.
    CompatibleSystemDatastores []string
    Specify the compatible system datastores.
    Customs []DatastoreCustomArgs
    See Custom section for details.
    DatastoreId string
    ID of the datastore.
    DefaultTags map[string]string
    Default tags defined in the provider configuration.
    Driver string
    Specific image mapping driver enforcement. If present it overrides image DRIVER set in the image attributes and VM template.
    Name string
    The name of the datastore.
    NoDecompress bool
    Boolean, do not try to untar or decompress the file to be registered.
    RestrictedDirectories string
    Paths that cannot be used to register images. A space separated list of paths.
    SafeDirectories string
    If you need to allow a directory listed under RESTRICTED_DIRS. A space separated list of paths.
    StagingDir string
    Path in the storage bridge host to copy an Image before moving it to its final destination.
    StorageUsageLimit float64
    The maximum capacity allowed for the Datastore in MB.
    Tags map[string]string
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    TagsAll map[string]string
    Result of the applied default_tags and then resource tags.
    TransferBandwithLimit float64
    Specify the maximum transfer rate in bytes/second when downloading images from a http/https URL. Suffixes K, M or G can be used.
    Type string
    Type of the new datastore: image, system, file.
    bridgeLists List<String>
    List of hosts that have access to the storage to add new images to the datastore.
    cephs List<DatastoreCeph>
    See Ceph section for details.
    checkAvailableCapacity Boolean
    If yes, the available capacity of the Datastore is checked before creating a new image.
    clusterIds List<Double>
    IDs of the clusters the datastore is part of. Minimum 1 item.
    compatibleSystemDatastores List<String>
    Specify the compatible system datastores.
    customs List<DatastoreCustom>
    See Custom section for details.
    datastoreId String
    ID of the datastore.
    defaultTags Map<String,String>
    Default tags defined in the provider configuration.
    driver String
    Specific image mapping driver enforcement. If present it overrides image DRIVER set in the image attributes and VM template.
    name String
    The name of the datastore.
    noDecompress Boolean
    Boolean, do not try to untar or decompress the file to be registered.
    restrictedDirectories String
    Paths that cannot be used to register images. A space separated list of paths.
    safeDirectories String
    If you need to allow a directory listed under RESTRICTED_DIRS. A space separated list of paths.
    stagingDir String
    Path in the storage bridge host to copy an Image before moving it to its final destination.
    storageUsageLimit Double
    The maximum capacity allowed for the Datastore in MB.
    tags Map<String,String>
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    tagsAll Map<String,String>
    Result of the applied default_tags and then resource tags.
    transferBandwithLimit Double
    Specify the maximum transfer rate in bytes/second when downloading images from a http/https URL. Suffixes K, M or G can be used.
    type String
    Type of the new datastore: image, system, file.
    bridgeLists string[]
    List of hosts that have access to the storage to add new images to the datastore.
    cephs DatastoreCeph[]
    See Ceph section for details.
    checkAvailableCapacity boolean
    If yes, the available capacity of the Datastore is checked before creating a new image.
    clusterIds number[]
    IDs of the clusters the datastore is part of. Minimum 1 item.
    compatibleSystemDatastores string[]
    Specify the compatible system datastores.
    customs DatastoreCustom[]
    See Custom section for details.
    datastoreId string
    ID of the datastore.
    defaultTags {[key: string]: string}
    Default tags defined in the provider configuration.
    driver string
    Specific image mapping driver enforcement. If present it overrides image DRIVER set in the image attributes and VM template.
    name string
    The name of the datastore.
    noDecompress boolean
    Boolean, do not try to untar or decompress the file to be registered.
    restrictedDirectories string
    Paths that cannot be used to register images. A space separated list of paths.
    safeDirectories string
    If you need to allow a directory listed under RESTRICTED_DIRS. A space separated list of paths.
    stagingDir string
    Path in the storage bridge host to copy an Image before moving it to its final destination.
    storageUsageLimit number
    The maximum capacity allowed for the Datastore in MB.
    tags {[key: string]: string}
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    tagsAll {[key: string]: string}
    Result of the applied default_tags and then resource tags.
    transferBandwithLimit number
    Specify the maximum transfer rate in bytes/second when downloading images from a http/https URL. Suffixes K, M or G can be used.
    type string
    Type of the new datastore: image, system, file.
    bridge_lists Sequence[str]
    List of hosts that have access to the storage to add new images to the datastore.
    cephs Sequence[DatastoreCephArgs]
    See Ceph section for details.
    check_available_capacity bool
    If yes, the available capacity of the Datastore is checked before creating a new image.
    cluster_ids Sequence[float]
    IDs of the clusters the datastore is part of. Minimum 1 item.
    compatible_system_datastores Sequence[str]
    Specify the compatible system datastores.
    customs Sequence[DatastoreCustomArgs]
    See Custom section for details.
    datastore_id str
    ID of the datastore.
    default_tags Mapping[str, str]
    Default tags defined in the provider configuration.
    driver str
    Specific image mapping driver enforcement. If present it overrides image DRIVER set in the image attributes and VM template.
    name str
    The name of the datastore.
    no_decompress bool
    Boolean, do not try to untar or decompress the file to be registered.
    restricted_directories str
    Paths that cannot be used to register images. A space separated list of paths.
    safe_directories str
    If you need to allow a directory listed under RESTRICTED_DIRS. A space separated list of paths.
    staging_dir str
    Path in the storage bridge host to copy an Image before moving it to its final destination.
    storage_usage_limit float
    The maximum capacity allowed for the Datastore in MB.
    tags Mapping[str, str]
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    tags_all Mapping[str, str]
    Result of the applied default_tags and then resource tags.
    transfer_bandwith_limit float
    Specify the maximum transfer rate in bytes/second when downloading images from a http/https URL. Suffixes K, M or G can be used.
    type str
    Type of the new datastore: image, system, file.
    bridgeLists List<String>
    List of hosts that have access to the storage to add new images to the datastore.
    cephs List<Property Map>
    See Ceph section for details.
    checkAvailableCapacity Boolean
    If yes, the available capacity of the Datastore is checked before creating a new image.
    clusterIds List<Number>
    IDs of the clusters the datastore is part of. Minimum 1 item.
    compatibleSystemDatastores List<String>
    Specify the compatible system datastores.
    customs List<Property Map>
    See Custom section for details.
    datastoreId String
    ID of the datastore.
    defaultTags Map<String>
    Default tags defined in the provider configuration.
    driver String
    Specific image mapping driver enforcement. If present it overrides image DRIVER set in the image attributes and VM template.
    name String
    The name of the datastore.
    noDecompress Boolean
    Boolean, do not try to untar or decompress the file to be registered.
    restrictedDirectories String
    Paths that cannot be used to register images. A space separated list of paths.
    safeDirectories String
    If you need to allow a directory listed under RESTRICTED_DIRS. A space separated list of paths.
    stagingDir String
    Path in the storage bridge host to copy an Image before moving it to its final destination.
    storageUsageLimit Number
    The maximum capacity allowed for the Datastore in MB.
    tags Map<String>
    Map of tags (key=value) assigned to the resource. Override matching tags present in the default_tags atribute when configured in the provider block. See tags usage related documentation for more information.
    tagsAll Map<String>
    Result of the applied default_tags and then resource tags.
    transferBandwithLimit Number
    Specify the maximum transfer rate in bytes/second when downloading images from a http/https URL. Suffixes K, M or G can be used.
    type String
    Type of the new datastore: image, system, file.

    Supporting Types

    DatastoreCeph, DatastoreCephArgs

    Config string
    Non-default Ceph configuration file if needed.
    Hosts List<string>
    List of Ceph monitors.
    Key string
    Key file for user. if not set default locations are used.
    LocalStorage bool
    Use local host storage, SSH mode.
    PoolName string
    Ceph pool name.
    RbdFormat string
    By default RBD Format 2 will be used.
    Secret string
    The UUID of the libvirt secret.
    Trash bool
    Enables trash feature on given datastore.
    User string
    Ceph user name.
    Config string
    Non-default Ceph configuration file if needed.
    Hosts []string
    List of Ceph monitors.
    Key string
    Key file for user. if not set default locations are used.
    LocalStorage bool
    Use local host storage, SSH mode.
    PoolName string
    Ceph pool name.
    RbdFormat string
    By default RBD Format 2 will be used.
    Secret string
    The UUID of the libvirt secret.
    Trash bool
    Enables trash feature on given datastore.
    User string
    Ceph user name.
    config String
    Non-default Ceph configuration file if needed.
    hosts List<String>
    List of Ceph monitors.
    key String
    Key file for user. if not set default locations are used.
    localStorage Boolean
    Use local host storage, SSH mode.
    poolName String
    Ceph pool name.
    rbdFormat String
    By default RBD Format 2 will be used.
    secret String
    The UUID of the libvirt secret.
    trash Boolean
    Enables trash feature on given datastore.
    user String
    Ceph user name.
    config string
    Non-default Ceph configuration file if needed.
    hosts string[]
    List of Ceph monitors.
    key string
    Key file for user. if not set default locations are used.
    localStorage boolean
    Use local host storage, SSH mode.
    poolName string
    Ceph pool name.
    rbdFormat string
    By default RBD Format 2 will be used.
    secret string
    The UUID of the libvirt secret.
    trash boolean
    Enables trash feature on given datastore.
    user string
    Ceph user name.
    config str
    Non-default Ceph configuration file if needed.
    hosts Sequence[str]
    List of Ceph monitors.
    key str
    Key file for user. if not set default locations are used.
    local_storage bool
    Use local host storage, SSH mode.
    pool_name str
    Ceph pool name.
    rbd_format str
    By default RBD Format 2 will be used.
    secret str
    The UUID of the libvirt secret.
    trash bool
    Enables trash feature on given datastore.
    user str
    Ceph user name.
    config String
    Non-default Ceph configuration file if needed.
    hosts List<String>
    List of Ceph monitors.
    key String
    Key file for user. if not set default locations are used.
    localStorage Boolean
    Use local host storage, SSH mode.
    poolName String
    Ceph pool name.
    rbdFormat String
    By default RBD Format 2 will be used.
    secret String
    The UUID of the libvirt secret.
    trash Boolean
    Enables trash feature on given datastore.
    user String
    Ceph user name.

    DatastoreCustom, DatastoreCustomArgs

    Transfer string
    name of the transfer driver (named TM_MAD in opennebula).
    Datastore string
    name of the datastore driver (named DS_MAD in OpenNebula).
    Transfer string
    name of the transfer driver (named TM_MAD in opennebula).
    Datastore string
    name of the datastore driver (named DS_MAD in OpenNebula).
    transfer String
    name of the transfer driver (named TM_MAD in opennebula).
    datastore String
    name of the datastore driver (named DS_MAD in OpenNebula).
    transfer string
    name of the transfer driver (named TM_MAD in opennebula).
    datastore string
    name of the datastore driver (named DS_MAD in OpenNebula).
    transfer str
    name of the transfer driver (named TM_MAD in opennebula).
    datastore str
    name of the datastore driver (named DS_MAD in OpenNebula).
    transfer String
    name of the transfer driver (named TM_MAD in opennebula).
    datastore String
    name of the datastore driver (named DS_MAD in OpenNebula).

    Import

    opennebula_datastore can be imported using its ID:

    $ pulumi import opennebula:index/datastore:Datastore example 123
    

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

    Package Details

    Repository
    opennebula opennebula/terraform-provider-opennebula
    License
    Notes
    This Pulumi package is based on the opennebula Terraform Provider.
    opennebula logo
    opennebula 1.4.1 published on Monday, Apr 14, 2025 by opennebula