diff --git a/.gitignore b/.gitignore index e6d9f78..ac368b1 100644 --- a/.gitignore +++ b/.gitignore @@ -12,7 +12,8 @@ crash.log # .tfvars files are managed as part of configuration and so should be included in # version control. # -# example.tfvars +*.tfvars +!sample.tfvars # Ignore override files as they are usually used to override resources locally and so # are not checked in diff --git a/terraform/azure/eventhub.tf b/terraform/azure/eventhub.tf new file mode 100644 index 0000000..d53b5c7 --- /dev/null +++ b/terraform/azure/eventhub.tf @@ -0,0 +1,103 @@ + +resource "azurerm_template_deployment" "eventhub" { + name = "${var.prefix}-eventhub" + resource_group_name = "${azurerm_resource_group.rg.name}" + + template_body = </resourceGroups//providers/Microsoft.Network/virtualNetworks/databricks-vnet/subnets/\",\"/subscriptions//resourceGroups//providers/Microsoft.Network/virtualNetworks/databricks-vnet/subnets/\"]" diff --git a/terraform/azure/vars.tf b/terraform/azure/vars.tf new file mode 100644 index 0000000..c442bff --- /dev/null +++ b/terraform/azure/vars.tf @@ -0,0 +1,30 @@ +# Common properties + +variable "resource_group_name" { + description = "The name of the resource group." +} + +variable "location" { + description = "The location/region where the resources are created." +} + +variable "prefix" { + description = "The Prefix used for resources." +} + + +# EventHub + +variable "subnetIds" { + description = "IDs of subnets. Event Hub Namespace will only accept connections from these subnets." + type = "string" +} + +variable "partitionCount" { + description = "The number of partitions must be between 2 and 32. The partition count is not changeable." + type = "string" +} +variable "messageRetentionInDays" { + description = "The Event Hubs Standard tier allows message retention period for a maximum of seven days." + type = "string" +} \ No newline at end of file