// Code generated by pulumi-language-go DO NOT EDIT. // *** WARNING: Do not edit by hand unless you're certain you know what you are doing! *** package incus import ( "context" "reflect" "errors" "git.kalinow.ski/kiterun/pulumi-incus/sdk/go/incus/internal" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) type StoragePool struct { pulumi.CustomResourceState // *Optional* - Map of key/value pairs of // [storage pool config settings](https://linuxcontainers.org/incus/docs/main/reference/storage_drivers/). // Config settings vary from driver to driver. Config pulumi.StringMapOutput `pulumi:"config"` // *Optional* - Description of the storage pool. `description` is mutual exclusive with `target`. The `description` can only be set on cluster level (with `target` not set) or on non-clustered setups. Description pulumi.StringOutput `pulumi:"description"` // **Required** - Storage Pool driver. Must be one of `dir`, `zfs`, `lvm`, `lvmcluster`, `btrfs`, `ceph`, `cephfs`, `cephobject`, `linstor` or `truenas`. Driver pulumi.StringOutput `pulumi:"driver"` // **Required** - Name of the storage pool. Name pulumi.StringOutput `pulumi:"name"` // *Optional* - Name of the project where the storage pool will be stored. Project pulumi.StringOutput `pulumi:"project"` // *Optional* - The remote in which the resource will be created. If // not provided, the provider's default remote will be used. Remote pulumi.StringPtrOutput `pulumi:"remote"` // *Optional* - Specify a target node in a cluster. Target pulumi.StringPtrOutput `pulumi:"target"` } // NewStoragePool registers a new resource with the given unique name, arguments, and options. func NewStoragePool(ctx *pulumi.Context, name string, args *StoragePoolArgs, opts ...pulumi.ResourceOption) (*StoragePool, error) { if args == nil { return nil, errors.New("missing one or more required arguments") } if args.Driver == nil { return nil, errors.New("invalid value for required argument 'Driver'") } if args.Name == nil { return nil, errors.New("invalid value for required argument 'Name'") } if args.Project == nil { args.Project = pulumi.StringPtr("default") } opts = internal.PkgResourceDefaultOpts(opts) var resource StoragePool err := ctx.RegisterResource("incus:index/storagePool:StoragePool", name, args, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // GetStoragePool gets an existing StoragePool 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 GetStoragePool(ctx *pulumi.Context, name string, id pulumi.IDInput, state *StoragePoolState, opts ...pulumi.ResourceOption) (*StoragePool, error) { var resource StoragePool err := ctx.ReadResource("incus:index/storagePool:StoragePool", name, id, state, &resource, opts...) if err != nil { return nil, err } return &resource, nil } // Input properties used for looking up and filtering StoragePool resources. type storagePoolState struct { // *Optional* - Map of key/value pairs of // [storage pool config settings](https://linuxcontainers.org/incus/docs/main/reference/storage_drivers/). // Config settings vary from driver to driver. Config map[string]string `pulumi:"config"` // *Optional* - Description of the storage pool. `description` is mutual exclusive with `target`. The `description` can only be set on cluster level (with `target` not set) or on non-clustered setups. Description *string `pulumi:"description"` // **Required** - Storage Pool driver. Must be one of `dir`, `zfs`, `lvm`, `lvmcluster`, `btrfs`, `ceph`, `cephfs`, `cephobject`, `linstor` or `truenas`. Driver *string `pulumi:"driver"` // **Required** - Name of the storage pool. Name *string `pulumi:"name"` // *Optional* - Name of the project where the storage pool will be stored. Project *string `pulumi:"project"` // *Optional* - The remote in which the resource will be created. If // not provided, the provider's default remote will be used. Remote *string `pulumi:"remote"` // *Optional* - Specify a target node in a cluster. Target *string `pulumi:"target"` } type StoragePoolState struct { // *Optional* - Map of key/value pairs of // [storage pool config settings](https://linuxcontainers.org/incus/docs/main/reference/storage_drivers/). // Config settings vary from driver to driver. Config pulumi.StringMapInput // *Optional* - Description of the storage pool. `description` is mutual exclusive with `target`. The `description` can only be set on cluster level (with `target` not set) or on non-clustered setups. Description pulumi.StringPtrInput // **Required** - Storage Pool driver. Must be one of `dir`, `zfs`, `lvm`, `lvmcluster`, `btrfs`, `ceph`, `cephfs`, `cephobject`, `linstor` or `truenas`. Driver pulumi.StringPtrInput // **Required** - Name of the storage pool. Name pulumi.StringPtrInput // *Optional* - Name of the project where the storage pool will be stored. Project pulumi.StringPtrInput // *Optional* - The remote in which the resource will be created. If // not provided, the provider's default remote will be used. Remote pulumi.StringPtrInput // *Optional* - Specify a target node in a cluster. Target pulumi.StringPtrInput } func (StoragePoolState) ElementType() reflect.Type { return reflect.TypeOf((*storagePoolState)(nil)).Elem() } type storagePoolArgs struct { // *Optional* - Map of key/value pairs of // [storage pool config settings](https://linuxcontainers.org/incus/docs/main/reference/storage_drivers/). // Config settings vary from driver to driver. Config map[string]string `pulumi:"config"` // *Optional* - Description of the storage pool. `description` is mutual exclusive with `target`. The `description` can only be set on cluster level (with `target` not set) or on non-clustered setups. Description *string `pulumi:"description"` // **Required** - Storage Pool driver. Must be one of `dir`, `zfs`, `lvm`, `lvmcluster`, `btrfs`, `ceph`, `cephfs`, `cephobject`, `linstor` or `truenas`. Driver string `pulumi:"driver"` // **Required** - Name of the storage pool. Name string `pulumi:"name"` // *Optional* - Name of the project where the storage pool will be stored. Project *string `pulumi:"project"` // *Optional* - The remote in which the resource will be created. If // not provided, the provider's default remote will be used. Remote *string `pulumi:"remote"` // *Optional* - Specify a target node in a cluster. Target *string `pulumi:"target"` } // The set of arguments for constructing a StoragePool resource. type StoragePoolArgs struct { // *Optional* - Map of key/value pairs of // [storage pool config settings](https://linuxcontainers.org/incus/docs/main/reference/storage_drivers/). // Config settings vary from driver to driver. Config pulumi.StringMapInput // *Optional* - Description of the storage pool. `description` is mutual exclusive with `target`. The `description` can only be set on cluster level (with `target` not set) or on non-clustered setups. Description pulumi.StringPtrInput // **Required** - Storage Pool driver. Must be one of `dir`, `zfs`, `lvm`, `lvmcluster`, `btrfs`, `ceph`, `cephfs`, `cephobject`, `linstor` or `truenas`. Driver pulumi.StringInput // **Required** - Name of the storage pool. Name pulumi.StringInput // *Optional* - Name of the project where the storage pool will be stored. Project pulumi.StringPtrInput // *Optional* - The remote in which the resource will be created. If // not provided, the provider's default remote will be used. Remote pulumi.StringPtrInput // *Optional* - Specify a target node in a cluster. Target pulumi.StringPtrInput } func (StoragePoolArgs) ElementType() reflect.Type { return reflect.TypeOf((*storagePoolArgs)(nil)).Elem() } type StoragePoolInput interface { pulumi.Input ToStoragePoolOutput() StoragePoolOutput ToStoragePoolOutputWithContext(ctx context.Context) StoragePoolOutput } func (*StoragePool) ElementType() reflect.Type { return reflect.TypeOf((**StoragePool)(nil)).Elem() } func (i *StoragePool) ToStoragePoolOutput() StoragePoolOutput { return i.ToStoragePoolOutputWithContext(context.Background()) } func (i *StoragePool) ToStoragePoolOutputWithContext(ctx context.Context) StoragePoolOutput { return pulumi.ToOutputWithContext(ctx, i).(StoragePoolOutput) } // StoragePoolArrayInput is an input type that accepts StoragePoolArray and StoragePoolArrayOutput values. // You can construct a concrete instance of `StoragePoolArrayInput` via: // // StoragePoolArray{ StoragePoolArgs{...} } type StoragePoolArrayInput interface { pulumi.Input ToStoragePoolArrayOutput() StoragePoolArrayOutput ToStoragePoolArrayOutputWithContext(context.Context) StoragePoolArrayOutput } type StoragePoolArray []StoragePoolInput func (StoragePoolArray) ElementType() reflect.Type { return reflect.TypeOf((*[]*StoragePool)(nil)).Elem() } func (i StoragePoolArray) ToStoragePoolArrayOutput() StoragePoolArrayOutput { return i.ToStoragePoolArrayOutputWithContext(context.Background()) } func (i StoragePoolArray) ToStoragePoolArrayOutputWithContext(ctx context.Context) StoragePoolArrayOutput { return pulumi.ToOutputWithContext(ctx, i).(StoragePoolArrayOutput) } // StoragePoolMapInput is an input type that accepts StoragePoolMap and StoragePoolMapOutput values. // You can construct a concrete instance of `StoragePoolMapInput` via: // // StoragePoolMap{ "key": StoragePoolArgs{...} } type StoragePoolMapInput interface { pulumi.Input ToStoragePoolMapOutput() StoragePoolMapOutput ToStoragePoolMapOutputWithContext(context.Context) StoragePoolMapOutput } type StoragePoolMap map[string]StoragePoolInput func (StoragePoolMap) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*StoragePool)(nil)).Elem() } func (i StoragePoolMap) ToStoragePoolMapOutput() StoragePoolMapOutput { return i.ToStoragePoolMapOutputWithContext(context.Background()) } func (i StoragePoolMap) ToStoragePoolMapOutputWithContext(ctx context.Context) StoragePoolMapOutput { return pulumi.ToOutputWithContext(ctx, i).(StoragePoolMapOutput) } type StoragePoolOutput struct{ *pulumi.OutputState } func (StoragePoolOutput) ElementType() reflect.Type { return reflect.TypeOf((**StoragePool)(nil)).Elem() } func (o StoragePoolOutput) ToStoragePoolOutput() StoragePoolOutput { return o } func (o StoragePoolOutput) ToStoragePoolOutputWithContext(ctx context.Context) StoragePoolOutput { return o } // *Optional* - Map of key/value pairs of // [storage pool config settings](https://linuxcontainers.org/incus/docs/main/reference/storage_drivers/). // Config settings vary from driver to driver. func (o StoragePoolOutput) Config() pulumi.StringMapOutput { return o.ApplyT(func(v *StoragePool) pulumi.StringMapOutput { return v.Config }).(pulumi.StringMapOutput) } // *Optional* - Description of the storage pool. `description` is mutual exclusive with `target`. The `description` can only be set on cluster level (with `target` not set) or on non-clustered setups. func (o StoragePoolOutput) Description() pulumi.StringOutput { return o.ApplyT(func(v *StoragePool) pulumi.StringOutput { return v.Description }).(pulumi.StringOutput) } // **Required** - Storage Pool driver. Must be one of `dir`, `zfs`, `lvm`, `lvmcluster`, `btrfs`, `ceph`, `cephfs`, `cephobject`, `linstor` or `truenas`. func (o StoragePoolOutput) Driver() pulumi.StringOutput { return o.ApplyT(func(v *StoragePool) pulumi.StringOutput { return v.Driver }).(pulumi.StringOutput) } // **Required** - Name of the storage pool. func (o StoragePoolOutput) Name() pulumi.StringOutput { return o.ApplyT(func(v *StoragePool) pulumi.StringOutput { return v.Name }).(pulumi.StringOutput) } // *Optional* - Name of the project where the storage pool will be stored. func (o StoragePoolOutput) Project() pulumi.StringOutput { return o.ApplyT(func(v *StoragePool) pulumi.StringOutput { return v.Project }).(pulumi.StringOutput) } // *Optional* - The remote in which the resource will be created. If // not provided, the provider's default remote will be used. func (o StoragePoolOutput) Remote() pulumi.StringPtrOutput { return o.ApplyT(func(v *StoragePool) pulumi.StringPtrOutput { return v.Remote }).(pulumi.StringPtrOutput) } // *Optional* - Specify a target node in a cluster. func (o StoragePoolOutput) Target() pulumi.StringPtrOutput { return o.ApplyT(func(v *StoragePool) pulumi.StringPtrOutput { return v.Target }).(pulumi.StringPtrOutput) } type StoragePoolArrayOutput struct{ *pulumi.OutputState } func (StoragePoolArrayOutput) ElementType() reflect.Type { return reflect.TypeOf((*[]*StoragePool)(nil)).Elem() } func (o StoragePoolArrayOutput) ToStoragePoolArrayOutput() StoragePoolArrayOutput { return o } func (o StoragePoolArrayOutput) ToStoragePoolArrayOutputWithContext(ctx context.Context) StoragePoolArrayOutput { return o } func (o StoragePoolArrayOutput) Index(i pulumi.IntInput) StoragePoolOutput { return pulumi.All(o, i).ApplyT(func(vs []interface{}) *StoragePool { return vs[0].([]*StoragePool)[vs[1].(int)] }).(StoragePoolOutput) } type StoragePoolMapOutput struct{ *pulumi.OutputState } func (StoragePoolMapOutput) ElementType() reflect.Type { return reflect.TypeOf((*map[string]*StoragePool)(nil)).Elem() } func (o StoragePoolMapOutput) ToStoragePoolMapOutput() StoragePoolMapOutput { return o } func (o StoragePoolMapOutput) ToStoragePoolMapOutputWithContext(ctx context.Context) StoragePoolMapOutput { return o } func (o StoragePoolMapOutput) MapIndex(k pulumi.StringInput) StoragePoolOutput { return pulumi.All(o, k).ApplyT(func(vs []interface{}) *StoragePool { return vs[0].(map[string]*StoragePool)[vs[1].(string)] }).(StoragePoolOutput) } func init() { pulumi.RegisterInputType(reflect.TypeOf((*StoragePoolInput)(nil)).Elem(), &StoragePool{}) pulumi.RegisterInputType(reflect.TypeOf((*StoragePoolArrayInput)(nil)).Elem(), StoragePoolArray{}) pulumi.RegisterInputType(reflect.TypeOf((*StoragePoolMapInput)(nil)).Elem(), StoragePoolMap{}) pulumi.RegisterOutputType(StoragePoolOutput{}) pulumi.RegisterOutputType(StoragePoolArrayOutput{}) pulumi.RegisterOutputType(StoragePoolMapOutput{}) }