Rescue
post
Refactor Terraform codebase by extracting variables from resources and modules to separated files
🔒 Requires the read:rescue permission
Authorizations
Body
terraformstring · binaryRequiredExample:
[email protected]iac_typestring · enumOptionalDefault:
The type of IaC source
terraformPossible values: Responses
200
Zip archive of refactored data
application/zip
Responsestring · binary
400
Failed to refactor terraform
application/json
401
Failed to authenticate user
application/json
403
Missing required scopes. 🔒 Requires the read:rescue permission
application/json
429
Too many requests
application/json
post
/api/v1/rescue/tf/extractPOST /api/v1/rescue/tf/extract HTTP/1.1
Host: api.bluebricks.co
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: multipart/form-data
Accept: */*
Content-Length: 63
{
"terraform": "[email protected]",
"iac_type": "terraform"
}binarypost
Generate bricks file template from IaC source
🔒 Requires the read:rescue permission
Authorizations
Body
sourcestringRequired
The path to the IaC source directory
package_namestringRequired
The package name e.g. @bluebricks/aws-vpc
iac_typestring · enumRequiredPossible values:
The type of IaC source
Responses
200
Generated bricks file template
application/json
400
IaC source directory or package name are invalid
application/json
401
Failed to authenticate user
application/json
403
Missing required scopes. 🔒 Requires the read:rescue permission
application/json
429
Too many requests
application/json
post
/api/v1/rescuePOST /api/v1/rescue HTTP/1.1
Host: api.bluebricks.co
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 62
{
"source": "text",
"package_name": "text",
"iac_type": "terraform"
}{
"name": "@bluebricks/aws-vpc",
"description": "A package for blueprinting a secure VPC",
"version": "1.2.3",
"tags": [
"my-tag"
],
"manifest_version": 1,
"state": "managed",
"repository": {
"type": "text",
"url": "text"
},
"props": {
"ANY_ADDITIONAL_PROPERTY": {
"type": "string",
"description": "The name of the VPC",
"default": "my-vpc",
"value": "my-vpc1",
"allowed_values": [
"my-vpc"
],
"ANY_ADDITIONAL_PROPERTY": "anything"
}
},
"computed": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"outs": {
"ANY_ADDITIONAL_PROPERTY": {
"type": "string",
"description": "The VPC ID",
"value": "my-vpc123",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
},
"packages": [
{
"id": "s3",
"name": "terraform-aws-s3",
"version": "1.2.3",
"props": {
"region": {
"value": "'us-west-2'"
},
"vpc_id": {
"value": "Props.vpc_id ?? Data.vpc1.vpc_id"
}
},
"path": "https://github.com/bb/vpc.git",
"kind": "terraform",
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"native": {
"type": "terraform",
"version": "text",
"path": "text",
"state_path": "text",
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"ANY_ADDITIONAL_PROPERTY": "anything"
}Last updated
Was this helpful?

