- Using Oracle Cloud Stack
- Creating Templates with Oracle Cloud Stack
- Creating a Template
- Creating Template Parameters
Creating Template Parameters
For an introduction, see What are Parameters.
Some parameters are predefined and available to all templates. You do not have to explicitly define them. See List of Implicit Template Parameters.
Tip:
To define constraints on the stack’s name, create a template parameter namedserviceName
of type String
.
- Access the Oracle Cloud Stack console, and then edit your template.
- To the right of Parameters, click Add parameter .
- Enter a name for the parameter.
- Select a parameter type:
Parameter Type Description String
Users can enter any text value.
Number
Users can enter only a numeric value.
Boolean
Users can select either true or false (check box).
Password
Users can enter any text value, but this value is not displayed in the Oracle Cloud Stack console.
Ssh
Users can supply a Secure Shell (SSH) public key. Oracle Cloud Stack console users can supply the key value as text or as a file, or let Oracle Cloud generate a value dynamically. If the key is generated, users must download a file containing the public key and its corresponding private key.
ComputeShape
Users can select from a list of standard Oracle Cloud compute shapes (
oc3
,oc2m
, and so on). A shape specifies the number of Oracle Compute Units (OCPUs) and the amount of memory allocated to a cloud resource.Storage
Users can specify a storage container in Oracle Cloud Infrastructure Object Storage Classic.
Region
Users can select from a list of Oracle Cloud regions, such as a geographical locations. The available regions vary depending on the user’s account settings. The default value is "No Preference", in which case Oracle Cloud automatically selects a region.
File
Users can select a file to upload from their local machine.
Service_
Type
Users can select from a list of existing instances of cloud resource
Type
. See List of Resource Types. - Edit the attributes and constraints of the parameter:
The available attributes and constraints vary for each parameter type.
Field Description default
The value of this parameter if none is provided
description
A description of the parameter. This description is displayed if the user clicks the help icon.
label
The parameter’s display name.
mandatory
(true/false) Whether or not this parameter is mandatory or optional
readOnly
(true/false) Whether or not the default value of this parameter can be modified
sensitive
(true/false) Whether or not this parameter’s value should be displayed to users
allowedPattern
The parameter’s value must match this regular expression, such as
"[a-zA-Z]*"
allowedValues
A list of value options. Use one of these formats:
-
A comma-separated list of values
-
A list of
key:value
pairs. The values are displayed to the user and theGetParam
function returns the selected key.
constraintDescription
A custom message that is displayed to the user if the parameter’s constraints are not met
maxLength
The maximum number of characters
minLength
The minimum number of characters
maxValue
The minimum numeric value
minValue
The maximum numeric value
-
- Click Apply Changes.
- Repeat from step 2 for each additional template parameter that you want to create.
- Click Save the current template .
If you delete an existing parameter, Oracle Cloud
Stack does not delete any references to the parameter in the rest of the template (Fn::GetParam: paramName
). Your template will not have valid syntax until you remove these parameter references.
After creating parameters in a template, see:
-
Creating Parameter Groups (optional)