Introduction
This document covers both Integrated Edge Cloud(IEC) Type 1 & 2.
Upload Terraform template to gopaddle repository
POST /api/{accountID}/v1/{projectID}/terraform/upload { "fileName":"terraform", "fileContent" : <Content in []bytes> } Response: { "message": "Uploading terraform template", "requestID": "a9fbd75c-8b17-4523-b024-81be7d860ca2", "activityID": "act2a53ed2de3e3de4ffbe8183e3f652bd7eefc", "templateID": "tmp3a2c220ae6d30e482beab5ce9a6f242d434d" }
Get an uploaded template from gopaddle
GET /api/{accountID}/v1/{projectID}/terraform/{templateID} Response: { "id":"tmp8a2b4bc5e00b4e458aeb12ce36b9b6b9ccf1", "templateGraph":<base64 string>, "project":"", "fileName":"sample", "createdTime":"2021-05-14 03:21:19.399387876 +0000 UTC", "dependencyRef":[ ], "owner":{ "id":"1" } }
Retrieve the key file associated with a template from gopaddle
GET /api/{accountID}/v1/{projectID}/terraform/{templateID}/keyFile Response: { "keyFile": { "variable": [ { "aws_region": [ { "default": "us-east-2", "description": "aws_region" } ] }, { "aws_instance": [ { "default": "t2.small", "description": "instance_type" } ] }, { "aws_ami": [ { "default": "ami-0b9064170e32bde34", "description": "aws_ami" } ] }, { "access_key": [ { "default": "<access_key>", "description": "access_key" } ] }, { "secret_key": [ { "default": "<secret_key>", "description": "secret_key" } ] }, { "aws_subnet_id": [ { "default": "subnet-d64dcabe", "description": "subnet_id" } ] }, { "key_name": [ { "default": "terraform", "description": "key_name" } ] }, { "vpc_id": [ { "default": "vpc-561e9f3e", "description": "vpc_id" } ] } ] }, "files": [ { "fileContent": "<base64Encoded_filecontent>", "name": "terraform.pem" }, { "fileContent": "<base64Encoded_filecontent>", "name": "token" } ] }
List all the uploaded templates from gopaddle
GET /api/{accountID}/v1/{ProjectID}/terraform Response: { "paginationCount": 1, "templates": [ { "id": "tmp8a2b4bc5e00b4e458aeb12ce36b9b6b9ccf1", "templateGraph": <base64 string> "name": "", "project": "", "fileName": "sample", "createdTime": "2021-05-13 08:28:10.584356353 +0000 UTC", "dependencyRef": [], "owner": { "id": "1" } } ], "count": 1, "requestID": "b3948ae9-e42e-4446-8946-a66ba42f29ee" }
Launch a template from gopaddle
POST /api/{accountID}/v1/{ProjectID}/terraform/{templateID}/launch { "files":{ "keyFile":<keyFileContent>, "files":[ { "fileContent":<base64Encoded_filecontent>, "name":"terraform.pem" }, { "fileContent":<base64Encoded_filecontent>, "name":"token" } ] } } Response: { "message": "Template launch triggered", "templateID": "tmp6a431367ea6eae4218eb3ffeb39179a745f2" }
Get all activities associated with a launch operation from gopaddle
GET /api/{accountID}/v1/{ProjectID}/terraform/{templateID}/activity Response: { "Activities": [ { "templateID": "tmp0a2bc500eecb6e48cdea4dce81aa874d59e8", "id": "actcac0d817e00f8e49a5e9e22ed20b0adceab4", "operation": "terraform", "summaries": [ { "state": "Running", "description": "Validating terraform file", "eventName": "TERRAFORM_INIT", "timestamp": "2021-05-28 06:08:43.691868604 +0000 UTC", "level": "Info" }, { "state": "Running", "description": "Creating the terraform template", "eventName": "TERRAFORM_INIT", "timestamp": "2021-05-28 06:08:43.872481208 +0000 UTC", "level": "Info" }, { "state": "Running", "description": "terraform plan executed.", "eventName": "TERRAFORM_INIT", "timestamp": "2021-05-28 06:10:12.917442967 +0000 UTC", "level": "Info" }, { "state": "Running", "description": "created the terraform grpah.png", "eventName": "TERRAFORM_GRAPH", "timestamp": "2021-05-28 06:10:16.075130017 +0000 UTC", "level": "Info" }, { "state": "Running", "description": "uploaded the terraform template", "eventName": "TERRAFORM_INIT", "timestamp": "2021-05-28 06:10:16.621650279 +0000 UTC", "level": "Info" } ], "operationType": "TERRAFORM_INIT", "status": "Running", "updatedTime": "2021-05-28 06:08:43.466032275 +0000 UTC" } ], "paginationCount": 1, "count": 1, "requestID": "51624d1e-fe68-4949-9c1a-d9a1f3cf7046" }
Get details of a specific activity from gopaddle
GET /api/{accountID}/v1/{ProjectID}/terraform/{templateID}/activity/{activityID} Response: { "accountID": "1a56b4adge67fg4622ga052g93280b35c5ee", "id": "actcac0d817e00f8e49a5e9e22ed20b0adceab4", "templateID": "tmp0a2bc500eecb6e48cdea4dce81aa874d59e8", "operationType": "TERRAFORM_INIT", "operation": "terraform", "status": "Running", "updatedTime": "2021-05-28 06:08:43.466032275 +0000 UTC", "summaries": [ { "level": "Info", "state": "Running", "eventName": "TERRAFORM_INIT", "description": "Validating terraform file", "timeStamp": "2021-05-28 06:08:43.691868604 +0000 UTC" }, { "level": "Info", "state": "Running", "eventName": "TERRAFORM_INIT", "description": "Creating the terraform template", "timeStamp": "2021-05-28 06:08:43.872481208 +0000 UTC" }, { "level": "Info", "state": "Running", "eventName": "TERRAFORM_INIT", "description": "terraform plan executed.", "timeStamp": "2021-05-28 06:10:12.917442967 +0000 UTC" }, { "level": "Info", "state": "Running", "eventName": "TERRAFORM_GRAPH", "description": "created the terraform grpah.png", "timeStamp": "2021-05-28 06:10:16.075130017 +0000 UTC" }, { "level": "Info", "state": "Running", "eventName": "TERRAFORM_INIT", "description": "uploaded the terraform template", "timeStamp": "2021-05-28 06:10:16.621650279 +0000 UTC" } ] }
Get the status of the cluster launch in gopaddle
GET /api/{accountID}/v1/{ProjectID}/terraform/{templateID}/status Response: { "status": "Running" }
Delete a template from gopaddle
DELETE /api/{accountID}/v1/{projectID}/terraform/{templateID} Response: { "message": "Template tmp8a2b4bc5e00b4e458aeb12ce36b9b6b9ccf1 deleted successfully" }