Sign inSign up

claranet/datadog-terraform

By claranet

•Updated about 6 years ago

Simple terraform based image with useful tools to works with terraform code for Datadog at Claranet.

Image
0

1.6K

claranet/datadog-terraform repository overview

⁠Claranet Datadog Terraform

Docker image for Datadog terraform code like monitors or integrations repositories.

⁠What does it contains

The image is based on official terraform image and add some tools like :

  • terraform-docs
  • terraform-config-inspect
  • bash
  • curl
  • grep
  • jq

⁠Dockerfile

FROM hashicorp/terraform:0.12.6

ENV LC_COLLATE=C \
    LC_ALL=C.UTF-8 \
    LANG=C.UTF-8

RUN apk add --no-cache \
        curl \
        bash \
        grep \
        coreutils \
        jq \
        go \
        musl-dev

RUN go get github.com/hashicorp/terraform-config-inspect && \
    mv /root/go/bin/* /usr/local/bin/ && \
    rm -fr /root/go /root/.cache /root/.terraform.d && \
    curl -Lo /usr/local/bin/terraform-docs "https://github.com/$(curl -s https://github.com/segmentio/terraform-docs/releases | grep terraform-docs-v0.6.0-linux-amd | head -n 1 | cut -d '"' -f 2)" && \
    chmod +x /usr/local/bin/*

RUN apk --no-cache del go musl-dev

RUN addgroup -S claranet && adduser -S claranet -G claranet
USER claranet


ENTRYPOINT ["/bin/bash"]
HEALTHCHECK NONE
CMD []

⁠How to build

Be sure docker service is run and :

docker build -t claranet/datadog-terraform .

⁠How to use

The docker container will have a whole ready environment to work with our terraform datadog related code like our monitors templates.

For instance, to run the auto_update.sh script which assure compliance and everything is up to date on repository in case of contribution:

docker run --rm -v "$PWD:/work" claranet/datadog-terraform /work/scripts/auto_update.sh

Tag summary

Content type

Image

Digest

Size

190.6 MB

Last updated

about 6 years ago

docker pull claranet/datadog-terraform