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

Failed to add firewall rule #205

Closed
adobryn opened this issue Jan 30, 2024 · 4 comments · Fixed by #231
Closed

Failed to add firewall rule #205

adobryn opened this issue Jan 30, 2024 · 4 comments · Fixed by #231
Labels
idle Inactive for 14 days need-to-triage Requires investigation

Comments

@adobryn
Copy link

adobryn commented Jan 30, 2024

I'm trying to deploy to Azure DB from a runner VM within the same subscription.

For database this option "Allow public access from any Azure service within Azure to this server" is active but the GitHub Action still can't get past the firewall with the error message

Failed to add firewall rule. Unable to detect client IP Address.

Adding a public IP of the runner VM to firewall rules did not help. Also I can connect to the database using psql from the runner direct, and with az postgres flexible-server connect as well.

Is it possible to disable automatically adding new firewall rules in the action?

here is the code:

jobs:
  build:
    runs-on: [ self-hosted ]
    steps:
      - uses: actions/checkout@v3
      - uses: azure/sql-action@v2.2.1
        with:
          connection-string: ${{ secrets.AZURE_SQL_CONNECTION_STRING }}
          path: './project/projectsqlproj'
          action: 'publish'

Connection string is built like this:

Server=<dbname>.postgres.database.azure.com,<port number>;Initial Catalog=<name>; User ID=<username>; Password=<password>; Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;
@adobryn adobryn added the need-to-triage Requires investigation label Jan 30, 2024
Copy link

This issue is idle because it has been open for 14 days with no activity.

@github-actions github-actions bot added the idle Inactive for 14 days label Feb 14, 2024
@benjamin-hodgson
Copy link

benjamin-hodgson commented May 17, 2024

+1 to this, I'd like a way to opt out of the automatic firewall behaviour. An option in the action yaml would suit me, something like this:

uses: azure/sql-action@v2.2.1
  with:
    connection-string: ...
    path: ...
    action: Publish
    configure-firewall: false

(My deployment works fine; I'm using OIDC to auth as a managed identity so I don't need the firewall config.)

@benjamin-hodgson
Copy link

Is this a dupe of #186 ?

Copy link

This issue is idle because it has been open for 14 days with no activity.

@github-actions github-actions bot added the idle Inactive for 14 days label May 31, 2024
@zijchen zijchen linked a pull request Jun 26, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idle Inactive for 14 days need-to-triage Requires investigation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants