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

Preview the change

Simulate first. A rename is a single label update with no cloud operation, so the plan shows one ~ update and nothing touches the provider:
  formae apply · reconcile                                                                         rename-demo.pkl
────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
  ~ 1 update

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

────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
                                                              simulation only — command will not continue  ?: help
3

Apply

Drop --simulate to make the change. formae renames the inventory row and leaves the cloud 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):
  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