This message was deleted.
# azure
s
This message was deleted.
m
Have worked around this for now by: 1. Hashing the file 2. Passing that hash as an input to the Environment InputMap Seems to do enough to trigger Update correctly
Copy code
public static Command UploadFile(string commandName, Input<string> fileShareName,
        Input<string> storageAccountName, Input<string> storageKey,
        Input<string> sourceFile, Input<string> fileHash,
        Input<string> destinationFile)
    {
        const string uploadCommand =
            "az storage file upload -s $STORAGE_SHARE_NAME --source $SOURCE_FILE --account-key $STORAGE_ACCOUNT_KEY --account-name $STORAGE_ACCOUNT_NAME -p $DESTINATION_PATH";

        const string deleteCommand =
            "az storage file delete -s $STORAGE_SHARE_NAME --account-key $STORAGE_ACCOUNT_KEY --account-name $STORAGE_ACCOUNT_NAME -p $DESTINATION_PATH";

        return new Command(commandName, new CommandArgs
        {
            Create = uploadCommand,
            Update = uploadCommand,
            Delete = deleteCommand,

            Environment =
            {
                { "STORAGE_SHARE_NAME", fileShareName },
                { "STORAGE_ACCOUNT_NAME", storageAccountName },
                { "STORAGE_ACCOUNT_KEY", storageKey },
                { "SOURCE_FILE", sourceFile },
                { "HASH", fileHash },
                { "DESTINATION_PATH", destinationFile }
            }
        });
    }