Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/erezrokah/terraform-azure-cloudquery

Deploy CloudQuery on GCP
https://github.com/erezrokah/terraform-azure-cloudquery

Last synced: 2 months ago
JSON representation

Deploy CloudQuery on GCP

Awesome Lists containing this project

README

        

# CloudQuery Azure Module

This folder contains a Terraform module to deploy a CloudQuery cluster in Azure on top of AKS.

## Usage

Examples are included in the [example](./examples/complete) folder, but simple usage is as follows:

```hcl
module "cloudquery" {
source = "cloudquery/cloudquery/azure"
version = "~> 0.1"

name = "cloudquery"

# path to your cloudquery config
config_file = "config.yml"

}
```

### Existing VPC

TDB

### Run Helm Separately

TDB

## Examples

## Requirements

| Name | Version |
|------|---------|
| [terraform](#requirement\_terraform) | >= 0.15 |
| [azurerm](#requirement\_azurerm) | >= 2.4.6 |
| [helm](#requirement\_helm) | >= 2.5 |
| [kubernetes](#requirement\_kubernetes) | ~> 2.11 |
| [random](#requirement\_random) | ~> 3.3 |

## Providers

| Name | Version |
|------|---------|
| [azurerm](#provider\_azurerm) | >= 2.4.6 |
| [helm](#provider\_helm) | >= 2.5 |
| [random](#provider\_random) | ~> 3.3 |

## Modules

| Name | Source | Version |
|------|--------|---------|
| [aks](#module\_aks) | github.com/Azure/terraform-azurerm-aks | 6.2.0 |
| [naming](#module\_naming) | Azure/naming/azurerm | ~> 0.2.0 |
| [network](#module\_network) | Azure/network/azurerm | ~> 3.5.0 |
| [postgresql](#module\_postgresql) | github.com/Azure/terraform-azurerm-postgresql | 0f607dbc9d08528bb16a48fc9dc8831aa4a92f5c |

## Resources

| Name | Type |
|------|------|
| [azurerm_key_vault.vault](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/key_vault) | resource |
| [azurerm_key_vault_secret.pg_dsn](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/key_vault_secret) | resource |
| [azurerm_key_vault_secret.pg_password](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/key_vault_secret) | resource |
| [azurerm_private_endpoint.psql_private_endpoint](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/private_endpoint) | resource |
| [azurerm_resource_group.rg](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/resource_group) | resource |
| [helm_release.cloudquery](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource |
| [random_password.postgresql](https://registry.terraform.io/providers/hashicorp/random/latest/docs/resources/password) | resource |
| [azurerm_client_config.current](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/client_config) | data source |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [chart\_values](#input\_chart\_values) | Variables to pass to the helm chart | `string` | `""` | no |
| [chart\_version](#input\_chart\_version) | The version of CloudQuery helm chart | `string` | `"1.0.32"` | no |
| [config\_file](#input\_config\_file) | Path to the CloudQuery config.hcl | `string` | `""` | no |
| [install\_helm\_chart](#input\_install\_helm\_chart) | Enable/Disable helm chart installation | `bool` | `true` | no |
| [kubernetes\_enable\_host\_encryption](#input\_kubernetes\_enable\_host\_encryption) | Enable Host Encryption for default node pool. Encryption at host feature must be enabled on the subscription: https://docs.microsoft.com/azure/virtual-machines/linux/disks-enable-host-based-encryption-cli | `bool` | `false` | no |
| [kubernetes\_node\_disk\_size\_gb](#input\_kubernetes\_node\_disk\_size\_gb) | Node disk size in gb. | `number` | `30` | no |
| [kubernetes\_orchestrator\_version](#input\_kubernetes\_orchestrator\_version) | Specify which Kubernetes release to use for the orchestration layer. The default used is the latest Kubernetes version available in the region | `string` | `"1.23.5"` | no |
| [kubernetes\_private\_cluster\_enabled](#input\_kubernetes\_private\_cluster\_enabled) | If true cluster API server will be exposed only on internal IP address and available only in cluster vnet. | `bool` | `false` | no |
| [kubernetes\_sku\_tier](#input\_kubernetes\_sku\_tier) | The SKU Tier that should be used for this Kubernetes Cluster. Possible values are Free and Paid | `string` | `"Free"` | no |
| [kubernetes\_version](#input\_kubernetes\_version) | Specify which Kubernetes release to use. The default used is the latest Kubernetes version available in the region | `string` | `"1.23.5"` | no |
| [location](#input\_location) | The location to host resources | `string` | n/a | yes |
| [name](#input\_name) | Name to use on all resources created | `string` | `"cloudquery"` | no |
| [postgres\_backup\_retention\_days](#input\_postgres\_backup\_retention\_days) | Retention days for backup | `number` | `7` | no |
| [postgres\_firewall\_rules](#input\_postgres\_firewall\_rules) | If Postgres is publicly accessible you will need to specified a firewall rule to allow connections |

list(object({
name = string
start_ip = string
end_ip = string
}))
| `[]` | no |
| [postgres\_publicly\_accessible](#input\_postgres\_publicly\_accessible) | Make Postgres publicly accessible (might be needed if you want to connect to it from Grafana or other tools). | `bool` | `false` | no |
| [postgres\_server\_version](#input\_postgres\_server\_version) | Version of Azure Postgres engine to use | `string` | `"11"` | no |
| [postgres\_sku\_name](#input\_postgres\_sku\_name) | Postgresql sku name | `string` | `"GP_Gen5_2"` | no |
| [tags](#input\_tags) | A map of tags to use on all resources | `map(string)` | `{}` | no |

## Outputs

| Name | Description |
|------|-------------|
| [aks\_host](#output\_aks\_host) | AKS host |
| [network\_id](#output\_network\_id) | ID of the network that was created |
| [postgres\_fqdn](#output\_postgres\_fqdn) | Fqdn of the Postgres server |
| [postgres\_server\_administrator\_password](#output\_postgres\_server\_administrator\_password) | Administrator password for cloudquery database |

## Troubleshooting

If helm installtion is stuck in some hanging state you can run the following commands:

```bash
# check if helm is installed in cloudquery namespace
helm ls -n cloudquery
# If yes uninstall with the your release name
helm uninstall YOUR_RELEASE_NAME -n cloudquery
```

## Authors

Module is maintained by [CloudQuery Team](https://github.com/cloudquery/cloudquery).

## License

Apache 2 Licensed. See [LICENSE](https://github.com/cloudquery/terraform-azure-cloudquery/tree/main/LICENSE) for full details.