| Variables | Default Value | Tfvars Value | Description |
|---|---|---|---|
| connection_types | PRIVATELINK | Can be modified in tfvars | Connection type for Confluent Cloud |
| dns_config_resolution | PRIVATE | Can be modified in tfvars | DNS Resolution for Confluent Cloud |
| env | Provide value in tfvars | Environment for Confluent/Azure Cloud (test,prod) | |
| cloud | Provide value in tfvars | Value for Cloud Provider (AWS/GCP/Azure) | |
| subscription_id | Provide value in tfvars | Subscription ID of Azure Account | |
| region | Provide value in tfvars | Region of Confluent Cloud | |
| resource_group_name | Provide value in tfvars | Resource Group Name in Azure Cloud | |
| vnet_location | Provide value in tfvars | VPC Location in Cloud Provider (should be same as the region of confluent cloud) | |
| address_space | Provide value in tfvars | CIDR Address for Vnet in Cloud Provider | |
| subnet_prefixes | Provide value in tfvars | CIDR Address for the Subnet in Cloud Provider |
- Used as module. Module present in terraform/modules/cloud-network folder.
- VPC and Subnet created in azure cloud by default.
- Customizable variables in this file are vnet_location, resource_group_name, address_space and subnet_prefixes
- vnet location should be same as your confluent cloud location.
- exported output variables are subnet_id and vpc_id.
- Creates private DNS zone for the newly created Confluent Cloud.
- Links the created DNS to the VPC.
- Create the endpoints for connectivity between Confluent Cloud and Azure VPC
- Create DNS for Confluent Cloud Alias.
- Variables are resource_group_name and env.
- Creates a confluent network in the Confluent Cloud and the Private access with the Cloud environment.
- Customizable variables in this file are region, cloud, connection_types, dns_config and subscription (in case of azure, account in case of aws, projects in case of gcp).
- connection_types, dns_config are default variables present in variables.tf, they can be modifiled in tfvars file if required.
- variables cloud, region are present in tfvars, they can be modified as per requirement.
- Creates a single zone cluster in the Confluent Cloud.
- env variable can be modified in tfvars depending upon the environment.
- Cluster name will depend on the env variable.
- Creates two topics for order and payments as per requirement.
- env variable in this file will be aligned as per the value in tfvars.
- Creates one service account as per requirement.
- Provides the minimum role required (follows POLP) to create the topics in the cluster.
- Creates an API key for the service account to connect to the cluster.
- Binds a create topic role for the service account in the newly created cluster.
- Binds a read topic role for the service account in the newly created cluster.
- Contains the provider required to use the API's required for Confluent Cloud/Azure.
- Backend block has been configured to store the terraform state files in a bucket for versioning.
- Subscription ID of the Azure project can be passed in this file as var.subscription variable.
- Confluent cloud keys can be passed as hardcoded (not safe), environment variable, passed from azure secret manager.
- tfvars file which can be modified as per the region, subscription id, vnet location, vpc ip address.
cd terraform
terraform init
terraform plan -var-file="env-config/test.tfvars"
terraform apply -var-file="env-config/test.tfvars"- Create a VM in the same VPC.
- Assign the application to use the confluent service account.
- Make sure the application is able to create/read messages in the Confluent cluster.