oracle.oci.oci_database_vm_cluster – Manage a VmCluster resource in Oracle Cloud Infrastructure

Note

This plugin is part of the oracle.oci collection (version 5.3.0).

You might already have this collection installed if you are using the ansible package. It is not included in ansible-core. To check whether it is installed, run ansible-galaxy collection list.

To install it, use: ansible-galaxy collection install oracle.oci.

To use it in a playbook, specify: oracle.oci.oci_database_vm_cluster.

New in version 2.9.0: of oracle.oci

Synopsis

  • This module allows the user to create, update and delete a VmCluster resource in Oracle Cloud Infrastructure

  • For state=present, creates an Exadata Cloud@Customer VM cluster.

  • This resource has the following action operations in the oracle.oci.oci_database_vm_cluster_actions module: add_virtual_machine, change_compartment, remove_virtual_machine.

Requirements

The below requirements are needed on the host that executes this module.

Parameters

Parameter Choices/Defaults Comments
api_user
string
The OCID of the user, on whose behalf, OCI APIs are invoked. If not set, then the value of the OCI_USER_ID environment variable, if any, is used. This option is required if the user is not specified through a configuration file (See config_file_location). To get the user's OCID, please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm.
api_user_fingerprint
string
Fingerprint for the key pair being used. If not set, then the value of the OCI_USER_FINGERPRINT environment variable, if any, is used. This option is required if the key fingerprint is not specified through a configuration file (See config_file_location). To get the key pair's fingerprint value please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm.
api_user_key_file
string
Full path and filename of the private key (in PEM format). If not set, then the value of the OCI_USER_KEY_FILE variable, if any, is used. This option is required if the private key is not specified through a configuration file (See config_file_location). If the key is encrypted with a pass-phrase, the api_user_key_pass_phrase option must also be provided.
api_user_key_pass_phrase
string
Passphrase used by the key referenced in api_user_key_file, if it is encrypted. If not set, then the value of the OCI_USER_KEY_PASS_PHRASE variable, if any, is used. This option is required if the key passphrase is not specified through a configuration file (See config_file_location).
auth_purpose
string
    Choices:
  • service_principal
The auth purpose which can be used in conjunction with 'auth_type=instance_principal'. The default auth_purpose for instance_principal is None.
auth_type
string
    Choices:
  • api_key ←
  • instance_principal
  • instance_obo_user
  • resource_principal
  • security_token
The type of authentication to use for making API requests. By default auth_type="api_key" based authentication is performed and the API key (see api_user_key_file) in your config file will be used. If this 'auth_type' module option is not specified, the value of the OCI_ANSIBLE_AUTH_TYPE, if any, is used. Use auth_type="instance_principal" to use instance principal based authentication when running ansible playbooks within an OCI compute instance.
cert_bundle
string
The full path to a CA certificate bundle to be used for SSL verification. This will override the default CA certificate bundle. If not set, then the value of the OCI_ANSIBLE_CERT_BUNDLE variable, if any, is used.
compartment_id
string
The OCID of the compartment.
Required for create using state=present.
Required for update when environment variable OCI_USE_NAME_AS_IDENTIFIER is set.
Required for delete when environment variable OCI_USE_NAME_AS_IDENTIFIER is set.
config_file_location
string
Path to configuration file. If not set then the value of the OCI_CONFIG_FILE environment variable, if any, is used. Otherwise, defaults to ~/.oci/config.
config_profile_name
string
The profile to load from the config file referenced by config_file_location. If not set, then the value of the OCI_CONFIG_PROFILE environment variable, if any, is used. Otherwise, defaults to the "DEFAULT" profile in config_file_location.
cpu_core_count
integer
The number of CPU cores to enable for the VM cluster.
Required for create using state=present.
This parameter is updatable.
data_collection_options
dictionary
This parameter is updatable.
is_diagnostics_events_enabled
boolean
    Choices:
  • no
  • yes
Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. Enabling diagnostic collection allows you to receive Events service notifications for guest VM issues. Diagnostic collection also allows Oracle to provide enhanced service and proactive support for your Exadata system. You can enable diagnostic collection during VM cluster/Cloud VM cluster provisioning. You can also disable or enable it at any time using the `UpdateVmCluster` or `updateCloudVmCluster` API.
is_health_monitoring_enabled
boolean
    Choices:
  • no
  • yes
Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. Enabling health monitoring allows Oracle to collect diagnostic data and share it with its operations and support personnel. You may also receive notifications for some events. Collecting health diagnostics enables Oracle to provide proactive support and enhanced service for your system. Optionally enable health monitoring while provisioning a system. You can also disable or enable health monitoring anytime using the `UpdateVmCluster`, `UpdateCloudVmCluster` or `updateDbsystem` API.
is_incident_logs_enabled
boolean
    Choices:
  • no
  • yes
Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. Enabling incident logs collection allows Oracle to receive Events service notifications for guest VM issues, collect incident logs and traces, and use them to diagnose issues and resolve them. Optionally enable incident logs collection while provisioning a system. You can also disable or enable incident logs collection anytime using the `UpdateVmCluster`, `updateCloudVmCluster` or `updateDbsystem` API.
data_storage_size_in_gbs
float
The data disk group size to be allocated in GBs.
This parameter is updatable.
data_storage_size_in_tbs
float
The data disk group size to be allocated in TBs.
This parameter is updatable.
db_node_storage_size_in_gbs
integer
The local node storage to be allocated in GBs.
This parameter is updatable.
db_servers
list / elements=string
The list of Db server.
defined_tags
dictionary
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
This parameter is updatable.
display_name
string
The user-friendly name for the VM cluster. The name does not need to be unique.
Required for create using state=present.
Required for update, delete when environment variable OCI_USE_NAME_AS_IDENTIFIER is set.

aliases: name
exadata_infrastructure_id
string
The OCID of the Exadata infrastructure.
Required for create using state=present.
force_create
boolean
    Choices:
  • no ←
  • yes
Whether to attempt non-idempotent creation of a resource. By default, create resource is an idempotent operation, and doesn't create the resource if it already exists. Setting this option to true, forcefully creates a copy of the resource, even if it already exists.This option is mutually exclusive with key_by.
freeform_tags
dictionary
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.
Example: `{"Department": "Finance"}`
This parameter is updatable.
gi_version
string
The Oracle Grid Infrastructure software version for the VM cluster.
Required for create using state=present.
is_local_backup_enabled
boolean
    Choices:
  • no
  • yes
If true, database backup on local Exadata storage is configured for the VM cluster. If false, database backup on local Exadata storage is not available in the VM cluster.
is_sparse_diskgroup_enabled
boolean
    Choices:
  • no
  • yes
If true, the sparse disk group is configured for the VM cluster. If false, the sparse disk group is not created.
key_by
list / elements=string
The list of attributes of this resource which should be used to uniquely identify an instance of the resource. By default, all the attributes of a resource are used to uniquely identify a resource.
license_model
string
    Choices:
  • LICENSE_INCLUDED
  • BRING_YOUR_OWN_LICENSE
The Oracle license model that applies to the VM cluster. The default is BRING_YOUR_OWN_LICENSE.
This parameter is updatable.
memory_size_in_gbs
integer
The memory to be allocated in GBs.
This parameter is updatable.
ocpu_count
float
The number of OCPU cores to enable for the VM cluster. Only one decimal place is allowed for the fractional part.
This parameter is updatable.
realm_specific_endpoint_template_enabled
boolean
    Choices:
  • no
  • yes
Enable/Disable realm specific endpoint template for service client. By Default, realm specific endpoint template is disabled. If not set, then the value of the OCI_REALM_SPECIFIC_SERVICE_ENDPOINT_TEMPLATE_ENABLED variable, if any, is used.
region
string
The Oracle Cloud Infrastructure region to use for all OCI API requests. If not set, then the value of the OCI_REGION variable, if any, is used. This option is required if the region is not specified through a configuration file (See config_file_location). Please refer to https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm for more information on OCI regions.
ssh_public_keys
list / elements=string
The public key portion of one or more key pairs used for SSH access to the VM cluster.
Required for create using state=present.
This parameter is updatable.
state
string
    Choices:
  • present ←
  • absent
The state of the VmCluster.
Use state=present to create or update a VmCluster.
Use state=absent to delete a VmCluster.
tenancy
string
OCID of your tenancy. If not set, then the value of the OCI_TENANCY variable, if any, is used. This option is required if the tenancy OCID is not specified through a configuration file (See config_file_location). To get the tenancy OCID, please refer https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm
time_zone
string
The time zone to use for the VM cluster. For details, see DB System Time Zones.
update_details
dictionary
This parameter is updatable.
update_action
string
    Choices:
  • ROLLING_APPLY
  • PRECHECK
  • ROLLBACK
The update action to perform.
This parameter is updatable.
update_id
string
The OCID of the maintenance update.
This parameter is updatable.
version
dictionary
This parameter is updatable.
action
string
    Choices:
  • APPLY
  • PRECHECK
The action to perform on the patch.
This parameter is updatable.
database_software_image_id
string
The OCID of the database software image.
This parameter is updatable.
patch_id
string
The OCID of the patch.
This parameter is updatable.
vm_cluster_id
string
The VM cluster OCID.
Required for update using state=present when environment variable OCI_USE_NAME_AS_IDENTIFIER is not set.
Required for delete using state=absent when environment variable OCI_USE_NAME_AS_IDENTIFIER is not set.

aliases: id
vm_cluster_network_id
string
The OCID of the VM cluster network.
Required for create using state=present.
wait
boolean
    Choices:
  • no
  • yes ←
Whether to wait for create or delete operation to complete.
wait_timeout
integer
Time, in seconds, to wait when wait=yes. Defaults to 1200 for most of the services but some services might have a longer wait timeout.

Examples

- name: Create vm_cluster
  oci_database_vm_cluster:
    # required
    compartment_id: "ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx"
    display_name: display_name_example
    exadata_infrastructure_id: "ocid1.exadatainfrastructure.oc1..xxxxxxEXAMPLExxxxxx"
    vm_cluster_network_id: "ocid1.vmclusternetwork.oc1..xxxxxxEXAMPLExxxxxx"
    gi_version: gi_version_example
    cpu_core_count: 56
    ssh_public_keys: [ "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAz..." ]

    # optional
    is_sparse_diskgroup_enabled: true
    is_local_backup_enabled: true
    time_zone: time_zone_example
    db_servers: [ "db_servers_example" ]
    ocpu_count: 3.4
    memory_size_in_gbs: 56
    db_node_storage_size_in_gbs: 56
    data_storage_size_in_tbs: 3.4
    data_storage_size_in_gbs: 3.4
    license_model: LICENSE_INCLUDED
    freeform_tags: {'Department': 'Finance'}
    defined_tags: {'Operations': {'CostCenter': 'US'}}
    data_collection_options:
      # optional
      is_diagnostics_events_enabled: true
      is_health_monitoring_enabled: true
      is_incident_logs_enabled: true

- name: Update vm_cluster
  oci_database_vm_cluster:
    # required
    vm_cluster_id: "ocid1.vmcluster.oc1..xxxxxxEXAMPLExxxxxx"

    # optional
    cpu_core_count: 56
    ocpu_count: 3.4
    memory_size_in_gbs: 56
    db_node_storage_size_in_gbs: 56
    data_storage_size_in_tbs: 3.4
    data_storage_size_in_gbs: 3.4
    license_model: LICENSE_INCLUDED
    ssh_public_keys: [ "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAz..." ]
    version:
      # optional
      patch_id: "ocid1.patch.oc1..xxxxxxEXAMPLExxxxxx"
      database_software_image_id: "ocid1.databasesoftwareimage.oc1..xxxxxxEXAMPLExxxxxx"
      action: APPLY
    update_details:
      # optional
      update_id: "ocid1.update.oc1..xxxxxxEXAMPLExxxxxx"
      update_action: ROLLING_APPLY
    freeform_tags: {'Department': 'Finance'}
    defined_tags: {'Operations': {'CostCenter': 'US'}}
    data_collection_options:
      # optional
      is_diagnostics_events_enabled: true
      is_health_monitoring_enabled: true
      is_incident_logs_enabled: true

- name: Update vm_cluster using name (when environment variable OCI_USE_NAME_AS_IDENTIFIER is set)
  oci_database_vm_cluster:
    # required
    compartment_id: "ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx"
    display_name: display_name_example

    # optional
    cpu_core_count: 56
    ocpu_count: 3.4
    memory_size_in_gbs: 56
    db_node_storage_size_in_gbs: 56
    data_storage_size_in_tbs: 3.4
    data_storage_size_in_gbs: 3.4
    license_model: LICENSE_INCLUDED
    ssh_public_keys: [ "ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAz..." ]
    version:
      # optional
      patch_id: "ocid1.patch.oc1..xxxxxxEXAMPLExxxxxx"
      database_software_image_id: "ocid1.databasesoftwareimage.oc1..xxxxxxEXAMPLExxxxxx"
      action: APPLY
    update_details:
      # optional
      update_id: "ocid1.update.oc1..xxxxxxEXAMPLExxxxxx"
      update_action: ROLLING_APPLY
    freeform_tags: {'Department': 'Finance'}
    defined_tags: {'Operations': {'CostCenter': 'US'}}
    data_collection_options:
      # optional
      is_diagnostics_events_enabled: true
      is_health_monitoring_enabled: true
      is_incident_logs_enabled: true

- name: Delete vm_cluster
  oci_database_vm_cluster:
    # required
    vm_cluster_id: "ocid1.vmcluster.oc1..xxxxxxEXAMPLExxxxxx"
    state: absent

- name: Delete vm_cluster using name (when environment variable OCI_USE_NAME_AS_IDENTIFIER is set)
  oci_database_vm_cluster:
    # required
    compartment_id: "ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx"
    display_name: display_name_example
    state: absent

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key Returned Description
vm_cluster
complex
on success
Details of the VmCluster resource acted upon by the current operation

Sample:
{'availability_domain': 'Uocm:PHX-AD-1', 'compartment_id': 'ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx', 'cpus_enabled': 56, 'data_collection_options': {'is_diagnostics_events_enabled': True, 'is_health_monitoring_enabled': True, 'is_incident_logs_enabled': True}, 'data_storage_size_in_gbs': 1.2, 'data_storage_size_in_tbs': 1.2, 'db_node_storage_size_in_gbs': 56, 'db_servers': [], 'defined_tags': {'Operations': {'CostCenter': 'US'}}, 'display_name': 'display_name_example', 'exadata_infrastructure_id': 'ocid1.exadatainfrastructure.oc1..xxxxxxEXAMPLExxxxxx', 'freeform_tags': {'Department': 'Finance'}, 'gi_version': 'gi_version_example', 'id': 'ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx', 'is_local_backup_enabled': True, 'is_sparse_diskgroup_enabled': True, 'last_patch_history_entry_id': 'ocid1.lastpatchhistoryentry.oc1..xxxxxxEXAMPLExxxxxx', 'license_model': 'LICENSE_INCLUDED', 'lifecycle_details': 'lifecycle_details_example', 'lifecycle_state': 'PROVISIONING', 'memory_size_in_gbs': 56, 'ocpus_enabled': 3.4, 'shape': 'shape_example', 'ssh_public_keys': ['ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAz...'], 'system_version': 'system_version_example', 'time_created': '2013-10-20T19:20:30+01:00', 'time_zone': 'time_zone_example', 'vm_cluster_network_id': 'ocid1.vmclusternetwork.oc1..xxxxxxEXAMPLExxxxxx'}
 
availability_domain
string
on success
The name of the availability domain that the VM cluster is located in.

Sample:
Uocm:PHX-AD-1
 
compartment_id
string
on success
The OCID of the compartment.

Sample:
ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx
 
cpus_enabled
integer
on success
The number of enabled CPU cores.

Sample:
56
 
data_collection_options
complex
on success

   
is_diagnostics_events_enabled
boolean
on success
Indicates whether diagnostic collection is enabled for the VM cluster/Cloud VM cluster/VMBM DBCS. Enabling diagnostic collection allows you to receive Events service notifications for guest VM issues. Diagnostic collection also allows Oracle to provide enhanced service and proactive support for your Exadata system. You can enable diagnostic collection during VM cluster/Cloud VM cluster provisioning. You can also disable or enable it at any time using the `UpdateVmCluster` or `updateCloudVmCluster` API.

Sample:
True
   
is_health_monitoring_enabled
boolean
on success
Indicates whether health monitoring is enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. Enabling health monitoring allows Oracle to collect diagnostic data and share it with its operations and support personnel. You may also receive notifications for some events. Collecting health diagnostics enables Oracle to provide proactive support and enhanced service for your system. Optionally enable health monitoring while provisioning a system. You can also disable or enable health monitoring anytime using the `UpdateVmCluster`, `UpdateCloudVmCluster` or `updateDbsystem` API.

Sample:
True
   
is_incident_logs_enabled
boolean
on success
Indicates whether incident logs and trace collection are enabled for the VM cluster / Cloud VM cluster / VMBM DBCS. Enabling incident logs collection allows Oracle to receive Events service notifications for guest VM issues, collect incident logs and traces, and use them to diagnose issues and resolve them. Optionally enable incident logs collection while provisioning a system. You can also disable or enable incident logs collection anytime using the `UpdateVmCluster`, `updateCloudVmCluster` or `updateDbsystem` API.

Sample:
True
 
data_storage_size_in_gbs
float
on success
Size of the DATA disk group in GBs.

Sample:
1.2
 
data_storage_size_in_tbs
float
on success
Size, in terabytes, of the DATA disk group.

Sample:
1.2
 
db_node_storage_size_in_gbs
integer
on success
The local node storage allocated in GBs.

Sample:
56
 
db_servers
list / elements=string
on success
The list of Db server.

 
defined_tags
dictionary
on success
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.

Sample:
{'Operations': {'CostCenter': 'US'}}
 
display_name
string
on success
The user-friendly name for the Exadata Cloud@Customer VM cluster. The name does not need to be unique.

Sample:
display_name_example
 
exadata_infrastructure_id
string
on success
The OCID of the Exadata infrastructure.

Sample:
ocid1.exadatainfrastructure.oc1..xxxxxxEXAMPLExxxxxx
 
freeform_tags
dictionary
on success
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.
Example: `{"Department": "Finance"}`

Sample:
{'Department': 'Finance'}
 
gi_version
string
on success
The Oracle Grid Infrastructure software version for the VM cluster.

Sample:
gi_version_example
 
id
string
on success
The OCID of the VM cluster.

Sample:
ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx
 
is_local_backup_enabled
boolean
on success
If true, database backup on local Exadata storage is configured for the VM cluster. If false, database backup on local Exadata storage is not available in the VM cluster.

Sample:
True
 
is_sparse_diskgroup_enabled
boolean
on success
If true, sparse disk group is configured for the VM cluster. If false, sparse disk group is not created.

Sample:
True
 
last_patch_history_entry_id
string
on success
The OCID of the last patch history. This value is updated as soon as a patch operation starts.

Sample:
ocid1.lastpatchhistoryentry.oc1..xxxxxxEXAMPLExxxxxx
 
license_model
string
on success
The Oracle license model that applies to the VM cluster. The default is LICENSE_INCLUDED.

Sample:
LICENSE_INCLUDED
 
lifecycle_details
string
on success
Additional information about the current lifecycle state.

Sample:
lifecycle_details_example
 
lifecycle_state
string
on success
The current state of the VM cluster.

Sample:
PROVISIONING
 
memory_size_in_gbs
integer
on success
The memory allocated in GBs.

Sample:
56
 
ocpus_enabled
float
on success
The number of enabled OCPU cores.

Sample:
3.4
 
shape
string
on success
The shape of the Exadata infrastructure. The shape determines the amount of CPU, storage, and memory resources allocated to the instance.

Sample:
shape_example
 
ssh_public_keys
list / elements=string
on success
The public key portion of one or more key pairs used for SSH access to the VM cluster.

Sample:
['ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAz...']
 
system_version
string
on success
Operating system version of the image.

Sample:
system_version_example
 
time_created
string
on success
The date and time that the VM cluster was created.

Sample:
2013-10-20T19:20:30+01:00
 
time_zone
string
on success
The time zone of the Exadata infrastructure. For details, see Exadata Infrastructure Time Zones.

Sample:
time_zone_example
 
vm_cluster_network_id
string
on success
The OCID of the VM cluster network.

Sample:
ocid1.vmclusternetwork.oc1..xxxxxxEXAMPLExxxxxx


Authors

  • Oracle (@oracle)