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

Added more variables to management script #203

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions management-scripts/extension/install-latest-extension.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
[Parameter(Mandatory=$false)][string]$DDEnv="<not-set>",
[Parameter(Mandatory=$false)][string]$DDService="<not-set>",
[Parameter(Mandatory=$false)][string]$DDVersion="<not-set>",
[Parameter(Mandatory=$false)][string]$DDLogsInjection="<not-set>",
[Parameter(Mandatory=$false)][string]$DDLogsDirectSubmissionIntegrations="<not-set>",
[Parameter(Mandatory=$false)][string]$DDLogsDirectSubmissionMinimumLevel="<not-set>",
[Parameter(Mandatory=$false)][string]$ExtensionVersion,
[Parameter(Mandatory=$false)][Switch]$Remove
)
Expand Down Expand Up @@ -85,6 +88,18 @@ if ($DDVersion -ne $skipVar) {
az webapp config appsettings set -n ${SiteName} -g ${ResourceGroup} --settings DD_VERSION=$DDVersion
}

if ($DDLogsInjection -ne $skipVar) {
az webapp config appsettings set -n ${SiteName} -g ${ResourceGroup} --settings DD_LOGS_INJECTION=$DDLogsInjection
}

if ($DDLogsDirectSubmissionIntegrations -ne $skipVar) {
az webapp config appsettings set -n ${SiteName} -g ${ResourceGroup} --settings DD_LOGS_DIRECT_SUBMISSION_INTEGRATIONS=$DDLogsDirectSubmissionIntegrations
}

if ($DDLogsDirectSubmissionMinimumLevel -ne $skipVar) {
az webapp config appsettings set -n ${SiteName} -g ${ResourceGroup} --settings DD_LOGS_DIRECT_SUBMISSION_MINIMUM_LEVEL=$DDLogsDirectSubmissionMinimumLevel
}

if ($Remove) {
Write-Output "[${SiteName}] Attempting to remove ${Extension}"
Invoke-RestMethod -Uri $siteExtensionManage -Headers @{Authorization=("Basic {0}" -f $base64AuthInfo)} -UserAgent $userAgent -Method DELETE
Expand Down