Infrastructure as Code Flashcards
Q: What is Infrastructure as Code (IaC)?
A: IaC is the practice of managing and provisioning infrastructure using code instead of manual processes.
Q: What are the benefits of IaC?
A: Consistency, repeatability, scalability, faster provisioning, version control, and easier collaboration.
Q: What is the difference between declarative and imperative IaC?
A: Declarative defines what the infrastructure should look like (e.g., AWS CloudFormation), while imperative specifies how to build it step by step.
Q: What is AWS CloudFormation?
A: A service that allows you to define AWS resources and infrastructure as code using templates.
Q: What is a CloudFormation template?
A: A JSON or YAML file that defines resources, configurations, and dependencies for provisioning AWS infrastructure.
Q: What is the AWS Cloud Development Kit (CDK)?
A: A framework that allows you to define AWS infrastructure using programming languages like Python, TypeScript, Java, and C#.
Q: What are constructs in AWS CDK?
A: High-level components that represent AWS resources and their configurations, simplifying infrastructure code.
Q: What is Terraform?
A: An open-source IaC tool that provisions and manages infrastructure across multiple cloud providers using declarative configuration files.
Q: What is the role of state in Terraform?
A: Terraform uses a state file to track the current infrastructure and plan changes, ensuring consistency between configurations and deployed resources.
Q: What is Ansible, and how does it relate to IaC?
A: Ansible is an open-source tool for configuration management and orchestration, often used alongside IaC tools like Terraform or CloudFormation.
Q: What is a CloudFormation stack?
A: A collection of AWS resources managed as a single unit, created and updated using a CloudFormation template.
Q: What are StackSets in CloudFormation?
A: A feature that allows you to deploy CloudFormation stacks across multiple AWS accounts and regions.
Q: What are parameters in CloudFormation templates?
A: User-defined inputs that customize stack behavior during creation or updates.
Q: What are outputs in CloudFormation templates?
A: Values returned after a stack is created, such as resource IDs or endpoints, for use in other stacks or scripts.
Q: What is a Change Set in CloudFormation?
A: A preview of changes that will be made to a stack before updating or deleting it.
Q: What is drift detection in CloudFormation?
A: A feature that identifies differences between the actual resource configurations and the configuration defined in the template.