Terraform Provider - Docker
Find a file
Manuel Vogel 6c796e15a5
feat/doc generation (#193)
* chore: add tfplugindocs tool

* feat: add tfplugin doc dependency and make target

* chore: apply documentation generation

* docs(contributing): update for documentation generation

* fix: adapt website-lint target to new do folder

* docs(network): update ds descriptions

* docs: add template for index.md

* docs: add network resource generation

* chore(ci): updates paths for website checks

* docs: add plugin data source generation

* docs: add import cmd for network resource

* docs: add plugin resource generation

* feat: outlines remaining resources with example and import cmd

* feat: add descriptions to docs

* chore: add DevSkim ignores and fix capitalized errors

* docs: complete ds registry image

* docs: add container resource generation

* docs: add lables description to missing resources

* docs: remove computed:true from network data

so the list is rendered in the description

* Revert "docs: remove computed:true from network data"

This reverts commit dce9b7a5a2.

* docs: add docker image descriptions to generate the docs

* docs: add docker registry image descriptions to generate the docs

* docs: add docker service descriptions to generate the docs

* docs: add docker volume descriptions to generate the docs

* docs(index): clarifies description

so more docker resources are mentioned

* docs(network): fixes required and read-only attributes

so the ds can only be read by-name

* docs(plugin): clarifies the ds docs attributes

* docs: fix typo registry image ds

* docs(config): clarifies attributes and enhances examples

Provide a long example and import command

* fix(config): make data non-sensitive

Because only secrets data is

* docs(containter): clarifies attributes

and enhances examples with import

* docs(config): fix typo

* docs(image): clarifies attributes and remove import

* docs(network): clarifies attributes and adapts import

* docs(plugin): clarifies attributes and import

* docs(registry_image): clarifies attributes and removes import

* chore(secret): remove typo

* docs(service): clarifies attributes and import

* docs(volume): clarifies attributes and import

* fix: correct md linter rules after doc gen

* docs(volume): regenerated

* docs: add config custom template

* docs: add templates for all resources

* docs(config): templates all sections and examples

for better redability and structure

* docs(config): fix md linter

* docs(container): templates all sections and examples

* docs(image): templates all sections and examples

* docs(image): fix import resource by renaming

* docs(network): templates all sections and examples

* docs(service): templates all sections and examples

* docs(volume): templates all sections and examples

* fix(lint): replace website with doc directory

* fix(ci): link check file extension check

* fix: markdown links

* chore: remove old website folder

* chore: fix website-lint terrafmr dir and pattern

* fix: lint fix target website folder

* fix: website links

* docs(provider): update examples

with templates on auth and certs

* docs(provider): add tf-plugin-docs line

* docs(contributing): split doc generation section

* docs: final brush up for readability and structure

* chore(ci): add website-generation job

to see if files changed and it should run locally again

* chore(ci): remove explicit docker setup

from website lint because it's installed by default
2021-05-21 21:30:56 +09:00
.github feat/doc generation (#193) 2021-05-21 21:30:56 +09:00
docs feat/doc generation (#193) 2021-05-21 21:30:56 +09:00
examples feat/doc generation (#193) 2021-05-21 21:30:56 +09:00
internal/provider feat/doc generation (#193) 2021-05-21 21:30:56 +09:00
scripts fix: test spaces for windows (#190) 2021-05-11 10:00:02 +02:00
templates feat/doc generation (#193) 2021-05-21 21:30:56 +09:00
tools feat/doc generation (#193) 2021-05-21 21:30:56 +09:00
.gitignore feat/doc generation (#193) 2021-05-21 21:30:56 +09: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 feat/doc generation (#193) 2021-05-21 21:30:56 +09:00
.markdownlint.yml feat/doc generation (#193) 2021-05-21 21:30:56 +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 feat/doc generation (#193) 2021-05-21 21:30:56 +09:00
GNUmakefile feat/doc generation (#193) 2021-05-21 21:30:56 +09:00
go.mod feat/doc generation (#193) 2021-05-21 21:30:56 +09:00
go.sum feat/doc generation (#193) 2021-05-21 21:30:56 +09:00
LICENSE initial commit 2017-06-05 20:59:08 +00:00
main.go feat/doc generation (#193) 2021-05-21 21:30:56 +09: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
}