← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1834371] Re: On GCE, ds.metadata.instance_data cannot be used for templating

 

Tracked in Github Issues as https://github.com/canonical/cloud-
init/issues/3398

** Bug watch added: github.com/canonical/cloud-init/issues #3398
   https://github.com/canonical/cloud-init/issues/3398

** Changed in: cloud-init
       Status: Triaged => Expired

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1834371

Title:
  On GCE, ds.metadata.instance_data cannot be used for templating

Status in cloud-init:
  Expired

Bug description:
  When running on GCE, the templating engine has a
  ds.metadata.instance_data attribute available to it.  However, that
  attribute is a string representation of a dictionary (of GCE-specific
  metadata), rather than a dictionary.  This means that the contents of
  instance_data cannot readily be used in templating.

  This is a feature request for instance_data to be presented as a dict
  rather than as an opaque string.

  
  [Original Report]

  I have a use-case where I need to query the metadata that was passed
  on creating the instance and use those values as variables in my
  cloud-config.

  However, ds.meta_data.instance_data is a string, hence making it not
  query-able from cloud-config. Just removing the enclosing quotes and
  the escaping around the quotes within the actual dictionary itself
  makes the instance_data field easily query-able.

  Please consider making the instance_data field a query-able field?

  Environment Information :
  Operating System : Ubuntu 18.04.2 LTS
  Cloud Init : 19.1-1-gbaa47854-0ubuntu1~18.04.1

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1834371/+subscriptions



References