File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -42,10 +42,13 @@ When creating new resources:
4242
4343### Running & Debugging the Provider  
4444
45+ You can run the currently checked-out code for local testing and use it with Terraform.
46+ 
4547Also see [ Terraform docs on debugging] ( https://developer.hashicorp.com/terraform/plugin/debugging#starting-a-provider-in-debug-mode ) .
4648
4749Run the provider in debug mode and reattach the provider in Terraform:
4850*  Launch ` main.go `  with the ` -debug `  flag from your IDE.
51+   *  Or launch it with ` go run main.go -debug `  from the command line.
4952*  After launching, the provider will print an env var. Copy the printed ` TF_REATTACH_PROVIDERS='{…}' `  value.
5053*  Export it in your shell where you run Terraform: ` export TF_REATTACH_PROVIDERS='{…}' ` .
5154*  Terraform will now talk to your debug instance, and you can set breakpoints.
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments