Skip to content

Latest commit

 

History

History
38 lines (35 loc) · 1.12 KB

README.md

File metadata and controls

38 lines (35 loc) · 1.12 KB

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