Name = "Oracle Cloud"
Description = ''''''
URL = "https://cloud.oracle.com/home"
Code = "oraclecloud"
Since = "v2.3.0"

Example = '''
# Using API Key authentication:
OCI_PRIVATE_KEY_PATH="~/.oci/oci_api_key.pem" \
OCI_PRIVATE_KEY_PASSWORD="secret" \
OCI_TENANCY_OCID="ocid1.tenancy.oc1..secret" \
OCI_USER_OCID="ocid1.user.oc1..secret" \
OCI_FINGERPRINT="00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00" \
OCI_REGION="us-phoenix-1" \
OCI_COMPARTMENT_OCID="ocid1.tenancy.oc1..secret" \
lego --email you@example.com --dns oraclecloud -d '*.example.com' -d example.com run

# Using Instance Principal authentication (when running on OCI compute instances):
# https://docs.oracle.com/en-us/iaas/Content/Identity/Tasks/callingservicesfrominstances.htm
OCI_AUTH_TYPE="instance_principal" \
OCI_COMPARTMENT_OCID="ocid1.tenancy.oc1..secret" \
lego --email you@example.com --dns oraclecloud -d '*.example.com' -d example.com run
'''

[Configuration]
  [Configuration.Credentials]
    OCI_COMPARTMENT_OCID = "Compartment OCID"
    OCI_REGION = "Region (it can be empty if `OCI_AUTH_TYPE=instance_principal`)."
    OCI_PRIVATE_KEY_PATH = "Private key file (ignored if `OCI_AUTH_TYPE=instance_principal`)"
    OCI_PRIVATE_KEY_PASSWORD = "Private key password (ignored if `OCI_AUTH_TYPE=instance_principal`)"
    OCI_TENANCY_OCID = "Tenancy OCID (ignored if `OCI_AUTH_TYPE=instance_principal`)"
    OCI_USER_OCID = "User OCID (ignored if `OCI_AUTH_TYPE=instance_principal`)"
    OCI_FINGERPRINT = "Public key fingerprint (ignored if `OCI_AUTH_TYPE=instance_principal`)"
  [Configuration.Additional]
    OCI_AUTH_TYPE = "Authorization type. Possible values: 'instance_principal', ''  (Default: '')"
    TF_VAR_region = "Alias on `OCI_REGION`"
    TF_VAR_fingerprint = "Alias on `OCI_FINGERPRINT`"
    TF_VAR_user_ocid = "Alias on `OCI_USER_OCID`"
    TF_VAR_tenancy_ocid = "Alias on `OCI_TENANCY_OCID`"
    TF_VAR_private_key_path = "Alias on `OCI_PRIVATE_KEY_PATH`"
    OCI_POLLING_INTERVAL = "Time between DNS propagation check in seconds (Default: 2)"
    OCI_PROPAGATION_TIMEOUT = "Maximum waiting time for DNS propagation in seconds (Default: 60)"
    OCI_TTL = "The TTL of the TXT record used for the DNS challenge in seconds (Default: 120)"
    OCI_HTTP_TIMEOUT = "API request timeout in seconds (Default: 60)"

[Links]
  API = "https://docs.cloud.oracle.com/iaas/Content/DNS/Concepts/dnszonemanagement.htm"
  GoClient = "https://github.com/oracle/oci-go-sdk"

