Terraform Interview Questions


You are testing out a new environment and need to ensure you are using the right syntax to reference resources. What are two commands that can help you discover and test the correct interpolation syntax? – terraform console – terraform show How would name a Docker image resource for reference later? – resources “docker_image” HowContinue reading “Terraform Interview Questions”

Common commands in Terraform


$ terraform help Common commands: apply              Builds or changes infrastructure console            Interactive console for Terraform interpolations destroy            Destroy Terraform-managed infrastructure env                Workspace management fmt                Rewrites config files to canonical format get                Download and install modules for the configuration graph              Create a visual graph of Terraform resources import             Import existing infrastructure into Terraform init               Initialize aContinue reading “Common commands in Terraform”

provider.docker: Error pinging Docker server: Got permission denied while trying to connect to the Docker daemon socket


provider.docker: Error pinging Docker server: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/_ping: dial unix /var/run/docker.sock: connect: permission denied   aryan@aryan-VirtualBox:~/docker$ terraform plan Refreshing Terraform state in-memory prior to plan… The refreshed state will be used to calculate this plan, but will not be persisted to localContinue reading “provider.docker: Error pinging Docker server: Got permission denied while trying to connect to the Docker daemon socket”

Steps to install terraform on Ubuntu / Ubuntu cloud server :


Install unzip sudo apt-get install unzip Download latest version of the terraform wget https://releases.hashicorp.com/terraform/0.11.13/terraform_0.11.13_linux_amd64.zip Extract the downloaded file archive unzip terraform_0.11.13_linux_amd64.zip Move the executable into a directory searched for executables sudo mv terraform /usr/local/bin/ Run it terraform –version   aryan@aryan-VirtualBox:~$ sudo apt-get install unzip [sudo] password for aryan: Reading package lists… Done Building dependency treeContinue reading “Steps to install terraform on Ubuntu / Ubuntu cloud server :”