Prepares a skeleton cloud resource plan from a specific version of a terraform module repository
GET/api/v2/terraform/repository/cloudresourceplan
Prepares a skeleton cloud resource plan from a specific version of a terraform module repository
Request
Query Parameters
The URL of the Terraform module repository
Version of module to retrieve
Name of a platform secret to use for authentication
Responses
- 200
- 400
- 401
- 403
- 500
Skeleton CloudResourcePlan for module
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
Cloud refers to the cloud provider of the resource (azure, gcp, aws).
Description provides a short summary for the cloud resource plan.
inputs
undefined[]
Inputs is a collection of inputs that are required for the cloud resource plan. These are used to control what users are permitted to provide inputs for
Description is the description of the variable
Name is the name of the variable
Options are the available options for a list or string type
Sensitive indicates if the input is sensitive
Type is the type of the variable
validation
required
Validation is the validation of the variable
Default is the default value of the variable
MaxLength is the maximum length of the variable if a string
MinLength is the minimum length of the variable if a string
Pattern is the pattern of the variable if a string
Required is true if the variable is required
scope
required
Scope is the scope of the cloud resource plan, and whom the cloudresource plan is intended for.
terraform
required
Terraform provides all the configuration for the terraform module that is used to create the cloud resource.
ModuleURL is the URL of the terraform module that is used to create the cloud resource.
ModuleVersion is the version of the terraform module that is used to create the cloud resource.
SecretRef is a reference to a platform secret that contains the credentials required to access the terraform module source.
TFVarsTemplate is the terraform vars template that is used to create the cloud resource.
Must be a valid semver in the format X.Y.Z without a 'v' prefix. An optional -suffix can be provided; note in semver that 1.0.0 is after 1.0.0-1.
{
"cloud": "string",
"description": "string",
"inputs": [
{
"description": "string",
"name": "string",
"options": [
"string"
],
"sensitive": true,
"type": "string",
"validation": {
"default": "string",
"maxLength": 0,
"minLength": 0,
"pattern": "string",
"required": true
}
}
],
"scope": {
"allStages": true,
"allWorkspaces": true,
"allowedStages": [
"string"
],
"allowedWorkspaces": [
"string"
]
},
"terraform": {
"moduleURL": "string",
"moduleVersion": "string",
"secretRef": "string",
"tfVarsTemplate": "string"
},
"version": "string"
}
Validation error of supplied parameters/body
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
fieldErrors
undefined[]
required
{
"code": 0,
"fieldErrors": [
{
"errCode": "string",
"field": "string",
"message": "string"
}
],
"message": "string"
}
If not authenticated
If authenticated but not authorized
A generic API error containing the cause of the error
- application/json
- Schema
- Example (from schema)
Schema
{
"code": 0,
"detail": "string",
"message": "string",
"uri": "string",
"verb": "string"
}