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

Missing Details for the Resource Group and Server Name FQDN #12054

Closed
kalalvishal opened this issue Mar 8, 2022 · 4 comments
Closed

Missing Details for the Resource Group and Server Name FQDN #12054

kalalvishal opened this issue Mar 8, 2022 · 4 comments
Assignees
Labels
devops/prod devops-cicd-targets/tech doc-bug Feedback about omissions, errors, or confusing or conflicting text in an article. Pri1

Comments

@kalalvishal
Copy link

[Enter feedback here]

In the yaml section, to run the script to add and remove the ip from sql firewall, resourcegroup argument is required.

Also, to run sqlcmd, it requires sqlfqdn example servername.database.windows.net which can be passed as a additional variable. SQL Server name is required for the ps script hence I suggested to have an additional variable for sql fqdn.

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@WilliamAntonRohm WilliamAntonRohm added the doc-bug Feedback about omissions, errors, or confusing or conflicting text in an article. label Mar 9, 2022
@WilliamAntonRohm
Copy link
Contributor

@kalalvishal -- Vishal, thank you for your feedback.

@juliakm, @steved0x -- Julia, Steve, the author Atul is unassignable. Please look into this issue.

@kalalvishal
Copy link
Author

kalalvishal commented Mar 10, 2022

This should be ideal modification:

variables:
AzureSubscription: ""
ServerName: ""
ServerFqdn: ""
DatabaseName: ""
AdminUser: ""
AdminPassword: ""
SQLFile: "<Location of SQL file in $(Build.SourcesDirectory)>"

steps:

  • task: AzurePowerShell@2
    displayName: Azure PowerShell script: FilePath
    inputs:
    azureSubscription: '$(AzureSubscription)'
    ScriptPath: '$(Build.SourcesDirectory)\scripts\SetAzureFirewallRule.ps1'
    ScriptArguments: '-ServerName $(ServerName) -ResourceGroup $(ResourceGroupName)'
    azurePowerShellVersion: LatestVersion

  • task: CmdLine@1
    displayName: Run Sqlcmd
    inputs:
    filename: Sqlcmd
    arguments: '-S $(ServerFqdn) -U $(AdminUser) -P $(AdminPassword) -d $(DatabaseName) -i $(SQLFile)'

  • task: AzurePowerShell@2
    displayName: Azure PowerShell script: FilePath
    inputs:
    azureSubscription: '$(AzureSubscription)'
    ScriptPath: '$(Build.SourcesDirectory)\scripts\RemoveAzureFirewallRule.ps1'
    ScriptArguments: '$(ServerName) -ResourceGroup $(ResourceGroupName)'
    azurePowerShellVersion: LatestVersion

Also resource group parameter "$ResourceGroupName" in all Classic PS script, should be changed to "$ResourceGroup" else the yaml pipeline task "AzurePowerShell@2" to add and remove firewall rule will fail as resource group parameter in both ARM and Classic are different.

@juliakm
Copy link
Collaborator

juliakm commented Apr 6, 2022

Thanks @kalalvishal! We'll take a look at updating the script.

@juliakm
Copy link
Collaborator

juliakm commented Apr 20, 2022

Updates will go out in the next day.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devops/prod devops-cicd-targets/tech doc-bug Feedback about omissions, errors, or confusing or conflicting text in an article. Pri1
Projects
None yet
Development

No branches or pull requests

5 participants