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

Cannot deploy Install-AzSKOrganizationPolicy with App insights location set... #195

Closed
Stoffe opened this issue Aug 16, 2018 · 7 comments
Closed

Comments

@Stoffe
Copy link

Stoffe commented Aug 16, 2018

Title

Cannot deploy Install-AzSKOrganizationPolicy with App insights location set...

Description

Setting the -AppInsightLocation northeurope or westeurope will result in an error,

Install-AzSKOrganizationPolicy : Parameter set cannot be resolved using the specified named parameters.

Steps to reproduce

Call Install-AzSKOrganizationPolicy with a -AppInsightLocation of north or west europe.

Install-AzSKOrganizationPolicy -SubscriptionId <SUBID> -OrgName "<NAME>" -DepartmentName "<DEP>" -PolicyFolderPath "<C: PATH>" -ResourceGroupLocation westeurope -AppInsightLocation westeurope -ResourceGroupName "<NAME>" -AppInsightName "<NAME>"

Expected behavior

Should set AppInsights location to the north or west europe.

Actual behavior

Error, if this parameter is left out, the app insights will deploy to east US, which is not compliant for us.

@VishalHaibatpure
Copy link

VishalHaibatpure commented Aug 20, 2018

Please use below parameter set for customized setup for Org Policy.

Install-AzSKOrganizationPolicy -SubscriptionId <SUBID> -OrgName "<ORG-DEPT NAME>" -StorageAccountName "<storagename>" -ResourceGroupLocation westeurope -AppInsightLocation westeurope -MonitoringDashboardLocation westeurope -ResourceGroupName "<NAME>" -AppInsightName "<NAME>" -PolicyFolderPath "<C: PATH>"

@Stoffe
Copy link
Author

Stoffe commented Aug 20, 2018

Then, I get the same error as before...

Have you actually tried that commandline? or do I have a strange version? (Just downloaded it last week)

Install-AzSKOrganizationPolicy : Parameter set cannot be resolved using the specified named parameters.
At line:1 char:1

  • Install-AzSKOrganizationPolicy -SubscriptionId 097edece-e071-4747-a27 ...
  •   + CategoryInfo          : InvalidArgument: (:) [Install-AzSKOrganizationPolicy], ParameterBindingException
      + FullyQualifiedErrorId : AmbiguousParameterSet,Install-AzSKOrganizationPolicy
    

@VishalHaibatpure
Copy link

The given parameter set works for me with version 3.5.0
Make sure you are not using "-DepartmentName" in your command. That is the only parameter not supported for custom resources setup for Org policy.

If this is not helping out, you can try executing command using PowerShell ISE command window

image

@Stoffe
Copy link
Author

Stoffe commented Aug 22, 2018

Ahh, ok, didnt know the DepartmentName was not suppose to be on, ok, however now I get another error...

InvalidArgument: Only alphanumeric characters are supported in StorageAccountName param. And length should be less than 24 characters

And, I tried to have 1 letter, 3 letters, 10 letters and one number in the storageaccount name, and even tried to remove characters from other parameters to a minimum to make sure the error message is relevant...

ok more testing show that a numbers only in storage account works, hmm, I am however doubtful that this is a problem for AzSK maybe this is a problem connected to the Azure side instead after reading up on others having the same problem

However, giving the storageaccount a name of for instance 123456, gives me an error:

The storage account named 123456 is already taken. Parameter name: Name Failed to create storage account [123456]

@VishalHaibatpure
Copy link

It should work with unique alphanumeric name as storage account names are scoped globally across subscriptions.

@VishalHaibatpure
Copy link

@Stoffe : Let us know if issue is resolved for you.

@njohnso
Copy link

njohnso commented Mar 5, 2020

Found a solution to @Stoffe problem. In case others have the same issue. If you receive the error:

InvalidArgument: Only alphanumeric characters are supported in StorageAccountName param. And length should be less than 24 characters

You are using uppercase letters. Use all lowercase letters and this will work fine. Suggested a solution here:

#966

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants