Terraform onboarding script for Citrix DaaS pulls ...
# citrix-daas
s
Terraform onboarding script for Citrix DaaS pulls only 250 published applications. Anyone know how to import all applications to tf state file.
s
for me: line 272 from their script should be replaced with $response = Invoke-WebRequest -Uri "$($Uri)?limit=1000" -Method $Method -Headers $Headers -ContentType $ContentType -Body $Body -SkipCertificateCheck line 275 should be replaced with $response = Invoke-WebRequest -Uri "$($Uri)?limit=1000" -Method $Method -Headers $Headers -ContentType $ContentType -Body $Body Ideally, they should add a mechanism to check if there's more objects than the limit and parse "other pages". I put limit=1000 because sometimes higher number get rejected.
s
@Steven Lemonier - Thank you, that worked.
We have 890 applications, so the limit 1000 worked. But the API record limit can't exceed 1000, there should be enhancement to include all the records. Invoke-RestMethod : {"ErrorMessage":"An error occurred. The number of records per API call is limited to between 0 and 1000.\r\nParameter name: limit","SdkErrorId":"UnknownError","ErrorType":"ArgumentException","ErrorDetails":"Transaction ID: e40529b2-f8a8-482a-8a86-a96cf3f16ea7\r\nAction Name: GetApplicationsAsync\r\n\r\n\r\nException:\r\n Error Source : CitrixOrchestration\r\n","SupportLink":null,"ErrorReportXml":null,"ErrorReport":null}
s
yeah, need to handle ContinuationToken
r
@Jason Samuel ^^
✅ 1
s
I reported this on GitHub and new version of the script is released today which has the fix.
👍 2