@innovationnorway/terraform-config
v0.1.0-alpha.1
Published
terraform-config lib
Downloads
5
Readme
@innovationnorway/terraform-config
Note: work in progress — highly subject to change
Usage
import * as tfconfig from '@innovationnorway/terraform-config'
const fileName = 'example.tf'
const src = `
terraform {
required_version = ">= 0.12.7"
required_providers {
random = ">= 2.2.0"
}
}
variable "name_prefix" {
type = string
description = "Creates a unique name beginning with the specified prefix."
}
resource "random_id" "test" {
keepers = {
# Generate a new id each time we change the name prefix
name_prefix = var.name_prefix
}
byte_length = 4
}
`
const file = tfconfig.parse(fileName, src)
console.log(file)