Analyze Terraform state for compliance
curl --request POST \
--url https://api.usenabla.com/v1/evidence/terraform \
--header 'Content-Type: application/json' \
--header 'X-Customer-Key: <api-key>' \
--data '
{
"name": "production-infrastructure",
"format": "json",
"content_base64": "eyJ2ZXJzaW9uIjo0LCJ0ZXJyYWZvcm1fdmVyc2lvbiI6IjEuMC4wIiwicmVzb3VyY2VzIjpbXX0=",
"include_diagram": false
}
'import requests
url = "https://api.usenabla.com/v1/evidence/terraform"
payload = {
"name": "production-infrastructure",
"format": "json",
"content_base64": "eyJ2ZXJzaW9uIjo0LCJ0ZXJyYWZvcm1fdmVyc2lvbiI6IjEuMC4wIiwicmVzb3VyY2VzIjpbXX0=",
"include_diagram": False
}
headers = {
"X-Customer-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Customer-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'production-infrastructure',
format: 'json',
content_base64: 'eyJ2ZXJzaW9uIjo0LCJ0ZXJyYWZvcm1fdmVyc2lvbiI6IjEuMC4wIiwicmVzb3VyY2VzIjpbXX0=',
include_diagram: false
})
};
fetch('https://api.usenabla.com/v1/evidence/terraform', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.usenabla.com/v1/evidence/terraform",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'production-infrastructure',
'format' => 'json',
'content_base64' => 'eyJ2ZXJzaW9uIjo0LCJ0ZXJyYWZvcm1fdmVyc2lvbiI6IjEuMC4wIiwicmVzb3VyY2VzIjpbXX0=',
'include_diagram' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Customer-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.usenabla.com/v1/evidence/terraform"
payload := strings.NewReader("{\n \"name\": \"production-infrastructure\",\n \"format\": \"json\",\n \"content_base64\": \"eyJ2ZXJzaW9uIjo0LCJ0ZXJyYWZvcm1fdmVyc2lvbiI6IjEuMC4wIiwicmVzb3VyY2VzIjpbXX0=\",\n \"include_diagram\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Customer-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.usenabla.com/v1/evidence/terraform")
.header("X-Customer-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"production-infrastructure\",\n \"format\": \"json\",\n \"content_base64\": \"eyJ2ZXJzaW9uIjo0LCJ0ZXJyYWZvcm1fdmVyc2lvbiI6IjEuMC4wIiwicmVzb3VyY2VzIjpbXX0=\",\n \"include_diagram\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usenabla.com/v1/evidence/terraform")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Customer-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"production-infrastructure\",\n \"format\": \"json\",\n \"content_base64\": \"eyJ2ZXJzaW9uIjo0LCJ0ZXJyYWZvcm1fdmVyc2lvbiI6IjEuMC4wIiwicmVzb3VyY2VzIjpbXX0=\",\n \"include_diagram\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"assessment": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"framework": "NIST 800-53",
"version": "Rev. 5",
"timestamp": "2023-11-07T05:31:56Z",
"controls": [
{
"control_id": "SC-13",
"title": "Cryptographic Protection",
"findings": [
"<string>"
],
"evidence": [
"<string>"
]
}
],
"summary": {
"total_controls": 123,
"satisfied": 123,
"not_satisfied": 123,
"not_applicable": 123
}
},
"artifacts": [
{
"filename": "nist80053-assessment.json",
"content_type": "application/json",
"content_base64": "<string>",
"size_bytes": 123,
"diagram": "<string>"
}
]
}{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"requestId": "<string>"
}{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"requestId": "<string>"
}{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"requestId": "<string>"
}Evidence
Analyze Terraform state for compliance
Generate NIST 800-53 compliance assessment from Terraform state file with optional architecture diagram
POST
/
v1
/
evidence
/
terraform
Analyze Terraform state for compliance
curl --request POST \
--url https://api.usenabla.com/v1/evidence/terraform \
--header 'Content-Type: application/json' \
--header 'X-Customer-Key: <api-key>' \
--data '
{
"name": "production-infrastructure",
"format": "json",
"content_base64": "eyJ2ZXJzaW9uIjo0LCJ0ZXJyYWZvcm1fdmVyc2lvbiI6IjEuMC4wIiwicmVzb3VyY2VzIjpbXX0=",
"include_diagram": false
}
'import requests
url = "https://api.usenabla.com/v1/evidence/terraform"
payload = {
"name": "production-infrastructure",
"format": "json",
"content_base64": "eyJ2ZXJzaW9uIjo0LCJ0ZXJyYWZvcm1fdmVyc2lvbiI6IjEuMC4wIiwicmVzb3VyY2VzIjpbXX0=",
"include_diagram": False
}
headers = {
"X-Customer-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Customer-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'production-infrastructure',
format: 'json',
content_base64: 'eyJ2ZXJzaW9uIjo0LCJ0ZXJyYWZvcm1fdmVyc2lvbiI6IjEuMC4wIiwicmVzb3VyY2VzIjpbXX0=',
include_diagram: false
})
};
fetch('https://api.usenabla.com/v1/evidence/terraform', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.usenabla.com/v1/evidence/terraform",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'production-infrastructure',
'format' => 'json',
'content_base64' => 'eyJ2ZXJzaW9uIjo0LCJ0ZXJyYWZvcm1fdmVyc2lvbiI6IjEuMC4wIiwicmVzb3VyY2VzIjpbXX0=',
'include_diagram' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Customer-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.usenabla.com/v1/evidence/terraform"
payload := strings.NewReader("{\n \"name\": \"production-infrastructure\",\n \"format\": \"json\",\n \"content_base64\": \"eyJ2ZXJzaW9uIjo0LCJ0ZXJyYWZvcm1fdmVyc2lvbiI6IjEuMC4wIiwicmVzb3VyY2VzIjpbXX0=\",\n \"include_diagram\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Customer-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.usenabla.com/v1/evidence/terraform")
.header("X-Customer-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"production-infrastructure\",\n \"format\": \"json\",\n \"content_base64\": \"eyJ2ZXJzaW9uIjo0LCJ0ZXJyYWZvcm1fdmVyc2lvbiI6IjEuMC4wIiwicmVzb3VyY2VzIjpbXX0=\",\n \"include_diagram\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.usenabla.com/v1/evidence/terraform")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Customer-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"production-infrastructure\",\n \"format\": \"json\",\n \"content_base64\": \"eyJ2ZXJzaW9uIjo0LCJ0ZXJyYWZvcm1fdmVyc2lvbiI6IjEuMC4wIiwicmVzb3VyY2VzIjpbXX0=\",\n \"include_diagram\": false\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"assessment": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"framework": "NIST 800-53",
"version": "Rev. 5",
"timestamp": "2023-11-07T05:31:56Z",
"controls": [
{
"control_id": "SC-13",
"title": "Cryptographic Protection",
"findings": [
"<string>"
],
"evidence": [
"<string>"
]
}
],
"summary": {
"total_controls": 123,
"satisfied": 123,
"not_satisfied": 123,
"not_applicable": 123
}
},
"artifacts": [
{
"filename": "nist80053-assessment.json",
"content_type": "application/json",
"content_base64": "<string>",
"size_bytes": 123,
"diagram": "<string>"
}
]
}{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"requestId": "<string>"
}{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"requestId": "<string>"
}{
"error": "<string>",
"message": "<string>",
"code": "<string>",
"requestId": "<string>"
}Authorizations
Customer API key for authentication
Body
application/json
Name for the evidence assessment
Example:
"production-infrastructure"
Output format for the assessment
Available options:
oscal, yaml, json Example:
"json"
Base64-encoded Terraform state file (JSON)
Example:
"eyJ2ZXJzaW9uIjo0LCJ0ZXJyYWZvcm1fdmVyc2lvbiI6IjEuMC4wIiwicmVzb3VyY2VzIjpbXX0="
Include Mermaid architecture diagram in artifacts
Response
Evidence assessment completed successfully
Unique identifier for this assessment
Assessment status
Available options:
completed, failed Timestamp when assessment was created
Show child attributes
Show child attributes
Generated artifacts (assessment files, diagrams)
Show child attributes
Show child attributes
⌘I

