2019-06-12 08:49:28 -04:00
|
|
|
---
|
|
|
|
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.
|
2019-06-12 08:49:28 -04:00
|
|
|
layout: docs
|
2020-03-18 18:46:47 -04:00
|
|
|
page_title: Yandex Compute - Builders
|
|
|
|
sidebar_current: docs-builders-yandex
|
2019-06-12 08:49:28 -04:00
|
|
|
---
|
|
|
|
|
|
|
|
# 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
|
2019-06-12 08:49:28 -04:00
|
|
|
|
|
|
|
### 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
|
|
|
|
|
2020-03-12 10:05:08 -04:00
|
|
|
```json
|
2019-06-12 08:49:28 -04:00
|
|
|
{
|
|
|
|
"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)
|
2019-06-12 08:49:28 -04:00
|
|
|
can be configured for this builder.
|
|
|
|
|
|
|
|
### Required:
|
|
|
|
|
2020-03-18 18:46:47 -04:00
|
|
|
@include 'partials/builder/yandex/Config-required.mdx'
|
2019-06-12 08:49:28 -04:00
|
|
|
|
|
|
|
### Optional:
|
|
|
|
|
2020-03-18 18:46:47 -04:00
|
|
|
@include 'partials/builder/yandex/Config-not-required.mdx'
|