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

Issue while deploying Continuous Assurance #87

Open
anttipo opened this issue Jan 30, 2018 · 0 comments
Open

Issue while deploying Continuous Assurance #87

anttipo opened this issue Jan 30, 2018 · 0 comments

Comments

@anttipo
Copy link

anttipo commented Jan 30, 2018

I'm running to some issues while trying to deploy CA to a fresh new subscription, which hasn't been covered by AzSDK in the past. Using AzSDK 2.9.0

This is the output I get, when running the deployment:

PS Z:\> Install-AzSDKContinuousAssurance -SubscriptionId <REDACTED> -AutomationAccountLocation Westeurope -ResourceGroupNames foobar -OMSWorkspaceId <REDACTED> -OMSSharedKey <REDACTED>
WARNING: The command Install-AzSDKContinuousAssurance shall be renamed to Install-AzSKContinuousAssurance in a future release ('SDK' shall be replaced with 'SK').
================================================================================
azsdk Version: 2.9.0 
================================================================================
Method Name: Install-AzSDKContinuousAssurance 
Input Parameters: 
Key                       Value                                                                                   
---                       -----                                                                                   
SubscriptionId            <REDACTED>
AutomationAccountLocation Westeurope                                                                              
ResourceGroupNames        foobar                                                                              
OMSWorkspaceId            <REDACTED>
OMSSharedKey              <REDACTED>
================================================================================
Running AzSDK cmdlet using a generic (org-neutral) policy...
================================================================================
Started setting up Automation Account for Continuous Assurance (CA)
================================================================================
Creating Automation Account: [AzSDKContinuousAssurance]
Creating new AAD application: [AzSDK_CA_SPN_20180130122928]. This may take a few min...
Creating new service principal (SPN) for the AAD application. This will be used as the runtime account for AzSDK CA
Generating new credential for AzSDK CA SPN
Configuring permissions for AzSDK CA SPN. This may take a few min...
Adding SPN to [Reader] role at [Subscription] scope...
Adding SPN to [Contributor] role at [AzSDKRG] resource group scope...
Configuring AzSDK CA Automation Account with SPN credential
Preparing a storage account for storing reports from CA scans...
Found existing AzSDK storage account: [<REDACTED>]. This will be used to store reports from CA scans.
Cannot create object of type "RunbookSchedule". Cannot convert value "2018-01-30T14.31.08+02:00" to type "System.DateTime". Error: "String was not recognized as a valid DateTime."
Error occurred. Rolling back the changes.
================================================================================
Logs have been exported to: 'C:\...\20180130_142923_ICA\'
================================================================================

PowerShellOutput.log guides this a bit further:

Cannot create object of type "RunbookSchedule". Cannot convert value "2018-01-30T14.31.08+02:00" to type "System.DateTime". Error: "String was not recognized as a valid DateTime."
At C:\...\WindowsPowerShell\Modules\azsdk\2.9.0\Framework\Core\ContinuousCompliance\CCAutomation.ps1:2431 char:4
+             $ScanSchedule = [RunbookSchedule]@{
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [], RuntimeException
    + FullyQualifiedErrorId : ObjectCreationError

This gives me the understanding that DateTime conversion isn't working properly. I tried setting up the schedule manually and after that running the Update-AzSDKContinuousAssurance command with correct parameters. It succeeds, but doesn't actually seem to work. I've started the PS session with import-module AzSDK to verify that the correct version of AzureRM (4.1.0) is loaded.

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

1 participant