Deploying Docker Images Using Terraform

Deploying Docker Images Using Terraform
Techiio-author
Written by Abhishek JalanApril 18, 2020
1 min read
Terraform
8 VIEWS 1 LIKES 0 DISLIKES SHARE
1 LIKES 0 DISLIKES 8 VIEWS SHARE
Techiio-author
Abhishek Jalan

DevSecOps Engineer

We're going to create a Terraform file that deploys a Nginx Docker image.

Create a Terraform File

Create main.tf:

vi main.tf

main.tf:
resource "docker_image" "nginx_image" {
name = "nginx:latest"
}

Initialize Terraform

terraform init

Plan the Deployment

Execute terraform plan:

terraform plan -out=tf_image_plan

Apply the Terraform Plan

Apply the plan:

terraform apply tf_image_plan
Docker
DevOps
Terraform
8 VIEWS 1 LIKES 0 DISLIKES SHARE
1 LIKES 0 DISLIKES 8 VIEWS SHARE
Was this blog helpful?
techiio-price-plantechiio-price-plantechiio-price-plantechiio-price-plantechiio-price-plan
You must be Logged in to comment
Code Block
Techiio-author
Abhishek Jalan
DevSecOps Engineer
Techiio-followerTechiio-followerTechiio-followerTechiio-followerTechiio-follower
+60 more
19 Blog Posts
9 Discussion Threads
Trending Technologies
15
Software40
DevOps46
Frontend Development24
Backend Development20
Server Administration17
Linux Administration26
Data Center24
Sentry24
Terraform23
Ansible83
Docker70
Penetration Testing16
Kubernetes21
NGINX20
JenkinsX17
Techiio-logo

Techiio is on the journey to build an ocean of technical knowledge, scouring the emerging stars in process and proffering them to the corporate world.

Follow us on:

Subscribe to get latest updates

You can unsubscribe anytime from getting updates from us
Developed and maintained by Wikiance
Developed and maintained by Wikiance