terraform-generator
Version:
Generate Terraform configurations with Node.js.
48 lines (47 loc) • 1.21 kB
TypeScript
import { TerraformElement } from '../utils';
/**
* @category Argument
*/
export declare class Argument<T extends string = string> extends TerraformElement {
#private;
/**
* Construct argument.
*
* @param arg argument as string
*/
constructor(arg: T);
/**
* Get argument's attribute.
*
* @param name attribute name
*/
attr(name: string): Argument;
/**
* Get list argument's element.
*
* @param idx element index
*/
element(idx: number): Argument;
/**
* To Terraform representation.
*
* Use this method when argument is used as an interpolation in another Terraform argument or code.
*/
toTerraform(): string;
/**
* To string.
*
* Use this method when argument is used as an interpolation in a Terraform string or heredoc.
*
* It is automatically called when argument is used in template literal.
*/
toString(): string;
}
/**
* Convenient function to construct new [[Argument]].
*
* @param arg argument as string or copy from another argument object
*
* @category Argument
*/
export declare const arg: <T extends string = string>(arg: T) => Argument<T>;