Skip to content

eliasjcjunior/custom-terraform-provider

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terraform Provider Json Server

Custom plugin created on article: Creating the first terraform custom provider

Requirements

Running server

  • Install the json-server to running a easily and fast server.
    $ npm i -g json-server
  • On project root create a db.json file to initialize the server, with the following content:
    {
      "users": []
    }
    
  • Run the server
    $ json-server --watch db.json
    

Build provider

  • Run the following command to build the provider on folder terraform-provider-jsonserver
    $ go build -o terraform-provider-jsonserver
    
  • Run Makefile to install provider
    $ make install
    

Running example

  • On root folder run terraform with example configuration
    $ terraform init && terraform plan
    

About

Custom terraform provider example with local node.js server

Topics

Resources

Stars

Watchers

Forks