/iac-in-action

A great workshop to start your infrastructure as code journey!

Primary LanguageHCLApache License 2.0Apache-2.0

IaC in Action

Reading material and code examples

Table of Contents

Prerequisites

As part of this workshop, you will be using HashiCorp Terraform and Amazon Web Services.

For instructions on how to install Terraform. please see our Learn Guide.

On that page, you will find instructions for macOS (using brew), Windows (using choco) as well as a manual installation path.

Reading material

This section is a collection of links that will help you make the most of today's session.

HashiCorp Configuration Language

First Steps

Providers for Terraform

We used the following Providers for this workshop:

AWS-specific Terraform Resources

We used the following AWS-specific Data Sources and Resources for this workshop:

Other Terraform Resources

We used the following Data Sources and Resources for this workshop:

Outputs

After running terraform plan -out=aws.tfplan and terraform apply aws.tfplan, you will have two resources:

For both of these, we have created Terraform Outputs that can be retrevied using the output Command:

# show all outputs
terraform output

# show SSH connection string for EC2 Instance
terraform output ssh_connection_string

# show Website Endpoint for S3 Bucket
terraform output website_url
  • The SSH Connection String can be used to connect to your EC2 Instance. This uses the ec2-ssh-key.pem file.
  • The Website Endpoint can be used to view S3-Bucket hosted website files for static websites.=

Next Steps

Code Quality

Before plan and apply, always clean up your code:

Modules

Author Information

This repository is maintained by Taylor Dolezal .

License

Licensed under the Apache License, Version 2.0 (the "License").

You may obtain a copy of the License at apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" basis, without WARRANTIES or conditions of any kind, either express or implied.

See the License for the specific language governing permissions and limitations under the License.