Single value variables

If a variable always resolves to a single string, use the variable directly without modification in the FlexConfig script.

For example, the predefined text variable tcpMssBytes always resolves to a single value (which must be numeric). The Sysopt_basic FlexConfig then uses an if/then/else structure to set the maximum segment size based on the value of another single-value text variable, tcpMssMinimum .

Implementation methods

The implementation of single value variables depends on the variable type:

  • Standard text variables: Use the variable directly in the FlexConfig script. For example, the predefined text variable tcpMssBytes always resolves to a single numeric value.

  • Secret key variables: Always use the Insert menu to add the variable, even for second and subsequent uses. These variables do not show up in the Variables list within the FlexConfig object.

  • Policy object variables for network objects: Equate to a single IP address specification (host address, network address, or address range). You must know what type of address to expect because ASA commands require specific address types.

Note

Policy object variables for network objects also equate to a single IP address specification, either a host address, network address, or address range. However, in this case, you must know what type of address to expect, because the ASA commands require specific address types. For example, if a command requires a host address, using a network object variable that points to an object that contains a network address will result in an error during deployment.

TCP MSS configuration using single value variables

The Sysopt_basic FlexConfig uses an if/then/else structure to set the maximum segment size based on the value of another single-value text variable, tcpMssMinimum:


#if($tcpMssMinimum == "true")
  sysopt connection tcpmss minimum $tcpMssBytes 
#else
  sysopt connection tcpmss $tcpMssBytes 
#end

In this example, you would use the Insert menu in the FlexConfig object editor to add the first use of $tcpMssBytes, but you would type in the variable directly on the #else line.