<commit_before>terraform {
    required_version = ">= 0.10.7"
}

resource "openstack_images_image_v2" "images" {
  name = "${var.name_prefix}${element(var.images, count.index)}"
  image_source_url = "${var.image_locations["${element(var.images, count.index)}"]}"
  count = "${var.use_shared_resources ? 0 : length(var.images)}"
  container_format = "bare"
  disk_format = "qcow2"
}

resource "openstack_compute_secgroup_v2" "all_open_security_group" {
  name = "${var.name_prefix}all-open"
  description = "Sumaform security group with no restrictions"
  count = "${var.use_shared_resources ? 0 : 1}"

  rule {
    from_port   = 1
    to_port     = 65535
    ip_protocol = "tcp"
    cidr        = "0.0.0.0/0"
  }

  rule {
    from_port   = 1
    to_port     = 65535
    ip_protocol = "udp"
    cidr        = "0.0.0.0/0"
  }

  rule {
    from_port   = -1
    to_port     = -1
    ip_protocol = "icmp"
    cidr        = "0.0.0.0/0"
  }
}

output "configuration" {
  value = {
    cc_username = "${var.cc_username}"
    cc_password = "${<PASSWORD>}"
    timezone = "${var.timezone}"
    ssh_key_path = "${var.ssh_key_path}"
    mirror = "${var.mirror == "" ? "null" : var.mirror}"
    use_avahi = "${var.use_avahi}"
    domain = "${var.domain}"
    name_prefix = "${var.name_prefix}"
    use_shared_resources = "${var.use_shared_resources}"
    testsuite = "${var.testsuite}"

    // Provider-specific variables
    image_ids = "${join(",", openstack_images_image_v2.images.*.id)}"
  }
}
<commit_msg>Bugfix: OpenStack: specify RNG<commit_after>terraform {
    required_version = ">= 0.10.7"
}

resource "openstack_images_image_v2" "images" {
  name = "${var.name_prefix}${element(var.images, count.index)}"
  image_source_url = "${var.image_locations["${element(var.images, count.index)}"]}"
  count = "${var.use_shared_resources ? 0 : length(var.images)}"
  container_format = "bare"
  disk_format = "qcow2"
  properties {
    hw_rng_model = "virtio"
  }
}

resource "openstack_compute_secgroup_v2" "all_open_security_group" {
  name = "${var.name_prefix}all-open"
  description = "Sumaform security group with no restrictions"
  count = "${var.use_shared_resources ? 0 : 1}"

  rule {
    from_port   = 1
    to_port     = 65535
    ip_protocol = "tcp"
    cidr        = "0.0.0.0/0"
  }

  rule {
    from_port   = 1
    to_port     = 65535
    ip_protocol = "udp"
    cidr        = "0.0.0.0/0"
  }

  rule {
    from_port   = -1
    to_port     = -1
    ip_protocol = "icmp"
    cidr        = "0.0.0.0/0"
  }
}

output "configuration" {
  value = {
    cc_username = "${var.cc_username}"
    cc_password = "${<PASSWORD>}"
    timezone = "${var.timezone}"
    ssh_key_path = "${var.ssh_key_path}"
    mirror = "${var.mirror == "" ? "null" : var.mirror}"
    use_avahi = "${var.use_avahi}"
    domain = "${var.domain}"
    name_prefix = "${var.name_prefix}"
    use_shared_resources = "${var.use_shared_resources}"
    testsuite = "${var.testsuite}"

    // Provider-specific variables
    image_ids = "${join(",", openstack_images_image_v2.images.*.id)}"
  }
}

{'fraction_non_alphanumeric': 0.16296538210320052, 'fraction_numerical': 0.02612671456564337, 'mean_word_length': 3.0091623036649215, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 6, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4529175', 'n_tokens_mistral': 1200, 'n_tokens_neox': 1152, 'n_words': 192}