ine-labs / AzureGoat

AzureGoat : A Damn Vulnerable Azure Infrastructure
MIT License
776 stars 177 forks source link

Doesnt deploy over cloudshell. Terraform issue. #6

Closed Sh4d0w-3xPl0iT closed 8 months ago

Sh4d0w-3xPl0iT commented 1 year ago

Hi I tried to deploy the lab on the cloud using cloudshell and i get struck at the same error.

azurerm_storage_blob.app_files_prod["shared/files/.ssh/config.txt"]: Creating... azurerm_storage_blob.app_files_prod["webfiles/build/static/illustrations/illustration_login.png"]: Creation complete after 2s [id=https://appazgoat3299488storage.blob.core.windows.net/prod-appazgoat3299488-storage-container/webfiles/build/static/illustrations/illustration_login.png] azurerm_storage_blob.app_files_prod["shared/files/.ssh/keys/justin.pub"]: Creation complete after 2s [id=https://appazgoat3299488storage.blob.core.windows.net/prod-appazgoat3299488-storage-container/shared/files/.ssh/keys/justin.pub] azurerm_storage_blob.app_files_prod["webfiles/build/static/mock-images/products/product_21.jpg"]: Creating... azurerm_storage_blob.app_files_prod["webfiles/build/static/mock-images/avatars/avatar_4.jpg"]: Creating... azurerm_storage_blob.app_files_prod["webfiles/build/static/mock-images/avatars/avatar_3.jpg"]: Creation complete after 1s [id=https://appazgoat3299488storage.blob.core.windows.net/prod-appazgoat3299488-storage-container/webfiles/build/static/mock-images/avatars/avatar_3.jpg] azurerm_storage_blob.app_files_prod["webfiles/build/static/mock-images/covers/cover_7.jpg"]: Creation complete after 1s [id=https://appazgoat3299488storage.blob.core.windows.net/prod-appazgoat3299488-storage-container/webfiles/build/static/mock-images/covers/cover_7.jpg] azurerm_storage_blob.app_files_prod["shared/scripts/deploy_node.sh"]: Creation complete after 1s [id=https://appazgoat3299488storage.blob.core.windows.net/prod-appazgoat3299488-storage-container/shared/scripts/deploy_node.sh] azurerm_storage_blob.app_files_prod["shared/scripts/php-deploy.sh"]: Creation complete after 1s [id=https://appazgoat3299488storage.blob.core.windows.net/prod-appazgoat3299488-storage-container/shared/scripts/php-deploy.sh] azurerm_storage_blob.app_files_prod["webfiles/build/static/mock-images/products/product_13.jpg"]: Creating... azurerm_storage_blob.app_files_prod["webfiles/build/static/icons/ic_flag_de.svg"]: Creating... azurerm_storage_blob.app_files_prod["webfiles/build/static/mock-images/products/product_14.jpg"]: Creation complete after 1s [id=https://appazgoat3299488storage.blob.core.windows.net/prod-appazgoat3299488-storage-container/webfiles/build/static/mock-images/products/product_14.jpg] azurerm_storage_blob.app_files_prod["webfiles/build/static/mock-images/avatars/avatar_7.jpg"]: Creation complete after 1s [id=https://appazgoat3299488storage.blob.core.windows.net/prod-appazgoat3299488-storage-container/webfiles/build/static/mock-images/avatars/avatar_7.jpg] azurerm_storage_blob.app_files_prod["webfiles/build/static/mock-images/covers/cover_8.jpg"]: Creating... azurerm_storage_blob.app_files_prod["webfiles/build/static/media/register.4206b16c0ce018f0307d.jpg"]: Creating... azurerm_storage_blob.app_files_prod["shared/files/.ssh/config.txt"]: Creation complete after 1s [id=https://appazgoat3299488storage.blob.core.windows.net/prod-appazgoat3299488-storage-container/shared/files/.ssh/config.txt] azurerm_storage_blob.app_files_prod["shared/files/.ssh/keys/sophia.pub"]: Creating... azurerm_storage_blob.app_files_prod["shared/files/.ssh/keys/mary.pem"]: Creating... azurerm_storage_blob.app_files_prod["webfiles/build/static/mock-images/avatars/avatar_12.jpg"]: Creating... azurerm_storage_blob.app_files_prod["webfiles/build/static/mock-images/avatars/avatar_4.jpg"]: Creation complete after 1s [id=https://appazgoat3299488storage.blob.core.windows.net/prod-appazgoat3299488-storage-container/webfiles/build/static/mock-images/avatars/avatar_4.jpg] azurerm_storage_blob.app_files_prod["images/20220525173359279634.png"]: Creating... azurerm_storage_blob.app_files_prod["webfiles/build/static/mock-images/products/product_13.jpg"]: Creation complete after 1s [id=https://appazgoat3299488storage.blob.core.windows.net/prod-appazgoat3299488-storage-container/webfiles/build/static/mock-images/products/product_13.jpg] azurerm_storage_blob.app_files_prod["webfiles/build/static/mock-images/products/product_21.jpg"]: Creation complete after 1s [id=https://appazgoat3299488storage.blob.core.windows.net/prod-appazgoat3299488-storage-container/webfiles/build/static/mock-images/products/product_21.jpg] azurerm_storage_blob.app_files_prod["webfiles/build/static/mock-images/covers/cover_8.jpg"]: Creation complete after 1s [id=https://appazgoat3299488storage.blob.core.windows.net/prod-appazgoat3299488-storage-container/webfiles/build/static/mock-images/covers/cover_8.jpg] azurerm_storage_blob.app_files_prod["webfiles/build/static/mock-images/products/product_18.jpg"]: Creating... azurerm_storage_blob.config_update_prod: Creating... azurerm_storage_blob.app_files_prod["webfiles/build/static/icons/ic_flag_de.svg"]: Creation complete after 1s [id=https://appazgoat3299488storage.blob.core.windows.net/prod-appazgoat3299488-storage-container/webfiles/build/static/icons/ic_flag_de.svg] azurerm_storage_blob.app_files_prod["webfiles/build/static/media/register.4206b16c0ce018f0307d.jpg"]: Creation complete after 2s [id=https://appazgoat3299488storage.blob.core.windows.net/prod-appazgoat3299488-storage-container/webfiles/build/static/media/register.4206b16c0ce018f0307d.jpg] azurerm_storage_blob.app_files_prod["shared/files/.ssh/keys/mary.pem"]: Creation complete after 1s [id=https://appazgoat3299488storage.blob.core.windows.net/prod-appazgoat3299488-storage-container/shared/files/.ssh/keys/mary.pem] azurerm_storage_blob.app_files_prod["shared/files/.ssh/keys/john.pub"]: Creating... azurerm_storage_blob.app_files_prod["shared/files/.ssh/keys/sophia.pub"]: Creation complete after 2s [id=https://appazgoat3299488storage.blob.core.windows.net/prod-appazgoat3299488-storage-container/shared/files/.ssh/keys/sophia.pub] azurerm_storage_blob.app_files_prod["webfiles/build/static/mock-images/avatars/avatar_12.jpg"]: Creation complete after 1s [id=https://appazgoat3299488storage.blob.core.windows.net/prod-appazgoat3299488-storage-container/webfiles/build/static/mock-images/avatars/avatar_12.jpg] azurerm_cosmosdb_account.db: Still creating... [1m50s elapsed] azurerm_storage_blob.app_files_prod["images/20220525173359279634.png"]: Creation complete after 1s [id=https://appazgoat3299488storage.blob.core.windows.net/prod-appazgoat3299488-storage-container/images/20220525173359279634.png] azurerm_storage_blob.config_update_prod: Creation complete after 1s [id=https://appazgoat3299488storage.blob.core.windows.net/prod-appazgoat3299488-storage-container/modules/module-1/resources/storage_account/shared/files/.ssh/config.txt] azurerm_storage_blob.app_files_prod["shared/files/.ssh/keys/john.pub"]: Creation complete after 1s [id=https://appazgoat3299488storage.blob.core.windows.net/prod-appazgoat3299488-storage-container/shared/files/.ssh/keys/john.pub] azurerm_storage_blob.app_files_prod["webfiles/build/static/mock-images/products/product_18.jpg"]: Creation complete after 2s [id=https://appazgoat3299488storage.blob.core.windows.net/prod-appazgoat3299488-storage-container/webfiles/build/static/mock-images/products/product_18.jpg] azurerm_cosmosdb_account.db: Still creating... [2m0s elapsed] azurerm_cosmosdb_account.db: Still creating... [2m10s elapsed] azurerm_cosmosdb_account.db: Still creating... [2m20s elapsed] azurerm_cosmosdb_account.db: Creation complete after 2m22s [id=/subscriptions/44520894-a01e-4f6d-9612-0310dbd2c8d4/resourceGroups/azuregoat_app/providers/Microsoft.DocumentDB/databaseAccounts/ine-cosmos-db-data-3299488] ╷ │ Warning: Deprecated Resource │ │ with azurerm_app_service_plan.app_service_plan, │ on main.tf line 145, in resource "azurerm_app_service_plan" "app_service_plan": │ 145: resource "azurerm_app_service_plan" "app_service_plan" { │ │ The azurerm_app_service_plan resource has been superseded by the azurerm_service_plan resource. Whilst this resource will continue to be available in the 2.x and 3.x │ releases it is feature-frozen for compatibility purposes, will no longer receive any updates and will be removed in a future major release of the Azure Provider. ╵ ╷ │ Error: Provider produced inconsistent result after apply │ │ When applying changes to azurerm_app_service_plan.app_service_plan, provider "provider[\"registry.terraform.io/hashicorp/azurerm\"]" produced an unexpected new value: Root │ resource was present, but now absent. │ │ This is a bug in the provider, which should be reported in the provider's own issue tracker. ╵ ╷ │ Error: Provider produced inconsistent result after apply │ │ When applying changes to azurerm_network_security_group.net_sg, provider "provider[\"registry.terraform.io/hashicorp/azurerm\"]" produced an unexpected new value: Root resource │ was present, but now absent. │ │ This is a bug in the provider, which should be reported in the provider's own issue tracker. ╵ ╷ │ Error: Provider produced inconsistent result after apply │ │ When applying changes to azurerm_public_ip.VM_PublicIP, provider "provider[\"registry.terraform.io/hashicorp/azurerm\"]" produced an unexpected new value: Root resource was │ present, but now absent. │ │ This is a bug in the provider, which should be reported in the provider's own issue tracker.

sherinsteph commented 11 months ago

Hi @Sh4d0w-3xPl0iT, I tried deploying AzureGoat using Azure Cloud Shell, and it got deployed as expected. Although a deprecation warning appeared, the deployment was successful. Attached is a screenshot for your reference.

Screenshot 2023-12-01 144308