scalr_storage_profile

Resource: scalr_storage_profile

Manages the state of storage profiles in Scalr.

Example Usage

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": "[email protected]",
      "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

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.

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.

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.

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.
  • 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:

terraform import scalr_storage_profile.example sp-xxxxxxxxxx