feat(host/plugin): Support External Name field

The new `ExternalName` field is an optional field that is used to store
the cloud providers' human-identifiable name for a given compute
instance. This field is not user-editable, but it is kept in sync with
the cloud provider's through Boundary's `SetSyncJob`.
This commit is contained in:
Hugo Vieira authored and Hugo committed 2023-04-04 18:51:04 +01:00
1 parent 26ebaefd70
commit 2ff9b8efac
13 files changed
+340 -132

No files matched your search

+3 -1
View File
@@ -58,6 +58,7 @@ func createNewHostMap(ctx context.Context,
catalog.GetPublicId(),
ph.GetExternalId(),
WithName(ph.GetName()),
WithExternalName(ph.GetExternalName()),
WithDescription(ph.GetDescription()),
withIpAddresses(ph.GetIpAddresses()),
withDnsNames(ph.GetDnsNames()),
@@ -85,7 +86,8 @@ func createNewHostMap(ctx context.Context,
switch {
case currHost == nil,
currHost.Name != newHost.Name,
currHost.Description != newHost.Description:
currHost.Description != newHost.Description,
currHost.ExternalName != newHost.ExternalName:
hi.dirtyHost = true
}