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.
// DO NOT EDIT. Code generated by 'cdktf convert' - Please report bugs at https://cdk.tf/bug
import { Construct } from "constructs";
import { TerraformStack } from "cdktf";
/*
* Provider bindings are generated by running `cdktf get`.
* See https://cdk.tf/provider-generation for more details.
*/
import { ResourceGroup } from "./.gen/providers/azurerm/resource-group";
import { Uuid } from "./.gen/providers/random/uuid";
class MyConvertedCode extends TerraformStack {
constructor(scope: Construct, name: string) {
super(scope, name);
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const test = new Uuid(this, "test", {});
const azurermResourceGroupTest = new ResourceGroup(this, "test_1", {
location: "Central US",
name: "${" + test.result + "}-rg",
});
/*This allows the Terraform resource name to match the original name. You can remove the call if you don't need them to match.*/
azurermResourceGroupTest.overrideLogicalId("test");
}
}
keepers
(Map of String) Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information.id
(String) The generated uuid presented in string format.result
(String) The generated uuid presented in string format.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