---
updatedAt: 2025-08-29T13:25:09.000Z
agentTools:
  projectIndex: https://docs.scalr.io/llms.txt
---

# scalr_storage_profile

## Resource: scalr\_storage\_profile

Manages the state of storage profiles in Scalr.

## Example Usage

```terraform
resource "scalr_storage_profile" "example_google" {
  name    = "my-google-storage-profile"
  default = true
  google {
    storage_bucket = "my-bucket"
    encryption_key = "S5pst/kWvXUmpaIQ8kSb3mr+h4yrA+Q024mOMMO8Bog="
    project        = "playground"
    credentials    = <<EOF
    {
      "type": "service_account",
      "project_id": "playground",
      "private_key_id": "b185b5359...",
      "private_key": "-----BEGIN PRIVATE KEY-----\n...\n-----END PRIVATE KEY-----\n",
      "client_email": "sa@playground.iam.gserviceaccount.com",
      "client_id": "1234567890",
      "auth_uri": "https://accounts.google.com/o/oauth2/auth",
      "token_uri": "https://oauth2.googleapis.com/token",
      "auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
      "client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/sa%40playground.iam.gserviceaccount.com"
    }
    EOF
  }
}

resource "scalr_storage_profile" "example_azure" {
  name = "my-azure-storage-profile"
  azurerm {
    audience        = "awesome-audience"
    client_id       = "12345678-1234-1234-1234-123456789012"
    container_name  = "my-container"
    storage_account = "my-storage-account"
    tenant_id       = "12345678-1234-1234-1234-123456789012"
  }
}
```

## Schema

### Required

* `name` (String) Name of the storage profile.

### Optional

* `aws_s3` (Block List) Settings for the AWS S3 storage profile. (see [below for nested schema](#nestedblock--aws_s3))
* `azurerm` (Block List) Settings for the AzureRM storage profile. (see [below for nested schema](#nestedblock--azurerm))
* `default` (Boolean) The default storage profile.
* `google` (Block List) Settings for the Google storage profile. (see [below for nested schema](#nestedblock--google))

### Read-Only

* `created_at` (String) The resource creation timestamp.
* `error_message` (String) The last error description, when these settings doesn't work properly.
* `id` (String) The ID of this resource.
* `updated_at` (String) The resource last update timestamp.

<a id="nestedblock--aws_s3"></a>

### Nested Schema for `aws_s3`

Required:

* `audience` (String) The value of the `aud` claim for the identity token.
* `bucket_name` (String) AWS S3 Storage bucket name. Bucket must already exist.
* `role_arn` (String) Amazon Resource Name (ARN) of the IAM Role to assume.

Optional:

* `region` (String) AWS S3 bucket region.

<a id="nestedblock--azurerm"></a>

### Nested Schema for `azurerm`

Required:

* `audience` (String) Azure audience for authentication.
* `client_id` (String) Azure client ID for authentication.
* `container_name` (String) Azure storage container name.
* `storage_account` (String) Azure storage account name.
* `tenant_id` (String) Azure tenant ID for authentication.

<a id="nestedblock--google"></a>

### Nested Schema for `google`

Required:

* `credentials` (String, Sensitive) Service Account JSON key. Required IAM roles: `Storage Admin` assigned on a `google-storage-bucket` bucket. See: [use IAM with bucket](https://cloud.google.com/storage/docs/access-control/using-iam-permissions#bucket-iam).
* `storage_bucket` (String) Google Storage bucket name. Bucket must already exist.

Optional:

* `encryption_key` (String, Sensitive) Customer supplied encryption key. Must be exactly 32 bytes, encoded into base64.
* `project` (String) Google Cloud project ID.

## Import

Import is supported using the following syntax:

```shell
terraform import scalr_storage_profile.example sp-xxxxxxxxxx
```

# Sibling pages

* [scalr\_endpoint](https://docs.scalr.io/scalr/docs/provider_resource_scalr_endpoint.md)
* [scalr\_access\_policy](https://docs.scalr.io/scalr/docs/provider_resource_scalr_access_policy.md)
* [scalr\_account\_allowed\_ips](https://docs.scalr.io/scalr/docs/provider_resource_scalr_account_allowed_ips.md)
* [scalr\_agent\_pool](https://docs.scalr.io/scalr/docs/provider_resource_scalr_agent_pool.md)
* [scalr\_agent\_pool\_token](https://docs.scalr.io/scalr/docs/provider_resource_scalr_agent_pool_token.md)
* [scalr\_assume\_service\_account\_policy](https://docs.scalr.io/scalr/docs/provider_resource_scalr_assume_service_account_policy.md)
* [scalr\_checkov\_integration](https://docs.scalr.io/scalr/docs/provider_resource_scalr_checkov_integration.md)
* [scalr\_drift\_detection](https://docs.scalr.io/scalr/docs/provider_resource_scalr_drift_detection.md)
* [scalr\_environment](https://docs.scalr.io/scalr/docs/provider_resource_scalr_environment.md)
* [scalr\_environment\_hook](https://docs.scalr.io/scalr/docs/provider_resource_scalr_environment_hook.md)
* [scalr\_event\_bridge\_integration](https://docs.scalr.io/scalr/docs/provider_resource_scalr_event_bridge_integration.md)
* [scalr\_federated\_environments](https://docs.scalr.io/scalr/docs/provider_resource_scalr_federated_environments.md)
* [scalr\_hook](https://docs.scalr.io/scalr/docs/provider_resource_scalr_hook.md)
* [scalr\_iam\_team](https://docs.scalr.io/scalr/docs/provider_resource_scalr_iam_team.md)
* [scalr\_integration\_infracost](https://docs.scalr.io/scalr/docs/provider_resource_scalr_integration_infracost.md)
* [scalr\_module](https://docs.scalr.io/scalr/docs/provider_resource_scalr_module.md)
* [scalr\_module\_namespace](https://docs.scalr.io/scalr/docs/provider_resource_scalr_module_namespace.md)
* [scalr\_policy\_group](https://docs.scalr.io/scalr/docs/provider_resource_scalr_policy_group.md)
* [scalr\_policy\_group\_linkage](https://docs.scalr.io/scalr/docs/provider_resource_scalr_policy_group_linkage.md)
* [scalr\_provider\_configuration](https://docs.scalr.io/scalr/docs/provider_resource_scalr_provider_configuration.md)
* [scalr\_provider\_configuration\_default](https://docs.scalr.io/scalr/docs/provider_resource_scalr_provider_configuration_default.md)
* [scalr\_role](https://docs.scalr.io/scalr/docs/provider_resource_scalr_role.md)
* [scalr\_run\_schedule\_rule](https://docs.scalr.io/scalr/docs/provider_resource_scalr_run_schedule_rule.md)
* [scalr\_run\_trigger](https://docs.scalr.io/scalr/docs/provider_resource_scalr_run_trigger.md)
* [scalr\_service\_account](https://docs.scalr.io/scalr/docs/provider_resource_scalr_service_account.md)
* [scalr\_service\_account\_token](https://docs.scalr.io/scalr/docs/provider_resource_scalr_service_account_token.md)
* [scalr\_slack\_integration](https://docs.scalr.io/scalr/docs/provider_resource_scalr_slack_integration.md)
* [scalr\_ssh\_key](https://docs.scalr.io/scalr/docs/provider_resource_scalr_ssh_key.md)
* [scalr\_tag](https://docs.scalr.io/scalr/docs/provider_resource_scalr_tag.md)
* [scalr\_var\_set](https://docs.scalr.io/scalr/docs/provider_resource_scalr_var_set.md)
* [scalr\_variable](https://docs.scalr.io/scalr/docs/provider_resource_scalr_variable.md)
* [scalr\_vcs\_provider](https://docs.scalr.io/scalr/docs/provider_resource_scalr_vcs_provider.md)
* [scalr\_webhook](https://docs.scalr.io/scalr/docs/provider_resource_scalr_webhook.md)
* [scalr\_workload\_identity\_provider](https://docs.scalr.io/scalr/docs/provider_resource_scalr_workload_identity_provider.md)
* [scalr\_workspace](https://docs.scalr.io/scalr/docs/provider_resource_scalr_workspace.md)
* [scalr\_workspace\_run\_schedule](https://docs.scalr.io/scalr/docs/provider_resource_scalr_workspace_run_schedule.md)
* [scalr\_workspace\_var\_set](https://docs.scalr.io/scalr/docs/provider_resource_scalr_workspace_var_set.md)