Hi there, I'm trying to create an Azure Database f...
# azure
n
Hi there, I'm trying to create an Azure Database for Mysql. I have tried hundreds of time. The creation starts and it hangs forever. I have tried with Terraform and it works. I then have replicated the same code and same parameters with Pulumi to no avail. I have nothing in the resource group activity logs and running Pulumi up with --debug does not give me anyu insight too. I don't know what to do anymore. Here's the code I'm running
Copy code
amdb = azure.dbformysql.Server(
            "AmDb",
            opts = pulumi.ResourceOptions(
                depends_on= [
                    dbprivdns,
                    dbsubnet,
                    privzonelink

                ]
            ),
            resource_group_name = resource_group.name,
            server_name = "xxxxxxxxxxxx",
            create_mode = "Default",
            location = LOCATION,
            administrator_login = DB_USERNAME,
            administrator_login_password = DB_PASSWORD,
            network = azure.dbformysql.NetworkArgs(
                delegated_subnet_resource_id = dbsubnet.id,
                private_dns_zone_resource_id = dbprivdns.id
                ),
            sku = azure.dbformysql.SkuArgs(
                name = "Standard_D2ds_v4",
                tier = azure.dbformysql.SkuTier(
                    "GeneralPurpose"
                )
            ),
            version = "8.0.21",
            storage = azure.dbformysql.StorageArgs(
                iops = 360,
                storage_size_gb = 20,
                )
)
c
It's hard to give any insights (at least for me) from just that code. Your debug log will contain some sensitive info like your Azure subscription info, otherwise you could share it here. Sanitizing it is a bit hard. Having said that, the only pointers I can give is simplify your DB creation, i.e. remove private network etc. and just create the DB, destroy it and add features to it incrementally to see when the hangup starts. I assume this is a dev/test stack where you can destroy and recreate the DB temporarily till you figure out what's going on. Also, how are you authenticating to Azure?
az
CLI?
n
Hi @clever-sunset-76585 thank you for your interest. What you are suggesting was my next move I'll do as you advise. I'm authenticating using az cli indeed, but it's worth noting that I'm also creating other resources along with the DB and it's working well. The DB is the only thing at fault.
I'm also going to use azure classic instead of azure_native
Finally I have succeeded ! The issue was a typo in the administrator_login reference in my config file. I used the azure-classic provider and it returned the error right away. I'm going to open an issue for that since the azure-native provider should have prompted me the same way.
c
Awesome! Glad you are unblocked!