OuterSrc / terraform-azurerm-caf

Terraform supermodule for the Terraform platform engineering for Azure
http://aka.ms/caf/terraform
MIT License
0 stars 0 forks source link

Bug report-Datalake container cannot be added #8

Open ml-justinhewitt opened 1 year ago

ml-justinhewitt commented 1 year ago

Is there an existing issue for this?

Community Note

Version of the module you are using

v0.0.5

Rover Version

No response

Terraform Version

No response

AzureRM Provider Version

No response

Affected Resource(s)/Data Source(s)

stsga3tmiareporting

Terraform Configuration Files

storage_accounts = {
  datalake1 = {
    access_tier              = "Hot"       # Optional - If not specified defaults to Hot 
    account_kind             = "StorageV2" # Optional - If not specified defaults to StorageV2
    account_replication_type = "ZRS"
    account_tier             = "Standard"
    is_hns_enabled           = true
    min_tls_version          = "TLS1_2"
    name                     = "stsga3tmiareporting"
    resource_group_key       = "solution1_region1"

    #### Below block errors in pipeline run, container created manually in Portal
     containers = {
       container1 = {
         name = "landingzone"
       }
     }

Expected Behaviour

A container should be created

Actual Behaviour

Container fails to be created with error:

Error: containers.Client#GetProperties: Failure responding to request: StatusCode=403 -- Original Error: autorest/azure: Service returned an error. Status=403 Code="AuthorizationFailure" Message="This request is not authorized to perform this operation.\nRequestId:a78960b2-701e-000b-4813-88c411000000\nTime:2023-05-16T16:29:14.4083162Z"

Further investigation shows that a data_lake_filesystems block should be used instead. But this also errors:

Error: checking for existence of existing File System "landingzone2" (Account "stsga3pdltest"): datalakestore.Client#GetProperties: Failure responding to request: StatusCode=403 -- Original Error: autorest/azure: error response cannot be parsed: "" error: EOF

Steps to Reproduce

No response

Important Factoids

No response

References

No response

ml-justinhewitt commented 1 year ago

This appears to be due to network permissions. If a network block exists with bypass = ["AzureServices"] then the container/data_lake_filesystem fails, UNLESS a complete list of uksouth and ukwest IP addresses are added as ip_rules. Then either a container or data_lake_filesystem block can be used