#azure (2022-10)

azure

Archive: https://archive.sweetops.com/azure/

2022-10-18

Jan Fiedler avatar
Jan Fiedler

Hey community, i am currently trying to execute terraform in a Devops pipeline using a custom Docker Image which looks like this:

FROM mcr.microsoft.com/azure-cli:2.9.1

RUN apk --no-cache add sudo shadow nodejs npm

# Install tfenv
RUN git clone <https://github.com/tfutils/tfenv.git> ~/.tfenv
RUN ln -s ~/.tfenv/bin/* /usr/local/bin
RUN tfenv install 1.0.11

LABEL "com.azure.dev.pipelines.agent.handler.node.path"="/usr/bin/node"

When trying to execute /usr/local/bin/tfenv or /usr/local/bin/terraform within step, I get a permission denied. I know that the command are executed from the user vsts_azpcontainer when using a custom container image. But also tweaking the permissions of terraform or tfenv did not work. I have the feeling, I am on a wrong path on that one. Have any of you dealt with this before?

    keyboard_arrow_up