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

Something wrong with static website check? #35

Closed
gregb opened this issue Sep 15, 2021 · 0 comments
Closed

Something wrong with static website check? #35

gregb opened this issue Sep 15, 2021 · 0 comments

Comments

@gregb
Copy link

gregb commented Sep 15, 2021

The check on this line:

validate_static_website = ( var.enable_static_website ? ((var.account_kind == "BlockBlobStorage" || var.account_kind == "StorageV2") ?

Fails when I specify an account kind of FileStorage and leave enable_static_website unspecified, or explicitly set to false.

module "storage_account" {
  source = "github.com/gregb/terraform-azurerm-storage-account?ref=static_website_validation_fix"
  #source  = "tfe.lnrisk.io/Infrastructure/storage-account/azurerm"
  #version = "0.9.0"

  location            = module.metadata.location
  names               = module.metadata.names
  tags                = module.metadata.tags
  resource_group_name = module.resource_group.name

  account_kind            = "FileStorage"
  replication_type        = "LRS"
  account_tier            = "Premium"
  access_tier             = "Hot"
  enable_large_file_share = true

  # does not allow private ips?
  #access_list = {
  #  containers = var.vnet_cidr_block
  #}

  service_endpoints = {
    "iaas-private" = module.virtual_network.subnet["iaas-private"].id
  }
}

│ Error: Invalid function argument

│ on .terraform/modules/storage_account/local.tf line 8, in locals:
│ 8: true : file("ERROR: Account kind must be BlockBlobStorage or StorageV2 when enabling static website"))

I had to disable this check by just setting it to false in https://github.com/gregb/terraform-azurerm-storage-account/tree/static_website_validation_fix

@jhisc jhisc closed this as completed Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants