astronomer/terraform-provider-astro

Add terraform import script

Closed this issue · 1 comments

Description

Create a bash/python script that will enable companies to migrate all of their resources to be managed by terraform. The script will read from existing resources (by listing all orgs, deployments, clusters, etc) and then correctly import them into terraform

Open Questions

Will some users want to only use terraform for some but not all resources if so can we make the script flexible for this?

Acceptance Criteria

No response

Anything else?

No response

The output file should include the import command as well as the configuration that matches what is in core API/cloud UI
for example, if we are importing a workspace, we should have something like this

import {
  id = "<your-workspace-ID>" // ID of the existing deployment
  to = astro_workspace.workspace_name
}
// The new resource configuration.
resource "astro_workspace" "workspace_name" {
  name                    = "workspace name" // same as the actual workspace in cloud UI
  description             = "an existing workspace" // same as the actual workspace in cloud UI
  cicd_enforced_default = true // same as the actual workspace in cloud UI
}