terraform-generator
Version:
Generate Terraform configurations with Node.js.
31 lines (30 loc) • 773 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Backend = void 0;
const arguments_1 = require("../arguments");
const utils_1 = require("../utils");
const _1 = require(".");
/**
* @category Block
*/
class Backend extends _1.Block {
/**
* Construct backend.
*
* Refer to Terraform documentation on what can be put as type & arguments.
*
* @param type type
* @param args arguments
*/
constructor(type, args) {
super('backend', [type], args, undefined, true);
this.type = type;
}
asArgument() {
return new arguments_1.Argument(JSON.stringify(this.type));
}
attr(_name) {
throw utils_1.Util.inaccessibleMethod();
}
}
exports.Backend = Backend;