Variable replacement not working in Deploy to S3

Variable replacement does not seem to be working inside of the Deploy to S3 step.
I have a JSON file inside of my package and am using the hierarchical syntax to replace variables.

The logs show that variable replacement occurs, but the file that is uploaded to S3 has no variables replaced.

Any assistance would be appreciated!

Hi Nicholas,

Thanks for getting in touch!

I’ve done some testing around this and it looks like the variable substitution works if there is an Octopus variable identified in the JSON as detailed here:

I’m going to query this internally to determine whether it should be working for JSON replacement too.


Thanks for getting back to me. Yes the substitution only seems to work if there is a variable defined in the JSON. This is pretty hacky for my particular use case as I still want a json file that contains values for local development. I have a pretty nasty workaround for the moment, which is to have a dummy json file that I use for replacement that then gets written over the config file in S3. It would be really great it this step supported the hierarchical syntax.

Hi Nicholas,

I had a chat about this with our engineers, and they agree that this behaviour isn’t ideal.
Luckily, we’re currently working on a backend project to make the code base behind our AWS and Azure more modular for various internal reasons. The side effect of this being that issues like this one will be resolved during these changes and will be released as part of 2020.3 over the next couple months.


This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.