packer-cn/website/pages/docs/builders/yandex.mdx

65 lines
1.6 KiB
Plaintext
Raw Normal View History

---
description: |
2020-03-18 18:46:47 -04:00
The yandex Packer builder is able to create images for use with
Yandex.Cloud based on existing images.
layout: docs
2020-03-18 18:46:47 -04:00
page_title: Yandex Compute - Builders
sidebar_current: docs-builders-yandex
---
# Yandex Compute Builder
Type: `yandex`
The `yandex` Packer builder is able to create
[images](https://cloud.yandex.com/docs/compute/concepts/images) for use with
[Yandex Compute Cloud](https://cloud.yandex.com/docs/compute/)
based on existing images.
## Authentication
Yandex.Cloud services authentication requires one of the following security credentials:
2020-03-18 18:46:47 -04:00
- OAuth token
- File with Service Account Key
### Authentication Using Token
To authenticate with an OAuth token only `token` config key is needed.
Or use the `YC_TOKEN` environment variable.
### Authentication Using Service Account Key File
To authenticate with a service account credential, only `service_account_key_file` is needed.
Or use the `YC_SERVICE_ACCOUNT_KEY_FILE` environment variable.
## Basic Example
```json
{
"type": "yandex",
"token": "YOUR OAUTH TOKEN",
"folder_id": "YOUR FOLDER ID",
"source_image_family": "ubuntu-1804-lts",
"ssh_username": "ubuntu",
"use_ipv4_nat": "true"
}
```
## Configuration Reference
Configuration options are organized below into two categories: required and
optional. Within each category, the available options are alphabetized and
described.
2020-03-18 18:46:47 -04:00
In addition to the options listed here, a [communicator](/docs/templates/communicator.html)
can be configured for this builder.
### Required:
2020-03-18 18:46:47 -04:00
@include 'partials/builder/yandex/Config-required.mdx'
### Optional:
2020-03-18 18:46:47 -04:00
@include 'partials/builder/yandex/Config-not-required.mdx'