# Azure PostgreSQL

## Example Usage

***

{% tabs %}
{% tab title="Terraform" %}
{% code title="azure-postgresql-integration.tf" %}

```tf
resource "apono_integration" "azure-postgresql-integration" {
  name                     = "Azure PostgreSQL"
  type                     = "azure-postgresql"
  connector_id             = "apono-connector-id"
  connected_resource_types = ["azure-postgresql-instance"]
  metadata = {
    hostname = "<Hostname>"
    port = "<Port>"
    dbname = "<Database Name>"
    sslmode = "<SSL Mode>"
  }
  kubernetes_secret = {
    name      = "name_template_value"
    namespace = "namespace_template_value"
  }
}
```

{% endcode %}
{% endtab %}

{% tab title="Terraform V2" %}
{% code title="azure-postgresql-integration.tf" %}

```tf
resource "apono_resource_integration" "azure-postgresql-integration" {
  name                     = "Azure PostgreSQL"
  type                     = "azure-postgresql"
  connector_id             = "apono-connector-id"
  connected_resource_types = ["azure-postgresql-instance"]
  integration_config = {
    hostname = "<Hostname>"
    port = "<Port>"
    dbname = "<Database Name>"
    sslmode = "<SSL Mode>"
  }
  secret_store_config = {
    kubernetes = {
      name      = "name_template_value"
      namespace = "namespace_template_value"
    }
}
```

{% endcode %}
{% endtab %}

{% tab title="Public API" %}
{% code title="azure-postgresql-integration.json" %}

```json
{
    "azure-postgresql-integration": {
        "name": "Azure PostgreSQL",
        "type": "azure-postgresql",
        "connector_id": "apono-connector-id",
        "connected_resource_types": [
            "azure-postgresql-instance"
        ],
        "integration_config": {
            "hostname": "<Hostname>",
            "port": "<Port>",
            "dbname": "<Database Name>",
            "sslmode": "<SSL Mode>",
        },
	"secret_store_config": {
    	    "name": "name_template_value",
    	    "namespace": "namespace_template_value"
  	    }
    }
}
```

{% endcode %}
{% endtab %}
{% endtabs %}

## Schema

***

* `type` azure-postgresql
* `connected_resource_types` List of resource types to sync.

<details>

<summary>Available resource types you can use</summary>

* azure-postgresql-instance
* azure-postgresql-database
* azure-postgresql-table
* azure-postgresql-role

</details>

### Integration Config

***

* `hostname` (Required | String) Hostname
* `port` (Required | String) Port
  * Default value: `5432`
* `dbname` (Required | String) Database Name
  * Default value: `postgres`
* `sslmode` (Required | String) SSL Mode
  * Default value: `disable`
  * Possible values: disable, allow, prefer, require, verify-ca, verify-full


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.apono.io/metadata-for-integration-config/integration-metadata/azure-postgresql.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
