oracle.oci.oci_network_ip_sec_connection_tunnel_facts – Fetches details about one or multiple IpSecConnectionTunnel resources in Oracle Cloud Infrastructure

Note

This plugin is part of the oracle.oci collection (version 4.14.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_network_ip_sec_connection_tunnel_facts.

New in version 2.9.0: of oracle.oci

Synopsis

  • Fetches details about one or multiple IpSecConnectionTunnel resources in Oracle Cloud Infrastructure

  • Lists the tunnel information for the specified IPSec connection.

  • If tunnel_id is specified, the details of a single IpSecConnectionTunnel will be returned.

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
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.
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.
display_name
string
Use display_name along with the other options to return only resources that match the given display name exactly.
ipsc_id
string / required
The OCID of the IPSec connection.
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.
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
tunnel_id
string
The OCID of the tunnel.
Required to get a specific ip_sec_connection_tunnel.

aliases: id

Examples

- name: Get a specific ip_sec_connection_tunnel
  oci_network_ip_sec_connection_tunnel_facts:
    # required
    tunnel_id: "ocid1.tunnel.oc1..xxxxxxEXAMPLExxxxxx"
    ipsc_id: "ocid1.ipsc.oc1..xxxxxxEXAMPLExxxxxx"

- name: List ip_sec_connection_tunnels
  oci_network_ip_sec_connection_tunnel_facts:
    # required
    ipsc_id: "ocid1.ipsc.oc1..xxxxxxEXAMPLExxxxxx"

Return Values

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

Key Returned Description
ip_sec_connection_tunnels
complex
on success
List of IpSecConnectionTunnel resources

Sample:
[{'bgp_session_info': {'bgp_ipv6_state': 'UP', 'bgp_state': 'UP', 'customer_bgp_asn': 'customer_bgp_asn_example', 'customer_interface_ip': 'customer_interface_ip_example', 'customer_interface_ipv6': 'customer_interface_ipv6_example', 'oracle_bgp_asn': 'oracle_bgp_asn_example', 'oracle_interface_ip': 'oracle_interface_ip_example', 'oracle_interface_ipv6': 'oracle_interface_ipv6_example'}, 'compartment_id': 'ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx', 'cpe_ip': 'cpe_ip_example', 'display_name': 'display_name_example', 'dpd_mode': 'INITIATE_AND_RESPOND', 'dpd_timeout_in_sec': 56, 'encryption_domain_config': {'cpe_traffic_selector': [], 'oracle_traffic_selector': []}, 'id': 'ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx', 'ike_version': 'V1', 'lifecycle_state': 'PROVISIONING', 'nat_translation_enabled': 'ENABLED', 'oracle_can_initiate': 'INITIATOR_OR_RESPONDER', 'phase_one_details': {'custom_authentication_algorithm': 'custom_authentication_algorithm_example', 'custom_dh_group': 'custom_dh_group_example', 'custom_encryption_algorithm': 'custom_encryption_algorithm_example', 'is_custom_phase_one_config': True, 'is_ike_established': True, 'lifetime': 56, 'negotiated_authentication_algorithm': 'negotiated_authentication_algorithm_example', 'negotiated_dh_group': 'negotiated_dh_group_example', 'negotiated_encryption_algorithm': 'negotiated_encryption_algorithm_example', 'remaining_lifetime': 56, 'remaining_lifetime_last_retrieved': '2013-10-20T19:20:30+01:00'}, 'phase_two_details': {'custom_authentication_algorithm': 'custom_authentication_algorithm_example', 'custom_encryption_algorithm': 'custom_encryption_algorithm_example', 'dh_group': 'dh_group_example', 'is_custom_phase_two_config': True, 'is_esp_established': True, 'is_pfs_enabled': True, 'lifetime': 56, 'negotiated_authentication_algorithm': 'negotiated_authentication_algorithm_example', 'negotiated_dh_group': 'negotiated_dh_group_example', 'negotiated_encryption_algorithm': 'negotiated_encryption_algorithm_example', 'remaining_lifetime': 56, 'remaining_lifetime_last_retrieved': '2013-10-20T19:20:30+01:00'}, 'routing': 'BGP', 'status': 'UP', 'time_created': '2013-10-20T19:20:30+01:00', 'time_status_updated': '2013-10-20T19:20:30+01:00', 'vpn_ip': 'vpn_ip_example'}]
 
bgp_session_info
complex
on success

   
bgp_ipv6_state
string
on success
The state of the BGP IPv6 session.

Sample:
UP
   
bgp_state
string
on success
The state of the BGP session.

Sample:
UP
   
customer_bgp_asn
string
on success
If the tunnel's `routing` attribute is set to `BGP` (see IPSecConnectionTunnel), this ASN is required and used for the tunnel's BGP session. This is the ASN of the network on the CPE end of the BGP session. Can be a 2-byte or 4-byte ASN. Uses "asplain" format.
If the tunnel uses static routing, the `customerBgpAsn` must be null.
Example: `12345` (2-byte) or `1587232876` (4-byte)

Sample:
customer_bgp_asn_example
   
customer_interface_ip
string
on success
The IP address for the CPE end of the inside tunnel interface.
If the tunnel's `routing` attribute is set to `BGP` (see IPSecConnectionTunnel), this IP address is required and used for the tunnel's BGP session.
If `routing` is instead set to `STATIC`, this IP address is optional. You can set this IP address so you can troubleshoot or monitor the tunnel.
The value must be a /30 or /31.
Example: `10.0.0.5/31`

Sample:
customer_interface_ip_example
   
customer_interface_ipv6
string
on success
The IPv6 address for the CPE end of the inside tunnel interface. This IP address is optional.
If the tunnel's `routing` attribute is set to `BGP` (see IPSecConnectionTunnel), this IP address is used for the tunnel's BGP session.
If `routing` is instead set to `STATIC`, you can set this IP address to troubleshoot or monitor the tunnel.
Only subnet masks from /64 up to /127 are allowed.
Example: `2001:db8::1/64`

Sample:
customer_interface_ipv6_example
   
oracle_bgp_asn
string
on success
The Oracle BGP ASN.

Sample:
oracle_bgp_asn_example
   
oracle_interface_ip
string
on success
The IP address for the Oracle end of the inside tunnel interface.
If the tunnel's `routing` attribute is set to `BGP` (see IPSecConnectionTunnel), this IP address is required and used for the tunnel's BGP session.
If `routing` is instead set to `STATIC`, this IP address is optional. You can set this IP address so you can troubleshoot or monitor the tunnel.
The value must be a /30 or /31.
Example: `10.0.0.4/31`

Sample:
oracle_interface_ip_example
   
oracle_interface_ipv6
string
on success
The IPv6 address for the Oracle end of the inside tunnel interface. This IP address is optional.
If the tunnel's `routing` attribute is set to `BGP` (see IPSecConnectionTunnel), this IP address is used for the tunnel's BGP session.
If `routing` is instead set to `STATIC`, you can set this IP address to troubleshoot or monitor the tunnel.
Only subnet masks from /64 up to /127 are allowed.
Example: `2001:db8::1/64`

Sample:
oracle_interface_ipv6_example
 
compartment_id
string
on success
The OCID of the compartment containing the tunnel.

Sample:
ocid1.compartment.oc1..xxxxxxEXAMPLExxxxxx
 
cpe_ip
string
on success
The IP address of the CPE device's VPN headend.
Example: `203.0.113.22`

Sample:
cpe_ip_example
 
display_name
string
on success
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.

Sample:
display_name_example
 
dpd_mode
string
on success
Dead peer detection (DPD) mode set on the Oracle side of the connection. This mode sets whether Oracle can only respond to a request from the CPE device to start DPD, or both respond to and initiate requests.

Sample:
INITIATE_AND_RESPOND
 
dpd_timeout_in_sec
integer
on success
DPD timeout in seconds.

Sample:
56
 
encryption_domain_config
complex
on success

   
cpe_traffic_selector
list / elements=string
on success
Lists IPv4 or IPv6-enabled subnets in your on-premises network.

   
oracle_traffic_selector
list / elements=string
on success
Lists IPv4 or IPv6-enabled subnets in your Oracle tenancy.

 
id
string
on success
The OCID of the tunnel.

Sample:
ocid1.resource.oc1..xxxxxxEXAMPLExxxxxx
 
ike_version
string
on success
Internet Key Exchange protocol version.

Sample:
V1
 
lifecycle_state
string
on success
The tunnel's lifecycle state.

Sample:
PROVISIONING
 
nat_translation_enabled
string
on success
By default (the `AUTO` setting), IKE sends packets with a source and destination port set to 500, and when it detects that the port used to forward packets has changed (most likely because a NAT device is between the CPE device and the Oracle VPN headend) it will try to negotiate the use of NAT-T.
The `ENABLED` option sets the IKE protocol to use port 4500 instead of 500 and forces encapsulating traffic with the ESP protocol inside UDP packets.
The `DISABLED` option directs IKE to completely refuse to negotiate NAT-T even if it senses there may be a NAT device in use.
.

Sample:
ENABLED
 
oracle_can_initiate
string
on success
Indicates whether Oracle can only respond to a request to start an IPSec tunnel from the CPE device, or both respond to and initiate requests.

Sample:
INITIATOR_OR_RESPONDER
 
phase_one_details
complex
on success

   
custom_authentication_algorithm
string
on success
The proposed custom authentication algorithm.

Sample:
custom_authentication_algorithm_example
   
custom_dh_group
string
on success
The proposed custom Diffie-Hellman group.

Sample:
custom_dh_group_example
   
custom_encryption_algorithm
string
on success
The proposed custom encryption algorithm.

Sample:
custom_encryption_algorithm_example
   
is_custom_phase_one_config
boolean
on success
Indicates whether custom phase one configuration is enabled. If this option is not enabled, default settings are proposed.

Sample:
True
   
is_ike_established
boolean
on success
Indicates whether IKE phase one is established.

Sample:
True
   
lifetime
integer
on success
The total configured lifetime of the IKE security association.

Sample:
56
   
negotiated_authentication_algorithm
string
on success
The negotiated authentication algorithm.

Sample:
negotiated_authentication_algorithm_example
   
negotiated_dh_group
string
on success
The negotiated Diffie-Hellman group.

Sample:
negotiated_dh_group_example
   
negotiated_encryption_algorithm
string
on success
The negotiated encryption algorithm.

Sample:
negotiated_encryption_algorithm_example
   
remaining_lifetime
integer
on success
The remaining lifetime before the key is refreshed.

Sample:
56
   
remaining_lifetime_last_retrieved
string
on success
The date and time we retrieved the remaining lifetime, in the format defined by RFC3339.
Example: `2016-08-25T21:10:29.600Z`

Sample:
2013-10-20T19:20:30+01:00
 
phase_two_details
complex
on success

   
custom_authentication_algorithm
string
on success
Phase two authentication algorithm proposed during tunnel negotiation.

Sample:
custom_authentication_algorithm_example
   
custom_encryption_algorithm
string
on success
The proposed custom phase two encryption algorithm.

Sample:
custom_encryption_algorithm_example
   
dh_group
string
on success
The proposed Diffie-Hellman group.

Sample:
dh_group_example
   
is_custom_phase_two_config
boolean
on success
Indicates whether custom phase two configuration is enabled. If this option is not enabled, default settings are proposed.

Sample:
True
   
is_esp_established
boolean
on success
Indicates that ESP phase two is established.

Sample:
True
   
is_pfs_enabled
boolean
on success
Indicates that PFS (perfect forward secrecy) is enabled.

Sample:
True
   
lifetime
integer
on success
The total configured lifetime of the IKE security association.

Sample:
56
   
negotiated_authentication_algorithm
string
on success
The negotiated phase two authentication algorithm.

Sample:
negotiated_authentication_algorithm_example
   
negotiated_dh_group
string
on success
The negotiated Diffie-Hellman group.

Sample:
negotiated_dh_group_example
   
negotiated_encryption_algorithm
string
on success
The negotiated encryption algorithm.

Sample:
negotiated_encryption_algorithm_example
   
remaining_lifetime
integer
on success
The remaining lifetime before the key is refreshed.

Sample:
56
   
remaining_lifetime_last_retrieved
string
on success
The date and time the remaining lifetime was last retrieved, in the format defined by RFC3339.
Example: `2016-08-25T21:10:29.600Z`

Sample:
2013-10-20T19:20:30+01:00
 
routing
string
on success
The type of routing used for this tunnel (BGP dynamic routing, static routing, or policy-based routing).

Sample:
BGP
 
status
string
on success
The status of the tunnel based on IPSec protocol characteristics.

Sample:
UP
 
time_created
string
on success
The date and time the IPSec tunnel was created, in the format defined by RFC3339.
Example: `2016-08-25T21:10:29.600Z`

Sample:
2013-10-20T19:20:30+01:00
 
time_status_updated
string
on success
When the status of the IPSec tunnel last changed, in the format defined by RFC3339.
Example: `2016-08-25T21:10:29.600Z`

Sample:
2013-10-20T19:20:30+01:00
 
vpn_ip
string
on success
The IP address of the Oracle VPN headend for the connection.
Example: `203.0.113.21`

Sample:
vpn_ip_example


Authors

  • Oracle (@oracle)