1. Packages
  2. Lxd Provider
  3. API Docs
  4. StorageBucket
lxd 2.5.0 published on Thursday, Mar 13, 2025 by terraform-lxd

lxd.StorageBucket

Explore with Pulumi AI

Create StorageBucket Resource

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

Constructor syntax

new StorageBucket(name: string, args: StorageBucketArgs, opts?: CustomResourceOptions);
@overload
def StorageBucket(resource_name: str,
                  args: StorageBucketArgs,
                  opts: Optional[ResourceOptions] = None)

@overload
def StorageBucket(resource_name: str,
                  opts: Optional[ResourceOptions] = None,
                  pool: Optional[str] = None,
                  config: Optional[Mapping[str, str]] = None,
                  description: Optional[str] = None,
                  name: Optional[str] = None,
                  project: Optional[str] = None,
                  remote: Optional[str] = None,
                  target: Optional[str] = None)
func NewStorageBucket(ctx *Context, name string, args StorageBucketArgs, opts ...ResourceOption) (*StorageBucket, error)
public StorageBucket(string name, StorageBucketArgs args, CustomResourceOptions? opts = null)
public StorageBucket(String name, StorageBucketArgs args)
public StorageBucket(String name, StorageBucketArgs args, CustomResourceOptions options)
type: lxd:StorageBucket
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. StorageBucketArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. StorageBucketArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. StorageBucketArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. StorageBucketArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. StorageBucketArgs
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 storageBucketResource = new Lxd.StorageBucket("storageBucketResource", new()
{
    Pool = "string",
    Config = 
    {
        { "string", "string" },
    },
    Description = "string",
    Name = "string",
    Project = "string",
    Remote = "string",
    Target = "string",
});
Copy
example, err := lxd.NewStorageBucket(ctx, "storageBucketResource", &lxd.StorageBucketArgs{
Pool: pulumi.String("string"),
Config: pulumi.StringMap{
"string": pulumi.String("string"),
},
Description: pulumi.String("string"),
Name: pulumi.String("string"),
Project: pulumi.String("string"),
Remote: pulumi.String("string"),
Target: pulumi.String("string"),
})
Copy
var storageBucketResource = new StorageBucket("storageBucketResource", StorageBucketArgs.builder()
    .pool("string")
    .config(Map.of("string", "string"))
    .description("string")
    .name("string")
    .project("string")
    .remote("string")
    .target("string")
    .build());
Copy
storage_bucket_resource = lxd.StorageBucket("storageBucketResource",
    pool="string",
    config={
        "string": "string",
    },
    description="string",
    name="string",
    project="string",
    remote="string",
    target="string")
Copy
const storageBucketResource = new lxd.StorageBucket("storageBucketResource", {
    pool: "string",
    config: {
        string: "string",
    },
    description: "string",
    name: "string",
    project: "string",
    remote: "string",
    target: "string",
});
Copy
type: lxd:StorageBucket
properties:
    config:
        string: string
    description: string
    name: string
    pool: string
    project: string
    remote: string
    target: string
Copy

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

Pool This property is required. string
Required - Name of storage pool to host the storage bucket.
Config Dictionary<string, string>
Optional - Map of key/value pairs of storage bucket config settings. Note that config settings vary depending on the used storage pool.
Description string
Optional - Description of the storage bucket.
Name string
Required - Name of the storage bucket.
Project string
Optional - Name of the project where the storage bucket will be stored.
Remote string
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
Target string
Optional - Specify a target node in a cluster.
Pool This property is required. string
Required - Name of storage pool to host the storage bucket.
Config map[string]string
Optional - Map of key/value pairs of storage bucket config settings. Note that config settings vary depending on the used storage pool.
Description string
Optional - Description of the storage bucket.
Name string
Required - Name of the storage bucket.
Project string
Optional - Name of the project where the storage bucket will be stored.
Remote string
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
Target string
Optional - Specify a target node in a cluster.
pool This property is required. String
Required - Name of storage pool to host the storage bucket.
config Map<String,String>
Optional - Map of key/value pairs of storage bucket config settings. Note that config settings vary depending on the used storage pool.
description String
Optional - Description of the storage bucket.
name String
Required - Name of the storage bucket.
project String
Optional - Name of the project where the storage bucket will be stored.
remote String
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
target String
Optional - Specify a target node in a cluster.
pool This property is required. string
Required - Name of storage pool to host the storage bucket.
config {[key: string]: string}
Optional - Map of key/value pairs of storage bucket config settings. Note that config settings vary depending on the used storage pool.
description string
Optional - Description of the storage bucket.
name string
Required - Name of the storage bucket.
project string
Optional - Name of the project where the storage bucket will be stored.
remote string
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
target string
Optional - Specify a target node in a cluster.
pool This property is required. str
Required - Name of storage pool to host the storage bucket.
config Mapping[str, str]
Optional - Map of key/value pairs of storage bucket config settings. Note that config settings vary depending on the used storage pool.
description str
Optional - Description of the storage bucket.
name str
Required - Name of the storage bucket.
project str
Optional - Name of the project where the storage bucket will be stored.
remote str
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
target str
Optional - Specify a target node in a cluster.
pool This property is required. String
Required - Name of storage pool to host the storage bucket.
config Map<String>
Optional - Map of key/value pairs of storage bucket config settings. Note that config settings vary depending on the used storage pool.
description String
Optional - Description of the storage bucket.
name String
Required - Name of the storage bucket.
project String
Optional - Name of the project where the storage bucket will be stored.
remote String
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
target String
Optional - Specify a target node in a cluster.

Outputs

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

Id string
The provider-assigned unique ID for this managed resource.
Location string
Name of the node where storage bucket was created.
Id string
The provider-assigned unique ID for this managed resource.
Location string
Name of the node where storage bucket was created.
id String
The provider-assigned unique ID for this managed resource.
location String
Name of the node where storage bucket was created.
id string
The provider-assigned unique ID for this managed resource.
location string
Name of the node where storage bucket was created.
id str
The provider-assigned unique ID for this managed resource.
location str
Name of the node where storage bucket was created.
id String
The provider-assigned unique ID for this managed resource.
location String
Name of the node where storage bucket was created.

Look up Existing StorageBucket Resource

Get an existing StorageBucket 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?: StorageBucketState, opts?: CustomResourceOptions): StorageBucket
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        config: Optional[Mapping[str, str]] = None,
        description: Optional[str] = None,
        location: Optional[str] = None,
        name: Optional[str] = None,
        pool: Optional[str] = None,
        project: Optional[str] = None,
        remote: Optional[str] = None,
        target: Optional[str] = None) -> StorageBucket
func GetStorageBucket(ctx *Context, name string, id IDInput, state *StorageBucketState, opts ...ResourceOption) (*StorageBucket, error)
public static StorageBucket Get(string name, Input<string> id, StorageBucketState? state, CustomResourceOptions? opts = null)
public static StorageBucket get(String name, Output<String> id, StorageBucketState state, CustomResourceOptions options)
resources:  _:    type: lxd:StorageBucket    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Config Dictionary<string, string>
Optional - Map of key/value pairs of storage bucket config settings. Note that config settings vary depending on the used storage pool.
Description string
Optional - Description of the storage bucket.
Location string
Name of the node where storage bucket was created.
Name string
Required - Name of the storage bucket.
Pool string
Required - Name of storage pool to host the storage bucket.
Project string
Optional - Name of the project where the storage bucket will be stored.
Remote string
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
Target string
Optional - Specify a target node in a cluster.
Config map[string]string
Optional - Map of key/value pairs of storage bucket config settings. Note that config settings vary depending on the used storage pool.
Description string
Optional - Description of the storage bucket.
Location string
Name of the node where storage bucket was created.
Name string
Required - Name of the storage bucket.
Pool string
Required - Name of storage pool to host the storage bucket.
Project string
Optional - Name of the project where the storage bucket will be stored.
Remote string
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
Target string
Optional - Specify a target node in a cluster.
config Map<String,String>
Optional - Map of key/value pairs of storage bucket config settings. Note that config settings vary depending on the used storage pool.
description String
Optional - Description of the storage bucket.
location String
Name of the node where storage bucket was created.
name String
Required - Name of the storage bucket.
pool String
Required - Name of storage pool to host the storage bucket.
project String
Optional - Name of the project where the storage bucket will be stored.
remote String
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
target String
Optional - Specify a target node in a cluster.
config {[key: string]: string}
Optional - Map of key/value pairs of storage bucket config settings. Note that config settings vary depending on the used storage pool.
description string
Optional - Description of the storage bucket.
location string
Name of the node where storage bucket was created.
name string
Required - Name of the storage bucket.
pool string
Required - Name of storage pool to host the storage bucket.
project string
Optional - Name of the project where the storage bucket will be stored.
remote string
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
target string
Optional - Specify a target node in a cluster.
config Mapping[str, str]
Optional - Map of key/value pairs of storage bucket config settings. Note that config settings vary depending on the used storage pool.
description str
Optional - Description of the storage bucket.
location str
Name of the node where storage bucket was created.
name str
Required - Name of the storage bucket.
pool str
Required - Name of storage pool to host the storage bucket.
project str
Optional - Name of the project where the storage bucket will be stored.
remote str
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
target str
Optional - Specify a target node in a cluster.
config Map<String>
Optional - Map of key/value pairs of storage bucket config settings. Note that config settings vary depending on the used storage pool.
description String
Optional - Description of the storage bucket.
location String
Name of the node where storage bucket was created.
name String
Required - Name of the storage bucket.
pool String
Required - Name of storage pool to host the storage bucket.
project String
Optional - Name of the project where the storage bucket will be stored.
remote String
Optional - The remote in which the resource will be created. If not provided, the provider's default remote will be used.
target String
Optional - Specify a target node in a cluster.

Package Details

Repository
lxd terraform-lxd/terraform-provider-lxd
License
Notes
This Pulumi package is based on the lxd Terraform Provider.