{"id":28221306,"url":"https://github.com/rssnyder/drone-plugin-cdktf-ts","last_synced_at":"2025-07-01T04:07:06.526Z","repository":{"id":292369688,"uuid":"980688609","full_name":"rssnyder/drone-plugin-cdktf-ts","owner":"rssnyder","description":"drone plugin to run cdktf for typescript","archived":false,"fork":false,"pushed_at":"2025-05-09T19:05:26.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-10T11:41:29.954Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rssnyder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-09T14:42:15.000Z","updated_at":"2025-05-09T19:05:29.000Z","dependencies_parsed_at":"2025-05-09T15:47:07.373Z","dependency_job_id":"c1e2bb94-1f79-41d4-b911-ade4885f6552","html_url":"https://github.com/rssnyder/drone-plugin-cdktf-ts","commit_stats":null,"previous_names":["rssnyder/drone-plugin-cdktf-ts"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rssnyder/drone-plugin-cdktf-ts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rssnyder%2Fdrone-plugin-cdktf-ts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rssnyder%2Fdrone-plugin-cdktf-ts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rssnyder%2Fdrone-plugin-cdktf-ts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rssnyder%2Fdrone-plugin-cdktf-ts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rssnyder","download_url":"https://codeload.github.com/rssnyder/drone-plugin-cdktf-ts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rssnyder%2Fdrone-plugin-cdktf-ts/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262893641,"owners_count":23380710,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-18T05:16:31.679Z","updated_at":"2025-07-01T04:07:06.515Z","avatar_url":"https://github.com/rssnyder.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# drone-plugin-hcltf\n\na drone plugin to execute cdktf within a harness pipeline\n\nimages are tagged with `node\u003cversion\u003e-tofu\u003cversion\u003e-cdktf\u003cversion\u003e` and you can browse published versions on [dockerhub](https://hub.docker.com/r/harnesscommunity/drone-plugin-cdktf-ts/tags)\n\n## Options\n\n`PLUGIN_CODE_DIR`: directory in your repo where the CDKTF code is located\n\n`PLUGIN_APP`: CDKTF app to synth\n\n`PLUGIN_OUTPUT_DIR` (optional): directory to store resulting TF code\n\n`PLUGIN_NPM_INSTALL_OPTIONS` (optional): additional flags to pass to `npm i` command\n\n`PLUGIN_HCL` (optional): if set, generate output in HCL instead of JSON (default)\n\n## preperation\n\nthis plugin uses opentofu, as such to work with cdktf you will need to set the providers in your `cdktf.json` to reference the opentofu registry:\n\nfor the aws provider:\n```\n  \"terraformProviders\": [\n    \"registry.opentofu.org/hashicorp/aws@5.33.0\"\n  ],\n```\n\n## usage\n\nin an iacm pipeline, this plugin **must** be used before any tofu steps, as they all need the tf code to exist locally:\n\n```\n- step:\n    type: Plugin\n    name: cdktf\n    identifier: cdktf\n    spec:\n      connectorRef: account.harnessImage\n      image: harnesscommunity/drone-plugin-cdktf-ts\n      settings:\n          CODE_DIR: \u003c+workspace.envVars.CDKTF_DIR\u003e\n          APP: \u003c+workspace.envVars.CDKTF_APP\u003e\n          OUTPUT_DIR: /harness/\u003c+workspace.folderPath.split(\"/stacks\")[0]\u003e\n```\n\nwhere you will need to set `CDKTF_DIR` and an environment variable in your workspace to be the relitive location of your CDKTF code in your repo, and `CDKTF_APP` is set to the name of the app you want to synthisize for your pipeline.\n\n![image](https://github.com/user-attachments/assets/408726f2-7ee7-4533-ba24-90130f95cb76)\n\nthe `folderPath` on your workspace should be set and end in `stacks/\u003capp name\u003e` to follow the standard output scheme of CDKTF.\n\n![image](https://github.com/user-attachments/assets/f69a1e32-b525-44e2-87d9-74954ae0c1d4)\n\n## testing\n\nfrom the location of your cdftf code:\n\n```\nrm -rf .gen cdktf.out node_modules;\ndocker run -v ${PWD}:/harness -e PLUGIN_CODE_DIR=/harness -e PLUGIN_APP=app -it drone-plugin-cdktf-ts\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frssnyder%2Fdrone-plugin-cdktf-ts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frssnyder%2Fdrone-plugin-cdktf-ts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frssnyder%2Fdrone-plugin-cdktf-ts/lists"}