Skip to main content
A label is a formae-side identifier that lives in formae’s inventory and is never sent to the cloud provider. formae tracks each resource by an internal id, so changing a label is a metadata update: the inventory row changes and the cloud object stays exactly as it is. To rename, set the resource’s alias to its current label and its label to the new one, then apply. formae matches the resource by its alias and updates the label in place. This works in both reconcile and patch mode.
1

Set alias and the new label

In the forma where the resource is declared, add alias with its current label and change label to the new one:
2

Apply

The plan is a single label change with no cloud operations: formae renames the inventory row and leaves the resource untouched. You can drop the alias afterwards, or leave it in place, a later apply with the alias still set is a no-op.Confirm and formae completes the rename in place, with no cloud call:
  formae status command                                                                                     ↻ live
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
     ID                          Command   Mode        Progress                         ✓    ✗    ◐    ○    Time
✓    3GprjIv3mF4CxosYjVhW5dbSUhi apply     reconcile   completed 1/1                    1    0    0    0    00:00
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

  ▌ Resources
        Label ▲                                               Type                                Operation   Time
       lambda-artifacts                                      AWS::S3::Bucket                     update      00:00

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
  →←: column  s: toggle sort  space: expand  d: details  esc: back  q: quit                                ?: help

Naming a discovered resource

When discovery labels a resource with a raw provider id (a VPC discovered as vpc-008eef40942ac586b, say), give it a readable name as you bring it under management: set alias to the discovered label and label to the name you want.
Renaming does not free the old label for future discoveries. The numeric suffix that disambiguates discovered labels advances past whatever is already in the inventory, so renaming database to aurora-writer while database-1 and database-2 still exist means the next discovery that would land on database becomes database-3.

See also