Skip to content

add "pet_name_length" parameter to the random_pet resource #407

@georgikoemdzhiev

Description

@georgikoemdzhiev

Terraform CLI and Provider Versions

Terraform CLI version: v.1.4.6

Use Cases or Problem Statement

Some resource parameters have a maximum length defined such as the domain_name property of the aws_opensearch_domain resource in the AWS provider (i.e. the domain name must be <= than 28 characters long). In those cases, if we want to use the random_pet resources to generate a random name for the domain_name property, it may generate a name that is longer than the maximum allowed length.

Current:

resource "random_pet" "cluster" {
  length = 1
}

resource "aws_opensearch_domain" "opensearch" {
  domain_name    = "my-team-name-${random_pet.cluster.id}-${var.environment}"
  engine_version = var.engine_version
...

Proposal

Add a pet_name_length property to the random_pet resource

How much impact is this issue causing?

Low

Additional Information

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions