Terraform resource: aws ebs volume

From wikieduonline
Revision as of 11:15, 25 October 2024 by Welcome (talk | contribs)
Jump to navigation Jump to search
availability_zone - (Required) The AZ where the EBS volume will exist.

Examples

Official example

resource "aws_ebs_volume" "example" {
  availability_zone = "us-west-2a"
  size              = 40

  tags = {
    Name = "HelloWorld"
  }
}


resource "aws_ebs_volume" "your_volume_name" {
  availability_zone = aws_instance.your_instance.availability_zone
  size              = var.your_value == "XXXXX" ? 5000 : 4000 

  tags = {
    Name = "your-name-${var.env}-ebs"
    Env  = var.env
  }
}

Related

See also

Advertising: