docker_facebook_share

Prerequisite - Docker should be installed mkdir learn-terraform-docker-container cd learn-terraform-docker-container Create a file and name it main.tf terraform { required_providers { docker = { source = "kreuzwerker/docker" version = "~> 2.13.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 } } terraform init terraform apply docker ps Nginx will server up at port 8000 To stop the container, run terraform destroy...

Read More
terraform

sudo apt-get update && sudo apt-get install -y gnupg software-properties-common curl curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add - sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main" sudo apt-get update && sudo apt-get install terraform Verify the installation terraform -help Enable tab completion touch ~/.bashrc OR touch ~/.zshrc Install the autocomplete package terraform -install-autocomplete...

Read More