f5devcentral / terraform-aws-bigip

BIG-IP AWS module for the Terraform Registry
MIT License
10 stars 25 forks source link

parameterize f5_owner_id to account for other regions #75

Open Mikej81 opened 4 years ago

Mikej81 commented 4 years ago

Non US Commercial regions have different OwnerID.

Add

variable f5_owner_ids {
  description = "AWS Owner ID's across regions change"
  type        = list(string)
  default     = ["679593333241", "345084742485", "self", "aws-marketplace"]
}

to https://github.com/f5devcentral/terraform-aws-bigip/blob/develop/variables.tf#L12

and change

data "aws_ami" "f5_ami" {
  most_recent = true
  owners      = var.f5_owners_ids

  filter {
    name   = "name"
    values = ["${var.f5_ami_search_name}"]
  }
}

https://github.com/f5devcentral/terraform-aws-bigip/blob/develop/main.tf#L65

Would PR from my fork but I messed up master branch, and lazy.