packer-cn/builder/ucloud/examples/basic.json

39 lines
973 B
JSON
Raw Normal View History

2019-06-13 03:16:49 -04:00
{
"variables": {
"ucloud_public_key": "{{env `UCLOUD_PUBLIC_KEY`}}",
"ucloud_private_key": "{{env `UCLOUD_PRIVATE_KEY`}}",
"ucloud_project_id": "{{env `UCLOUD_PROJECT_ID`}}"
},
2019-10-12 04:46:21 -04:00
"builders": [
{
"type": "ucloud-uhost",
"public_key": "{{user `ucloud_public_key`}}",
"private_key": "{{user `ucloud_private_key`}}",
2019-06-27 02:28:46 -04:00
"project_id": "{{user `ucloud_project_id`}}",
2019-10-12 04:46:21 -04:00
"region": "cn-bj2",
"availability_zone": "cn-bj2-02",
"instance_type": "n-basic-2",
"source_image_id": "uimage-f1chxn",
"ssh_username": "root",
"image_name": "packer-test-basic-bj",
"image_copy_to_mappings": [
{
"project_id": "{{user `ucloud_project_id`}}",
"region": "cn-sh2",
"description": "test",
"name": "packer-test-basic-sh"
}
]
}
],
"provisioners": [
{
"type": "shell",
"inline": [
"yum install -y nginx"
]
}
]
2019-06-13 03:16:49 -04:00
}