All pages
Powered by GitBook
1 of 1

Loading...

Globalvar

This endpoint is used to create, update, search or delete global variables information inside a Terrakube organizations, this variables will be injected inside the jobs, workspace variables have priority over global variables if the same name is used.

You need to be part of the administrator Active Directory Group to work with this endpoint

Entity fields:

Path
Type
Description

data.type

string

Should be "variable"

data.attributes.key

string

Unique variable name

data.attributes.value

string

Key value

data.attributes.sensitive

boolean

To hide the value when the output is sensitive

data.attributes.hcl

boolean

Terraform HCL variable type

data.attributes.category

string

Variable type could be TERRAFORM or ENV (Environment Variable)

data.attributes.description

string

Free text

{
  "data": {
    "type": "globalvar",
    "attributes": {
      "key": "tag_name",
      "value": "HolaMundo",
      "sensitive": false,
      "hcl": false,
      "category": "TERRAFORM",
      "description": "Azure RG Tag"
    }
  }
}

Example:

Supported Operations

For a complete list of organization operation please visit the

OpenAPI specification
post

Creates an item of type globalvar and adds it to globalvar

Path parameters
organizationIdstringRequired

organization Identifier

Body
typestringOptional

Create Permissions : (user is a superuser) Delete Permissions : (user is a superuser)

idstringOptional
categorystring 路 enumOptional

Update Permissions : (user is a superuser)

Possible values:
descriptionstringOptional

Update Permissions : (user is a superuser)

hclbooleanOptional

Update Permissions : (user is a superuser)

keystringOptional

Update Permissions : (user is a superuser)

sensitivebooleanOptional

Update Permissions : (admin update secret)

valuestringOptional

Read Permissions : (admin read secret) Update Permissions : (user is a superuser)

idstringOptional
typestring 路 enumOptionalPossible values:
Responses
201

Successful response

application/vnd.api+json
typestringOptional

Create Permissions : (user is a superuser) Delete Permissions : (user is a superuser)

idstringOptional
categorystring 路 enumOptional

Update Permissions : (user is a superuser)

Possible values:
descriptionstringOptional

Update Permissions : (user is a superuser)

hclbooleanOptional

Update Permissions : (user is a superuser)

keystringOptional

Update Permissions : (user is a superuser)

sensitivebooleanOptional

Update Permissions : (admin update secret)

valuestringOptional

Read Permissions : (admin read secret) Update Permissions : (user is a superuser)

idstringOptional
typestring 路 enumOptionalPossible values:
post
/organization/{organizationId}/globalvar
201

Successful response

delete

Deletes an instance of type globalvar

Path parameters
organizationIdstringRequired

organization Identifier

globalvarIdstringRequired

globalvar Identifier

Responses
204

Successful response

delete
/organization/{organizationId}/globalvar/{globalvarId}
204

Successful response

No content

patch

Modifies an instance of type globalvar

Path parameters
organizationIdstringRequired

organization Identifier

globalvarIdstringRequired

globalvar Identifier

Body
typestringOptional

Create Permissions : (user is a superuser) Delete Permissions : (user is a superuser)

idstringOptional
categorystring 路 enumOptional

Update Permissions : (user is a superuser)

Possible values:
descriptionstringOptional

Update Permissions : (user is a superuser)

hclbooleanOptional

Update Permissions : (user is a superuser)

keystringOptional

Update Permissions : (user is a superuser)

sensitivebooleanOptional

Update Permissions : (admin update secret)

valuestringOptional

Read Permissions : (admin read secret) Update Permissions : (user is a superuser)

idstringOptional
typestring 路 enumOptionalPossible values:
Responses
204

Successful response

patch
/organization/{organizationId}/globalvar/{globalvarId}
204

Successful response

No content

POST /api/v1/organization/{organizationId}/globalvar HTTP/1.1
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 220

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "category": "TERRAFORM",
      "description": "text",
      "hcl": true,
      "key": "text",
      "sensitive": true,
      "value": "text"
    },
    "relationships": {
      "organization": {
        "id": "text",
        "type": "organization"
      }
    }
  }
}
{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "category": "TERRAFORM",
      "description": "text",
      "hcl": true,
      "key": "text",
      "sensitive": true,
      "value": "text"
    },
    "relationships": {
      "organization": {
        "id": "text",
        "type": "organization"
      }
    }
  }
}
DELETE /api/v1/organization/{organizationId}/globalvar/{globalvarId} HTTP/1.1
Accept: */*
PATCH /api/v1/organization/{organizationId}/globalvar/{globalvarId} HTTP/1.1
Content-Type: application/vnd.api+json
Accept: */*
Content-Length: 220

{
  "data": {
    "type": "text",
    "id": "text",
    "attributes": {
      "category": "TERRAFORM",
      "description": "text",
      "hcl": true,
      "key": "text",
      "sensitive": true,
      "value": "text"
    },
    "relationships": {
      "organization": {
        "id": "text",
        "type": "organization"
      }
    }
  }
}
get

Returns the relationship globalvar

Path parameters
organizationIdstringRequired

organization Identifier

Query parameters
itemsstring 路 enumOptionalPossible values:
itemsstring 路 enumOptionalPossible values:
itemsstring 路 enumOptionalPossible values:
filter[globalvar]stringOptional

Filters the collection of globalvar using a 'disjoint' RSQL expression

page[number]integer 路 int32Optional

Number of pages to return. Can be used with page[size]

page[size]integer 路 int32Optional

Number of elements per page. Can be used with page[number]

page[offset]integer 路 int32Optional

Offset from 0 to start paginating. Can be used with page[limit]

page[limit]integer 路 int32Optional

Maximum number of items to return. Can be used with page[offset]

page[totals]stringOptional

For requesting total pages/records be included in the response page meta data

Responses
200

Successful response

application/vnd.api+json
get
/organization/{organizationId}/globalvar
200

Successful response

{
  "data": [
    {
      "type": "text",
      "id": "text",
      "attributes": {
        "category": null,
        "description": null,
        "hcl": null,
        "key": null,
        "sensitive": null,
        "value": null
      },
      "relationships": {
        "organization": {
          "data": [
            null
          ]
        }
      }
    }
  ],
  "included": [
    {
      "type": "text",
      "id": "text",
      "attributes": {},
      "relationships": {}
    }
  ]
}
GET /api/v1/organization/{organizationId}/globalvar HTTP/1.1
Accept: */*