From 32b77f3b80c290de21cf8c8f3024831395b41865 Mon Sep 17 00:00:00 2001 From: Gennady Lipenkov Date: Wed, 8 Jul 2020 22:54:20 +0300 Subject: [PATCH] Update doc pages --- .../yandex-import/post-processor.go | 1 + website/data/docs-navigation.js | 1 + .../yandex-import/Config-not-required.mdx | 23 +++++++++++++++++++ .../yandex-import/Config-required.mdx | 14 +++++++++++ 4 files changed, 39 insertions(+) create mode 100644 website/pages/partials/post-processor/yandex-import/Config-not-required.mdx create mode 100644 website/pages/partials/post-processor/yandex-import/Config-required.mdx diff --git a/post-processor/yandex-import/post-processor.go b/post-processor/yandex-import/post-processor.go index 655f77cfb..d8038f3cc 100644 --- a/post-processor/yandex-import/post-processor.go +++ b/post-processor/yandex-import/post-processor.go @@ -1,3 +1,4 @@ +//go:generate struct-markdown //go:generate mapstructure-to-hcl2 -type Config package yandeximport diff --git a/website/data/docs-navigation.js b/website/data/docs-navigation.js index 0669763f6..92f9ec5cc 100644 --- a/website/data/docs-navigation.js +++ b/website/data/docs-navigation.js @@ -268,6 +268,7 @@ export default [ 'vsphere', 'vsphere-template', 'yandex-export', + 'yandex-import', ], }, '----------', diff --git a/website/pages/partials/post-processor/yandex-import/Config-not-required.mdx b/website/pages/partials/post-processor/yandex-import/Config-not-required.mdx new file mode 100644 index 000000000..cefa41b91 --- /dev/null +++ b/website/pages/partials/post-processor/yandex-import/Config-not-required.mdx @@ -0,0 +1,23 @@ + + +- `token` (string) - OAuth token to use to authenticate to Yandex.Cloud. Alternatively you may set + value by environment variable YC_TOKEN. + +- `service_account_key_file` (string) - Path to file with Service Account key in json format. This + is an alternative method to authenticate to Yandex.Cloud. Alternatively you may set environment variable + YC_SERVICE_ACCOUNT_KEY_FILE. + +- `object_name` (string) - The name of the object key in + `bucket` where the qcow2 file will be copied to import. This is a [template engine](/docs/templates/engine). + Therefore, you may use user variables and template functions in this field. + +- `skip_clean` (bool) - Whether skip removing the qcow2 file uploaded to Storage + after the import process has completed. Possible values are: `true` to + leave it in the bucket, `false` to remove it. (Default: `false`). + +- `image_description` (string) - The description of the image. + +- `image_family` (string) - The family name of the imported image. + +- `image_labels` (map[string]string) - Key/value pair labels to apply to the imported image. + \ No newline at end of file diff --git a/website/pages/partials/post-processor/yandex-import/Config-required.mdx b/website/pages/partials/post-processor/yandex-import/Config-required.mdx new file mode 100644 index 000000000..eacba433a --- /dev/null +++ b/website/pages/partials/post-processor/yandex-import/Config-required.mdx @@ -0,0 +1,14 @@ + + +- `folder_id` (string) - The folder ID that will be used to store imported Image. + Alternatively you may set value by environment variable YC_FOLDER_ID. + +- `service_account_id` (string) - Service Account ID with proper permission to use Storage service + for operations 'upload' and 'delete' object to `bucket` + +- `bucket` (string) - The name of the bucket where the qcow2 file will be copied to for import. + This bucket must exist when the post-processor is run. + +- `image_name` (string) - The name of the image, which contains 1-63 characters and only + supports lowercase English characters, numbers and hyphen. + \ No newline at end of file