Skip to content

Instantly share code, notes, and snippets.

View celliott's full-sized avatar

chris elliott celliott

  • Chris Elliott
  • portland, or
View GitHub Profile

terraformModules from cdktf.json

  "terraformModules": [
    {
      "name": "aws-vpc",
      "source": "git@github.com:mycompany/tf-aws-vpc?ref=v1.0.0"
    },
    {
 "name": "aws-rds",
@celliott
celliott / gist:9ee102bbc4839ab3294ded957abb29f6
Created March 12, 2021 19:22
module variables without type import error
$ cdktf get
TypeError: Cannot read property 'match' of undefined
at transformVariables (/usr/local/lib/node_modules/cdktf-cli/lib/get/generator/provider-schema.js:43:46)
at harvestModuleSchema (/usr/local/lib/node_modules/cdktf-cli/lib/get/generator/provider-schema.js:89:21)
at processTicksAndRejections (node:internal/process/task_queues:94:5)
at async /usr/local/lib/node_modules/cdktf-cli/lib/get/generator/provider-schema.js:133:28
at async Object.withTempDir (/usr/local/lib/node_modules/cdktf-cli/lib/util.js:41:9)
at async Object.readSchema (/usr/local/lib/node_modules/cdktf-cli/lib/get/generator/provider-schema.js:124:5)
at async ConstructsMaker.generateTypeScript (/usr/local/lib/node_modules/cdktf-cli/lib/get/constructs-maker.js:160:24)
at async ConstructsMaker.generate (/usr/local/lib/node_modules/cdktf-cli/lib/get/constructs-maker.js:174:9)
$ cdktf get
Error: parse config: [hcl2json.tf:259,2-10: Missing newline after block definition; A block definition must end with a newline.]
at cb (/usr/local/lib/node_modules/cdktf-cli/node_modules/@cdktf/hcl2json/lib/index.js:48:63)
at syscall/js.valueInvoke (/usr/local/lib/node_modules/cdktf-cli/node_modules/@cdktf/hcl2json/lib/wasm_exec.js:190:48)
at <anonymous>:wasm-function[1489]:0x1517da
at <anonymous>:wasm-function[1472]:0x14fa33
at <anonymous>:wasm-function[3109]:0x3f0f9a
at <anonymous>:wasm-function[977]:0xd73a3
at resume (<anonymous>:wasm-function[976]:0xd7384)
at Go._resume (/usr/local/lib/node_modules/cdktf-cli/node_modules/@cdktf/hcl2json/lib/wasm_exec.js:276:36)

dev env setup

NOTES 
- this was built on a fresh Mavericks install b/c i had a Mavericks image handy
- not tested on Yosemite
- there are a few manual steps. they are documented

####run setup

try
[ method, args... ] = JSON.parse message.data.toString()
catch e
console.log "not json #{message.data}"
# attempt to pass the data to a wildcard handler so we can interpret
$["*"].apply $, [ message.data ] if message.data?
return
@celliott
celliott / gist:4d43ebe01ac6adb1e3c0
Created November 17, 2014 18:00
apstrata_device_id_and_token
// These values are the device id, and device token provisioned
// with the Apstrata device management api which you can discover
// in your Apstrata workbench.
apstrata_device_id = 'APSTRATA_DEVICE_ID';
apstrata_token = 'APSTRATA_DEVICE_TOKEN';
@celliott
celliott / gist:361bb7a2208e1fbecec9
Last active August 29, 2015 14:09
bll_simulator_wotio_connection
// The following credentials are needed to register with the
// Apstrata device management service, and configure the wot.io
// connection associated with your device:
apstrata_api_key = 'APSTRATA_API_KEY';
apstrata_secret = 'APSTRATA_SECRET';
wot_username = 'WOTIO_USERNAME';
wot_token = 'WOTIO_TOKEN';
@celliott
celliott / gist:ae40090218b4d0ab384c
Last active August 29, 2015 14:09
bll_software_button
<container id="labeledButton" left="100" right="100" top="180" height="40" like="BUTTONS.LabeledButton">
<behavior like="BUTTONS.LabeledButtonBehavior">
<method id="onTap" params="container, message"><![CDATA[
// If the button is less than 1, then set it to 0. Othewise set it to 1
button = button < 0.9 ? 1 : 0;
// We use the global wot variable to send a message to wot.io with timestamp
wot.send([ "button", button, new Date.now() ]);
]]></method>
</behavior>
</container>
@celliott
celliott / gist:41f3c40b71f6ef95a13d
Created November 7, 2014 22:53
wotio_connection apstrata
// The following credentials are needed to register with the
// Apstrata device management service, and configure the wot.io
// connection associated with your device:
apstrata_api_key = 'PLEASE ENTER YOUR APSTRATA APP KEY/ID HERE'
apstrata_secret = 'PLEASE ENTER YOUR APSTRATA APP SECRETE HERE'
wot_username = 'PLEASE ENTER YOUR WOTIO USERNAME HERE'
wot_token = 'PLEASE ENTER YOUR WOTIO TOKEN HERE'
// instantiate a new Apstrata Device management platform interface
@celliott
celliott / gist:8ab5fc3c8bc6826122fa
Created November 7, 2014 22:40
wot connection bipio
// The following credentials are needed to register with the
// Apstrata device management service, and configure the wot.io
// connection associated with your device:
apstrata_api_key = 'PLEASE ENTER YOUR APSTRATA APP KEY/ID HERE'
apstrata_secret = 'PLEASE ENTER YOUR APSTRATA APP SECRETE HERE'
wot_username = 'PLEASE ENTER YOUR WOTIO USERNAME HERE'
wot_token = 'PLEASE ENTER YOUR WOTIO TOKEN HERE'
// instantiate a new Apstrata Device management platform interface
aps = new apstrata.Apstrata( apstrata_api_key, apstrata_secret, wot_username, wot_token,true)