You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
If you are interested in working on this issue or have submitted a pull request, please leave a comment. If the issue is assigned to the "modular-magician" user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If the issue is assigned to a user, that user is claiming responsibility for the issue. If the issue is assigned to "hashibot", a community member has claimed the issue already.
Description
Instances have a specific type of custom metadata called Guest attributes. Unlike normal metadata, the applications on the instance can write to guest attributes while the VM is running.
The Terraform provider does not contain a resource or attribute to query these guest attributes.
It works, but my problem with this approach is the non-portable dependency of google-cloud-sdk and jq.
My specific use-case
I install salt-minion on the VMs to hand over the management to a salt-master. salt-minion generates a key-pair. The public key is added to Guest Attributes. Terraform picks it up from Guest Attributes and add it to the configuration of the salt-master.
This is vaguely similar to the problem of having an instance send a signal to terraform described in hashicorp/terraform#4668 (comment).
b/308756204
The text was updated successfully, but these errors were encountered:
Community Note
Description
Instances have a specific type of custom metadata called Guest attributes. Unlike normal metadata, the applications on the instance can write to guest attributes while the VM is running.
The Terraform provider does not contain a resource or attribute to query these guest attributes.
The Compute Engine API contains a
getGuestAttributes
method.New or Affected Resource(s)
And likely others that where a VM is the backing resource.
Potential Terraform Configuration
Create a VM with the current
google_compute_instance
resource and guest attributes enabled:Set a guest attribute on the VM:
The requested enhancement to the data source where it contains the attribute
guest_attributes
:Workaround
I have implemented this with an External Data Source.
guest-attributes.sh
:It works, but my problem with this approach is the non-portable dependency of
google-cloud-sdk
andjq
.My specific use-case
I install
salt-minion
on the VMs to hand over the management to asalt-master
.salt-minion
generates a key-pair. The public key is added to Guest Attributes. Terraform picks it up from Guest Attributes and add it to the configuration of thesalt-master
.This is vaguely similar to the problem of having an instance send a signal to terraform described in hashicorp/terraform#4668 (comment).
b/308756204
The text was updated successfully, but these errors were encountered: