Codification
The Codification API allows you to generate Infrastructure as Code (Terraform HCL) for cloud assets programmatically.
Codify Asset
Generate IaC code (Terraform HCL) for a specific cloud asset
JWT authentication token
The Terraform asset type (e.g., aws_s3_bucket)
The unique identifier of the cloud asset (e.g., ARN)
The Infrastructure as Code type
The cloud provider (e.g., aws, azure, gcp)
The cloud account number/ID
If true, returns raw HCL without escaping newlines
falseSuccessfully codified asset
Bad Request Error
Unauthorized Error
Insufficient permissions
Internal Server Error
List Module Repositories
Fetches repositories that contain terraform modules
JWT authentication token
Successfully retrieved module repos
Bad Request Error
Unauthorized Error
Insufficient permissions
Internal Server Error
List Modules
Fetches modules available in a repository
JWT authentication token
Full repository path (e.g., owner/name/subdirectory)
List of resource types to filter modules by, separated by commas
Successfully fetched modules
Bad Request Error
Unauthorized Error
Insufficient permissions
Internal Server Error
Codify Module
Create a module call using the provided resource along with its dependencies
JWT authentication token
The id of the resource to be codified using module call
The Terraform asset type (e.g. aws_s3_bucket)
The format of the codified result (e.g. terraform, json)
HCLPossible values: The MD5 hash of the module path
The protocol to reach the module's repository
sshPossible values: The provider of the resource type
The Firefly integration ID where the resource is located
The source type of the module (e.g. private, public)
Whether to use AI to codify the module
trueSuccessful module call
Bad Request Error
Unauthorized Error
Insufficient permissions
Internal Server Error
Create Module
Create a new module using the provided resource
JWT authentication token
The id of the resource to be codified using create module
The Terraform asset type (e.g. aws_s3_bucket)
The provider of the resource type
The Firefly integration ID where the resource is located
The Terraform version to use from the specified provider
Whether to use AI to create the module
trueWhether to include dependencies in the module (only available when withAi is true)
falseSuccessfully created module
Bad Request Error
Unauthorized Error
Insufficient permissions
Internal Server Error
Create Pull Request
Creates a pull request containing Infrastructure as Code for specified cloud resources
JWT authentication token
VCS integration ID
Repository full name (e.g., org/repo)
Infrastructure as Code type
Comment to include in the pull request description
File path for the codified output
Target branch name (defaults to main/master)
Successfully created pull request
Bad Request Error
Unauthorized Error
Insufficient permissions
Internal Server Error
List Module Repositories
Fetches repositories that contain terraform modules
JWT authentication token
Successfully retrieved module repos
Bad Request Error
Unauthorized Error
Insufficient permissions
Internal Server Error
List Modules
Fetches modules available in a repository
JWT authentication token
Full repository path (e.g., owner/name/subdirectory)
List of resource types to filter modules by, separated by commas
Successfully fetched modules
Bad Request Error
Unauthorized Error
Insufficient permissions
Internal Server Error
Codify Module
Create a module call using the provided resource along with its dependencies
JWT authentication token
The id of the resource to be codified using module call
The Terraform asset type (e.g. aws_s3_bucket)
The format of the codified result (e.g. terraform, json)
HCLPossible values: The MD5 hash of the module path
The protocol to reach the module's repository
sshPossible values: The provider of the resource type
The Firefly integration ID where the resource is located
The source type of the module (e.g. private, public)
Whether to use AI to codify the module
trueSuccessful module call
Bad Request Error
Unauthorized Error
Insufficient permissions
Internal Server Error
Create Module
Create a new module using the provided resource
JWT authentication token
The id of the resource to be codified using create module
The Terraform asset type (e.g. aws_s3_bucket)
The provider of the resource type
The Firefly integration ID where the resource is located
The Terraform version to use from the specified provider
Whether to use AI to create the module
trueWhether to include dependencies in the module (only available when withAi is true)
falseSuccessfully created module
Bad Request Error
Unauthorized Error
Insufficient permissions
Internal Server Error
Create Pull Request
Creates a pull request containing Infrastructure as Code for specified cloud resources
JWT authentication token
VCS integration ID
Repository full name (e.g., org/repo)
Infrastructure as Code type
Comment to include in the pull request description
File path for the codified output
Target branch name (defaults to main/master)
Successfully created pull request
Bad Request Error
Unauthorized Error
Insufficient permissions
Internal Server Error
Last updated
Was this helpful?

