Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
cdktf-import
Advanced tools
A CLI for importing terraform resources using CDKTF. Terraform can import existing infrastructure resources. This functionality lets you bring existing resources under Terraform management. We want to bring the same experience to CDKTF. This CLI is based
A CLI for importing terraform resources using CDKTF. Terraform can import existing infrastructure resources. This functionality lets you bring existing resources under Terraform management. We want to bring the same experience to CDKTF. This CLI is based on the solution that comes from this comment on this Github issue.
npm i cdktf-import -g
cdktf-import <Resource_Name>.<Unique_ID> <Import_ID>
Assume resources exist, write the approximate cdktf code.
Change directory using this path cd cdktf.out/stacks/<stack>
.
Check Unique_ID
in cdk.tf.json
, as shown below:
"resource": {
"<Resource_Name>": {
"<Unique_ID>": {
"//": {
"metadata": {
"path": "<Path>",
"uniqueId": "<Unique_ID>"
}
},
},
},
},
Initialize project by running command terraform init
.
Import resources using the values from the step 3 terraform import <Resource_Name>.<Unique_ID> <ID>
.
Change directory to cwd
.
Run cdktf diff <stack>
.
BIG THANKS to Xing Yahao for providing the solution.
CDKTF Import is distributed under the MIT License. Feel free to use, modify, and distribute this library in your projects.
FAQs
A CLI for importing terraform resources using CDKTF. Terraform can import existing infrastructure resources. This functionality lets you bring existing resources under Terraform management. We want to bring the same experience to CDKTF. This CLI is based
The npm package cdktf-import receives a total of 1 weekly downloads. As such, cdktf-import popularity was classified as not popular.
We found that cdktf-import demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.