Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blast-radius not working with latest terraform version #71

Open
ltomes opened this issue Nov 20, 2019 · 0 comments
Open

blast-radius not working with latest terraform version #71

ltomes opened this issue Nov 20, 2019 · 0 comments

Comments

@ltomes
Copy link
Contributor

ltomes commented Nov 20, 2019

blast-radius is not working with latest terraform version.
On inspection, blast-radius builds out terraform version 0.12.3, if a user is using a newer version of terraform they will get the following error:
Error refreshing state: state snapshot was created by Terraform v0.12.12, which is newer than current v0.12.3; upgrade to Terraform v0.12.12 or greater to work with this state

I have updated the terraform version in this PR: #70

Temporary mediation for compose users:
Create a docker-compose file like so:

version: '3.7'
services:
  graph:
    cap_add:
      - SYS_ADMIN
    image: gemini-blast-radius # 28mm/blast-radius
    build:
      context: ./
      dockerfile: ./Dockerfile
    ports:
      - "5000:5000"
    expose:
      - "5000"
    volumes:
      - "./:/data"

Create a Dockerfile with the following properties:

ARG TF_VERSION=0.12.12
ARG PYTHON_VERSION=3.7

FROM hashicorp/terraform:$TF_VERSION AS terraform_latest
FROM 28mm/blast-radius

COPY --from=terraform_latest /bin/terraform /bin/terraform

The above compose file pulls blast-radius as is, and then forces the terraform 0.12.12 binary into the blast radius container.

To call blast-radius just call docker--compose graph from the working directory of your terraform files.

dustinlharrison added a commit to dustinlharrison/blast-radius that referenced this issue Nov 21, 2019
…8mm#71: work around pyhcl

virtuald/pyhcl#55: pyhcl doesn't support terraform v0.12

Resolve this temporarily by using the go library `hcl2json` which allows
colorization and rendering to still work.  JSON references don't appear
to work, but the package is still usable.

Add pipenv support and update documentation and Makefile to support the
external go package.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant