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

az postgres allow access to azure services #7168

Closed
pascalnaber opened this issue Aug 28, 2018 · 6 comments
Closed

az postgres allow access to azure services #7168

pascalnaber opened this issue Aug 28, 2018 · 6 comments
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. PostgreSQL Service Attention This issue is responsible by Azure service team.

Comments

@pascalnaber
Copy link

I want "Allow Access To Azure Services" to be turned on for a postgres database.
There is no direct option for this in the CLI, but I found out that this can be done by adding a firewall rule with a specific name and ip-address:

az postgres server firewall-rule create -g $(RESOURCEGROUP_DATA_NAME) -s $(DATABASESERVER_NAME) -n "AllowAllWindowsAzureIps" --start-ip-address "0.0.0.0" --end-ip-address "0.0.0.0"

The button in the portal is turned on now. This looks great, but onfortunately it is not working.
After disabling it in the portal and enable it again to make it really working for other services to have access to the database.

@tjprescott tjprescott added question The issue doesn't require a change to the product in order to be resolved. Most issues start as that PostgreSQL labels Aug 29, 2018
@pascalnaber
Copy link
Author

@tjprescott if you ask me. It is really a bug. But I can't determine if the Azure CLI contains the bug. All I know is when I use the Azure CLI to turn on Allow Access To Azure Serices, it is not working.
The UI of the portal shows it is turned on. But it isn't.

@tjprescott
Copy link
Member

Hi @pascalnaber the "Question" label is often used by us to flag a new issue. The service team will need to investigate this and determine how they want to classify it as they maintain these commands.

@pascalnaber
Copy link
Author

I can confirm that the functionality works when executing an ARM template. So the CLI is not working correct. ARM is doing it correct.

{
    "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
    "contentVersion": "1.0.0.0",
    "parameters": {
        "databaseServerName": {
            "type": "string",
            "metadata": {
                "description": "Name of database server"
            }
        }       
    },
    "variables": {
        "databaseServerName": "[parameters('databaseServerName')]"
    },
    "resources": [       
        {
            "type": "Microsoft.DBforPostgreSQL/servers/firewallrules",
            "name": "[concat(variables('databaseServerName'), '/AllowAllWindowsAzureIps')]",
            "apiVersion": "2017-12-01",
            "properties": {
                "startIpAddress": "0.0.0.0",
                "endIpAddress": "0.0.0.0"
            }
        }
    ]
}

@tjprescott tjprescott added bug This issue requires a change to an existing behavior in the product in order to be resolved. and removed question The issue doesn't require a change to the product in order to be resolved. Most issues start as that labels Sep 7, 2018
@bsiegel bsiegel added the Service Attention This issue is responsible by Azure service team. label Sep 26, 2018
@anilpras
Copy link

anilpras commented May 1, 2019

@tjprescott, @pascalnaber
For us we have seen the issue with ARM template deployment triggered via CLI as well.
here is the used template: https://commontemplates.blob.core.windows.net/postgres/2.2/azuredeploy.json

@rachel-msft
Copy link

This has been resolved in the latest release.

@tjprescott please close.

@haroldrandom haroldrandom added bug This issue requires a change to an existing behavior in the product in order to be resolved. PostgreSQL Service Attention This issue is responsible by Azure service team. labels Oct 25, 2019
@paulmwatson
Copy link

Can confirm this worked for me with az cli 2.18.0 e.g.

az postgres server firewall-rule create --resource-group RG --server-name SN --name "AllowAllLinuxAzureIps" --start-ip-address "0.0.0.0" --end-ip-address "0.0.0.0"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue requires a change to an existing behavior in the product in order to be resolved. PostgreSQL Service Attention This issue is responsible by Azure service team.
Projects
None yet
Development

No branches or pull requests

8 participants