crossplane / terrajet

Generate Crossplane Providers from any Terraform Provider
https://crossplane.io
Apache License 2.0
289 stars 38 forks source link

Custom Terraform Provider Source #272

Closed fhopfensperger closed 2 years ago

fhopfensperger commented 2 years ago

Terrajet does not currently support custom providers that use a different HOSTNAME and NAMESPACE than hashicorp.

What happened?

If we develop a custom Terraform provider like

# main.tf
terraform {
  required_providers {
    myprov = {
      source = "mycompany.io/namespace/myprov"
      version = "0.1.0"
    }
  }
}

The current implementation of Terrajet would create the following main.tf.json file in the workspace

    "terraform": {
        "required_providers": {
            "namespace": {
                "source": "mycompany.io/namespace/myprov",
                "version": "0.1.0"
            }
        }
    }

which fails because the wrong provider name is used.

How can we reproduce it?