Terraform examples
In the following sections, we will look at different ways we can use Terraform, such as pulling images from GitHub and running them locally, or building and publishing Docker images.
Note
Make sure every time you run Terraform examples that create AWS resources to remember to destroy the resources using the terraform
destroy
command.
All resources created in AWS incur charges, and by destroying them, you will ensure there will be no surprise charges.
Pulling from GitHub Packages
The example code for this section can be found inside the chapter14/github
folder. The following snippet is from pullfromgithub.tf
:
#script to pull chapter12 image and run it locally #it also store the image locally terraform { required_providers { docker = { source = "kreuzwerker/docker" version = "~> 2.13.0" } } } data "docker_registry_image...