{"id":43052770,"url":"https://github.com/cloud-native-toolkit/image-terraform","last_synced_at":"2026-01-31T10:38:19.601Z","repository":{"id":38084243,"uuid":"465097878","full_name":"cloud-native-toolkit/image-terraform","owner":"cloud-native-toolkit","description":"Image to test running terraform with minimal supporting resources","archived":false,"fork":false,"pushed_at":"2025-03-12T15:34:38.000Z","size":58,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-06-22T03:02:56.573Z","etag":null,"topics":["docker","opentofu","terraform"],"latest_commit_sha":null,"homepage":"https://quay.io/cloudnativetoolkit/terraform","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cloud-native-toolkit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-03-02T00:09:40.000Z","updated_at":"2025-03-12T15:34:29.000Z","dependencies_parsed_at":"2025-03-09T16:25:07.330Z","dependency_job_id":"b887226e-ef64-411e-a482-2e16d89018cd","html_url":"https://github.com/cloud-native-toolkit/image-terraform","commit_stats":null,"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"purl":"pkg:github/cloud-native-toolkit/image-terraform","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud-native-toolkit%2Fimage-terraform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud-native-toolkit%2Fimage-terraform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud-native-toolkit%2Fimage-terraform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud-native-toolkit%2Fimage-terraform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cloud-native-toolkit","download_url":"https://codeload.github.com/cloud-native-toolkit/image-terraform/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cloud-native-toolkit%2Fimage-terraform/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28938841,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T10:18:23.202Z","status":"ssl_error","status_checked_at":"2026-01-31T10:18:22.693Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","opentofu","terraform"],"created_at":"2026-01-31T10:38:19.535Z","updated_at":"2026-01-31T10:38:19.595Z","avatar_url":"https://github.com/cloud-native-toolkit.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Terraform container image\n\n[![Docker Repository on Quay](https://quay.io/repository/cloudnativetoolkit/terraform/status \"Docker Repository on Quay\")](https://quay.io/repository/cloudnativetoolkit/terraform)\n\nThis repository builds a container image with a minimal set of tools required to apply Terraform automation.\n\nThe container includes the following:\n\n- bash\n- terraform cli\n- terragrunt cli\n- git cli\n- jq cli\n- yq v4 cli\n\n**Warning: The material contained in this repository has not been thoroughly tested. Proceed with caution.**\n\n## Getting started\n\n### Prerequisites\n\nTo run this image, the following tools are required:\n\n- `docker` cli\n- `docker` backend - Docker Desktop, colima, etc\n\n### Running the client\n\nStart the client to use it.\n\n- To run the `terraform` container:\n\n    ```bash\n    docker run -itd --name terraform quay.io/cloudnativetoolkit/terraform\n    ```\n\nOnce the client is running in the background, use it by opening a shell in it.\n\n- To use the `terraform` container, exec shell into it:\n\n    ```bash\n    docker exec -it terraform /bin/bash\n    ```\n\n  Your terminal is now in the container.\n\nUse this shell to run commands using the installed tools and scripts.\n\nWhen you're finished running commands, to exit the client.\n\n- To leave the `terraform` container shell, as with any shell:\n\n    ```bash\n    exit\n    ```\n\n  The container will keep running after you exit its shell.\n\nIf the client stops:\n\n- To run the `terraform` container again:\n\n    ```bash\n    docker start terraform\n    ```\n\nThe `terraform` container is just a Docker container, so all [Docker CLI commands](https://docs.docker.com/engine/reference/commandline/cli/) work.\n\n## Container registry\n\nThe build automation pushes the built container image to [quay.io/cloudnativetoolkit/terraform](https://quay.io/cloudnativetoolkit/terraform)\n\n### Floating tags\n\nThe floating image tags use the following convention:\n\n- `latest` - the latest **alpine** version of the image (currently terraform v1.2)\n- `alpine` - the latest **alpine** version of the image (currently terraform v1.2)\n- `fedora` - the latest **fedora** version of the image (currently terraform v1.2)\n- `v1.2` - the latest **alpine** version of the image using terraform v1.2\n- `v1.1` - the latest **alpine** version of the image using terraform v1.1\n- `v1.0` - the latest **alpine** version of the image using terraform v1.0\n- `v1.2-alpine` - the latest **alpine** version of the image using terraform v1.2\n- `v1.1-alpine` - the latest **alpine** version of the image using terraform v1.1\n- `v1.0-alpine` - the latest **alpine** version of the image using terraform v1.0\n- `v1.2-fedora` - the latest **fedora** version of the image using terraform v1.2\n- `v1.1-fedora` - the latest **fedora** version of the image using terraform v1.1\n- `v1.0-fedora` - the latest **fedora** version of the image using terraform v1.0\n\n### Pinned tags\n\nEach release within the repository corresponds to a pinned image tag that will never be moved to another image. The pinned tags use the following naming convention:\n\n```text\n{terraform version}-{release tag}-{base OS image}\n```\n\nwhere:\n\n- `{terraform version}` - is the major and minor version of the terraform cli (e.g. v1.1)\n- `{release tag}` - is the release tag for this repository (e.g. v1.0.0)\n- `{base OS image}` - is the base OS image (`alpine` or `fedora`)\n\nFor example:\n\n```text\nv1.1-v1.0.0-alpine\n```\n\n## Usage\n\nThe image can be used by referring to the image url. The following can be used to run the container image interactively:\n\n```shell\ndocker run -it quay.io/cloudnativetoolkit/terraform\n```\n\n## Development\n\nTo build the default image using the latest version of terraform on alpine, run the following:\n\n```shell\ndocker build -t terraform .\n```\n\n### Changing terraform versions\n\nThe terraform version can be changed by passing the `TERRAFORM_VERSION` as a build arg. For example:\n\n```shell\ndocker build --build-arg TERRAFORM_VERSION=1.1.9 -t terraform:v1.1 .\n```\n\n### Changing base OS versions\n\nThe base OS can be changed by using the `Dockerfile-fedora` file. For example:\n\n```shell\ndocker build -f Dockerfile-fedora -t terraform:fedora .\n```\n\n## Testing\n\nThe repository includes configuration files to test the built container images using the [container-structure-test](https://github.com/GoogleContainerTools/container-structure-test) utility.\n\nSeveral configuration files are defined:\n\n- `config.yaml` - provides validation for the majority of the container image structure\n- `config-v1.0.yaml` - provides validation for the terraform cli version in v1.0 builds of the image  \n- `config-v1.1.yaml` - provides validation for the terraform cli version in v1.1 builds of the image  \n- `config-v1.2.yaml` - provides validation for the terraform cli version in v1.2 builds of the image  \n\nThe config files can be used in combination by providing multiple `--config` arguments to the **container-structure-test** cli. \n\n### Prerequisites\n\nInstall the **container-structure-test** cli by following the instructions found on [container-structure-test](https://github.com/GoogleContainerTools/container-structure-test).\n\n**Note:** If you are using **colima**, the `DOCKER_HOST` environment variable will need to be set first.  \n\n1. Run `colima status` to get the socket value (e.g. `unix:///Users/myuser/.colima/default/docker.sock`) \n2. Export the socket value in the `DOCKER_HOST` environment variable - `export DOCKER_HOST=\"unix:///Users/myuser/.colima/default/docker.sock\"`)\n\n### Run the tests\n\nRun the test by providing the uri to the image and the config file(s) that will be applied. The image can exist locally or on a remote container registry.\n\n```shell\ncontainer-structure-test test --image {image name} --config config.yaml --config {version config}\n```\n\nFor example:\n\n```shell\ncontainer-structure-test test --image quay.io/cloudnativetoolkit/terraform:v1.0-alpine --config config.yaml --config config-v1.0.yaml\n```\n\n**Note:** If you want to test a image from a remote container registry, the `--pull` argument must be included.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloud-native-toolkit%2Fimage-terraform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcloud-native-toolkit%2Fimage-terraform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcloud-native-toolkit%2Fimage-terraform/lists"}