简体   繁体   中英

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}}

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM