Skip to content

Latest commit

 

History

History
52 lines (36 loc) · 1.74 KB

File metadata and controls

52 lines (36 loc) · 1.74 KB
page_title subcategory description
random_uuid Resource - terraform-provider-random
The resource random_uuid generates a random uuid string that is intended to be used as a unique identifier for other resources. This resource uses hashicorp/go-uuid https://github.com/hashicorp/go-uuid to generate a UUID-formatted string for use with services needing a unique string identifier.

random_uuid (Resource)

The resource random_uuid generates a random uuid string that is intended to be used as a unique identifier for other resources.

This resource uses hashicorp/go-uuid to generate a UUID-formatted string for use with services needing a unique string identifier.

Example Usage

# The following example shows how to generate a unique name for an Azure Resource Group.

resource "random_uuid" "test" {
}

resource "azurerm_resource_group" "test" {
  name     = "${random_uuid.test.result}-rg"
  location = "Central US"
}

Schema

Optional

  • keepers (Map of String) Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information.

Read-Only

  • id (String) The generated uuid presented in string format.
  • result (String) The generated uuid presented in string format.

Import

Import is supported using the following syntax:

# Random UUID's can be imported. This can be used to replace a config
# value with a value interpolated from the random provider without
# experiencing diffs.

terraform import random_uuid.main aabbccdd-eeff-0011-2233-445566778899