Provider Configurations

The ProviderConfiguration resource

The configuration of provider. Provider configuration is managed on the account scope and can be linked to environments or workspaces.

Key path

Description

type* (string)

Available values: provider-configurations

id (string)

attributes.aws-access-key (string)

AWS access key. This option is required with the access_keys credential type.

attributes.aws-account-type (string)

Available values: regular, gov-cloud, cn-cloud

The type of AWS account, available options: regular, gov-cloud, cn-cloud.

attributes.aws-credentials-type (string)

Available values: role_delegation, access_keys

The type of AWS credential, available options: access_keys, role_delegation.

attributes.aws-external-id (string)

External identifier to use when assuming the role. This option is required with the role_delegation credential type.

attributes.aws-role-arn (string)

Amazon Resource Name (ARN) of the IAM Role to assume. This option is required with the role_delegation credential type.

attributes.aws-secret-key (string)

AWS secret key. This option is required with the access_keys credential type.

attributes.aws-trusted-entity-type (string)

Available values: aws_account, aws_service

Trusted entity type, available options: aws_account, aws_service. This option is required with the role_delegation credential type.

attributes.azurerm-client-id (string)

The Client ID which should be used.

attributes.azurerm-client-secret (string)

The Client Secret which should be used.

attributes.azurerm-subscription-id (string)

The Subscription ID which should be used.

attributes.azurerm-tenant-id (string)

The Tenant ID should be used.

attributes.error-message (string)

Contains the error message if the provider configuration is in an errored status.

attributes.export-shell-variables (boolean)

Export provider variables into the run environment. This option is available only for built in providers.

attributes.google-credentials (string)

Service account key file in JSON format.

attributes.google-project (string)

The default project to manage resources in. If another project is specified on a resource, it will take precedence.

attributes.google-service-account-name (string)

Service account name.

attributes.is-shared (boolean)

Indicates whether the provider configuration can be used in any workspace of the account without directly linking it to the environment.

attributes.name* (string)

The name of a Scalr provider configuration. This field is unique for the account.

attributes.provider-name* (object)

The name of a Terraform provider.

attributes.scalr-hostname (string)

The Scalr hostname which should be used.

attributes.scalr-token (string)

The Scalr token which should be used.

attributes.status (string)

Available values: active, errored

Provider configuration status. Can be: active, errored.

relationships.account* (object)

The account this provider configuration belongs to.

relationships.account.data.type* (string)

Available values: accounts

relationships.account.data.id* (string)

relationships.environments (object)

The list of environments attached to the provider configuration. Can be used to bulk link/unlink environments.

relationships.environments.data* (array)

relationships.parameters (object)

The list of arguments for provider configurations.

relationships.parameters.data* (array)

links.self (string)

List Provider configurations

GET /provider-configurations

This endpoint returns a list of Provider configurations by various filters.

Query Parameters
  • filter[name] (string) – The provider configuration name filter.

  • filter[provider-name] (string) – The provider configuration type filter.

  • filter[account] (string) – The provider configuration account filter.

  • filter[environment] (string) – The provider configuration environment filter.

  • page[number] (string) – Page number

  • page[size] (string) – Page size

  • include (array) – The comma-separated list of relationship paths. (Available values: environments, parameters)

Example Request:

GET /provider-configurations HTTP/1.1
Host: my.scalr.io
Prefer: profile=preview
Status Codes
  • 200 OK – Success.

  • 403 Forbidden – User unauthorized to perform action.

  • 4XX – Client error.

  • 5XX – Server error.

Request Headers
  • Prefer – Specifies the API profile that server should use to handle this request. For the list of supported profiles check out the Scalr documentation. (Required)

Create a Provider configuration

POST /provider-configurations

Create a new Provider configuration.

Request body:

Key path

Description

data.type* (string)

Available values: provider-configurations

data.attributes.aws-access-key (string)

AWS access key. This option is required with the access_keys credential type.

data.attributes.aws-account-type (string)

Available values: regular, gov-cloud, cn-cloud

The type of AWS account, available options: regular, gov-cloud, cn-cloud.

data.attributes.aws-credentials-type (string)

Available values: role_delegation, access_keys

The type of AWS credential, available options: access_keys, role_delegation.

data.attributes.aws-external-id (string)

External identifier to use when assuming the role. This option is required with the role_delegation credential type.

data.attributes.aws-role-arn (string)

Amazon Resource Name (ARN) of the IAM Role to assume. This option is required with the role_delegation credential type.

data.attributes.aws-secret-key (string)

AWS secret key. This option is required with the access_keys credential type.

data.attributes.aws-trusted-entity-type (string)

Available values: aws_account, aws_service

Trusted entity type, available options: aws_account, aws_service. This option is required with the role_delegation credential type.

data.attributes.azurerm-client-id (string)

The Client ID which should be used.

data.attributes.azurerm-client-secret (string)

The Client Secret which should be used.

data.attributes.azurerm-subscription-id (string)

The Subscription ID which should be used.

data.attributes.azurerm-tenant-id (string)

The Tenant ID should be used.

data.attributes.export-shell-variables (boolean)

Export provider variables into the run environment. This option is available only for built in providers.

data.attributes.google-credentials (string)

Service account key file in JSON format.

data.attributes.google-project (string)

The default project to manage resources in. If another project is specified on a resource, it will take precedence.

data.attributes.is-shared (boolean)

Indicates whether the provider configuration can be used in any workspace of the account without directly linking it to the environment.

data.attributes.name* (string)

The name of a Scalr provider configuration. This field is unique for the account.

data.attributes.provider-name* (object)

The name of a Terraform provider.

data.attributes.scalr-hostname (string)

The Scalr hostname which should be used.

data.attributes.scalr-token (string)

The Scalr token which should be used.

data.relationships.account* (object)

The account this provider configuration belongs to.

data.relationships.account.data.type* (string)

Available values: accounts

data.relationships.account.data.id* (string)

data.relationships.environments (object)

The list of environments attached to the provider configuration. Can be used to bulk link/unlink environments.

data.relationships.environments.data* (array)

Example Request:

POST /provider-configurations HTTP/1.1
Host: my.scalr.io
Content-Type: application/vnd.api+json
Prefer: profile=preview

{
    "data": {
        "attributes": {
            "aws-access-key": "string",
            "aws-account-type": "regular",
            "aws-credentials-type": "role_delegation",
            "aws-external-id": "string",
            "aws-role-arn": "string",
            "aws-secret-key": "********",
            "aws-trusted-entity-type": "aws_account",
            "azurerm-client-id": "string",
            "azurerm-client-secret": "********",
            "azurerm-subscription-id": "string",
            "azurerm-tenant-id": "string",
            "export-shell-variables": true,
            "google-credentials": "********",
            "google-project": "string",
            "is-shared": true,
            "name": "string",
            "provider-name": {},
            "scalr-hostname": "string",
            "scalr-token": "********"
        },
        "relationships": {
            "account": {
                "data": {
                    "id": "string",
                    "type": "accounts"
                }
            },
            "environments": {
                "data": [
                    {
                        "id": "string",
                        "type": "environments"
                    }
                ]
            }
        },
        "type": "provider-configurations"
    }
}
Status Codes
  • 201 Created – Created.

  • 403 Forbidden – User unauthorized to perform action.

  • 404 Not Found – Relationship resource not found, or user unauthorized to perform action.

  • 422 Unprocessable Entity – Malformed request body (missing attributes, wrong types, etc.).

  • 4XX – Client error.

  • 5XX – Server error.

Request Headers
  • Prefer – Specifies the API profile that server should use to handle this request. For the list of supported profiles check out the Scalr documentation. (Required)

Delete a Provider configuration

DELETE /provider-configurations/{provider_configuration}

The endpoint deletes a Provider configuration by ID.

Parameters
  • provider_configuration (string) – The ID of the Provider configuration

Status Codes
  • 204 No Content – Deleted.

  • 404 Not Found – Provider configuration not found or user unauthorized.

  • 422 Unprocessable Entity – Some of environments cant be detached. The environment cant be detached if some of the environment workspaces use this provider configuration.

  • 4XX – Client error.

  • 5XX – Server error.

Request Headers
  • Prefer – Specifies the API profile that server should use to handle this request. For the list of supported profiles check out the Scalr documentation. (Required)

Get a Provider configuration

GET /provider-configurations/{provider_configuration}

Show details of a specific Proivider configuration.

Parameters
  • provider_configuration (string) – The ID of the Provider configuration.

Query Parameters
  • include (array) – The comma-separated list of relationship paths. (Available values: environments, parameters)

Example Request:

GET /provider-configurations/{provider_configuration} HTTP/1.1
Host: my.scalr.io
Prefer: profile=preview
Status Codes
  • 200 OK – Success.

  • 404 Not Found – Provider configuration not found or user unauthorized to perform action.

  • 4XX – Client error.

  • 5XX – Server error.

Request Headers
  • Prefer – Specifies the API profile that server should use to handle this request. For the list of supported profiles check out the Scalr documentation. (Required)

Update a Provider configuration

PATCH /provider-configurations/{provider_configuration}

This endpoint allows updates to attributes of an existing Provider configuration.

Parameters
  • provider_configuration (string) – The ID of the Provider configuration to update.

Request body:

Key path

Description

data.type* (string)

Available values: provider-configurations

data.attributes.aws-access-key (string)

AWS access key. This option is required with the access_keys credential type.

data.attributes.aws-account-type (string)

Available values: regular, gov-cloud, cn-cloud

The type of AWS account, available options: regular, gov-cloud, cn-cloud.

data.attributes.aws-credentials-type (string)

Available values: role_delegation, access_keys

The type of AWS credential, available options: access_keys, role_delegation.

data.attributes.aws-external-id (string)

External identifier to use when assuming the role. This option is required with the role_delegation credential type.

data.attributes.aws-role-arn (string)

Amazon Resource Name (ARN) of the IAM Role to assume. This option is required with the role_delegation credential type.

data.attributes.aws-secret-key (string)

AWS secret key. This option is required with the access_keys credential type.

data.attributes.aws-trusted-entity-type (string)

Available values: aws_account, aws_service

Trusted entity type, available options: aws_account, aws_service. This option is required with the role_delegation credential type.

data.attributes.azurerm-client-id (string)

The Client ID which should be used.

data.attributes.azurerm-client-secret (string)

The Client Secret which should be used.

data.attributes.azurerm-subscription-id (string)

The Subscription ID which should be used.

data.attributes.azurerm-tenant-id (string)

The Tenant ID should be used.

data.attributes.export-shell-variables (boolean)

Export provider variables into the run environment. This option is available only for built in providers.

data.attributes.google-credentials (string)

Service account key file in JSON format.

data.attributes.google-project (string)

The default project to manage resources in. If another project is specified on a resource, it will take precedence.

data.attributes.is-shared (boolean)

Indicates whether the provider configuration can be used in any workspace of the account without directly linking it to the environment.

data.attributes.name* (string)

The name of a Scalr provider configuration. This field is unique for the account.

data.attributes.provider-name* (object)

The name of a Terraform provider.

data.attributes.scalr-hostname (string)

The Scalr hostname which should be used.

data.attributes.scalr-token (string)

The Scalr token which should be used.

data.relationships.account* (object)

The account this provider configuration belongs to.

data.relationships.account.data.type* (string)

Available values: accounts

data.relationships.account.data.id* (string)

data.relationships.environments (object)

The list of environments attached to the provider configuration. Can be used to bulk link/unlink environments.

data.relationships.environments.data* (array)

Example Request:

PATCH /provider-configurations/{provider_configuration} HTTP/1.1
Host: my.scalr.io
Content-Type: application/vnd.api+json
Prefer: profile=preview

{
    "data": {
        "attributes": {
            "aws-access-key": "string",
            "aws-account-type": "regular",
            "aws-credentials-type": "role_delegation",
            "aws-external-id": "string",
            "aws-role-arn": "string",
            "aws-secret-key": "********",
            "aws-trusted-entity-type": "aws_account",
            "azurerm-client-id": "string",
            "azurerm-client-secret": "********",
            "azurerm-subscription-id": "string",
            "azurerm-tenant-id": "string",
            "export-shell-variables": true,
            "google-credentials": "********",
            "google-project": "string",
            "is-shared": true,
            "name": "string",
            "provider-name": {},
            "scalr-hostname": "string",
            "scalr-token": "********"
        },
        "relationships": {
            "account": {
                "data": {
                    "id": "string",
                    "type": "accounts"
                }
            },
            "environments": {
                "data": [
                    {
                        "id": "string",
                        "type": "environments"
                    }
                ]
            }
        },
        "type": "provider-configurations"
    }
}
Status Codes
  • 200 OK – Updated.

  • 403 Forbidden – User unauthorized to perform action.

  • 404 Not Found – Relationship resource not found, or user unauthorized to perform action.

  • 422 Unprocessable Entity – Malformed request body (missing attributes, wrong types, etc.) or some of environments cant be detached. The environment cant be detached if some of the environment workspaces use this provider configuration.

  • 4XX – Client error.

  • 5XX – Server error.

Request Headers
  • Prefer – Specifies the API profile that server should use to handle this request. For the list of supported profiles check out the Scalr documentation. (Required)