Skip to content

Deprecate name_prefix #1054

Closed
Closed
@danawillow

Description

@danawillow

Right now, a few of our resources support specifying the name in multiple ways:

  • A name field, which is for the name explicitly
  • A name_prefix field, which specifies a prefix and generates a random string for the rest
  • Setting neither, which generates a random string

Because of the existence of the random provider, we don't need to have this logic inside the google resources, and getting rid of it will make the entire provider more consistent (since only some resources support name_prefix anyway).

We can do this safely in two steps:

  • Add import capability to the random_id resource to allow setting its output to a user-specified value. This would allow users to transition to the random_id resource without needing to recreate their google resources, allowing them to do that transition on their own time instead of waiting for an opportunity when the resource would need to be recreated to make the change.
  • Deprecate the name_prefix field and make it computed so users can remove it from their configs without recreating the resource

@rosbo @paddycarver to make sure this checks out based on our conversation

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions