Programmatically adding fields to specific vocabularies Is it possible to add fields to vocabulary terms programmatically in a custom module?

I know it can be done at admin/structure/taxonomy/news_client_sites/fields in the UI, but I'd like to add the fields during the module install process.

I have specific vocabularies I've created during hook_install, but I'd like to be able to add fields to them as well.
It turns out that with taxonomies, vocabularies are bundles of taxonomy_term entities.

So, it turned out to be something like this:

Assuming a taxonomy machine name of example_taxonomy

  $field_example = array(
    'field_name' =&gt; 'field_example',
    'cardinality' =&gt; 1,
    'type' =&gt; 'text',
  );
  field_create_field($field_example);

  $field_example_instance = array(
    'field_name' =&gt; 'field_example',
    'label' =&gt; st('Example Text Field'),
    'bundle' =&gt; 'example_taxonomy',
    'entity_type' =&gt; 'taxonomy_term',
    'widget' =&gt; array(
      'type' =&gt; 'text_textfield',
    ),
  );
  field_create_instance($field_example_instance);


So, yeah, it turns out that taxonomy_terms are the entities and vocabularies are the bundles...