From 18c4f271ac698d8bd69884ff268096d51e1731dc Mon Sep 17 00:00:00 2001 From: Kostas Date: Thu, 1 Oct 2020 09:01:51 +0300 Subject: [PATCH] rename variable; add docs --- builder/oracle/oci/config.go | 4 ++-- builder/oracle/oci/config_test.go | 4 ++-- website/pages/docs/builders/oracle/oci.mdx | 6 +++++- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/builder/oracle/oci/config.go b/builder/oracle/oci/config.go index c63608c6b..79666620f 100644 --- a/builder/oracle/oci/config.go +++ b/builder/oracle/oci/config.go @@ -77,7 +77,7 @@ type Config struct { InstanceTags map[string]string `mapstructure:"instance_tags"` InstanceDefinedTags map[string]map[string]interface{} `mapstructure:"instance_defined_tags"` Shape string `mapstructure:"shape"` - BootVolumeSizeInGBs int64 `mapstructure:"boot_volume_size_in_gbs"` + BootVolumeSizeInGBs int64 `mapstructure:"disk_size"` // Metadata optionally contains custom metadata key/value pairs provided in the // configuration. While this can be used to set metadata["user_data"] the explicit @@ -333,7 +333,7 @@ func (c *Config) Prepare(raws ...interface{}) error { c.BootVolumeSizeInGBs = 50 } else if c.BootVolumeSizeInGBs < 50 || c.BootVolumeSizeInGBs > 16384 { errs = packer.MultiErrorAppend( - errs, errors.New("'boot_volume_size_in_gbs' must be between 50 and 16384 GBs")) + errs, errors.New("'disk_size' must be between 50 and 16384 GBs")) } if errs != nil && len(errs.Errors) > 0 { diff --git a/builder/oracle/oci/config_test.go b/builder/oracle/oci/config_test.go index eeeb189af..1026d8aed 100644 --- a/builder/oracle/oci/config_test.go +++ b/builder/oracle/oci/config_test.go @@ -44,8 +44,8 @@ func testConfig(accessConfFile *os.File) map[string]interface{} { "create_vnic_details": map[string]interface{}{ "nsg_ids": []string{"ocd1..."}, }, - "shape": "VM.Standard1.1", - "boot_volume_size_in_gbs": 60, + "shape": "VM.Standard1.1", + "disk_size": 60, } } diff --git a/website/pages/docs/builders/oracle/oci.mdx b/website/pages/docs/builders/oracle/oci.mdx index ab95924a8..956d9fdaf 100644 --- a/website/pages/docs/builders/oracle/oci.mdx +++ b/website/pages/docs/builders/oracle/oci.mdx @@ -139,7 +139,7 @@ can also be supplied to override the typical auto-generated key: - `instance_name` (string) - The name to assign to the instance used for the image creation process. If not set a name of the form `instanceYYYYMMDDhhmmss` will be used. -- `instance_tags` (map of strings) - Add one or more freeform tags to the instance used for the +- `instance_tags` (map of strings) - Add one or more freeform tags to the instance used for the image creation process. - `instance_defined_tags` (map of maps of strings) - Add one or more defined tags for a given namespace @@ -153,6 +153,10 @@ can also be supplied to override the typical auto-generated key: [the Oracle docs](https://docs.cloud.oracle.com/en-us/iaas/Content/Network/Tasks/managingVNICs.htm) for more information about VNICs. +- `disk_size` (int64) - The size of the boot volume in GBs. Minimum value is 50 and maximum value is 16384 (16TB). + Sets the [BootVolumeSizeInGBs](https://godoc.org/github.com/oracle/oci-go-sdk/core#InstanceConfigurationInstanceSourceViaImageDetails) + when launching the instance. Defaults to `50`. + - `use_private_ip` (boolean) - Use private ip addresses to connect to the instance via ssh.