pulumi/tests/integration/autonaming
Mikhail Shilkov 691269afa0
Autonaming configuration in experimental mode (#17916)
CLI-side implementation of #17592 towards #1518

It adds autonaming configuration support to `up` and `preview` commands
if the `PULUMI_EXPERIMENTAL` flag is enabled. Users can specify
`pulumi:autonaming` configuration and get names customized across their
resources, once the provider-side feature lands everywhere. Example:

```yaml
pulumi:autonaming:
  mode: default
  providers:
    aws:
      pattern: ${name}_${hex(4)}  # AWS - use underscore and shorter suffix
    azure-native:
      mode: verbatim  # disable name mangling for Azure
      resources:
        "azure-native:storage:Account": ${name}${string(6)}  # storage accounts are globally unique, so add a suffix
```

All the significant changes are isolated inside the new
`pkg/resource/autonaming` module, all the rest is wiring of parameters
from cmd to provider.

See #17592 for the specification of behavior, it's supposed to be
implemented according to that design and in full.

Here is a draft of TF Bridge changes for references:
https://github.com/pulumi/pulumi-terraform-bridge/pull/2675
2024-12-10 14:03:27 +00:00
..
Pulumi.yaml Autonaming configuration in experimental mode (#17916) 2024-12-10 14:03:27 +00:00
index.ts Autonaming configuration in experimental mode (#17916) 2024-12-10 14:03:27 +00:00
package.json Autonaming configuration in experimental mode (#17916) 2024-12-10 14:03:27 +00:00