mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-08 15:02:18 -04:00
aws: name instances for CCM
This commit is contained in:
parent
0d0191ba4d
commit
1f9a788c21
2 changed files with 3 additions and 24 deletions
|
@ -96,17 +96,13 @@ func (m *Metadata) Self(ctx context.Context) (metadata.InstanceMetadata, error)
|
|||
return metadata.InstanceMetadata{}, fmt.Errorf("retrieving instance identity: %w", err)
|
||||
}
|
||||
|
||||
name, err := readInstanceTag(ctx, m.imds, tagName)
|
||||
if err != nil {
|
||||
return metadata.InstanceMetadata{}, fmt.Errorf("retrieving name tag: %w", err)
|
||||
}
|
||||
instanceRole, err := readInstanceTag(ctx, m.imds, cloud.TagRole)
|
||||
if err != nil {
|
||||
return metadata.InstanceMetadata{}, fmt.Errorf("retrieving role tag: %w", err)
|
||||
}
|
||||
|
||||
return metadata.InstanceMetadata{
|
||||
Name: name,
|
||||
Name: identity.InstanceID,
|
||||
ProviderID: fmt.Sprintf("aws:///%s/%s", identity.AvailabilityZone, identity.InstanceID),
|
||||
Role: role.FromString(instanceRole),
|
||||
VPCIP: identity.PrivateIP,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue