env0 / env0-migration-tool

A repository that contains the necessary files in order to import existing Terraform workspaces from other platforms
1 stars 2 forks source link

Feature: extract data from tfc #1

Closed sagilaufer1992 closed 9 months ago

sagilaufer1992 commented 9 months ago

First step - make the TFC data organized in a JSON file so we can use it for creating TF configurations

example of generated data:

{
  "workspaces": [
    {
      "env_vars": [],
      "labels": [],
      "name": "static-website",
      "project_name": "Default Project",
      "terraform_version": "1.2.2",
      "vcs": {
        "account": "",
        "branch": "",
        "project_root": "src",
        "repository": ""
      }
    },
    {
      "env_vars": [],
      "labels": [],
      "name": "templates",
      "project_name": "prj-mGMp6cfyycqzCm3B",
      "terraform_version": "1.6.5",
      "vcs": {
        "account": "sagilaufer1992",
        "branch": "",
        "project_root": "",
        "repository": "templates"
      }
    }
  ]
}
avnerenv0 commented 9 months ago

also would be cool to see an example of this running, so maybe you can just include an output data.json in the PR

sagilaufer1992 commented 9 months ago

Get TFC data