Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Architecting AWS with Terraform

You're reading from   Architecting AWS with Terraform Design resilient and secure Cloud Infrastructures with Terraform on Amazon Web Services

Arrow left icon
Product type Paperback
Published in Dec 2023
Publisher Packt
ISBN-13 9781803248561
Length 260 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Erol Kavas Erol Kavas
Author Profile Icon Erol Kavas
Erol Kavas
Arrow right icon
View More author details
Toc

Table of Contents (21) Chapters Close

Preface 1. Part 1:Introduction to IAC and Terraform in AWS
2. Chapter 1: Understanding Patterns and Antipatterns of IaC and Terraform FREE CHAPTER 3. Chapter 2: How Not to Use IaC and Terraform 4. Chapter 3: Building Your First Terraform Project 5. Chapter 4: Discovering Best Practices for Terraform IaC Projects 6. Part 2:Become an Expert in Terraform with AWS
7. Chapter 5: Planning and Designing Infrastructure Projects in AWS 8. Chapter 6: Making Decisions for Terraform Projects with AWS 9. Chapter 7: Implementing Terraform in Projects 10. Chapter 8: Deploying Serverless Projects with Terraform 11. Chapter 9: Deploying Containers in AWS with Terraform 12. Part 3:How to Structure and Advance Terraform in Enterprises
13. Chapter 10: Leveraging Terraform for the Enterprise 14. Chapter 11: Building Git Workflows for IaC and Terraform Projects 15. Chapter 12: Automating the Deployment of Terraform Projects 16. Chapter 13: Governing AWS with Terraform 17. Chapter 14: Building a Secure Infrastructure with AWS Terraform 18. Chapter 15: Perfecting AWS Infrastructure with Terraform 19. Index 20. Other Books You May Enjoy

Building your first Terraform configuration

After installing Terraform and the AWS CLI, it is time to configure connectivity between them to be able to create resources with Terraform.

To authenticate the Terraform AWS provider with your IAM credentials, you need to set the AWS_ACCESS_KEY_ID environment variable in your terminal by adding your key after the = sign:

export AWS_ACCESS_KEY_ID=

Then add your secret key as follows, again after the = sign:

export AWS_SECRET_ACCESS_KEY=

You can verify your credentials and connectivity with the following command:

aws sts get-caller-identity

And you should receive a similar output to the following:

{
    "Account": "1234567890",
    "UserId": "ABCDEFGHJIKLM",
    "Arn": "arn:aws:iam:: 1234567890:user/erol_kavas"
}

Now that you have successfully built your first Terraform configuration, let’s move...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime