Перейти к содержимому

API-ключ — это уникальная строка длиной 128 символов, предназначенная для упрощенной аутентификации сервисных аккаунтов в тех облачных сервисах, которые не поддерживают авторизованные ключи

terraform
resource "mws_iam_service_account" "example" {
service_account = var.service_account_name
}
resource "mws_iam_api_key" "example" {
api_key = var.api_key_name
service_account = mws_iam_service_account.example.service_account
metadata = {
display_name = "Example Api-Key"
}
}
variable "service_account_name" {
type = string
default = "my-test-service-account"
description = "Service account name"
}
variable "api_key_name" {
type = string
default = "my-test-api-key"
description = "Api-Key name"
}
  • api_key (String) Идентификатор API-ключа
  • service_account (String) Идентификатор сервисного аккаунта.
  • expire_time (String) Время истечения срока действия ключа.
  • kind (String)
  • metadata (Attributes) (see below for nested schema)
  • project (String) Путь к проекту
  • timeouts (Attributes) (see below for nested schema)

Optional:

  • description (String) Описание ресурса.
  • display_name (String) Отображаемое имя. Необязательное поле, можно свободно задавать и изменять для удобства организации ресурсов.

Read-Only:

  • create_time (String) Дата создания объекта.
  • delete_time (String) Время запроса на удаление ресурса (не фактическое время удаления).
  • id (String) ID свойства
  • purge_time (String)
  • usages (Attributes List) Связи с другими ресурсами. В зависимости от типа связи, операции над ресурсом могут быть ограничены. (see below for nested schema)

Read-Only:

  • name (String) Имя связи, требуется для модификации коллекции
  • resource (String) ссылка на ресурс
  • usage_type (String) Тип связи. Помимо стандартных own и use могут быть добавлены специализированные типы для конкретных сервисов

Optional:

  • create (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as ”30s” or “2h45m”. Valid time units are “s” (seconds), “m” (minutes), “h” (hours).
  • delete (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as ”30s” or “2h45m”. Valid time units are “s” (seconds), “m” (minutes), “h” (hours). Setting a timeout for a Delete operation is only applicable if changes are saved into state before the destroy operation occurs.
  • update (String) A string that can be parsed as a duration consisting of numbers and unit suffixes, such as ”30s” or “2h45m”. Valid time units are “s” (seconds), “m” (minutes), “h” (hours).

Read-Only:

  • api_key (String, Sensitive) Сгенерированный API-ключ
  • last_auth_time (String) Время последней аутентификации.
  • ready (Attributes) Информация о статусе реконсиляции (see below for nested schema)

Read-Only:

  • message (String) Описание статуса
  • state (String) Состояние ресурса