Commit graph

60 commits

Author SHA1 Message Date
Buk Bukowski
3534622b92
feat: add docker logs data source (#471)
* working docker-logs

Signed-off-by: bukowa <gitbukowa@gmail.com>

* add tests

Signed-off-by: bukowa <gitbukowa@gmail.com>

* add description to logs_list_string

Signed-off-by: bukowa <gitbukowa@gmail.com>

* allow discarding docker-logs headers

Signed-off-by: bukowa <gitbukowa@gmail.com>

* add auto generated docs

Signed-off-by: Buk Bukowski <gitbukowa@gmail.com>

Signed-off-by: bukowa <gitbukowa@gmail.com>
Signed-off-by: Buk Bukowski <gitbukowa@gmail.com>
2022-10-17 13:50:45 +02:00
Martin Wentzel
291c90e61b fix: Update shasum of busybox:1.35.0 tag 2022-10-14 13:16:09 +02:00
Tyler Sullivan
d6077e672c
feat: Configurable timeout for docker_container resource stateChangeConf (#454)
* make the docker_container resource stateChangeConf timeout configurable

* remove commented out code

* update docs

* use milliseconds for consistency

* update description to say milliseconds

* fix log fmt to show actual seconds from milliseconds, and make website-generation

* fix: import state for containerReadRefreshTimeoutMillisecondsDefault

* fix: typo in comment

Co-authored-by: Tyler Sullivan <tyler.sullivan@smartsheet.com>
Co-authored-by: Martin <Junkern@users.noreply.github.com>
2022-09-13 15:44:25 +02:00
William Sedlacek
d0eae33123
fix: oauth authorization support for azurecr (#451)
* fix: oauth authorization support for azurecr

* fix: oauth when destroying images

* refactor: run make fmt
2022-09-09 13:59:18 +02:00
Martin
f34bec792b
fix: Replace deprecated .latest attribute with new image_id. (#453) 2022-09-05 15:14:45 +02:00
Martin
ad65027896
feat: Add image_id attribute to docker_image resource. (#450) 2022-09-05 13:55:41 +02:00
Martin
b37b866b6d
fix: Remove reading part of docker_tag resource. (#448) 2022-09-05 09:00:00 +02:00
Martin Wentzel
90a40021df fix: Fix repo_digest value for DockerImageDatasource test. 2022-09-02 15:34:07 +02:00
Imantas
c629be7de3
fix: Docker Registry Image data source use HEAD request to query image digest (#433)
* fix: Docker Registry Image data source use HEAD request to query image digest

* fix: explain double request to registry in data.docker_registry_image

Co-authored-by: Martin <Junkern@users.noreply.github.com>
2022-08-29 15:53:40 +02:00
Michele Adduci
19a7059828
fix: Adding Support for Windows Paths in Bash (#438)
Included support for Absolute Paths in Windows that begin with e.g. `G:/`
2022-08-29 12:32:02 +02:00
Kyle Carberry
6c8714dc4a
fix: Check the operating system for determining the default Docker socket (#427)
Windows doesn't use `/var/run/docker.sock`, so this provider
didn't work out of the box.
2022-08-10 15:32:34 +02:00
Martin
59fcfcc269
feat: Implement triggers attribute for docker_image. (#425)
* feat: Implement triggers attribute for docker_image.

* fix: Update repo_digest value in test.
2022-08-10 13:57:14 +02:00
Martin Wentzel
074c94cabc docs: Improve docker network usage documentation [skip-ci] 2022-08-01 13:22:15 +02:00
Martin
fdd628e915
fix: Add ForceTrue to docker_image name attribute. (#421)
* fix: Add ForceTrue to docker_image name attribute.

* fix: Test for docker_image name attribute change does not need to check for specific sha sums.
2022-08-01 08:44:47 +02:00
Martin
777e292b7f
feat: Implementation of docker_tag resource. (#418)
* feat: Basic implementation of docker_tag resource.

* feat: Adding new AccDockerTag tests to ci pipeline.

* fix: Update failing tests.

* docs: Update tags documentation.

* fix: Fix docker_tags test.

* fix: docker_tag tests now download platform specific images.

* fix: also pull correct busybox image for dockert_tag test.
2022-07-28 14:03:16 +02:00
Martin
cf3f8d6457
feat: Implement support for insecure registries (#414)
* feat: Add new tests for insecure registries.

* chore: Refactor code into parseImageOptions and add tests.

* feat: normalizeRegistryAddress supports http addresses.

* feat: keys of authConfigs are now stored without protocol.

* chore: Refactor of docker registry fallback in parseImageOptions.

* refactor: Improve tests and implementation of parseImageOptions

* feat: Implement support for http registries.

* fix: authConfig unit tests now reflect newest structure.

* fix: docker_image_registry data source can pull without authentication.

* fix: Refactor setup of http headers for registry requests.

* docs: Add note about http registries.

* docs: Fix linting error in docs.
2022-07-22 11:19:15 +02:00
Martin
df4b76aa04
fix: Enable authentication to multiple registries again. (#400)
* fix: Enable authentication to multiple registries again.

* fix: Tests run when conflictsWith is disabled.

* chore: Improve docs for multiple registry auth.

* tests: Add multiple registry auth test.

* fix: Correct index of auth structure.

* chore: Add newest docs [ci skip]
2022-07-15 13:05:26 +02:00
Martin
d12e13fac9
fix: ECR authentication (#409)
* chore: Adding makefile targets for local building.

* fix: Implement proper parsing of different ECR auth mechanisms.

* chore: Fix typos and cleanup Makefil [skip ci]
2022-07-15 12:25:36 +02:00
Martin
100db97ffa
feat: Add gpu flag to docker_container resource (#405)
* feat: Add gpu flag do docker_container resource.

* docs: Enhance gpus flag documentation.
2022-07-15 11:15:28 +02:00
Martin
faa3ec5a39
fix: Improve searchLocalImages error handling. (#407)
* fix: Improve searchLocalImages error handling.

* fix: Fix wrong sha format in docker image tests
2022-07-14 14:30:29 +02:00
Martin
6d6f9bb905
fix: Throw errors when any part of docker config file handling goes wrong. (#406) 2022-07-14 13:45:17 +02:00
Martin
78c42d7657
fix: Enables having a Dockerfile outside the context (#402)
* tests: Add failing test for Dockerfile outside context.

* fix: Enable support for Dockerfiles outside context.

Also extract some code to functions.

* fix: Adding docker outside context test and implementation for docker_registry_image.
2022-07-13 09:01:52 +02:00
Martin
401ff5e8ad
fix: Correctly handle build files and context for docker_registry_image (#398)
* tests: Add file_permission test which is failing for now.

* tests: Add whitelist_dockerignore test which is failing for now.

* fix: Various issues with docker_registry_image build process.
2022-07-11 15:18:55 +02:00
Stéphane Este-Gracias
6fd5b02a0d
feat: add runtime, stop_signal and stop_timeout properties to the docker_container resource (#364)
* feat: add property runtime to docker_container

Signed-off-by: Stéphane Este-Gracias <sestegra@gmail.com>

* feat: add properties stop_signal & stop_timeout

Signed-off-by: Stéphane Este-Gracias <sestegra@gmail.com>

* fix: stop_timeout cast

Signed-off-by: Stéphane Este-Gracias <sestegra@gmail.com>

* fix: add Computed to avoid recreation

Signed-off-by: Stéphane Este-Gracias <sestegra@gmail.com>
2022-07-11 12:27:47 +02:00
Marcel Meulemans
af072b22aa
fix: compare relative paths when excluding, fixes kreuzwerker#280 (#397) 2022-07-07 15:08:57 +02:00
Martin
dc8757e5f3
feat(src): Enable buildkit when client has support. (#387)
* feat(src): Enable buildkit when client has support.

* fix: Increase timeout of testsuite to 12min

* fix: docker_image datasource tests use smaller busybox image.

* fix: Use image version which are available on arm64.

* fix: Remove session dialer from buildkit implementation.

Did not do really anything

* feat: Buildkit is now working.

* fix: Disable linting for one specific line.

* fix: Fixes TestAccDockerImage_basic test.

The used image names in the two subtests must be different.
2022-06-23 10:32:31 +02:00
Alexander Niebuhr
3c22540321
fix: correct authentication for ghcr.io registry(#349)
Co-authored-by: Martin <Junkern@users.noreply.github.com>
2022-06-16 19:47:17 +02:00
Stephen Lacy
0beb476c08
chore(src): improve image delete error message (#359)
Co-authored-by: Martin <Junkern@users.noreply.github.com>
2022-06-10 20:06:31 +02:00
Manuel Vogel
3edb3c68b5
docs: fix service options (#337)
* chore: re-add tfplugindocs
* docs: adds ssh_opts of #335 in example
* docs: regenerate the website
* docs: fix service options block
* docs: beautify service docs
* docs: fix typo
2022-01-23 12:18:07 +01:00
Nolan Woods
24336bc89f
feat: add parameter for SSH options (#335) 2022-01-18 14:37:50 +09:00
Manuel Vogel
3fbe7d3a34
fix: pass container rm flag (#322)
* fix: pass container rm flag

* fix: deletion of containers

* docs: website gen

* docs: add stargazers

* fix(docs): for #321
2021-12-03 19:38:55 +09:00
renovate[bot]
7fc945d01b
fix(deps): update module github.com/golangci/golangci-lint to v1.43.0 (#306)
* fix(deps): update module github.com/golangci/golangci-lint to v1.43.0
* chore(ci): bump golangci-lint version
* fix: linter issues
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Manuel Vogel <mavogel@posteo.de>
2021-12-02 10:58:17 +01:00
Shunsuke Suzuki
62827ae478
fix: add nil check of DriverConfig (#315) 2021-11-30 15:30:45 +01:00
Shunsuke Suzuki
1e55894715
fix(container): remove log_driver's default value and make log_driver computed (#270)
* fix(container): remove log_driver's default value and make log_driver `computed`
* fix: update the description
* docs: make website-generation

Co-authored-by: Manuel Vogel <mavogel@posteo.de>
2021-11-30 07:51:49 +01:00
Bulgantamir
8304bfd0ae
Fixed typo (#310) 2021-11-15 23:57:55 +09:00
Artem Yarmoliuk
2ff0df9951
docs: fix r/registry_image truncated docs (#304) 2021-11-03 08:37:05 +09:00
Manuel Vogel
4cd1d11bcc
docs: corrects authentication misspell. Closes #264 2021-08-11 10:02:33 +02:00
Manuel Vogel
6be43d114e
fix: add current timestamp for file upload to container (#259) 2021-08-10 18:28:36 +09:00
Manuel Vogel
600a84979d
feat: add container storage opts (#258) 2021-08-05 06:59:48 +09:00
Manuel Vogel
e7e80fa23f
docs: update to absolute path for registry image context (#246) 2021-07-09 09:04:43 +02:00
Manuel Vogel
44081ad4b1
docs/service entrypoint (#244)
* chore: add tfplugin docs to deps
* docs(service): enhance the explanation of the command attribute
2021-07-07 11:41:27 +02:00
Manuel Vogel
b759b8f2c9
fix(registry_image): consider .dockerignore in image build (#240)
* fix(registry_image): consider .dockerignore in image build
* test: for respecting dockerignore in registry image build
2021-07-07 10:35:18 +02:00
Adam Le Bon
0b9790e3d3
fix: Update the URL of the docker hub registry (#230)
* fix: Update docker hub registry URL

Co-authored-by: Manuel Vogel <mavogel@posteo.de>
2021-06-28 18:52:43 +02:00
Manuel Vogel
7f96a26866
fix/service bind options (#234)
* fix: give service bind_options propagation rprivate as default
* test: add second bind mount for full-service spec to test this case as well
* docs: add a second mount to service example
* fix(service): allow other options for mount binds although they might not be the specified type
* test: for empty and null mount bind
* docs(service): explains propagation more in details
* docs(service): adds missing default for propagation
* fix(test): update stop grace period to 30s for flaky test on gh actions

Co-authored-by: Shunsuke Suzuki <suzuki-shunsuke@users.noreply.github.com>
2021-06-27 16:34:01 +02:00
Manuel Vogel
bc554257e4
fix/service delete deadline (#227)
* fix: service container wait

only apply if the destroy grace period is larger than 0s. Interpret also the wait result chan and errors

* chore(service): explains why we ignore certain errors

* chore: readds terraform-plugin-docs

* docs(service): explains the behavior if the grace period is 0s

* fix(service): ignore certain errors on wait error

* refactor: introduce more speaking error contains ignorable message method

because it's more precise on what's happening in the code
2021-06-22 22:11:32 +09:00
Kevin Burke
c888f812a3
internal/provider: include image name in error message (#223)
Without this, if the Docker image is not found, it's difficult to know
which image exactly is 404'ing - you get a very generic error message,
which can make it difficult to spot typos or other problems with the
image name.

Co-authored-by: Manuel Vogel <mavogel@posteo.de>
2021-06-21 09:52:34 +02:00
Manuel Vogel
4d40b84443
fix/service image name (#212)
* fix(service): remove image name suppress function
* feat: add docker image data-source
* docs(service): add example for iamge datasource usage
* fix: image repo digest with tag determination
* fix: always return a repoDigest
* fix(image): deprecation notice for latest attribute
* fix(ci): explicitly go get tfplugindocs
* fix(ci): remove gocenter.io proxy
2021-06-21 09:24:02 +02:00
Manuel Vogel
0588c2071b
chore/refactor tests (#201)
* chore: format test configs for datasources

* chore: outlines load test config helper and structure

* docs(contributing): add command for resouce tests

to have an example of the regex

* refactor: move container test configs into separate files

* fix: add insecure_skip_verify for image pulls

to fix the local test setup with invalid certs

* chore(ci): remove insecure registry adaption

* chore: regenerate website

* chore: update gitignore for scipts/testing dir

* fix: replace nodejs services with go versions

* fix: move testing program versions in separate files

* test: reactivate flaky test from travis

* chore: fix linter on all go files

* fix(linter): testing go servers

* chore(ci): add env for go version

* chore(ci): name workflow steps

also moves description of available docker versions in to acc dockerfile

* Revert "test: reactivate flaky test from travis"

This reverts commit b02654acc4d6b7d02c8f3ba090e6a3f248741b10.

* docs: fix provider-ssh example

* chore: use alpine als final image for tests

* refactor: move test configs from folder into testname.tf files

* refactor: image delete log is now debug and indented

* refactor: image test config into seprate files

* refactor: move network test config into seperate files

* refactor: move plugin test config into seperate files

* chore: rename registry image test file

* refactor: move registry_image test config into seperate files

* chore: format secret test configs

* refactor: inline volume test configs

* fix: remove unused volume label test function

* refactor: move service test configs into seperate files

* test: reactivate and fix service test

* chore: simplify insecure skip verify add to http client

* chore(ci): debug into service test

* chore(ci): add testacc setup

* chore: format tf config for provider test

* chore(ci): add debug output for config.json

* fix: check service auth for emptyness

* fix: remove re-read of provider auth config

because the bug occured only in CI as the meta object might be GCd

* test: pass auth to service instead of provider

* chore: reactivate all acc tests

* test: outlines service inspect json check for full spec

* test: add service inspect json checks

* test: finish service inspect json checks

* chore(service): move test helper to end to of the file

* chore: move mapEquals to test helpers

* test: add json inspect for config

* chore: add debug inspect log for plugin, secret and volume

* test: add json inspect for secret

* test: add json inspect for image

* test: add json inspect for network

* test: add json inspect for plugin

* test: add json inspect for volume

* test: inline ds plugin test configs

* test: inline network configs

* test: move ds reg image configs into separate files

* test: reactivates container upload checks

* chore: adapt issues ref from old to new xw repo

* fix: reactivate network ingress test

and provide helpers for removing the default ingress network and leaving the swamr

* docs: rerun website gen

* test: fix reg image build and keep test

* chore: add name to todo

* chore: move ds network and plugin specs to file

* chore: format provider test spec

* chore: use simpler error message for empty strings
2021-05-31 16:11:49 +09:00
Manuel Vogel
2d889c77d7
fix: add service host flattener with space split (#205)
* fix: add service host flattener with space split

* fix(service): switch host and ip in flatten extra hosts
2021-05-26 15:35:46 +09:00
Manuel Vogel
ebe61896e9
fix: service state upgradeV2 for empty auth
which caused a panic. Closes #203.
2021-05-25 16:46:25 +02:00