mirror of
https://github.com/ChristianLempa/boilerplates.git
synced 2024-12-12 18:20:39 +01:00
25 lines
389 B
HCL
25 lines
389 B
HCL
terraform {
|
|
required_providers {
|
|
docker = {
|
|
source = "kreuzwerker/docker"
|
|
version = "~> 3.0.0"
|
|
}
|
|
}
|
|
}
|
|
|
|
provider "docker" {}
|
|
|
|
resource "docker_image" "nginx" {
|
|
name = "nginx:latest"
|
|
keep_locally = false
|
|
}
|
|
|
|
resource "docker_container" "nginx" {
|
|
image = docker_image.nginx.latest
|
|
name = "tutorial"
|
|
ports {
|
|
internal = 80
|
|
external = 8000
|
|
}
|
|
}
|