Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Bump providers and move resources #157

Merged
merged 3 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
177 changes: 90 additions & 87 deletions terraform/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 28 additions & 4 deletions terraform/modules/azure/aks/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ resource "azurerm_resource_group_template_deployment" "dce" {
"dce_name" = {
value = local.dce_name
}
"location" = {
value = var.location
}
})
template_content = <<TEMPLATE
{
Expand All @@ -106,14 +109,17 @@ resource "azurerm_resource_group_template_deployment" "dce" {
"parameters": {
"dce_name": {
"type": "String"
},
"location": {
"type": "String"
}
},
"resources": [
{
"type": "Microsoft.Insights/dataCollectionEndpoints",
"apiVersion": "2021-09-01-preview",
"name": "[parameters('dce_name')]",
"location": "[resourceGroup().location]",
"location": "[parameters('location')]",
"kind": "Linux",
"properties": {}
}
Expand Down Expand Up @@ -144,6 +150,9 @@ resource "azurerm_resource_group_template_deployment" "dcr" {
"azure_monitor_workspace_id" = {
value = var.azure_monitor_workspace_id
}
"location" = {
value = var.location
}
})
template_content = <<TEMPLATE
{
Expand All @@ -158,14 +167,17 @@ resource "azurerm_resource_group_template_deployment" "dcr" {
},
"azure_monitor_workspace_id": {
"type": "String"
},
"location": {
"type": "String"
}
},
"resources": [
{
"type": "Microsoft.Insights/dataCollectionRules",
"apiVersion": "2021-09-01-preview",
"name": "[parameters('dcr_name')]",
"location": "[resourceGroup().location]",
"location": "[parameters('location')]",
"kind": "Linux",
"properties": {
"dataCollectionEndpointId": "[resourceId('Microsoft.Insights/dataCollectionEndpoints/', parameters('dce_name'))]",
Expand Down Expand Up @@ -222,6 +234,9 @@ resource "azurerm_resource_group_template_deployment" "dcra" {
"cluster_name" = {
value = azurerm_kubernetes_cluster.aks.name
}
"location" = {
value = var.location
}
})
template_content = <<TEMPLATE
{
Expand All @@ -236,14 +251,17 @@ resource "azurerm_resource_group_template_deployment" "dcra" {
},
"cluster_name": {
"type": "String"
},
"location": {
"type": "String"
}
},
"resources": [
{
"type": "Microsoft.ContainerService/managedClusters/providers/dataCollectionRuleAssociations",
"name": "[concat(parameters('cluster_name'),'/microsoft.insights/', parameters('dcra_name'))]",
"apiVersion": "2021-09-01-preview",
"location": "[resourceGroup().location]",
"location": "[parameters('location')]",
"properties": {
"description": "Association of data collection rule. Deleting this association will break the data collection for this AKS Cluster.",
"dataCollectionRuleId": "[resourceId('Microsoft.Insights/dataCollectionRules', parameters('dcr_name'))]"
Expand Down Expand Up @@ -272,6 +290,9 @@ resource "azurerm_resource_group_template_deployment" "rules" {
"cluster_name" = {
value = azurerm_kubernetes_cluster.aks.name
}
"location" = {
value = var.location
}
})
template_content = <<TEMPLATE
{
Expand All @@ -286,14 +307,17 @@ resource "azurerm_resource_group_template_deployment" "rules" {
},
"cluster_name": {
"type": "String"
},
"location": {
"type": "String"
}
},
"resources": [
{
"type": "Microsoft.AlertsManagement/prometheusRuleGroups",
"apiVersion": "2021-07-22-preview",
"name": "[parameters('rule_group_name')]",
"location": "[resourceGroup().location]",
"location": "[parameters('location')]",
"properties": {
"enabled": true,
"clusterName": "[parameters('cluster_name')]",
Expand Down
10 changes: 8 additions & 2 deletions terraform/modules/azure/monitor-stack/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,28 @@ resource "azurerm_resource_group_template_deployment" "azure_monitor_workspace"
"workspace_name" = {
value = local.azure_monitor_workspace_name
}
"location" = {
value = var.location
}
})
template_content = <<TEMPLATE
{
"$schema": "http://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"workspace_name": {
"type": "String"
"type": "String"
},
"location": {
"type": "String"
}
},
"resources": [
{
"type": "microsoft.monitor/accounts",
"apiVersion": "2021-06-03-preview",
"name": "[parameters('workspace_name')]",
"location": "[resourceGroup().location]"
"location": "[parameters('location')]"
}
],
"outputs": {
Expand Down
Loading