rename variable; add docs

This commit is contained in:
Kostas 2020-10-01 09:01:51 +03:00
parent 72166febee
commit 18c4f271ac
3 changed files with 9 additions and 5 deletions

View File

@ -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 {

View File

@ -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,
}
}

View File

@ -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.