Christoph
Christoph

Reputation: 21

cdktf, How to import resources from grafana (python)

I wish to import existing data sources from grafana.

The following link and its answer is not satisfactory, as the resources have been created using cdktf, albeit in an earlier run.

How can I import using cdktf similar to the following terraform cli command:

terraform import grafana_data_source.by_integer_id {{datasource id}}
terraform import grafana_data_source.by_uid {{datasource uid}}

Upvotes: 0

Views: 281

Answers (1)

Daniel Schmidt
Daniel Schmidt

Reputation: 11921

You need to use the terraform import command in your synthesized stack directory. The documentation about moving a resource from one stack to another covers how the command can be constructed.

Upvotes: 0

Related Questions