-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
194 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/test/resources/hcl/terraform_docker_mongo_main_with_provider.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# use local docker as provider | ||
provider "docker" { | ||
host = "unix:///var/run/docker.sock" | ||
} | ||
|
||
# get the mongo docker image | ||
resource "docker_image" "mongo" { | ||
name = "mongo" | ||
keep_locally = true | ||
} | ||
|
||
# start a container and expose the 27017 port | ||
resource "docker_container" "mongo" { | ||
name = var.mongo_container_name | ||
image = docker_image.mongo.latest | ||
ports = { | ||
internal = 27017 | ||
external = var.mongo_exposed_port | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
src/test/resources/hcl/terraform_docker_mongo_main_without_provider.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# get the mongo docker image | ||
resource "docker_image" "mongo" { | ||
name = "mongo" | ||
keep_locally = true | ||
} | ||
|
||
# start a container and expose the 27017 port | ||
resource "docker_container" "mongo" { | ||
name = var.mongo_container_name | ||
image = docker_image.mongo.latest | ||
ports = { | ||
internal = 27017 | ||
external = var.mongo_exposed_port | ||
} | ||
} |
18 changes: 18 additions & 0 deletions
18
src/test/resources/rest/github/selmak-terraform-docker-mongo-content-main.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{ | ||
"name": "main.tf", | ||
"path": "main.tf", | ||
"sha": "0a5cc012309c07f639bf522dec2dab19783608c9", | ||
"size": 360, | ||
"url": "https://api.github.com/repos/selmak/terraform-docker-mongo/contents/main.tf?ref=master", | ||
"html_url": "https://github.com/selmak/terraform-docker-mongo/blob/master/main.tf", | ||
"git_url": "https://api.github.com/repos/selmak/terraform-docker-mongo/git/blobs/0a5cc012309c07f639bf522dec2dab19783608c9", | ||
"download_url": "https://raw.githubusercontent.com/selmak/terraform-docker-mongo/master/main.tf", | ||
"type": "file", | ||
"content": "IyBnZXQgdGhlIG1vbmdvIGRvY2tlciBpbWFnZQpyZXNvdXJjZSAiZG9ja2Vy\nX2ltYWdlIiAibW9uZ28iIHsKICBuYW1lICAgICAgICAgPSAibW9uZ28iCiAg\na2VlcF9sb2NhbGx5ID0gdHJ1ZQp9CgojIHN0YXJ0IGEgY29udGFpbmVyIGFu\nZCBleHBvc2UgdGhlIDI3MDE3IHBvcnQKcmVzb3VyY2UgImRvY2tlcl9jb250\nYWluZXIiICJtb25nbyIgewogIG5hbWUgID0gIiR7dmFyLm1vbmdvX2NvbnRh\naW5lcl9uYW1lfSIKICBpbWFnZSA9ICIke2RvY2tlcl9pbWFnZS5tb25nby5s\nYXRlc3R9IgogIHBvcnRzID0gewogICAgaW50ZXJuYWwgPSAyNzAxNwogICAg\nZXh0ZXJuYWwgPSAiJHt2YXIubW9uZ29fZXhwb3NlZF9wb3J0fSIKICB9Cn0K\n", | ||
"encoding": "base64", | ||
"_links": { | ||
"self": "https://api.github.com/repos/selmak/terraform-docker-mongo/contents/main.tf?ref=master", | ||
"git": "https://api.github.com/repos/selmak/terraform-docker-mongo/git/blobs/0a5cc012309c07f639bf522dec2dab19783608c9", | ||
"html": "https://github.com/selmak/terraform-docker-mongo/blob/master/main.tf" | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
src/test/resources/rest/gitlab/selmak-terraform-docker-mongo-content-main.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"file_name": "main.tf", | ||
"file_path": "main.tf", | ||
"size": 360, | ||
"encoding": "base64", | ||
"content_sha256": "179816b847fa491f6a9b4d7eff54d6be640b397d8f0ec02a62ad6ed6220057b6", | ||
"ref": "master", | ||
"blob_id": "0a5cc012309c07f639bf522dec2dab19783608c9", | ||
"commit_id": "91ee4feddf2d3c489f8ea1b2489027bb05839ac1", | ||
"last_commit_id": "e01d6f909cd078253d6ef557769fc27c5df5d1e7", | ||
"content": "IyBnZXQgdGhlIG1vbmdvIGRvY2tlciBpbWFnZQpyZXNvdXJjZSAiZG9ja2VyX2ltYWdlIiAibW9uZ28iIHsKICBuYW1lICAgICAgICAgPSAibW9uZ28iCiAga2VlcF9sb2NhbGx5ID0gdHJ1ZQp9CgojIHN0YXJ0IGEgY29udGFpbmVyIGFuZCBleHBvc2UgdGhlIDI3MDE3IHBvcnQKcmVzb3VyY2UgImRvY2tlcl9jb250YWluZXIiICJtb25nbyIgewogIG5hbWUgID0gIiR7dmFyLm1vbmdvX2NvbnRhaW5lcl9uYW1lfSIKICBpbWFnZSA9ICIke2RvY2tlcl9pbWFnZS5tb25nby5sYXRlc3R9IgogIHBvcnRzID0gewogICAgaW50ZXJuYWwgPSAyNzAxNwogICAgZXh0ZXJuYWwgPSAiJHt2YXIubW9uZ29fZXhwb3NlZF9wb3J0fSIKICB9Cn0K" | ||
} |