❓Request

Post /api/v1/terraform/usertf

curl -i -H 'Accept: application/json' <http://localhost:3000/v1/terraform/usertf>

[{"id":"0","type":"vpc","data":{"name":"example-vpc","cidr":"10.0.0.0/16","publicsubnet":2,"privatesubnet":2,"azs":["us-east-1a","us-east-1c"],"nat_gateway":true}},
{"id":"1","type":"privatesubnet","parent":"5","data":{}},
{"id":"2","type":"privatesubnet","parent":"5","data":{}},
{"id":"3","type":"publicsubnet","parent":"6","data":{}},
{"id":"4","type":"publicsubnet","parent":"6","data":{}},
{"id":"5","type":"asg","parent":"0","data":{"min_size":1,"max_size":3,"desired_capacity":2,"image_id":"ami-0ab38cce86671f3f0","instance_type":"t2.nano","user_data":"echo \\"test\\""}},
{"id":"6","type":"alb","parent":"0","data":{}}]
//json type 
type Resource struct {
	Id     string                 `json:"id"`
	Type   string                 `json:"type"`
	Parent string                 `json:"parent"`
	Data   map[string]interface{} `json:"data"`
}

❗️Response

{
	statusCode: 200,
	data: {
		"error": false,
		"msg": "Successful creation of the user's tf files environment",
	}
}