GithubHelp home page GithubHelp logo

Comments (4)

tamirkamara avatar tamirkamara commented on June 15, 2024

@carolynvs is this something we can do? I can take it...

from terraform-mixin.

carolynvs avatar carolynvs commented on June 15, 2024

@tamirkamara absolutely, I would really appreciate help getting this resolved sooner.

Here is the code that I think needs to be changed:

const dockerfileLines = `
RUN apt-get update && apt-get install -y wget unzip && \
wget https://releases.hashicorp.com/terraform/{{.ClientVersion}}/terraform_{{.ClientVersion}}_linux_amd64.zip && \
unzip terraform_{{.ClientVersion}}_linux_amd64.zip -d /usr/bin && \
rm terraform_{{.ClientVersion}}_linux_amd64.zip
COPY {{.WorkingDir}}/{{.InitFile}} $BUNDLE_DIR/{{.WorkingDir}}/
RUN cd $BUNDLE_DIR/{{.WorkingDir}} && terraform init -backend=false
`

If you have any questions, just let me know. 👍

from terraform-mixin.

tamirkamara avatar tamirkamara commented on June 15, 2024

When running the mirror it duplicated the data that was fetched by the init command. In my custom docker file I delete the data downloaded by the init command and everything works fine. I have bundles with 5 terraform plugins and that accounts for ~300MB that are saved.

How do I know in the build time if an init will be run during runtime? init.go includes some logic around it but I wasn't sure if an init would always run or not...
@carolynvs

from terraform-mixin.

carolynvs avatar carolynvs commented on June 15, 2024

I think that we always run init at runtime, even when it's not strictly required.

fmt.Println("Initializing Terraform...")
err := m.Init(step.BackendConfig)

In #80 I proposed that we only call init at runtime if a remote backend was specified and otherwise skip it.

from terraform-mixin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.