Title: Quiz 6 — Deploying to the Cloud with Infrastructure as Code
Course: AIINFRA 303: Capstone Project > Section: Week 06 — Deploying to the Cloud with Infrastructure as Code

Q: Terraform is described as "declarative," meaning you write step-by-step instructions for how to create each resource in order.
- True
- False
A: False

Q: What does it mean for terraform apply to be idempotent?
- It can only be run once per project
- Running it repeatedly with no config changes results in no infrastructure changes
- It automatically encrypts all resources
- It requires a new state file every time
A: Running it repeatedly with no config changes results in no infrastructure changes

Q: Which command shows you a diff of what will change WITHOUT making any changes to real infrastructure?
- `terraform init`
- `terraform apply`
- `terraform plan`
- `terraform destroy`
A: `terraform plan`

Q: Name one benefit teams get from storing infrastructure definitions in version control (Git) rather than provisioning by hand through a console.
Feedback: Sample/expected answer: Any reasonable answer: change tracking/history, code review of infrastructure changes, one-command rollback via ****`git revert`**** + ****`terraform apply`****, reproducible/consistent environments across dev/staging/prod.

Q: According to Gartner, roughly 80% of cloud data security breaches are attributed to misconfiguration rather than a flaw in the cloud provider's platform.
- True
- False
A: True

Q: Where does Terraform's AWS provider look for credentials?
- A special `terraform-credentials.tf` file you must create
- The same credential chain used by the AWS CLI (environment variables, shared credentials file, or IAM role)
- It generates its own temporary credentials automatically with no setup
- Hardcoded values that must be committed to the `.tf` file
A: The same credential chain used by the AWS CLI (environment variables, shared credentials file, or IAM role)

Q: In this week's lab, what free local tool did you use to run your Terraform configuration against a local AWS emulation instead of billing a real cloud account?
Feedback: Sample/expected answer: LocalStack, accessed via the ****`tflocal`**** wrapper.

Q: Leaving a test EC2 or RDS instance running over a weekend costs nothing extra as long as you aren't actively sending it traffic.
- True
- False
A: False