Terraform Provider - Docker
Find a file
Manuel Vogel dce9b7a5a2
docs: remove computed:true from network data
so the list is rendered in the description
2021-05-17 14:48:23 +02:00
.github chore(ci): updates paths for website checks 2021-05-13 09:14:14 +02:00
docs docs: remove computed:true from network data 2021-05-17 14:48:23 +02:00
examples docs: complete ds registry image 2021-05-16 16:03:06 +02:00
internal/provider docs: remove computed:true from network data 2021-05-17 14:48:23 +02:00
scripts fix: test spaces for windows (#190) 2021-05-11 10:00:02 +02:00
templates docs: add template for index.md 2021-05-13 08:50:59 +02:00
tools chore: add tfplugindocs tool 2021-05-13 07:55:42 +02:00
website docs: add an example to build an image with docker_image (#158) 2021-03-29 10:09:08 +02:00
.gitignore chore: ignore dist folder 2021-04-21 14:11:32 +02:00
.go-version feat: support darwin arm builds and golang 1.16 (#140) 2021-03-18 23:21:49 +09:00
.golangci.yml feat: migrate to terraform-sdk v2 (#102) 2021-03-18 08:30:54 +01:00
.goreleaser.yml fix(deps): update module github.com/golangci/golangci-lint to v1.39.0 (#166) 2021-04-09 11:56:56 +02:00
.markdownlinkcheck.json ci: fix test of website 2020-12-12 01:21:02 +09:00
.markdownlint.yml ci: fix test of website 2020-12-12 01:21:02 +09:00
CHANGELOG.md chore: update changelog for v2.11.0 2021-01-22 21:10:38 +01:00
CODE_OF_CONDUCT.md docs: adds coc and contributing 2020-12-24 16:27:35 +01:00
CONTRIBUTING.md docs(contributing): update for documentation generation 2021-05-13 08:07:21 +02:00
GNUmakefile fix: adapt website-lint target to new do folder 2021-05-13 08:11:24 +02:00
go.mod feat: add tfplugin doc dependency and make target 2021-05-13 08:06:41 +02:00
go.sum feat: add tfplugin doc dependency and make target 2021-05-13 08:06:41 +02:00
LICENSE initial commit 2017-06-05 20:59:08 +00:00
main.go chore: add tfplugindocs tool 2021-05-13 07:55:42 +02:00
README.md docs(readme): update example usage 2021-03-25 11:50:57 +01:00
renovate.json5 chore(renovate): configure Renovate (#162) 2021-04-07 10:53:58 +02:00

Terraform Provider

Requirements

  • Terraform >=0.12.x
  • Go 1.15.x (to build the provider plugin)

Building The Provider

$ git clone git@github.com:kreuzwerker/terraform-provider-docker
$ make build

Example usage

# Set the required provider and versions
terraform {
  required_providers {
    # We recommend pinning to the specific version of the Docker Provider you're using
    # since new versions are released frequently
    docker = {
      source  = "kreuzwerker/docker"
      version = "2.11.0"
    }
  }
}

# Configure the docker provider
provider "docker" {
}

# Create a docker image resource
# -> docker pull nginx:latest
resource "docker_image" "nginx" {
  name         = "nginx:latest"
  keep_locally = true
}

# Create a docker container resource
# -> same as 'docker run --name nginx -d nginx:latest'
resource "docker_container" "nginx" {
  name    = "nginx"
  image   = docker_image.nginx.latest
}