Closed obaddour-tiger closed 5 months ago
Hi @obaddour-tiger !
When importing the environment, are you using this syntax? terraform import dbtcloud_environment.prod_environment "project_id:environment_id"
, with the :
between the project id and the environment id?
The error suggests that the ID doesn't have a :
in it.
I would also recommend upgrading to the latest version of the provider, there have been quite a few fixes and enhanced logging since 0.2.2
Hi @b-per
That did the trick, thank you! I only had the project_id
. Ahhh I'm just seeing now that this is documented at https://registry.terraform.io/providers/dbt-labs/dbtcloud/latest/docs/resources/environment#import... apologies.
Thanks for the tip, will upgrade versions.
Describe the bug
I have solely worked with DBT Cloud via the web UI. I am now migrating our resources to a terraform representation. I was able to
terraform import
our DBT Cloud project. However, when trying to import one of our environments, the terraform-provider-dbtcloud_v0.2.2 plugin crashes.Error message
When running command
$ terraform import dbtcloud_environment.prod_environment <redacted>
:Resource configuration
main.tf
:variables.tf
exists withdbt_account_id
anddbt_host_url
appropriately.Expected behavior
An update to terraform state, which means that
terraform plan
results inNo changes
Config:
Additional context
Not sure if there already exists a DBT Cloud project import script that enumerates all DBT Cloud resources, populates the terraform state file, and generates the terraform code, but that would be swell!