UNPKG

@cdktf/provider-upcloud

Version:

Prebuilt upcloud Provider for Terraform CDK (cdktf)

343 lines (342 loc) 16.7 kB
/** * Copyright (c) HashiCorp, Inc. * SPDX-License-Identifier: MPL-2.0 */ import { Construct } from 'constructs'; import * as cdktf from 'cdktf'; export interface StorageConfig extends cdktf.TerraformMetaArguments { /** * If set to true, the backup taken before the partition and filesystem resize attempt will be deleted immediately after success. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.32.0/docs/resources/storage#delete_autoresize_backup Storage#delete_autoresize_backup} */ readonly deleteAutoresizeBackup?: boolean | cdktf.IResolvable; /** * Sets if the storage is encrypted at rest. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.32.0/docs/resources/storage#encrypt Storage#encrypt} */ readonly encrypt?: boolean | cdktf.IResolvable; /** * If set to true, provider will attempt to resize partition and filesystem when the size of the storage changes. Please note that before the resize attempt is made, backup of the storage will be taken. If the resize attempt fails, the backup will be used to restore the storage and then deleted. If the resize attempt succeeds, backup will be kept (unless `delete_autoresize_backup` option is set to true). * Taking and keeping backups incure costs. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.32.0/docs/resources/storage#filesystem_autoresize Storage#filesystem_autoresize} */ readonly filesystemAutoresize?: boolean | cdktf.IResolvable; /** * User defined key-value pairs to classify the storage. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.32.0/docs/resources/storage#labels Storage#labels} */ readonly labels?: { [key: string]: string; }; /** * The size of the storage in gigabytes. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.32.0/docs/resources/storage#size Storage#size} */ readonly size: number; /** * The tier of the storage. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.32.0/docs/resources/storage#tier Storage#tier} */ readonly tier?: string; /** * The title of the storage. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.32.0/docs/resources/storage#title Storage#title} */ readonly title: string; /** * The zone the storage is in, e.g. `de-fra1`. You can list available zones with `upctl zone list`. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.32.0/docs/resources/storage#zone Storage#zone} */ readonly zone: string; /** * backup_rule block * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.32.0/docs/resources/storage#backup_rule Storage#backup_rule} */ readonly backupRule?: StorageBackupRule[] | cdktf.IResolvable; /** * clone block * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.32.0/docs/resources/storage#clone Storage#clone} */ readonly clone?: StorageClone[] | cdktf.IResolvable; /** * import block * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.32.0/docs/resources/storage#import Storage#import} */ readonly import?: StorageImport[] | cdktf.IResolvable; } export interface StorageBackupRule { /** * The weekday when the backup is created * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.32.0/docs/resources/storage#interval Storage#interval} */ readonly interval: string; /** * The number of days before a backup is automatically deleted * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.32.0/docs/resources/storage#retention Storage#retention} */ readonly retention: number; /** * The time of day (UTC) when the backup is created * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.32.0/docs/resources/storage#time Storage#time} */ readonly time: string; } export declare function storageBackupRuleToTerraform(struct?: StorageBackupRule | cdktf.IResolvable): any; export declare function storageBackupRuleToHclTerraform(struct?: StorageBackupRule | cdktf.IResolvable): any; export declare class StorageBackupRuleOutputReference extends cdktf.ComplexObject { private isEmptyObject; private resolvableValue?; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param complexObjectIndex the index of this item in the list * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string, complexObjectIndex: number, complexObjectIsFromSet: boolean); get internalValue(): StorageBackupRule | cdktf.IResolvable | undefined; set internalValue(value: StorageBackupRule | cdktf.IResolvable | undefined); private _interval?; get interval(): string; set interval(value: string); get intervalInput(): string | undefined; private _retention?; get retention(): number; set retention(value: number); get retentionInput(): number | undefined; private _time?; get time(): string; set time(value: string); get timeInput(): string | undefined; } export declare class StorageBackupRuleList extends cdktf.ComplexList { protected terraformResource: cdktf.IInterpolatingParent; protected terraformAttribute: string; protected wrapsSet: boolean; internalValue?: StorageBackupRule[] | cdktf.IResolvable; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string, wrapsSet: boolean); /** * @param index the index of the item to return */ get(index: number): StorageBackupRuleOutputReference; } export interface StorageClone { /** * The unique identifier of the storage/template to clone. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.32.0/docs/resources/storage#id Storage#id} * * Please be aware that the id field is automatically added to all resources in Terraform providers using a Terraform provider SDK version below 2. * If you experience problems setting this value it might not be settable. Please take a look at the provider documentation to ensure it should be settable. */ readonly id: string; } export declare function storageCloneToTerraform(struct?: StorageClone | cdktf.IResolvable): any; export declare function storageCloneToHclTerraform(struct?: StorageClone | cdktf.IResolvable): any; export declare class StorageCloneOutputReference extends cdktf.ComplexObject { private isEmptyObject; private resolvableValue?; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param complexObjectIndex the index of this item in the list * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string, complexObjectIndex: number, complexObjectIsFromSet: boolean); get internalValue(): StorageClone | cdktf.IResolvable | undefined; set internalValue(value: StorageClone | cdktf.IResolvable | undefined); private _id?; get id(): string; set id(value: string); get idInput(): string | undefined; } export declare class StorageCloneList extends cdktf.ComplexList { protected terraformResource: cdktf.IInterpolatingParent; protected terraformAttribute: string; protected wrapsSet: boolean; internalValue?: StorageClone[] | cdktf.IResolvable; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string, wrapsSet: boolean); /** * @param index the index of the item to return */ get(index: number): StorageCloneOutputReference; } export interface StorageImport { /** * The mode of the import task. One of `http_import` or `direct_upload`. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.32.0/docs/resources/storage#source Storage#source} */ readonly source: string; /** * SHA256 hash of the source content. This hash is used to verify the integrity of the imported data by comparing it to `sha256sum` after the import has completed. Possible filename is automatically removed from the hash before comparison. * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.32.0/docs/resources/storage#source_hash Storage#source_hash} */ readonly sourceHash?: string; /** * The location of the file to import. For `http_import` an accessible URL. For `direct_upload` a local file. When direct uploading a compressed image, `Content-Type` header of the PUT request is set automatically based on the file extension (`.gz` or `.xz`, case-insensitive). * * Docs at Terraform Registry: {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.32.0/docs/resources/storage#source_location Storage#source_location} */ readonly sourceLocation: string; } export declare function storageImportToTerraform(struct?: StorageImport | cdktf.IResolvable): any; export declare function storageImportToHclTerraform(struct?: StorageImport | cdktf.IResolvable): any; export declare class StorageImportOutputReference extends cdktf.ComplexObject { private isEmptyObject; private resolvableValue?; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param complexObjectIndex the index of this item in the list * @param complexObjectIsFromSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string, complexObjectIndex: number, complexObjectIsFromSet: boolean); get internalValue(): StorageImport | cdktf.IResolvable | undefined; set internalValue(value: StorageImport | cdktf.IResolvable | undefined); get sha256Sum(): string; private _source?; get source(): string; set source(value: string); get sourceInput(): string | undefined; private _sourceHash?; get sourceHash(): string; set sourceHash(value: string); resetSourceHash(): void; get sourceHashInput(): string | undefined; private _sourceLocation?; get sourceLocation(): string; set sourceLocation(value: string); get sourceLocationInput(): string | undefined; get writtenBytes(): number; } export declare class StorageImportList extends cdktf.ComplexList { protected terraformResource: cdktf.IInterpolatingParent; protected terraformAttribute: string; protected wrapsSet: boolean; internalValue?: StorageImport[] | cdktf.IResolvable; /** * @param terraformResource The parent resource * @param terraformAttribute The attribute on the parent resource this class is referencing * @param wrapsSet whether the list is wrapping a set (will add tolist() to be able to access an item via an index) */ constructor(terraformResource: cdktf.IInterpolatingParent, terraformAttribute: string, wrapsSet: boolean); /** * @param index the index of the item to return */ get(index: number): StorageImportOutputReference; } /** * Represents a {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.32.0/docs/resources/storage upcloud_storage} */ export declare class Storage extends cdktf.TerraformResource { static readonly tfResourceType = "upcloud_storage"; /** * Generates CDKTF code for importing a Storage resource upon running "cdktf plan <stack-name>" * @param scope The scope in which to define this construct * @param importToId The construct id used in the generated config for the Storage to import * @param importFromId The id of the existing Storage that should be imported. Refer to the {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.32.0/docs/resources/storage#import import section} in the documentation of this resource for the id to use * @param provider? Optional instance of the provider where the Storage to import is found */ static generateConfigForImport(scope: Construct, importToId: string, importFromId: string, provider?: cdktf.TerraformProvider): cdktf.ImportableResource; /** * Create a new {@link https://registry.terraform.io/providers/upcloudltd/upcloud/5.32.0/docs/resources/storage upcloud_storage} Resource * * @param scope The scope in which to define this construct * @param id The scoped construct ID. Must be unique amongst siblings in the same scope * @param options StorageConfig */ constructor(scope: Construct, id: string, config: StorageConfig); private _deleteAutoresizeBackup?; get deleteAutoresizeBackup(): boolean | cdktf.IResolvable; set deleteAutoresizeBackup(value: boolean | cdktf.IResolvable); resetDeleteAutoresizeBackup(): void; get deleteAutoresizeBackupInput(): boolean | cdktf.IResolvable | undefined; private _encrypt?; get encrypt(): boolean | cdktf.IResolvable; set encrypt(value: boolean | cdktf.IResolvable); resetEncrypt(): void; get encryptInput(): boolean | cdktf.IResolvable | undefined; private _filesystemAutoresize?; get filesystemAutoresize(): boolean | cdktf.IResolvable; set filesystemAutoresize(value: boolean | cdktf.IResolvable); resetFilesystemAutoresize(): void; get filesystemAutoresizeInput(): boolean | cdktf.IResolvable | undefined; get id(): string; private _labels?; get labels(): { [key: string]: string; }; set labels(value: { [key: string]: string; }); resetLabels(): void; get labelsInput(): { [key: string]: string; } | undefined; private _size?; get size(): number; set size(value: number); get sizeInput(): number | undefined; private _systemLabels; get systemLabels(): cdktf.StringMap; private _tier?; get tier(): string; set tier(value: string); resetTier(): void; get tierInput(): string | undefined; private _title?; get title(): string; set title(value: string); get titleInput(): string | undefined; get type(): string; private _zone?; get zone(): string; set zone(value: string); get zoneInput(): string | undefined; private _backupRule; get backupRule(): StorageBackupRuleList; putBackupRule(value: StorageBackupRule[] | cdktf.IResolvable): void; resetBackupRule(): void; get backupRuleInput(): cdktf.IResolvable | StorageBackupRule[] | undefined; private _clone; get clone(): StorageCloneList; putClone(value: StorageClone[] | cdktf.IResolvable): void; resetClone(): void; get cloneInput(): cdktf.IResolvable | StorageClone[] | undefined; private _import; get import(): StorageImportList; putImport(value: StorageImport[] | cdktf.IResolvable): void; resetImport(): void; get importInput(): cdktf.IResolvable | StorageImport[] | undefined; protected synthesizeAttributes(): { [name: string]: any; }; protected synthesizeHclAttributes(): { [name: string]: any; }; }