@innovationnorway/terraform-config
TypeScript icon, indicating that this package has built-in type declarations

0.1.0-alpha.1 • Public • Published

@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)

Readme

Keywords

Package Sidebar

Install

npm i @innovationnorway/terraform-config

Weekly Downloads

1

Version

0.1.0-alpha.1

License

MIT

Unpacked Size

3.9 MB

Total Files

4

Last publish

Collaborators

  • joakimhellum-in