Skip to content

Commit

Permalink
2.210.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Avo Cado committed Dec 31, 2024
1 parent 9945373 commit 29ea7f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 31 deletions.
24 changes: 2 additions & 22 deletions azure/azure_transient/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,9 @@ variable "deploy_nfs" {
default = true
}

variable "blob_url" {
type = string
description = "Cado Response VHD blobstore URL"
default = ""
}

variable "image_id" {
type = string
description = "A fully scoped resource id for a cado image e.g. /subscriptions/{ID}/resourceGroups/{NAME}/providers/Microsoft.Compute/images/cadoresponse"
description = "A Cado Response community image id"
default = ""
}

Expand Down Expand Up @@ -127,20 +121,6 @@ data "azurerm_client_config" "current" {}

// Network

resource "azurerm_image" "image" {
count = var.image_id != "" ? 0 : 1 # if image_id is set, we won't need an image from a blob
name = "cado_response"
location = data.azurerm_resource_group.group.location
resource_group_name = data.azurerm_resource_group.group.name

os_disk {
os_type = "Linux"
os_state = "Generalized"
blob_uri = var.blob_url # azurerm_storage_blob.vhd.url
size_gb = 30
}
}

resource "azurerm_virtual_network" "network" {
name = "cado-network"
address_space = ["10.0.0.0/16"]
Expand Down Expand Up @@ -305,7 +285,7 @@ resource "azurerm_linux_virtual_machine" "vm" {

tags = var.tags

source_image_id = var.image_id != "" ? var.image_id : azurerm_image.image[0].id
source_image_id = var.image_id
}

resource "azurerm_virtual_machine_data_disk_attachment" "data_disk_attachment" {
Expand Down
11 changes: 2 additions & 9 deletions azure/cado/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,10 @@ variable "deploy_acquisition_permissions" {
default = true
}

variable "blob_url" {
type = string
description = "Cado Response VHD blobstore URL"
default = "<VHD BLOBSTORE URL FROM YOUR STORAGE ACCOUNT>"
}

variable "image_id" {
type = string
description = "A fully scoped resource id for a cado image e.g. /subscriptions/{ID}/resourceGroups/{NAME}/providers/Microsoft.Compute/images/cadoresponse"
default = ""
description = "A Cado Response community image id"
default = "/communityGalleries/cadoplatform-1a38e0c7-afa4-4e0d-9c56-433a12cd67b1/images/CadoResponseV2.0/versions/latest"
}

variable "ip_pattern_https" {
Expand Down Expand Up @@ -161,7 +155,6 @@ module "azure_persistent" {
module "azure_transient" {
source = "./../azure_transient"
resource_group = var.resource_group
blob_url = var.blob_url
image_id = var.image_id
ip_pattern_https = var.ip_pattern_https
deploy_nfs = var.deploy_nfs
Expand Down

0 comments on commit 29ea7f6

Please sign in to comment.