Last updated on: 2023-10-18 04:01:19.

F5OS Terraform Reference Guide

This F5OS Terraform Provider Reference Guide describes how to manage the following F5OS Terraform Provider resources:

Prerequisites

The following is required for using ALL F5OS Terraform Provider resources:



F5OS Tenant reference

This topic describes how to manage the F5OS tenant.

F5OS Tenant example

The following example demonstrates a resource used to manage F5OS tenant.

resource "f5os_tenant" "test2" {
  name              = "testtenant-ecosys2"
  image_name        = "BIGIP-17.1.0-0.0.16.ALL-F5OS.qcow2.zip.bundle"
  mgmt_ip           = "10.10.10.26"
  mgmt_gateway      = "10.10.10.1"
  mgmt_prefix       = 24
  type              = "BIG-IP"
  cpu_cores         = 8
  running_state     = "configured"
  virtual_disk_size = 82
}

Required parameters

  • image_name (string) - Name of the tenant image used. Required for create operations.
  • mgmt_gateway (string) - Tenant management gateway.
  • mgmt_ip (string) - IP address used to connect to the deployed tenant. Required for create operations.
  • mgmt_prefix (integer) - Tenant management CIDR prefix.
  • name (string) - Name of the tenant. The first character must be a letter. Only lowercase alphanumeric characters are allowed. No special or extended characters are allowed except for hyphens. The name cannot exceed 50 characters.

Optional parameters

  • cpu_cores (integer) - The number of vCPUs you want added to the tenant. Required for create operations.
  • cryptos (string) - Whether crypto and compression hardware offload should be enabled on the tenant. We recommend it is enabled, otherwise crypto and compression may be processed in CPU.
  • dag_ipv6_prefix_length (integer) - Configures the DAG Global IPv6 prefix length. Value ranges from 1 to 128. Default value is 128.
  • nodes (integer list) - List of integers. Specifies on which blades nodes the tenants are deployed. Required for create operations. For single blade platforms like rSeries only the value of 1 should be provided.
  • deployment_file (string) - Deployment file used for BIG-IP-Next (limited access coming soon). Required for if type is BIG-IP-Next (limited access coming soon).
  • mac_block_size (string) - Configures a BIG-IP tenant on these systems to use a contiguous block of MAC allocation. Default value is one.
  • running_state (string) - Desired running_state of the tenant.
  • timeout (integer) - The number of seconds to wait for image import to finish.
  • type (string) - Name of the tenant image to be used. Required for create operations
  • virtual_disk_size (integer) - Minimum virtual disk size required for Tenant deployment
  • vlans (integer list) - The existing VLAN IDs in the chassis partition that should be added to the tenant. The order of these VLANs is ignored. This module orders the VLANs automatically, if you deliberately re-order them in subsequent tasks, this module will not register a change. Required for create operations.

Read-only parameters

  • id (string) - Tenant identifier.
  • status (string) - Tenant status.

F5OS Tenant image example

The following example demonstrates a resource used to manage F5OS tenant image.

resource "f5os_tenant_image" "test" {
  image_name  = "BIGIP-17.1.0-0.0.16.ALL-F5OS.qcow2.zip.bundle"
  remote_host = "remote-host"
  remote_path = "remote-path"
  local_path  = "images"
  timeout     = 360
}

Required parameters

  • image_name (string) - Name of the tenant image.

Optional parameters

  • local_path (string) - The path on the F5OS where the tenant image is to be uploaded.
  • protocol (string) - Protocol for image transfer.
  • remote_host (string) - The hostname or IP address of the remote server on which the tenant image is stored. The server must make the image accessible via the specified protocol.
  • remote_password (string, sensitive) Password for the user on the remote server on which the tenant image is stored.
  • remote_path (string) - The path to the tenant image on the remote server.
  • remote_port (integer) - The port on the remote host to which you want to connect. If the port is not provided, a default port for the selected protocol is used.
  • remote_user (string) - User name for the remote server on which the tenant image is stored.
  • timeout (integer) - The number of seconds to wait for image import to finish.

Read-only parameters

  • id (string) - Example identifier.
  • image_status (string) - Status of imported image.



F5OS VLAN reference

This topic describes how to manage the F5OS VLAN using Terraform.

F5OS VLAN example

The following example demonstrates a resource used to manage F5OS VLAN.

resource "f5os_vlan" "vlan-id" {vlan-id" {
  vlan_id    = 4
  name       = "vlan4"
}

Required parameters

  • vlan_id (integer) - The ID for the VLAN. Valid value range is 0 to 4095.

Optional parameters

  • name (string) - Specifies the name of the VLAN to configure on the F5OS platform. This parameter is REQUIRED when creating a resource. The first character must be a letter, alphanumeric characters are allowed. Periods, commas, hyphens, and underscores are allowed. The name cannot exceed 58 characters.

Read-only parameters

  • id (string) - Unique identifier for the VLAN resource.



F5OS Partition for VELOS reference

This topic describes how to manage the F5OS Partition for VELOS using Terraform.

F5OS Partition example

The following example demonstrates a resource used to manage F5OS Partition for VELOS.

Resource "f5os_partition" "velos-part" {

  name                              = "TerraformPartition"
  os_version                        = "1.3.1-5968"
  ipv4_mgmt_address                 = "10.1.1.125/24"
  ipv4_mgmt_gateway                 = "10.1.1.253"
  ipv6_mgmt_address                 = "2001::1/64"
  ipv6_mgmt_gateway                 = "2001::"
  slots                             = [1, 2]
}

Required parameters

  • name (string) - Name of the chassis partition. The first character must be a letter. Only lowercase alphanumeric characters are allowed. No special or extended characters are allowed except for hyphens. The name cannot exceed 50 characters.

Optional parameters

  • ipv4_mgmt_address (string) - Specifies the IPv4 address and subnet mask used to access the chassis partition. The address must be specified in CIDR notation; for example, 192.168.1.1/24.
  • ipv4_mgmt_gateway (string) - Specifies the IPv4 chassis partition management gateway.
  • Ipv6_mgmt_address (string) - Specifies the IPv6 address and subnet mask used to access the chassis partition. The address must be specified in CIDR notation; for example, 2002::1234:abcd:ffff:c0a8:101/64.
  • Ipv6_mgmt_gateway (string) - Specifies the IPv6 chassis partition management gateway.
  • os_version (string) – Specifies the partition OS version.
  • slots (integer) - List of integers specifying with which slots the chassis partition should be associated.
  • enabled (boolean) - Enables or disables the partition.
  • configuration_volume_size (integer) - Select the desired configuration volume in increments of 1 GB. The default value is 10 GB, with a minimum of 5 GB and a maximum of 15 GB. After you configure the volume sizes, you can increase but NOT decrease the size.
  • images_volume_size (integer) - select the desired storage volume for all tenant images in increments of 1 GB. The default value is 15 GB, with a minimum of 5 GB and a maximum of 50 GB. After you configure the volume sizes, you can increase but NOT decrease the size.
  • shared_volume_size (integer) - select the desired user data (tcpdump captures, QKView data, etc.) volume in increments of 1 GB. The default value is 10 GB, with a minimum of 5 GB and a maximum of 20 GB. After you configure the volume sizes, you can increase but NOT decrease the size.
  • timeout (integer) - The number of seconds to wait for the partition to transition to a running state. Default value is 360 seconds.

Read-only parameters

  • id (string) - Unique identifier for the Partition resource.

F5OS partition password change example

The following example demonstrates a resource used to change the F5OS partition password.

resource "f5os_partition_change_password" "changepass" {
  user_name    = "user1"
  old_password = "oldpwd"
  new_password = "newpwd"
}

Required parameters

  • user_name (string) - Name of the chassis partition user account.
  • new_password (string) - New password for the specified user account.
  • old_password (string) - Current password for the specified user account.

Read-only parameters

  • id (string) - Unique identifier for the Partition password change resource.


What’s Next?