@cdktf-providers/rancher-file
Version:
Prebuilt rancher/file Provider for Terraform CDK (cdktf)
111 lines (110 loc) • 5.85 kB
TypeScript
import { Construct } from 'constructs';
import * as cdktf from 'cdktf';
export interface LocalConfig extends cdktf.TerraformMetaArguments {
/**
* File contents, required.
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/rancher/file/2.2.2/docs/resources/local#contents Local#contents}
*/
readonly contents: string;
/**
* The directory where the file will be placed, defaults to the current working directory.
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/rancher/file/2.2.2/docs/resources/local#directory Local#directory}
*/
readonly directory?: string;
/**
* A string used to generate the file identifier, you can pass this value in the environment variable `TF_FILE_HMAC_SECRET_KEY`. The provider will use a hard coded value as the secret key for unprotected files. As this is used to calculate the id of the file, it can't be updated, any change will force a recreate. Since this also protects delete operations, you will need to first remove the old resource from your configuration with the old key, then add a new resource with the new key.
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/rancher/file/2.2.2/docs/resources/local#hmac_secret_key Local#hmac_secret_key}
*/
readonly hmacSecretKey?: string;
/**
* Identifier derived from sha256+HMAC hash of file contents. When setting 'protected' to true this argument is required. However, when 'protected' is false then this should be left empty (computed by the provider).
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/rancher/file/2.2.2/docs/resources/local#id Local#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;
/**
* File name, required.
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/rancher/file/2.2.2/docs/resources/local#name Local#name}
*/
readonly name: string;
/**
* The file permissions to assign to the file, defaults to '0600'.
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/rancher/file/2.2.2/docs/resources/local#permissions Local#permissions}
*/
readonly permissions?: string;
/**
* Whether or not to fail update or create if the calculated id doesn't match the given id. When this is true, the 'id' field is required and must match what we calculate as the hash at both create and update times. If the 'id' configured doesn't match what we calculate then the provider will error rather than updating or creating the file. When setting this to true, you will need to either set the `TF_FILE_HMAC_SECRET_KEY` environment variable or set the hmac_secret_key argument.
*
* Docs at Terraform Registry: {@link https://registry.terraform.io/providers/rancher/file/2.2.2/docs/resources/local#protected Local#protected}
*/
readonly protected?: boolean | cdktf.IResolvable;
}
/**
* Represents a {@link https://registry.terraform.io/providers/rancher/file/2.2.2/docs/resources/local file_local}
*/
export declare class Local extends cdktf.TerraformResource {
static readonly tfResourceType = "file_local";
/**
* Generates CDKTF code for importing a Local 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 Local to import
* @param importFromId The id of the existing Local that should be imported. Refer to the {@link https://registry.terraform.io/providers/rancher/file/2.2.2/docs/resources/local#import import section} in the documentation of this resource for the id to use
* @param provider? Optional instance of the provider where the Local to import is found
*/
static generateConfigForImport(scope: Construct, importToId: string, importFromId: string, provider?: cdktf.TerraformProvider): any;
/**
* Create a new {@link https://registry.terraform.io/providers/rancher/file/2.2.2/docs/resources/local file_local} 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 LocalConfig
*/
constructor(scope: Construct, id: string, config: LocalConfig);
private _contents?;
get contents(): string;
set contents(value: string);
get contentsInput(): string;
private _directory?;
get directory(): string;
set directory(value: string);
resetDirectory(): void;
get directoryInput(): string;
private _hmacSecretKey?;
get hmacSecretKey(): string;
set hmacSecretKey(value: string);
resetHmacSecretKey(): void;
get hmacSecretKeyInput(): string;
private _id?;
get id(): string;
set id(value: string);
resetId(): void;
get idInput(): string;
private _name?;
get name(): string;
set name(value: string);
get nameInput(): string;
private _permissions?;
get permissions(): string;
set permissions(value: string);
resetPermissions(): void;
get permissionsInput(): string;
private _protected?;
get protected(): boolean | cdktf.IResolvable;
set protected(value: boolean | cdktf.IResolvable);
resetProtected(): void;
get protectedInput(): any;
protected synthesizeAttributes(): {
[name: string]: any;
};
protected synthesizeHclAttributes(): {
[name: string]: any;
};
}