I must be missing something simple with this JSON Configuration Variable feature. I have the following JSON:
{
"EventProcessorFactory": "Factory"
"HubConfiguration": [
{
"ArchiveStorageConnectionString": "Connection string"
"ArchiveStorageContainerName": "containerName"
"EventHubGroupName": "ehs-peds-dev"
}
],
"HeartBeatConfiguration": {
"EventHubGroupName": "GroupName",
"EventHubName": "HubName"
"SharedAccessKey": "AccessKey"
"SharedAccessKeyName": "EventPublishers",
"EndPointURL": "URL"
}
}
I want to replace the ArchiveStorageConnectionString (and other properties of HubConfiguration) but I can't figure out what the correct syntax is. HubConfiguration is an array of HubConfigurations (although in this case I only have 1).
I've tried
HubConfiguration:1:ArchiveStorageConnectionString
But that doesn't work. I've also tried
HubConfiguration:0:ArchiveStorageConnectionString
0:HubConfiguration:0:ArchiveStorageConnectionString
1:HubConfiguration:1:ArchiveStorageConnectionString
but none of this seem to work. Any pointers would be greatly appreciated.
The Octopus code that matches and replaces the variables is here:
Some unit tests are here:
I would have expected this to work:
HubConfiguration:0:ArchiveStorageConnectionString
There does seem to be a problem with your JSON - this line should end with a ,:
"EventProcessorFactory": "Factory"
Do you get any output in your deployment when the convention runs?