---
type: archive
area: archive
status: archived
date: 2026-05-03
created: 2026-05-03
updated: 1980-01-01
tags:
  - archive
---
When a resource fail is marked as tainted
To force a particular resource to be created we can use taint

```
terraform taint <resource name>
```

#### Debugging
By using env variables 
```
export TF_LOG=TRASE <log level>
```
- Log levels
![[img-20240920-214358-81c0f078.png]]
- Record logs on a path
``` bash
export TF_LOG_PATH= SOME PATH
```
#### Terraform Import
Bring resources created outside terraform to terraform

```
terraform import <resource_type>.<resource_name> <attribute>
```
it only update the state file we have to manually write the configuration for it
for example :
![[img-20240920-221238-eaf15cf2.png]]
Importing resources without creating bloc in config files
![[img-20240920-221352-80fb4c37.png]]
Add block to configuration file empty
![[img-20240920-221511-db21f0f0.png]]
To define arguments we can inspects resources attributes from state file
after this any changes to this resource will be managed by terraform
