{"id":36441491,"url":"https://github.com/tatomoaki/tfconfigbuilder","last_synced_at":"2026-01-11T21:58:42.030Z","repository":{"id":208055738,"uuid":"719683687","full_name":"tatomoaki/tfconfigbuilder","owner":"tatomoaki","description":"Parse and convert draw.io xml files into Terraform configuration file","archived":false,"fork":false,"pushed_at":"2023-11-19T12:03:21.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-12T21:40:28.373Z","etag":null,"topics":["drawio","terraform","xml"],"latest_commit_sha":null,"homepage":"","language":"Go","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/tatomoaki.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}},"created_at":"2023-11-16T17:27:50.000Z","updated_at":"2023-11-19T12:06:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"d21aaa13-a250-4deb-a7f4-f5b7885a59ee","html_url":"https://github.com/tatomoaki/tfconfigbuilder","commit_stats":null,"previous_names":["tatomoaki/tfconfigbuilder"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tatomoaki/tfconfigbuilder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tatomoaki%2Ftfconfigbuilder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tatomoaki%2Ftfconfigbuilder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tatomoaki%2Ftfconfigbuilder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tatomoaki%2Ftfconfigbuilder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tatomoaki","download_url":"https://codeload.github.com/tatomoaki/tfconfigbuilder/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tatomoaki%2Ftfconfigbuilder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28324678,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T18:42:50.174Z","status":"ssl_error","status_checked_at":"2026-01-11T18:39:13.842Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["drawio","terraform","xml"],"created_at":"2026-01-11T21:58:41.442Z","updated_at":"2026-01-11T21:58:42.020Z","avatar_url":"https://github.com/tatomoaki.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tfconfigbuilder\n\ntfconfigbuilder is a Proof of Concept command-line tool that parses and converts an infrastructure diagram drawn in [draw.io](https://www.drawio.com/) and exported as an xml file into a terraform configuration file. Support is only for infrastructure mappings targeted at AWS resources. \n\n![Tool Overview](assets/tfconfigbuilder.drawio.png)\n\n\u003e Note, this project is WIP and still experimental. No guarantees are provided.\n\n## Getting Started\nThese instructions will get you a copy of the project on your local machine for development and testing purposes.\nBefore you begin, ensure you have the following installed:\n\n* Go (~ 1.20)\n* Terraform \n\n### Installing \nTo get stated with `tfconfigbuilder`:\n\n```bash\ngit clone https://github.com/tatomoaki/tfconfigbuilder.git\ncd tfconfigbuilder\ngo build -o tfconfigbuilder\n```\n\n\n### Usage \nTo generate a HCL file using `tfconfigbuilder`:\n\n1. Draw your AWS infrastructure in [draw.io](https://www.drawio.com/).\n2. Export file as an uncompressed XML File. (File -\u003e Export as -\u003e XML -\u003e Export -\u003e Save to filesystem)\n3. Run `tfconfigbuilder` tool with command below.\n\n```bash\n./tfconfigbuilder gen --file path/to/your/draw.io.xml\n```\n\nAssuming you have an XML file with this content below: \n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003cmxfile host=\"app.diagrams.net\" type=\"google\"\u003e\n  \u003cdiagram name=\"Page-1\" id=\"sYZNLJ5LxPdhcUlApB4R\"\u003e\n    \u003cmxGraphModel dx=\"1434\" dy=\"711\" grid=\"1\" gridSize=\"10\" guides=\"1\" tooltips=\"1\" connect=\"1\" arrows=\"1\" fold=\"1\" page=\"1\" pageScale=\"1\" pageWidth=\"827\" pageHeight=\"1169\" math=\"0\" shadow=\"0\"\u003e\n      \u003croot\u003e\n        \u003cmxCell id=\"0\" /\u003e\n        \u003cmxCell id=\"1\" parent=\"0\" /\u003e\n        \u003cmxCell id=\"LDINxFX0i1uucx2FuAdr-1\" value=\"\" style=\"outlineConnect=0;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;shape=mxgraph.aws3.ec2;fillColor=#F58534;gradientColor=none;\" vertex=\"1\" parent=\"1\"\u003e\n          \u003cmxGeometry x=\"150\" y=\"240\" width=\"76.5\" height=\"93\" as=\"geometry\" /\u003e\n        \u003c/mxCell\u003e\n      \u003c/root\u003e\n    \u003c/mxGraphModel\u003e\n  \u003c/diagram\u003e\n\u003c/mxfile\u003e\n```\n`tfconfigbuilder` will convert above XML content into this Terraform configuration file\n\n```terraform\nterraform {\n  required_providers {\n    aws = {\n      source  = \"hashicorp/aws\"\n      version = \"~\u003e 5.0\"\n    }\n  }\n}\n\nprovider \"aws\" {\n  region = \"af-south-1\"\n}\n\nresource \"aws_instance\" \"this\" {\n  instance_type = \"t2.micro\"\n}\n```\n\n### Testing\nTo run tests, use the following command\n```bash\ngo test ./... -coverage=coverage.out\n```\nThis will generate a coverage report, which can be viewed by running\n\n```bash\ngo tool cover -html=coverage.out\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftatomoaki%2Ftfconfigbuilder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftatomoaki%2Ftfconfigbuilder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftatomoaki%2Ftfconfigbuilder/lists"}