IaaS
Definition
Infrastructure as a Service (IaaS) is a cloud computing model that provides virtualized computing resources over the internet. It allows users to rent IT infrastructure—such as servers, storage, and networking—on a pay-as-you-go basis. This model offers flexibility and scalability, enabling users to deploy and manage operating systems and applications without the need to purchase and maintain physical hardware.
Secure Settings Example
# Example of a secure IaaS configuration using Terraform for AWS
resource "aws_instance" "secure_example" {
ami = "ami-0c55b159cbfafe1f0"
instance_type = "t2.micro"
# Enable encryption for root and additional volumes
root_block_device {
encrypted = true
}
# Use IAM roles for secure access
iam_instance_profile = "secure-instance-profile"
# Security group with least privilege
vpc_security_group_ids = ["sg-0123456789abcdef0"]
# Enable monitoring and logging
monitoring = true
}
Insecure Settings Example
# Example of an insecure IaaS configuration using Terraform for AWS
resource "aws_instance" "insecure_example" {
ami = "ami-0c55b159cbfafe1f0"
instance_type = "t2.micro"
# No encryption for root and additional volumes
root_block_device {
encrypted = false
}
# Directly using access keys instead of IAM roles
access_key = "AKIAIOSFODNN7EXAMPLE"
secret_key = "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
# Security group with wide-open access
vpc_security_group_ids = ["sg-0987654321fedcba0"]
# Monitoring and logging disabled
monitoring = false
}