Yandex Cloud
Поиск
Связаться с экспертомПопробовать бесплатно
  • Кейсы
  • Документация
  • Блог
  • Все сервисы
    • Cloud Interconnect
    • Cloud Backup
    • Compute Cloud
    • Object Storage
    • Managed Service for Kubernetes®
    • Managed Service for PostgreSQL
    • Managed Service for ClickHouse®
    • Monium
    • Cloud CDN
    • Network Load Balancer
    • Virtual Private Cloud
    • Cloud DNS
    • Application Load Balancer
    • Yandex Cloud Router
    • Managed Service for MySQL®
    • Managed Service for Valkey™
    • Managed Service for Apache Spark™
    • Managed Service for OpenSearch
    • Managed Service for Apache Kafka®
    • Data Transfer
    • Yandex MPP Analytics Engine for PostgreSQL
    • Managed Service for YDB
    • SpeechKit
    • Yandex Identity Hub
    • Key Management Service
    • Certificate Manager
    • Yandex Lockbox
    • Audit Trails
    • Container Registry
    • Managed Service for Prometheus®
    • Message Queue
    • Identity and Access Management
    • Yandex Cloud Console
    • Resource Manager
    • Yandex Cloud Billing
    • Cloud Apps
    • Yandex AI Studio
    • Yandex BareMetal
    • Smart Web Security
    • Security Deck
    • Yandex Cloud Video
    • Stackland
    • Yandex StoreDoc
    • Yandex Managed Service for Apache Airflow®
    • Data Processing
    • Yandex MetaData Hub
    • Yandex WebSQL
    • DataLens
    • Yandex Search API
    • SpeechSense
    • DataSphere
    • Vision OCR
    • Translate
    • Cloud Registry
    • SmartCaptcha
    • Cloud Desktop
    • SourceCraft Code Assistant
    • Managed Service for GitLab
    • Cloud Functions
    • API Gateway
    • Yandex Cloud Postbox
    • Serverless Integrations
    • IoT Core
    • Serverless Containers
    • Cloud Notification Service
    • Yandex Query
  • Статус работы сервисов
  • Marketplace
    • Доступны в регионе
    • Инфраструктура и сеть
    • Платформа данных
    • Искусственный интеллект
    • Безопасность
    • Инструменты DevOps
    • Бессерверные вычисления
    • Управление ресурсами
  • Все решения
    • По отраслям
    • По типу задач
    • Экономика платформы
    • Безопасность
    • Техническая поддержка
    • Каталог партнёров
    • Обучение и сертификация
    • Облако для стартапов
    • Облако для крупного бизнеса
    • Центр технологий для общества
    • Партнёрская программа
    • Поддержка IT-бизнеса
    • Облако для фрилансеров
    • Обучение и сертификация
    • Блог
    • Документация
    • Мероприятия и вебинары
    • Контакты, чаты и сообщества
    • Идеи
    • Калькулятор цен
    • Тарифы
    • Акции и free tier
  • Кейсы
  • Документация
  • Блог
Создавайте контент и получайте гранты!Готовы написать своё руководство? Участвуйте в контент-программе и получайте гранты на работу с облачными сервисами!
Подробнее о программе
Проект Яндекса
© 2026 ТОО «Облачные Сервисы Казахстан»
Terraform в Yandex Cloud
  • Начало работы
  • Настройка аутентификации Terraform-провайдера Yandex Cloud
  • Библиотека решений
    • Обзор
    • История изменений (англ.)
          • iam_oauth_client
          • iam_oauth_client_secret
          • iam_service_account
          • iam_service_account_api_key
          • iam_service_account_iam_binding
          • iam_service_account_iam_member
          • iam_service_account_iam_policy
          • iam_service_account_key
          • iam_service_account_static_access_key
          • iam_workload_identity_federated_credential
          • iam_workload_identity_oidc_federation
          • iam_workload_identity_oidc_federation_iam_binding

В этой статье:

  • Example usage
  • Arguments & Attributes Reference
  1. Справочник Terraform
  2. Ресурсы (англ.)
  3. Identity and Access Management
  4. Resources
  5. iam_service_account_api_key

yandex_iam_service_account_api_key (Resource)

Статья создана
Yandex Cloud
Обновлена 9 февраля 2026 г.
Открыть в Markdown
  • Example usage
  • Arguments & Attributes Reference

Allows management of a Yandex Cloud IAM service account API key. The API key is a private key used for simplified authorization in the Yandex Cloud API. API keys are only used for service accounts.

API keys do not expire. This means that this authentication method is simpler, but less secure. Use it if you can't automatically request an IAM token.

Example usageExample usage

//
// Create a new IAM Service Account API Key.
//
resource "yandex_iam_service_account_api_key" "sa-api-key" {
  lifecycle {
    ignore_changes = [scope]
  }
  service_account_id = "aje5a**********qspd3"
  description        = "api key for authorization"
  scopes             = ["yc.ydb.topics.manage", "yc.ydb.tables.manage"]
  expires_at         = "2024-11-11T00:00:00Z"
  pgp_key            = "keybase:keybaseusername"
}

Arguments & Attributes ReferenceArguments & Attributes Reference

  • created_at (Read-Only) (String). The creation timestamp of the resource.
  • description (String). The resource description.
  • encrypted_secret_key (Read-Only) (String). The encrypted secret key, base64 encoded. This is only populated when pgp_key is supplied.
  • expires_at (String). The key will be no longer valid after expiration timestamp.
  • id (String).
  • key_fingerprint (Read-Only) (String). The fingerprint of the PGP key used to encrypt the secret key. This is only populated when pgp_key is supplied.
  • output_to_lockbox_version_id (Read-Only) (String). ID of the Lockbox secret version that contains the value of secret_key. This is only populated when output_to_lockbox is supplied. This version will be destroyed when the IAM key is destroyed, or when output_to_lockbox is removed.
  • pgp_key (String). An optional PGP key to encrypt the resulting secret key material. May either be a base64-encoded public key or a keybase username in the form keybase:keybaseusername.
  • scope (String). The scope of the key. Use lifecycle {ignore_changes = [scope]} directive to avoid false changes on apply.
  • scopes (List Of String). The list of scopes of the key.
  • secret_key (Read-Only) (String). The secret key. This is only populated when neither pgp_key nor output_to_lockbox are provided.
  • service_account_id (Required)(String). ID of the service account to an API key for.
  • output_to_lockbox [Block]. option to create a Lockbox secret version from sensitive outputs
    • entry_for_secret_key (Required)(String). entry that will store the value of secret_key
    • secret_id (Required)(String). ID of the Lockbox secret where to store the sensible values.

Была ли статья полезна?

Предыдущая
iam_service_account
Следующая
iam_service_account_iam_binding
Создавайте контент и получайте гранты!Готовы написать своё руководство? Участвуйте в контент-программе и получайте гранты на работу с облачными сервисами!
Подробнее о программе
Проект Яндекса
© 2026 ТОО «Облачные Сервисы Казахстан»