From e9101f31877941b7ad508f705cdd9f47fa56c5c8 Mon Sep 17 00:00:00 2001 From: Anton Tayanovskyy Date: Thu, 9 Feb 2023 13:13:24 -0500 Subject: [PATCH] Update to a pre-release upstream using the Plugin Framework (#260) Upgrade upstream to a pre-release version f3a69cbc0904 built on top of the Plugin Framework --- examples/go.mod | 6 +- .../bridge-metadata.json | 38 ++ provider/cmd/pulumi-resource-random/main.go | 14 +- .../cmd/pulumi-resource-random/schema.json | 425 ++++++++-------- provider/cmd/pulumi-tfgen-random/main.go | 6 +- provider/go.mod | 31 +- provider/go.sum | 115 ++--- provider/resources.go | 17 +- provider/shim/go.mod | 41 +- provider/shim/go.sum | 132 ++--- provider/shim/shim.go | 4 +- sdk/dotnet/RandomId.cs | 61 +-- sdk/dotnet/RandomInteger.cs | 55 +- sdk/dotnet/RandomPassword.cs | 213 +++++--- sdk/dotnet/RandomPet.cs | 62 +-- sdk/dotnet/RandomShuffle.cs | 65 +-- sdk/dotnet/RandomString.cs | 219 ++++---- sdk/dotnet/RandomUuid.cs | 36 +- sdk/go/random/randomId.go | 129 ++--- sdk/go/random/randomInteger.go | 72 +-- sdk/go/random/randomPassword.go | 318 +++++++----- sdk/go/random/randomPet.go | 126 +++-- sdk/go/random/randomShuffle.go | 105 ++-- sdk/go/random/randomString.go | 369 +++++++------- sdk/go/random/randomUuid.go | 48 +- .../main/java/com/pulumi/random/RandomId.java | 40 +- .../java/com/pulumi/random/RandomIdArgs.java | 53 +- .../java/com/pulumi/random/RandomInteger.java | 41 +- .../com/pulumi/random/RandomIntegerArgs.java | 25 +- .../com/pulumi/random/RandomPassword.java | 205 +++++--- .../com/pulumi/random/RandomPasswordArgs.java | 162 +++--- .../java/com/pulumi/random/RandomPet.java | 51 +- .../java/com/pulumi/random/RandomPetArgs.java | 41 +- .../java/com/pulumi/random/RandomShuffle.java | 38 +- .../com/pulumi/random/RandomShuffleArgs.java | 65 +-- .../java/com/pulumi/random/RandomString.java | 209 ++++---- .../com/pulumi/random/RandomStringArgs.java | 202 ++++---- .../java/com/pulumi/random/RandomUuid.java | 25 +- .../com/pulumi/random/RandomUuidArgs.java | 25 +- .../pulumi/random/inputs/RandomIdState.java | 53 +- .../random/inputs/RandomIntegerState.java | 33 +- .../random/inputs/RandomPasswordState.java | 199 +++++--- .../pulumi/random/inputs/RandomPetState.java | 41 +- .../random/inputs/RandomShuffleState.java | 65 +-- .../random/inputs/RandomStringState.java | 210 ++++---- .../pulumi/random/inputs/RandomUuidState.java | 25 +- sdk/nodejs/randomId.ts | 53 +- sdk/nodejs/randomInteger.ts | 47 +- sdk/nodejs/randomPassword.ts | 196 +++++--- sdk/nodejs/randomPet.ts | 54 +- sdk/nodejs/randomShuffle.ts | 54 +- sdk/nodejs/randomString.ts | 213 ++++---- sdk/nodejs/randomUuid.ts | 28 +- sdk/python/pulumi_random/random_id.py | 105 ++-- sdk/python/pulumi_random/random_integer.py | 124 +---- sdk/python/pulumi_random/random_password.py | 431 ++++++++++------ sdk/python/pulumi_random/random_pet.py | 96 ++-- sdk/python/pulumi_random/random_shuffle.py | 130 ++--- sdk/python/pulumi_random/random_string.py | 469 ++++++++++-------- sdk/python/pulumi_random/random_uuid.py | 68 +-- 60 files changed, 3275 insertions(+), 3308 deletions(-) create mode 100644 provider/cmd/pulumi-resource-random/bridge-metadata.json diff --git a/examples/go.mod b/examples/go.mod index df20d215fc..8ea84966b1 100644 --- a/examples/go.mod +++ b/examples/go.mod @@ -2,7 +2,10 @@ module github.com/pulumi/pulumi-random/examples/v4 go 1.19 -require github.com/pulumi/pulumi/pkg/v3 v3.52.1 +require ( + github.com/pulumi/pulumi/pkg/v3 v3.52.1 + github.com/stretchr/testify v1.8.1 +) require ( cloud.google.com/go v0.103.0 // indirect @@ -150,7 +153,6 @@ require ( github.com/sergi/go-diff v1.2.0 // indirect github.com/spf13/cobra v1.6.1 // indirect github.com/spf13/pflag v1.0.5 // indirect - github.com/stretchr/testify v1.8.1 // indirect github.com/texttheater/golang-levenshtein v1.0.1 // indirect github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // indirect github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect diff --git a/provider/cmd/pulumi-resource-random/bridge-metadata.json b/provider/cmd/pulumi-resource-random/bridge-metadata.json new file mode 100644 index 0000000000..9f67f765cf --- /dev/null +++ b/provider/cmd/pulumi-resource-random/bridge-metadata.json @@ -0,0 +1,38 @@ +{ + "resources": { + "random:index/randomId:RandomId": "random_id", + "random:index/randomInteger:RandomInteger": "random_integer", + "random:index/randomPassword:RandomPassword": "random_password", + "random:index/randomPet:RandomPet": "random_pet", + "random:index/randomShuffle:RandomShuffle": "random_shuffle", + "random:index/randomString:RandomString": "random_string", + "random:index/randomUuid:RandomUuid": "random_uuid" + }, + "renamedProperties": { + "random:index/randomId:RandomId": { + "b64Std": "b64_std", + "b64Url": "b64_url", + "byteLength": "byte_length" + }, + "random:index/randomPassword:RandomPassword": { + "bcryptHash": "bcrypt_hash", + "minLower": "min_lower", + "minNumeric": "min_numeric", + "minSpecial": "min_special", + "minUpper": "min_upper", + "overrideSpecial": "override_special" + }, + "random:index/randomShuffle:RandomShuffle": { + "inputs": "input", + "resultCount": "result_count", + "results": "result" + }, + "random:index/randomString:RandomString": { + "minLower": "min_lower", + "minNumeric": "min_numeric", + "minSpecial": "min_special", + "minUpper": "min_upper", + "overrideSpecial": "override_special" + } + } +} \ No newline at end of file diff --git a/provider/cmd/pulumi-resource-random/main.go b/provider/cmd/pulumi-resource-random/main.go index 03be79cc2d..e76efed467 100644 --- a/provider/cmd/pulumi-resource-random/main.go +++ b/provider/cmd/pulumi-resource-random/main.go @@ -17,16 +17,24 @@ package main import ( + "context" _ "embed" + tfbridge "github.com/pulumi/pulumi-terraform-bridge/pf/tfbridge" + random "github.com/pulumi/pulumi-random/provider/v4" - "github.com/pulumi/pulumi-random/provider/v4/pkg/version" - "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge" ) //go:embed schema-embed.json var pulumiSchema []byte +//go:embed bridge-metadata.json +var bridgeMetadata []byte + func main() { - tfbridge.Main("random", version.Version, random.Provider(), pulumiSchema) + meta := tfbridge.ProviderMetadata{ + PackageSchema: pulumiSchema, + BridgeMetadata: bridgeMetadata, + } + tfbridge.Main(context.Background(), "random", random.Provider(), meta) } diff --git a/provider/cmd/pulumi-resource-random/schema.json b/provider/cmd/pulumi-resource-random/schema.json index d5d5fc6d41..7b349e905f 100644 --- a/provider/cmd/pulumi-resource-random/schema.json +++ b/provider/cmd/pulumi-resource-random/schema.json @@ -55,7 +55,7 @@ }, "resources": { "random:index/randomId:RandomId": { - "description": "The resource `random.RandomId` generates random numbers that are intended to be\nused as unique identifiers for other resources.\n\nThis resource *does* use a cryptographic random number generator in order\nto minimize the chance of collisions, making the results of this resource\nwhen a 16-byte identifier is requested of equivalent uniqueness to a\ntype-4 UUID.\n\nThis resource can be used in conjunction with resources that have\nthe `create_before_destroy` lifecycle flag set to avoid conflicts with\nunique names during the brief period where both the old and new resources\nexist concurrently.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n\nThe following example shows how to generate a unique name for an AWS EC2\ninstance that changes each time a new AMI id is selected.\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\nimport * as random from \"@pulumi/random\";\n\nconst serverRandomId = new random.RandomId(\"serverRandomId\", {\n byteLength: 8,\n keepers: {\n ami_id: _var.ami_id,\n },\n});\nconst serverInstance = new aws.ec2.Instance(\"serverInstance\", {\n ami: serverRandomId.keepers.apply(keepers =\u003e keepers?.amiId),\n tags: {\n Name: pulumi.interpolate`web-server ${serverRandomId.hex}`,\n },\n});\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\nusing Random = Pulumi.Random;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var serverRandomId = new Random.RandomId(\"serverRandomId\", new()\n {\n ByteLength = 8,\n Keepers = \n {\n { \"ami_id\", @var.Ami_id },\n },\n });\n\n var serverInstance = new Aws.Ec2.Instance(\"serverInstance\", new()\n {\n Ami = serverRandomId.Keepers.Apply(keepers =\u003e keepers?.AmiId),\n Tags = \n {\n { \"Name\", serverRandomId.Hex.Apply(hex =\u003e $\"web-server {hex}\") },\n },\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.random.RandomId;\nimport com.pulumi.random.RandomIdArgs;\nimport com.pulumi.aws.ec2.Instance;\nimport com.pulumi.aws.ec2.InstanceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var serverRandomId = new RandomId(\"serverRandomId\", RandomIdArgs.builder() \n .byteLength(8)\n .keepers(Map.of(\"ami_id\", var_.ami_id()))\n .build());\n\n var serverInstance = new Instance(\"serverInstance\", InstanceArgs.builder() \n .ami(serverRandomId.keepers().applyValue(keepers -\u003e keepers.amiId()))\n .tags(Map.of(\"Name\", serverRandomId.hex().applyValue(hex -\u003e String.format(\"web-server %s\", hex))))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n serverRandomId:\n type: random:RandomId\n properties:\n byteLength: 8\n keepers:\n ami_id: ${var.ami_id}\n serverInstance:\n type: aws:ec2:Instance\n properties:\n # Read the AMI id \"through\" the random_id resource to ensure that\n # // both will change together.\n ami: ${serverRandomId.keepers.amiId}\n tags:\n Name: web-server ${serverRandomId.hex}\n```\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\nRandom Ids can be imported using the `b64_url` with an optional `prefix`. This can be used to replace a config value with a value interpolated from the random provider without experiencing diffs. Example with no prefix\n\n```sh\n $ pulumi import random:index/randomId:RandomId server p-9hUg\n```\n\n Example with prefix (prefix is separated by a `,`)\n\n```sh\n $ pulumi import random:index/randomId:RandomId server my-prefix-,p-9hUg\n```\n\n ", + "description": "The resource `random.RandomId` generates random numbers that are intended to be\nused as unique identifiers for other resources.\n\nThis resource *does* use a cryptographic random number generator in order\nto minimize the chance of collisions, making the results of this resource\nwhen a 16-byte identifier is requested of equivalent uniqueness to a\ntype-4 UUID.\n\nThis resource can be used in conjunction with resources that have\nthe `create_before_destroy` lifecycle flag set to avoid conflicts with\nunique names during the brief period where both the old and new resources\nexist concurrently.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\nimport * as random from \"@pulumi/random\";\n\n// The following example shows how to generate a unique name for an AWS EC2\n// instance that changes each time a new AMI id is selected.\nconst serverRandomId = new random.RandomId(\"serverRandomId\", {\n keepers: {\n ami_id: _var.ami_id,\n },\n byteLength: 8,\n});\nconst serverInstance = new aws.ec2.Instance(\"serverInstance\", {\n tags: {\n Name: pulumi.interpolate`web-server ${serverRandomId.hex}`,\n },\n ami: serverRandomId.keepers.apply(keepers =\u003e keepers?.amiId),\n});\n// ... (other aws_instance arguments) ...\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\nusing Random = Pulumi.Random;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n // The following example shows how to generate a unique name for an AWS EC2\n // instance that changes each time a new AMI id is selected.\n var serverRandomId = new Random.RandomId(\"serverRandomId\", new()\n {\n Keepers = \n {\n { \"ami_id\", @var.Ami_id },\n },\n ByteLength = 8,\n });\n\n var serverInstance = new Aws.Ec2.Instance(\"serverInstance\", new()\n {\n Tags = \n {\n { \"Name\", serverRandomId.Hex.Apply(hex =\u003e $\"web-server {hex}\") },\n },\n Ami = serverRandomId.Keepers.Apply(keepers =\u003e keepers?.AmiId),\n });\n\n // ... (other aws_instance arguments) ...\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi-random/sdk/v4/go/random\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tserverRandomId, err := random.NewRandomId(ctx, \"serverRandomId\", \u0026random.RandomIdArgs{\n\t\t\tKeepers: pulumi.StringMap{\n\t\t\t\t\"ami_id\": pulumi.Any(_var.Ami_id),\n\t\t\t},\n\t\t\tByteLength: pulumi.Int(8),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewInstance(ctx, \"serverInstance\", \u0026ec2.InstanceArgs{\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Name\": serverRandomId.Hex.ApplyT(func(hex string) (string, error) {\n\t\t\t\t\treturn fmt.Sprintf(\"web-server %v\", hex), nil\n\t\t\t\t}).(pulumi.StringOutput),\n\t\t\t},\n\t\t\tAmi: serverRandomId.Keepers.ApplyT(func(keepers interface{}) (*string, error) {\n\t\t\t\treturn \u0026keepers.AmiId, nil\n\t\t\t}).(pulumi.StringPtrOutput),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.random.RandomId;\nimport com.pulumi.random.RandomIdArgs;\nimport com.pulumi.aws.ec2.Instance;\nimport com.pulumi.aws.ec2.InstanceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var serverRandomId = new RandomId(\"serverRandomId\", RandomIdArgs.builder() \n .keepers(Map.of(\"ami_id\", var_.ami_id()))\n .byteLength(8)\n .build());\n\n var serverInstance = new Instance(\"serverInstance\", InstanceArgs.builder() \n .tags(Map.of(\"Name\", serverRandomId.hex().applyValue(hex -\u003e String.format(\"web-server %s\", hex))))\n .ami(serverRandomId.keepers().applyValue(keepers -\u003e keepers.amiId()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n # The following example shows how to generate a unique name for an AWS EC2\n # instance that changes each time a new AMI id is selected.\n serverRandomId:\n type: random:RandomId\n properties:\n keepers:\n ami_id: ${var.ami_id}\n byteLength: 8\n serverInstance:\n type: aws:ec2:Instance\n properties:\n tags:\n Name: web-server ${serverRandomId.hex}\n # Read the AMI id \"through\" the random_id resource to ensure that\n # # both will change together.\n ami: ${serverRandomId.keepers.amiId}\n```\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\nRandom IDs can be imported using the b64_url with an optional prefix. This can be used to replace a config value with a value interpolated from the random provider without experiencing diffs. Example with no prefix\n\n```sh\n $ pulumi import random:index/randomId:RandomId server p-9hUg\n```\n\n Example with prefix (prefix is separated by a ,)\n\n```sh\n $ pulumi import random:index/randomId:RandomId server my-prefix-,p-9hUg\n```\n\n ", "properties": { "b64Std": { "type": "string", @@ -67,7 +67,7 @@ }, "byteLength": { "type": "integer", - "description": "The number of random bytes to produce. The\nminimum value is 1, which produces eight bits of randomness.\n" + "description": "The number of random bytes to produce. The minimum value is 1, which produces eight bits of randomness.\n" }, "dec": { "type": "string", @@ -80,13 +80,13 @@ "keepers": { "type": "object", "additionalProperties": { - "$ref": "pulumi.json#/Any" + "type": "string" }, - "description": "Arbitrary map of values that, when changed, will\ntrigger a new id to be generated. See\nthe main provider documentation for more information.\n" + "description": "Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information.\n" }, "prefix": { "type": "string", - "description": "Arbitrary string to prefix the output value with. This\nstring is supplied as-is, meaning it is not guaranteed to be URL-safe or\nbase64 encoded.\n" + "description": "Arbitrary string to prefix the output value with. This string is supplied as-is, meaning it is not guaranteed to be URL-safe or base64 encoded.\n" } }, "required": [ @@ -99,21 +99,18 @@ "inputProperties": { "byteLength": { "type": "integer", - "description": "The number of random bytes to produce. The\nminimum value is 1, which produces eight bits of randomness.\n", - "willReplaceOnChanges": true + "description": "The number of random bytes to produce. The minimum value is 1, which produces eight bits of randomness.\n" }, "keepers": { "type": "object", "additionalProperties": { - "$ref": "pulumi.json#/Any" + "type": "string" }, - "description": "Arbitrary map of values that, when changed, will\ntrigger a new id to be generated. See\nthe main provider documentation for more information.\n", - "willReplaceOnChanges": true + "description": "Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information.\n" }, "prefix": { "type": "string", - "description": "Arbitrary string to prefix the output value with. This\nstring is supplied as-is, meaning it is not guaranteed to be URL-safe or\nbase64 encoded.\n", - "willReplaceOnChanges": true + "description": "Arbitrary string to prefix the output value with. This string is supplied as-is, meaning it is not guaranteed to be URL-safe or base64 encoded.\n" } }, "requiredInputs": [ @@ -132,8 +129,7 @@ }, "byteLength": { "type": "integer", - "description": "The number of random bytes to produce. The\nminimum value is 1, which produces eight bits of randomness.\n", - "willReplaceOnChanges": true + "description": "The number of random bytes to produce. The minimum value is 1, which produces eight bits of randomness.\n" }, "dec": { "type": "string", @@ -146,29 +142,27 @@ "keepers": { "type": "object", "additionalProperties": { - "$ref": "pulumi.json#/Any" + "type": "string" }, - "description": "Arbitrary map of values that, when changed, will\ntrigger a new id to be generated. See\nthe main provider documentation for more information.\n", - "willReplaceOnChanges": true + "description": "Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information.\n" }, "prefix": { "type": "string", - "description": "Arbitrary string to prefix the output value with. This\nstring is supplied as-is, meaning it is not guaranteed to be URL-safe or\nbase64 encoded.\n", - "willReplaceOnChanges": true + "description": "Arbitrary string to prefix the output value with. This string is supplied as-is, meaning it is not guaranteed to be URL-safe or base64 encoded.\n" } }, "type": "object" } }, "random:index/randomInteger:RandomInteger": { - "description": "The resource `random.RandomInteger` generates random values from a given range, described by the `min` and `max` attributes of a given resource.\n\nThis resource can be used in conjunction with resources that have\nthe `create_before_destroy` lifecycle flag set, to avoid conflicts with\nunique names during the brief period where both the old and new resources\nexist concurrently.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n\nThe following example shows how to generate a random priority between 1 and 50000 for\na `aws_alb_listener_rule` resource:\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\nimport * as random from \"@pulumi/random\";\n\nconst priority = new random.RandomInteger(\"priority\", {\n keepers: {\n listener_arn: _var.listener_arn,\n },\n max: 50000,\n min: 1,\n});\nconst main = new aws.alb.ListenerRule(\"main\", {\n actions: [{\n targetGroupArn: _var.target_group_arn,\n type: \"forward\",\n }],\n listenerArn: _var.listener_arn,\n priority: priority.result,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_random as random\n\npriority = random.RandomInteger(\"priority\",\n keepers={\n \"listener_arn\": var[\"listener_arn\"],\n },\n max=50000,\n min=1)\nmain = aws.alb.ListenerRule(\"main\",\n actions=[aws.alb.ListenerRuleActionArgs(\n target_group_arn=var[\"target_group_arn\"],\n type=\"forward\",\n )],\n listener_arn=var[\"listener_arn\"],\n priority=priority.result)\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\nusing Random = Pulumi.Random;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var priority = new Random.RandomInteger(\"priority\", new()\n {\n Keepers = \n {\n { \"listener_arn\", @var.Listener_arn },\n },\n Max = 50000,\n Min = 1,\n });\n\n var main = new Aws.Alb.ListenerRule(\"main\", new()\n {\n Actions = new[]\n {\n new Aws.Alb.Inputs.ListenerRuleActionArgs\n {\n TargetGroupArn = @var.Target_group_arn,\n Type = \"forward\",\n },\n },\n ListenerArn = @var.Listener_arn,\n Priority = priority.Result,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/alb\"\n\t\"github.com/pulumi/pulumi-random/sdk/v4/go/random\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tpriority, err := random.NewRandomInteger(ctx, \"priority\", \u0026random.RandomIntegerArgs{\n\t\t\tKeepers: pulumi.AnyMap{\n\t\t\t\t\"listener_arn\": pulumi.Any(_var.Listener_arn),\n\t\t\t},\n\t\t\tMax: pulumi.Int(50000),\n\t\t\tMin: pulumi.Int(1),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = alb.NewListenerRule(ctx, \"main\", \u0026alb.ListenerRuleArgs{\n\t\t\tActions: alb.ListenerRuleActionArray{\n\t\t\t\t\u0026alb.ListenerRuleActionArgs{\n\t\t\t\t\tTargetGroupArn: pulumi.Any(_var.Target_group_arn),\n\t\t\t\t\tType: pulumi.String(\"forward\"),\n\t\t\t\t},\n\t\t\t},\n\t\t\tListenerArn: pulumi.Any(_var.Listener_arn),\n\t\t\tPriority: priority.Result,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.random.RandomInteger;\nimport com.pulumi.random.RandomIntegerArgs;\nimport com.pulumi.aws.alb.ListenerRule;\nimport com.pulumi.aws.alb.ListenerRuleArgs;\nimport com.pulumi.aws.alb.inputs.ListenerRuleActionArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var priority = new RandomInteger(\"priority\", RandomIntegerArgs.builder() \n .keepers(Map.of(\"listener_arn\", var_.listener_arn()))\n .max(50000)\n .min(1)\n .build());\n\n var main = new ListenerRule(\"main\", ListenerRuleArgs.builder() \n .actions(ListenerRuleActionArgs.builder()\n .targetGroupArn(var_.target_group_arn())\n .type(\"forward\")\n .build())\n .listenerArn(var_.listener_arn())\n .priority(priority.result())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n priority:\n type: random:RandomInteger\n properties:\n keepers:\n listener_arn: ${var.listener_arn}\n max: 50000\n min: 1\n main:\n type: aws:alb:ListenerRule\n properties:\n actions:\n - targetGroupArn: ${var.target_group_arn}\n type: forward\n listenerArn: ${var.listener_arn}\n priority: ${priority.result}\n```\n\nThe result of the above will set a random priority.\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\nRandom integers can be imported using the `result`, `min`, and `max`, with an optional `seed`. This can be used to replace a config value with a value interpolated from the random provider without experiencing diffs. Example (values are separated by a `,`)\n\n```sh\n $ pulumi import random:index/randomInteger:RandomInteger priority 15390,1,50000\n```\n\n ", + "description": "The resource `random.RandomInteger` generates random values from a given range, described by the `min` and `max` attributes of a given resource.\n\nThis resource can be used in conjunction with resources that have the `create_before_destroy` lifecycle flag set, to avoid conflicts with unique names during the brief period where both the old and new resources exist concurrently.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\nimport * as random from \"@pulumi/random\";\n\n// The following example shows how to generate a random priority\n// between 1 and 50000 for a aws_alb_listener_rule resource:\nconst priority = new random.RandomInteger(\"priority\", {\n min: 1,\n max: 50000,\n keepers: {\n listener_arn: _var.listener_arn,\n },\n});\nconst main = new aws.alb.ListenerRule(\"main\", {\n listenerArn: priority.keepers.apply(keepers =\u003e keepers?.listenerArn),\n priority: priority.result,\n actions: [{\n type: \"forward\",\n targetGroupArn: _var.target_group_arn,\n }],\n});\n// ... (other aws_alb_listener_rule arguments) ...\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\nusing Random = Pulumi.Random;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n // The following example shows how to generate a random priority\n // between 1 and 50000 for a aws_alb_listener_rule resource:\n var priority = new Random.RandomInteger(\"priority\", new()\n {\n Min = 1,\n Max = 50000,\n Keepers = \n {\n { \"listener_arn\", @var.Listener_arn },\n },\n });\n\n var main = new Aws.Alb.ListenerRule(\"main\", new()\n {\n ListenerArn = priority.Keepers.Apply(keepers =\u003e keepers?.ListenerArn),\n Priority = priority.Result,\n Actions = new[]\n {\n new Aws.Alb.Inputs.ListenerRuleActionArgs\n {\n Type = \"forward\",\n TargetGroupArn = @var.Target_group_arn,\n },\n },\n });\n\n // ... (other aws_alb_listener_rule arguments) ...\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/alb\"\n\t\"github.com/pulumi/pulumi-random/sdk/v4/go/random\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tpriority, err := random.NewRandomInteger(ctx, \"priority\", \u0026random.RandomIntegerArgs{\n\t\t\tMin: pulumi.Int(1),\n\t\t\tMax: pulumi.Int(50000),\n\t\t\tKeepers: pulumi.StringMap{\n\t\t\t\t\"listener_arn\": pulumi.Any(_var.Listener_arn),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = alb.NewListenerRule(ctx, \"main\", \u0026alb.ListenerRuleArgs{\n\t\t\tListenerArn: priority.Keepers.ApplyT(func(keepers interface{}) (*string, error) {\n\t\t\t\treturn \u0026keepers.ListenerArn, nil\n\t\t\t}).(pulumi.StringPtrOutput),\n\t\t\tPriority: priority.Result,\n\t\t\tActions: alb.ListenerRuleActionArray{\n\t\t\t\t\u0026alb.ListenerRuleActionArgs{\n\t\t\t\t\tType: pulumi.String(\"forward\"),\n\t\t\t\t\tTargetGroupArn: pulumi.Any(_var.Target_group_arn),\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.random.RandomInteger;\nimport com.pulumi.random.RandomIntegerArgs;\nimport com.pulumi.aws.alb.ListenerRule;\nimport com.pulumi.aws.alb.ListenerRuleArgs;\nimport com.pulumi.aws.alb.inputs.ListenerRuleActionArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var priority = new RandomInteger(\"priority\", RandomIntegerArgs.builder() \n .min(1)\n .max(50000)\n .keepers(Map.of(\"listener_arn\", var_.listener_arn()))\n .build());\n\n var main = new ListenerRule(\"main\", ListenerRuleArgs.builder() \n .listenerArn(priority.keepers().applyValue(keepers -\u003e keepers.listenerArn()))\n .priority(priority.result())\n .actions(ListenerRuleActionArgs.builder()\n .type(\"forward\")\n .targetGroupArn(var_.target_group_arn())\n .build())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n # The following example shows how to generate a random priority\n # between 1 and 50000 for a aws_alb_listener_rule resource:\n priority:\n type: random:RandomInteger\n properties:\n min: 1\n max: 50000\n keepers:\n listener_arn: ${var.listener_arn}\n main:\n type: aws:alb:ListenerRule\n properties:\n listenerArn: ${priority.keepers.listenerArn}\n priority: ${priority.result}\n actions:\n - type: forward\n targetGroupArn: ${var.target_group_arn}\n```\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\nRandom integers can be imported using the result, min, and max, with an optional seed. This can be used to replace a config value with a value interpolated from the random provider without experiencing diffs. Example (values are separated by a ,)\n\n```sh\n $ pulumi import random:index/randomInteger:RandomInteger priority 15390,1,50000\n```\n\n ", "properties": { "keepers": { "type": "object", "additionalProperties": { - "$ref": "pulumi.json#/Any" + "type": "string" }, - "description": "Arbitrary map of values that, when changed, will\ntrigger a new id to be generated. See\nthe main provider documentation for more information.\n" + "description": "Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information.\n" }, "max": { "type": "integer", @@ -180,7 +174,7 @@ }, "result": { "type": "integer", - "description": "(int) The random Integer result.\n" + "description": "The random integer result.\n" }, "seed": { "type": "string", @@ -196,25 +190,21 @@ "keepers": { "type": "object", "additionalProperties": { - "$ref": "pulumi.json#/Any" + "type": "string" }, - "description": "Arbitrary map of values that, when changed, will\ntrigger a new id to be generated. See\nthe main provider documentation for more information.\n", - "willReplaceOnChanges": true + "description": "Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information.\n" }, "max": { "type": "integer", - "description": "The maximum inclusive value of the range.\n", - "willReplaceOnChanges": true + "description": "The maximum inclusive value of the range.\n" }, "min": { "type": "integer", - "description": "The minimum inclusive value of the range.\n", - "willReplaceOnChanges": true + "description": "The minimum inclusive value of the range.\n" }, "seed": { "type": "string", - "description": "A custom seed to always produce the same value.\n", - "willReplaceOnChanges": true + "description": "A custom seed to always produce the same value.\n" } }, "requiredInputs": [ @@ -227,75 +217,81 @@ "keepers": { "type": "object", "additionalProperties": { - "$ref": "pulumi.json#/Any" + "type": "string" }, - "description": "Arbitrary map of values that, when changed, will\ntrigger a new id to be generated. See\nthe main provider documentation for more information.\n", - "willReplaceOnChanges": true + "description": "Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information.\n" }, "max": { "type": "integer", - "description": "The maximum inclusive value of the range.\n", - "willReplaceOnChanges": true + "description": "The maximum inclusive value of the range.\n" }, "min": { "type": "integer", - "description": "The minimum inclusive value of the range.\n", - "willReplaceOnChanges": true + "description": "The minimum inclusive value of the range.\n" }, "result": { "type": "integer", - "description": "(int) The random Integer result.\n" + "description": "The random integer result.\n" }, "seed": { "type": "string", - "description": "A custom seed to always produce the same value.\n", - "willReplaceOnChanges": true + "description": "A custom seed to always produce the same value.\n" } }, "type": "object" } }, "random:index/randomPassword:RandomPassword": { - "description": "\u003e **Note:** Requires random provider version \u003e= 2.2.0\n\nIdentical to random.RandomString with the exception that the\nresult is treated as sensitive and, thus, _not_ displayed in console output.\n\n\u003e **Note:** All attributes including the generated password will be stored in\nthe raw state as plain-text. [Read more about sensitive data in\nstate](https://www.terraform.io/docs/state/sensitive-data.html).\n\nThis resource *does* use a cryptographic random number generator.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\nimport * as random from \"@pulumi/random\";\n\nconst password = new random.RandomPassword(\"password\", {\n length: 16,\n special: true,\n overrideSpecial: `_%@`,\n});\nconst example = new aws.rds.Instance(\"example\", {\n instanceClass: \"db.t3.micro\",\n allocatedStorage: 64,\n engine: \"mysql\",\n username: \"someone\",\n password: password.result,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_random as random\n\npassword = random.RandomPassword(\"password\",\n length=16,\n special=True,\n override_special=\"_%@\")\nexample = aws.rds.Instance(\"example\",\n instance_class=\"db.t3.micro\",\n allocated_storage=64,\n engine=\"mysql\",\n username=\"someone\",\n password=password.result)\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\nusing Random = Pulumi.Random;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var password = new Random.RandomPassword(\"password\", new()\n {\n Length = 16,\n Special = true,\n OverrideSpecial = \"_%@\",\n });\n\n var example = new Aws.Rds.Instance(\"example\", new()\n {\n InstanceClass = \"db.t3.micro\",\n AllocatedStorage = 64,\n Engine = \"mysql\",\n Username = \"someone\",\n Password = password.Result,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/rds\"\n\t\"github.com/pulumi/pulumi-random/sdk/v4/go/random\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tpassword, err := random.NewRandomPassword(ctx, \"password\", \u0026random.RandomPasswordArgs{\n\t\t\tLength: pulumi.Int(16),\n\t\t\tSpecial: pulumi.Bool(true),\n\t\t\tOverrideSpecial: pulumi.String(fmt.Sprintf(\"_%v@\", \"%\")),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = rds.NewInstance(ctx, \"example\", \u0026rds.InstanceArgs{\n\t\t\tInstanceClass: pulumi.String(\"db.t3.micro\"),\n\t\t\tAllocatedStorage: pulumi.Int(64),\n\t\t\tEngine: pulumi.String(\"mysql\"),\n\t\t\tUsername: pulumi.String(\"someone\"),\n\t\t\tPassword: password.Result,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.random.RandomPassword;\nimport com.pulumi.random.RandomPasswordArgs;\nimport com.pulumi.aws.rds.Instance;\nimport com.pulumi.aws.rds.InstanceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var password = new RandomPassword(\"password\", RandomPasswordArgs.builder() \n .length(16)\n .special(true)\n .overrideSpecial(\"_%@\")\n .build());\n\n var example = new Instance(\"example\", InstanceArgs.builder() \n .instanceClass(\"db.t3.micro\")\n .allocatedStorage(64)\n .engine(\"mysql\")\n .username(\"someone\")\n .password(password.result())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n password:\n type: random:RandomPassword\n properties:\n length: 16\n special: true\n overrideSpecial: _%@\n example:\n type: aws:rds:Instance\n properties:\n instanceClass: db.t3.micro\n allocatedStorage: 64\n engine: mysql\n username: someone\n password: ${password.result}\n```\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\nRandom Password can be imported by specifying the value of the string\n\n```sh\n $ pulumi import random:index/randomPassword:RandomPassword password securepassword\n```\n\n ", + "description": "{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\nimport * as random from \"@pulumi/random\";\n\nconst password = new random.RandomPassword(\"password\", {\n length: 16,\n special: true,\n overrideSpecial: `!#$%\u0026*()-_=+[]{}\u003c\u003e:?`,\n});\nconst example = new aws.rds.Instance(\"example\", {\n instanceClass: \"db.t3.micro\",\n allocatedStorage: 64,\n engine: \"mysql\",\n username: \"someone\",\n password: password.result,\n});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_random as random\n\npassword = random.RandomPassword(\"password\",\n length=16,\n special=True,\n override_special=\"!#$%\u0026*()-_=+[]{}\u003c\u003e:?\")\nexample = aws.rds.Instance(\"example\",\n instance_class=\"db.t3.micro\",\n allocated_storage=64,\n engine=\"mysql\",\n username=\"someone\",\n password=password.result)\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\nusing Random = Pulumi.Random;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var password = new Random.RandomPassword(\"password\", new()\n {\n Length = 16,\n Special = true,\n OverrideSpecial = \"!#$%\u0026*()-_=+[]{}\u003c\u003e:?\",\n });\n\n var example = new Aws.Rds.Instance(\"example\", new()\n {\n InstanceClass = \"db.t3.micro\",\n AllocatedStorage = 64,\n Engine = \"mysql\",\n Username = \"someone\",\n Password = password.Result,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/rds\"\n\t\"github.com/pulumi/pulumi-random/sdk/v4/go/random\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tpassword, err := random.NewRandomPassword(ctx, \"password\", \u0026random.RandomPasswordArgs{\n\t\t\tLength: pulumi.Int(16),\n\t\t\tSpecial: pulumi.Bool(true),\n\t\t\tOverrideSpecial: pulumi.String(fmt.Sprintf(\"!#$%v\u0026*()-_=+[]{}\u003c\u003e:?\", \"%\")),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = rds.NewInstance(ctx, \"example\", \u0026rds.InstanceArgs{\n\t\t\tInstanceClass: pulumi.String(\"db.t3.micro\"),\n\t\t\tAllocatedStorage: pulumi.Int(64),\n\t\t\tEngine: pulumi.String(\"mysql\"),\n\t\t\tUsername: pulumi.String(\"someone\"),\n\t\t\tPassword: password.Result,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.random.RandomPassword;\nimport com.pulumi.random.RandomPasswordArgs;\nimport com.pulumi.aws.rds.Instance;\nimport com.pulumi.aws.rds.InstanceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var password = new RandomPassword(\"password\", RandomPasswordArgs.builder() \n .length(16)\n .special(true)\n .overrideSpecial(\"!#$%\u0026*()-_=+[]{}\u003c\u003e:?\")\n .build());\n\n var example = new Instance(\"example\", InstanceArgs.builder() \n .instanceClass(\"db.t3.micro\")\n .allocatedStorage(64)\n .engine(\"mysql\")\n .username(\"someone\")\n .password(password.result())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n password:\n type: random:RandomPassword\n properties:\n length: 16\n special: true\n overrideSpecial: '!#$%\u0026*()-_=+[]{}\u003c\u003e:?'\n example:\n type: aws:rds:Instance\n properties:\n instanceClass: db.t3.micro\n allocatedStorage: 64\n engine: mysql\n username: someone\n password: ${password.result}\n```\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\n### Avoiding Replacement\n\n```sh\n $ pulumi import random:index/randomPassword:RandomPassword If the resource were imported using `random_password.password securepassword`,\n```\n\n replacement could be avoided by using1. Attribute values that match the imported ID and defaults:\n\n\n\n terraform\n\n\n\n resource \"random_password\" \"password\" {\n\n\n\n\n\n length = 14\n\n\n\n\n\n lower\n\n= true\n\n\n\n } 2. Attribute values that match the imported ID and omit the attributes with defaults:\n\n\n\n terraform\n\n\n\n resource \"random_password\" \"password\" {\n\n\n\n\n\n length = 14\n\n\n\n } 3. `ignore_changes` specifying the attributes to ignore:\n\n\n\n terraform\n\n\n\n resource \"random_password\" \"password\" {\n\n\n\n\n\n length = 16\n\n\n\n\n\n lower\n\n= false\n\n\n\n\n\n lifecycle {\n\n\n\n\n\n\n\n ignore_changes = [\n\n\n\n\n\n\n\n\n\n length,\n\n\n\n\n\n\n\n\n\n lower,\n\n\n\n\n\n\n\n ]\n\n\n\n\n\n }\n\n\n\n }\n\n\n\n **NOTE** `ignore_changes` is only required until the resource is recreated after import,\n\n\n\n after which it will use the configuration values specified. ", "properties": { + "bcryptHash": { + "type": "string", + "description": "A bcrypt hash of the generated random string.\n", + "secret": true + }, "keepers": { "type": "object", "additionalProperties": { - "$ref": "pulumi.json#/Any" + "type": "string" }, - "description": "Arbitrary map of values that, when changed, will trigger recreation of resource. See [the main provider\ndocumentation](../index.html) for more information.\n" + "description": "Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information.\n" }, "length": { "type": "integer", - "description": "The length of the string desired.\n" + "description": "The length of the string desired. The minimum value for length is 1 and, length must also be \u003e= (`min_upper` + `min_lower` + `min_numeric` + `min_special`).\n" }, "lower": { "type": "boolean", - "description": "Include lowercase alphabet characters in the result.\n" + "description": "Include lowercase alphabet characters in the result. Default value is `true`.\n" }, "minLower": { "type": "integer", - "description": "Minimum number of lowercase alphabet characters in the result.\n" + "description": "Minimum number of lowercase alphabet characters in the result. Default value is `0`.\n" }, "minNumeric": { "type": "integer", - "description": "Minimum number of numeric characters in the result.\n" + "description": "Minimum number of numeric characters in the result. Default value is `0`.\n" }, "minSpecial": { "type": "integer", - "description": "Minimum number of special characters in the result.\n" + "description": "Minimum number of special characters in the result. Default value is `0`.\n" }, "minUpper": { "type": "integer", - "description": "Minimum number of uppercase alphabet characters in the result.\n" + "description": "Minimum number of uppercase alphabet characters in the result. Default value is `0`.\n" }, "number": { "type": "boolean", - "description": "Include numeric characters in the result.\n" + "description": "Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead.\n", + "deprecationMessage": "**NOTE**: This is deprecated, use `numeric` instead." + }, + "numeric": { + "type": "boolean", + "description": "Include numeric characters in the result. Default value is `true`.\n" }, "overrideSpecial": { "type": "string", - "description": "Supply your own list of special characters to use for string generation. This overrides the default character list in\nthe special argument. The `special` argument must still be set to true for any overwritten characters to be used in\ngeneration.\n" + "description": "Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation.\n" }, "result": { "type": "string", @@ -304,75 +300,79 @@ }, "special": { "type": "boolean", - "description": "Include special characters in the result. These are `!@#$%\u0026*()-_=+[]{}\u003c\u003e:?`\n" + "description": "Include special characters in the result. These are `!@#$%\u0026*()-_=+[]{}\u003c\u003e:?`. Default value is `true`.\n" }, "upper": { "type": "boolean", - "description": "Include uppercase alphabet characters in the result.\n" + "description": "Include uppercase alphabet characters in the result. Default value is `true`.\n" } }, "required": [ + "bcryptHash", "length", - "result" + "lower", + "minLower", + "minNumeric", + "minSpecial", + "minUpper", + "number", + "numeric", + "result", + "special", + "upper" ], "inputProperties": { "keepers": { "type": "object", "additionalProperties": { - "$ref": "pulumi.json#/Any" + "type": "string" }, - "description": "Arbitrary map of values that, when changed, will trigger recreation of resource. See [the main provider\ndocumentation](../index.html) for more information.\n", - "willReplaceOnChanges": true + "description": "Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information.\n" }, "length": { "type": "integer", - "description": "The length of the string desired.\n", - "willReplaceOnChanges": true + "description": "The length of the string desired. The minimum value for length is 1 and, length must also be \u003e= (`min_upper` + `min_lower` + `min_numeric` + `min_special`).\n" }, "lower": { "type": "boolean", - "description": "Include lowercase alphabet characters in the result.\n", - "willReplaceOnChanges": true + "description": "Include lowercase alphabet characters in the result. Default value is `true`.\n" }, "minLower": { "type": "integer", - "description": "Minimum number of lowercase alphabet characters in the result.\n", - "willReplaceOnChanges": true + "description": "Minimum number of lowercase alphabet characters in the result. Default value is `0`.\n" }, "minNumeric": { "type": "integer", - "description": "Minimum number of numeric characters in the result.\n", - "willReplaceOnChanges": true + "description": "Minimum number of numeric characters in the result. Default value is `0`.\n" }, "minSpecial": { "type": "integer", - "description": "Minimum number of special characters in the result.\n", - "willReplaceOnChanges": true + "description": "Minimum number of special characters in the result. Default value is `0`.\n" }, "minUpper": { "type": "integer", - "description": "Minimum number of uppercase alphabet characters in the result.\n", - "willReplaceOnChanges": true + "description": "Minimum number of uppercase alphabet characters in the result. Default value is `0`.\n" }, "number": { "type": "boolean", - "description": "Include numeric characters in the result.\n", - "willReplaceOnChanges": true + "description": "Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead.\n", + "deprecationMessage": "**NOTE**: This is deprecated, use `numeric` instead." + }, + "numeric": { + "type": "boolean", + "description": "Include numeric characters in the result. Default value is `true`.\n" }, "overrideSpecial": { "type": "string", - "description": "Supply your own list of special characters to use for string generation. This overrides the default character list in\nthe special argument. The `special` argument must still be set to true for any overwritten characters to be used in\ngeneration.\n", - "willReplaceOnChanges": true + "description": "Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation.\n" }, "special": { "type": "boolean", - "description": "Include special characters in the result. These are `!@#$%\u0026*()-_=+[]{}\u003c\u003e:?`\n", - "willReplaceOnChanges": true + "description": "Include special characters in the result. These are `!@#$%\u0026*()-_=+[]{}\u003c\u003e:?`. Default value is `true`.\n" }, "upper": { "type": "boolean", - "description": "Include uppercase alphabet characters in the result.\n", - "willReplaceOnChanges": true + "description": "Include uppercase alphabet characters in the result. Default value is `true`.\n" } }, "requiredInputs": [ @@ -381,53 +381,54 @@ "stateInputs": { "description": "Input properties used for looking up and filtering RandomPassword resources.\n", "properties": { + "bcryptHash": { + "type": "string", + "description": "A bcrypt hash of the generated random string.\n", + "secret": true + }, "keepers": { "type": "object", "additionalProperties": { - "$ref": "pulumi.json#/Any" + "type": "string" }, - "description": "Arbitrary map of values that, when changed, will trigger recreation of resource. See [the main provider\ndocumentation](../index.html) for more information.\n", - "willReplaceOnChanges": true + "description": "Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information.\n" }, "length": { "type": "integer", - "description": "The length of the string desired.\n", - "willReplaceOnChanges": true + "description": "The length of the string desired. The minimum value for length is 1 and, length must also be \u003e= (`min_upper` + `min_lower` + `min_numeric` + `min_special`).\n" }, "lower": { "type": "boolean", - "description": "Include lowercase alphabet characters in the result.\n", - "willReplaceOnChanges": true + "description": "Include lowercase alphabet characters in the result. Default value is `true`.\n" }, "minLower": { "type": "integer", - "description": "Minimum number of lowercase alphabet characters in the result.\n", - "willReplaceOnChanges": true + "description": "Minimum number of lowercase alphabet characters in the result. Default value is `0`.\n" }, "minNumeric": { "type": "integer", - "description": "Minimum number of numeric characters in the result.\n", - "willReplaceOnChanges": true + "description": "Minimum number of numeric characters in the result. Default value is `0`.\n" }, "minSpecial": { "type": "integer", - "description": "Minimum number of special characters in the result.\n", - "willReplaceOnChanges": true + "description": "Minimum number of special characters in the result. Default value is `0`.\n" }, "minUpper": { "type": "integer", - "description": "Minimum number of uppercase alphabet characters in the result.\n", - "willReplaceOnChanges": true + "description": "Minimum number of uppercase alphabet characters in the result. Default value is `0`.\n" }, "number": { "type": "boolean", - "description": "Include numeric characters in the result.\n", - "willReplaceOnChanges": true + "description": "Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead.\n", + "deprecationMessage": "**NOTE**: This is deprecated, use `numeric` instead." + }, + "numeric": { + "type": "boolean", + "description": "Include numeric characters in the result. Default value is `true`.\n" }, "overrideSpecial": { "type": "string", - "description": "Supply your own list of special characters to use for string generation. This overrides the default character list in\nthe special argument. The `special` argument must still be set to true for any overwritten characters to be used in\ngeneration.\n", - "willReplaceOnChanges": true + "description": "Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation.\n" }, "result": { "type": "string", @@ -436,31 +437,29 @@ }, "special": { "type": "boolean", - "description": "Include special characters in the result. These are `!@#$%\u0026*()-_=+[]{}\u003c\u003e:?`\n", - "willReplaceOnChanges": true + "description": "Include special characters in the result. These are `!@#$%\u0026*()-_=+[]{}\u003c\u003e:?`. Default value is `true`.\n" }, "upper": { "type": "boolean", - "description": "Include uppercase alphabet characters in the result.\n", - "willReplaceOnChanges": true + "description": "Include uppercase alphabet characters in the result. Default value is `true`.\n" } }, "type": "object" } }, "random:index/randomPet:RandomPet": { - "description": "The resource `random.RandomPet` generates random pet names that are intended to be\nused as unique identifiers for other resources.\n\nThis resource can be used in conjunction with resources that have\nthe `create_before_destroy` lifecycle flag set, to avoid conflicts with\nunique names during the brief period where both the old and new resources\nexist concurrently.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n\nThe following example shows how to generate a unique pet name for an AWS EC2\ninstance that changes each time a new AMI id is selected.\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\nimport * as random from \"@pulumi/random\";\n\nconst serverRandomPet = new random.RandomPet(\"serverRandomPet\", {keepers: {\n ami_id: _var.ami_id,\n}});\nconst serverInstance = new aws.ec2.Instance(\"serverInstance\", {\n ami: serverRandomPet.keepers.apply(keepers =\u003e keepers?.amiId),\n tags: {\n Name: pulumi.interpolate`web-server-${serverRandomPet.id}`,\n },\n});\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\nusing Random = Pulumi.Random;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var serverRandomPet = new Random.RandomPet(\"serverRandomPet\", new()\n {\n Keepers = \n {\n { \"ami_id\", @var.Ami_id },\n },\n });\n\n var serverInstance = new Aws.Ec2.Instance(\"serverInstance\", new()\n {\n Ami = serverRandomPet.Keepers.Apply(keepers =\u003e keepers?.AmiId),\n Tags = \n {\n { \"Name\", serverRandomPet.Id.Apply(id =\u003e $\"web-server-{id}\") },\n },\n });\n\n});\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.random.RandomPet;\nimport com.pulumi.random.RandomPetArgs;\nimport com.pulumi.aws.ec2.Instance;\nimport com.pulumi.aws.ec2.InstanceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var serverRandomPet = new RandomPet(\"serverRandomPet\", RandomPetArgs.builder() \n .keepers(Map.of(\"ami_id\", var_.ami_id()))\n .build());\n\n var serverInstance = new Instance(\"serverInstance\", InstanceArgs.builder() \n .ami(serverRandomPet.keepers().applyValue(keepers -\u003e keepers.amiId()))\n .tags(Map.of(\"Name\", serverRandomPet.id().applyValue(id -\u003e String.format(\"web-server-%s\", id))))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n serverRandomPet:\n type: random:RandomPet\n properties:\n keepers:\n ami_id: ${var.ami_id}\n serverInstance:\n type: aws:ec2:Instance\n properties:\n # Read the AMI id \"through\" the random_pet resource to ensure that\n # // both will change together.\n ami: ${serverRandomPet.keepers.amiId}\n tags:\n Name: web-server-${serverRandomPet.id}\n```\n\nThe result of the above will set the Name of the AWS Instance to\n`web-server-simple-snake`.\n{{% /example %}}\n{{% /examples %}}", + "description": "The resource `random.RandomPet` generates random pet names that are intended to be used as unique identifiers for other resources.\n\nThis resource can be used in conjunction with resources that have the `create_before_destroy` lifecycle flag set, to avoid conflicts with unique names during the brief period where both the old and new resources exist concurrently.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\nimport * as random from \"@pulumi/random\";\n\n// The following example shows how to generate a unique pet name\n// for an AWS EC2 instance that changes each time a new AMI id is\n// selected.\nconst serverRandomPet = new random.RandomPet(\"serverRandomPet\", {keepers: {\n ami_id: _var.ami_id,\n}});\nconst serverInstance = new aws.ec2.Instance(\"serverInstance\", {\n tags: {\n Name: pulumi.interpolate`web-server-${serverRandomPet.id}`,\n },\n ami: serverRandomPet.keepers.apply(keepers =\u003e keepers?.amiId),\n});\n// ... (other aws_instance arguments) ...\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\nusing Random = Pulumi.Random;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n // The following example shows how to generate a unique pet name\n // for an AWS EC2 instance that changes each time a new AMI id is\n // selected.\n var serverRandomPet = new Random.RandomPet(\"serverRandomPet\", new()\n {\n Keepers = \n {\n { \"ami_id\", @var.Ami_id },\n },\n });\n\n var serverInstance = new Aws.Ec2.Instance(\"serverInstance\", new()\n {\n Tags = \n {\n { \"Name\", serverRandomPet.Id.Apply(id =\u003e $\"web-server-{id}\") },\n },\n Ami = serverRandomPet.Keepers.Apply(keepers =\u003e keepers?.AmiId),\n });\n\n // ... (other aws_instance arguments) ...\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ec2\"\n\t\"github.com/pulumi/pulumi-random/sdk/v4/go/random\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\tserverRandomPet, err := random.NewRandomPet(ctx, \"serverRandomPet\", \u0026random.RandomPetArgs{\n\t\t\tKeepers: pulumi.StringMap{\n\t\t\t\t\"ami_id\": pulumi.Any(_var.Ami_id),\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = ec2.NewInstance(ctx, \"serverInstance\", \u0026ec2.InstanceArgs{\n\t\t\tTags: pulumi.StringMap{\n\t\t\t\t\"Name\": serverRandomPet.ID().ApplyT(func(id string) (string, error) {\n\t\t\t\t\treturn fmt.Sprintf(\"web-server-%v\", id), nil\n\t\t\t\t}).(pulumi.StringOutput),\n\t\t\t},\n\t\t\tAmi: serverRandomPet.Keepers.ApplyT(func(keepers interface{}) (*string, error) {\n\t\t\t\treturn \u0026keepers.AmiId, nil\n\t\t\t}).(pulumi.StringPtrOutput),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.random.RandomPet;\nimport com.pulumi.random.RandomPetArgs;\nimport com.pulumi.aws.ec2.Instance;\nimport com.pulumi.aws.ec2.InstanceArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var serverRandomPet = new RandomPet(\"serverRandomPet\", RandomPetArgs.builder() \n .keepers(Map.of(\"ami_id\", var_.ami_id()))\n .build());\n\n var serverInstance = new Instance(\"serverInstance\", InstanceArgs.builder() \n .tags(Map.of(\"Name\", serverRandomPet.id().applyValue(id -\u003e String.format(\"web-server-%s\", id))))\n .ami(serverRandomPet.keepers().applyValue(keepers -\u003e keepers.amiId()))\n .build());\n\n }\n}\n```\n```yaml\nresources:\n # The following example shows how to generate a unique pet name\n # for an AWS EC2 instance that changes each time a new AMI id is\n # selected.\n serverRandomPet:\n type: random:RandomPet\n properties:\n keepers:\n ami_id: ${var.ami_id}\n serverInstance:\n type: aws:ec2:Instance\n properties:\n tags:\n Name: web-server-${serverRandomPet.id}\n # Read the AMI id \"through\" the random_pet resource to ensure that\n # # both will change together.\n ami: ${serverRandomPet.keepers.amiId}\n```\n{{% /example %}}\n{{% /examples %}}", "properties": { "keepers": { "type": "object", "additionalProperties": { - "$ref": "pulumi.json#/Any" + "type": "string" }, - "description": "Arbitrary map of values that, when changed, will\ntrigger a new id to be generated. See\nthe main provider documentation for more information.\n" + "description": "Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information.\n" }, "length": { "type": "integer", - "description": "The length (in words) of the pet name.\n" + "description": "The length (in words) of the pet name. Defaults to 2\n" }, "prefix": { "type": "string", @@ -468,32 +467,32 @@ }, "separator": { "type": "string", - "description": "The character to separate words in the pet name.\n" + "description": "The character to separate words in the pet name. Defaults to \"-\"\n" } }, + "required": [ + "length", + "separator" + ], "inputProperties": { "keepers": { "type": "object", "additionalProperties": { - "$ref": "pulumi.json#/Any" + "type": "string" }, - "description": "Arbitrary map of values that, when changed, will\ntrigger a new id to be generated. See\nthe main provider documentation for more information.\n", - "willReplaceOnChanges": true + "description": "Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information.\n" }, "length": { "type": "integer", - "description": "The length (in words) of the pet name.\n", - "willReplaceOnChanges": true + "description": "The length (in words) of the pet name. Defaults to 2\n" }, "prefix": { "type": "string", - "description": "A string to prefix the name with.\n", - "willReplaceOnChanges": true + "description": "A string to prefix the name with.\n" }, "separator": { "type": "string", - "description": "The character to separate words in the pet name.\n", - "willReplaceOnChanges": true + "description": "The character to separate words in the pet name. Defaults to \"-\"\n" } }, "stateInputs": { @@ -502,32 +501,28 @@ "keepers": { "type": "object", "additionalProperties": { - "$ref": "pulumi.json#/Any" + "type": "string" }, - "description": "Arbitrary map of values that, when changed, will\ntrigger a new id to be generated. See\nthe main provider documentation for more information.\n", - "willReplaceOnChanges": true + "description": "Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information.\n" }, "length": { "type": "integer", - "description": "The length (in words) of the pet name.\n", - "willReplaceOnChanges": true + "description": "The length (in words) of the pet name. Defaults to 2\n" }, "prefix": { "type": "string", - "description": "A string to prefix the name with.\n", - "willReplaceOnChanges": true + "description": "A string to prefix the name with.\n" }, "separator": { "type": "string", - "description": "The character to separate words in the pet name.\n", - "willReplaceOnChanges": true + "description": "The character to separate words in the pet name. Defaults to \"-\"\n" } }, "type": "object" } }, "random:index/randomShuffle:RandomShuffle": { - "description": "The resource `random.RandomShuffle` generates a random permutation of a list\nof strings given as an argument.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\nimport * as random from \"@pulumi/random\";\n\nconst az = new random.RandomShuffle(\"az\", {\n inputs: [\n \"us-west-1a\",\n \"us-west-1c\",\n \"us-west-1d\",\n \"us-west-1e\",\n ],\n resultCount: 2,\n});\nconst example = new aws.elb.LoadBalancer(\"example\", {availabilityZones: az.results});\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_random as random\n\naz = random.RandomShuffle(\"az\",\n inputs=[\n \"us-west-1a\",\n \"us-west-1c\",\n \"us-west-1d\",\n \"us-west-1e\",\n ],\n result_count=2)\nexample = aws.elb.LoadBalancer(\"example\", availability_zones=az.results)\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\nusing Random = Pulumi.Random;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var az = new Random.RandomShuffle(\"az\", new()\n {\n Inputs = new[]\n {\n \"us-west-1a\",\n \"us-west-1c\",\n \"us-west-1d\",\n \"us-west-1e\",\n },\n ResultCount = 2,\n });\n\n var example = new Aws.Elb.LoadBalancer(\"example\", new()\n {\n AvailabilityZones = az.Results,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/elb\"\n\t\"github.com/pulumi/pulumi-random/sdk/v4/go/random\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\taz, err := random.NewRandomShuffle(ctx, \"az\", \u0026random.RandomShuffleArgs{\n\t\t\tInputs: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"us-west-1a\"),\n\t\t\t\tpulumi.String(\"us-west-1c\"),\n\t\t\t\tpulumi.String(\"us-west-1d\"),\n\t\t\t\tpulumi.String(\"us-west-1e\"),\n\t\t\t},\n\t\t\tResultCount: pulumi.Int(2),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = elb.NewLoadBalancer(ctx, \"example\", \u0026elb.LoadBalancerArgs{\n\t\t\tAvailabilityZones: az.Results,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.random.RandomShuffle;\nimport com.pulumi.random.RandomShuffleArgs;\nimport com.pulumi.aws.elb.LoadBalancer;\nimport com.pulumi.aws.elb.LoadBalancerArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var az = new RandomShuffle(\"az\", RandomShuffleArgs.builder() \n .inputs( \n \"us-west-1a\",\n \"us-west-1c\",\n \"us-west-1d\",\n \"us-west-1e\")\n .resultCount(2)\n .build());\n\n var example = new LoadBalancer(\"example\", LoadBalancerArgs.builder() \n .availabilityZones(az.results())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n az:\n type: random:RandomShuffle\n properties:\n inputs:\n - us-west-1a\n - us-west-1c\n - us-west-1d\n - us-west-1e\n resultCount: 2\n example:\n type: aws:elb:LoadBalancer\n properties:\n # Place the ELB in any two of the given availability zones, selected\n # // at random.\n availabilityZones: ${az.results}\n```\n{{% /example %}}\n{{% /examples %}}", + "description": "The resource `random.RandomShuffle` generates a random permutation of a list of strings given as an argument.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as aws from \"@pulumi/aws\";\nimport * as random from \"@pulumi/random\";\n\nconst az = new random.RandomShuffle(\"az\", {\n inputs: [\n \"us-west-1a\",\n \"us-west-1c\",\n \"us-west-1d\",\n \"us-west-1e\",\n ],\n resultCount: 2,\n});\nconst example = new aws.elb.LoadBalancer(\"example\", {availabilityZones: [az.results]});\n// ... and other aws_elb arguments ...\n```\n```python\nimport pulumi\nimport pulumi_aws as aws\nimport pulumi_random as random\n\naz = random.RandomShuffle(\"az\",\n inputs=[\n \"us-west-1a\",\n \"us-west-1c\",\n \"us-west-1d\",\n \"us-west-1e\",\n ],\n result_count=2)\nexample = aws.elb.LoadBalancer(\"example\", availability_zones=[az.results])\n# ... and other aws_elb arguments ...\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Aws = Pulumi.Aws;\nusing Random = Pulumi.Random;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var az = new Random.RandomShuffle(\"az\", new()\n {\n Inputs = new[]\n {\n \"us-west-1a\",\n \"us-west-1c\",\n \"us-west-1d\",\n \"us-west-1e\",\n },\n ResultCount = 2,\n });\n\n var example = new Aws.Elb.LoadBalancer(\"example\", new()\n {\n AvailabilityZones = new[]\n {\n az.Results,\n },\n });\n\n // ... and other aws_elb arguments ...\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-aws/sdk/v5/go/aws/elb\"\n\t\"github.com/pulumi/pulumi-random/sdk/v4/go/random\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\taz, err := random.NewRandomShuffle(ctx, \"az\", \u0026random.RandomShuffleArgs{\n\t\t\tInputs: pulumi.StringArray{\n\t\t\t\tpulumi.String(\"us-west-1a\"),\n\t\t\t\tpulumi.String(\"us-west-1c\"),\n\t\t\t\tpulumi.String(\"us-west-1d\"),\n\t\t\t\tpulumi.String(\"us-west-1e\"),\n\t\t\t},\n\t\t\tResultCount: pulumi.Int(2),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = elb.NewLoadBalancer(ctx, \"example\", \u0026elb.LoadBalancerArgs{\n\t\t\tAvailabilityZones: pulumi.StringArray{\n\t\t\t\taz.Results,\n\t\t\t},\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.random.RandomShuffle;\nimport com.pulumi.random.RandomShuffleArgs;\nimport com.pulumi.aws.elb.LoadBalancer;\nimport com.pulumi.aws.elb.LoadBalancerArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var az = new RandomShuffle(\"az\", RandomShuffleArgs.builder() \n .inputs( \n \"us-west-1a\",\n \"us-west-1c\",\n \"us-west-1d\",\n \"us-west-1e\")\n .resultCount(2)\n .build());\n\n var example = new LoadBalancer(\"example\", LoadBalancerArgs.builder() \n .availabilityZones(az.results())\n .build());\n\n }\n}\n```\n```yaml\nresources:\n az:\n type: random:RandomShuffle\n properties:\n inputs:\n - us-west-1a\n - us-west-1c\n - us-west-1d\n - us-west-1e\n resultCount: 2\n example:\n type: aws:elb:LoadBalancer\n properties:\n # Place the ELB in any two of the given availability zones, selected\n # # at random.\n availabilityZones:\n - ${az.results}\n```\n{{% /example %}}\n{{% /examples %}}", "properties": { "inputs": { "type": "array", @@ -539,13 +534,13 @@ "keepers": { "type": "object", "additionalProperties": { - "$ref": "pulumi.json#/Any" + "type": "string" }, - "description": "Arbitrary map of values that, when changed, will\ntrigger a new id to be generated. See\nthe main provider documentation for more information.\n" + "description": "Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information.\n" }, "resultCount": { "type": "integer", - "description": "The number of results to return. Defaults to\nthe number of items in the `input` list. If fewer items are requested,\nsome elements will be excluded from the result. If more items are requested,\nitems will be repeated in the result but not more frequently than the number\nof items in the input list.\n" + "description": "The number of results to return. Defaults to the number of items in the `input` list. If fewer items are requested, some elements will be excluded from the result. If more items are requested, items will be repeated in the result but not more frequently than the number of items in the input list.\n" }, "results": { "type": "array", @@ -556,7 +551,7 @@ }, "seed": { "type": "string", - "description": "Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the\nlist. **Important:** Even with an identical seed, it is not guaranteed that the same permutation will be produced across\ndifferent versions of Terraform. This argument causes the result to be *less volatile*, but not fixed for all time.\n" + "description": "Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the list.\n" } }, "required": [ @@ -569,26 +564,22 @@ "items": { "type": "string" }, - "description": "The list of strings to shuffle.\n", - "willReplaceOnChanges": true + "description": "The list of strings to shuffle.\n" }, "keepers": { "type": "object", "additionalProperties": { - "$ref": "pulumi.json#/Any" + "type": "string" }, - "description": "Arbitrary map of values that, when changed, will\ntrigger a new id to be generated. See\nthe main provider documentation for more information.\n", - "willReplaceOnChanges": true + "description": "Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information.\n" }, "resultCount": { "type": "integer", - "description": "The number of results to return. Defaults to\nthe number of items in the `input` list. If fewer items are requested,\nsome elements will be excluded from the result. If more items are requested,\nitems will be repeated in the result but not more frequently than the number\nof items in the input list.\n", - "willReplaceOnChanges": true + "description": "The number of results to return. Defaults to the number of items in the `input` list. If fewer items are requested, some elements will be excluded from the result. If more items are requested, items will be repeated in the result but not more frequently than the number of items in the input list.\n" }, "seed": { "type": "string", - "description": "Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the\nlist. **Important:** Even with an identical seed, it is not guaranteed that the same permutation will be produced across\ndifferent versions of Terraform. This argument causes the result to be *less volatile*, but not fixed for all time.\n", - "willReplaceOnChanges": true + "description": "Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the list.\n" } }, "requiredInputs": [ @@ -602,21 +593,18 @@ "items": { "type": "string" }, - "description": "The list of strings to shuffle.\n", - "willReplaceOnChanges": true + "description": "The list of strings to shuffle.\n" }, "keepers": { "type": "object", "additionalProperties": { - "$ref": "pulumi.json#/Any" + "type": "string" }, - "description": "Arbitrary map of values that, when changed, will\ntrigger a new id to be generated. See\nthe main provider documentation for more information.\n", - "willReplaceOnChanges": true + "description": "Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information.\n" }, "resultCount": { "type": "integer", - "description": "The number of results to return. Defaults to\nthe number of items in the `input` list. If fewer items are requested,\nsome elements will be excluded from the result. If more items are requested,\nitems will be repeated in the result but not more frequently than the number\nof items in the input list.\n", - "willReplaceOnChanges": true + "description": "The number of results to return. Defaults to the number of items in the `input` list. If fewer items are requested, some elements will be excluded from the result. If more items are requested, items will be repeated in the result but not more frequently than the number of items in the input list.\n" }, "results": { "type": "array", @@ -627,130 +615,137 @@ }, "seed": { "type": "string", - "description": "Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the\nlist. **Important:** Even with an identical seed, it is not guaranteed that the same permutation will be produced across\ndifferent versions of Terraform. This argument causes the result to be *less volatile*, but not fixed for all time.\n", - "willReplaceOnChanges": true + "description": "Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the list.\n" } }, "type": "object" } }, "random:index/randomString:RandomString": { - "description": "The resource `random.RandomString` generates a random permutation of alphanumeric\ncharacters and optionally special characters.\n\nThis resource *does* use a cryptographic random number generator.\n\nHistorically this resource's intended usage has been ambiguous as the original example\nused it in a password. For backwards compatibility it will\ncontinue to exist. For unique ids please use random_id, for sensitive\nrandom values please use random_password.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as random from \"@pulumi/random\";\n\nconst random = new random.RandomString(\"random\", {\n length: 16,\n overrideSpecial: `/@£$`,\n special: true,\n});\n```\n```python\nimport pulumi\nimport pulumi_random as random\n\nrandom = random.RandomString(\"random\",\n length=16,\n override_special=\"/@£$\",\n special=True)\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Random = Pulumi.Random;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var random = new Random.RandomString(\"random\", new()\n {\n Length = 16,\n OverrideSpecial = \"/@£$\",\n Special = true,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-random/sdk/v4/go/random\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := random.NewRandomString(ctx, \"random\", \u0026random.RandomStringArgs{\n\t\t\tLength: pulumi.Int(16),\n\t\t\tOverrideSpecial: pulumi.String(fmt.Sprintf(\"/@£$\")),\n\t\t\tSpecial: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.random.RandomString;\nimport com.pulumi.random.RandomStringArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var random = new RandomString(\"random\", RandomStringArgs.builder() \n .length(16)\n .overrideSpecial(\"/@£$\")\n .special(true)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n random:\n type: random:RandomString\n properties:\n length: 16\n overrideSpecial: /@£$\n special: true\n```\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\nStrings can be imported by just specifying the value of the string\n\n```sh\n $ pulumi import random:index/randomString:RandomString test test\n```\n\n ", + "description": "The resource `random.RandomString` generates a random permutation of alphanumeric characters and optionally special characters.\n\nThis resource *does* use a cryptographic random number generator.\n\nHistorically this resource's intended usage has been ambiguous as the original example used it in a password. For backwards compatibility it will continue to exist. For unique ids please use random_id, for sensitive random values please use random_password.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as random from \"@pulumi/random\";\n\nconst random = new random.RandomString(\"random\", {\n length: 16,\n overrideSpecial: `/@£$`,\n special: true,\n});\n```\n```python\nimport pulumi\nimport pulumi_random as random\n\nrandom = random.RandomString(\"random\",\n length=16,\n override_special=\"/@£$\",\n special=True)\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Random = Pulumi.Random;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var random = new Random.RandomString(\"random\", new()\n {\n Length = 16,\n OverrideSpecial = \"/@£$\",\n Special = true,\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/pulumi/pulumi-random/sdk/v4/go/random\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := random.NewRandomString(ctx, \"random\", \u0026random.RandomStringArgs{\n\t\t\tLength: pulumi.Int(16),\n\t\t\tOverrideSpecial: pulumi.String(fmt.Sprintf(\"/@£$\")),\n\t\t\tSpecial: pulumi.Bool(true),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.random.RandomString;\nimport com.pulumi.random.RandomStringArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var random = new RandomString(\"random\", RandomStringArgs.builder() \n .length(16)\n .overrideSpecial(\"/@£$\")\n .special(true)\n .build());\n\n }\n}\n```\n```yaml\nresources:\n random:\n type: random:RandomString\n properties:\n length: 16\n overrideSpecial: /@£$\n special: true\n```\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\n### Avoiding Replacement\n\n```sh\n $ pulumi import random:index/randomString:RandomString If the resource were imported using `random_string.test test`,\n```\n\n replacement can be avoided by using1. Attribute values that match the imported ID and defaults:\n\n\n\n terraform\n\n\n\n resource \"random_string\" \"test\" {\n\n\n\n\n\n length = 4\n\n\n\n\n\n lower\n\n= true\n\n\n\n } 2. Attribute values that match the imported ID and omit the attributes with defaults:\n\n\n\n terraform\n\n\n\n resource \"random_string\" \"test\" {\n\n\n\n\n\n length = 4\n\n\n\n } 3. `ignore_changes` specifying the attributes to ignore:\n\n\n\n terraform\n\n\n\n resource \"random_string\" \"test\" {\n\n\n\n\n\n length = 16\n\n\n\n\n\n lower\n\n= false\n\n\n\n\n\n lifecycle {\n\n\n\n\n\n\n\n ignore_changes = [\n\n\n\n\n\n\n\n\n\n length,\n\n\n\n\n\n\n\n\n\n lower,\n\n\n\n\n\n\n\n ]\n\n\n\n\n\n }\n\n\n\n }\n\n\n\n **NOTE** `ignore_changes` is only required until the resource is recreated after import,\n\n\n\n after which it will use the configuration values specified. ", "properties": { "keepers": { "type": "object", "additionalProperties": { - "$ref": "pulumi.json#/Any" + "type": "string" }, - "description": "Arbitrary map of values that, when changed, will\ntrigger a new id to be generated. See\nthe main provider documentation for more information.\n" + "description": "Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information.\n" }, "length": { "type": "integer", - "description": "The length of the string desired\n" + "description": "The length of the string desired. The minimum value for length is 1 and, length must also be \u003e= (`min_upper` + `min_lower` + `min_numeric` + `min_special`).\n" }, "lower": { "type": "boolean", - "description": "(default true) Include lowercase alphabet characters\nin random string.\n" + "description": "Include lowercase alphabet characters in the result. Default value is `true`.\n" }, "minLower": { "type": "integer", - "description": "(default 0) Minimum number of lowercase alphabet\ncharacters in random string.\n" + "description": "Minimum number of lowercase alphabet characters in the result. Default value is `0`.\n" }, "minNumeric": { "type": "integer", - "description": "(default 0) Minimum number of numeric characters\nin random string.\n" + "description": "Minimum number of numeric characters in the result. Default value is `0`.\n" }, "minSpecial": { "type": "integer", - "description": "(default 0) Minimum number of special characters\nin random string.\n" + "description": "Minimum number of special characters in the result. Default value is `0`.\n" }, "minUpper": { "type": "integer", - "description": "(default 0) Minimum number of uppercase alphabet\ncharacters in random string.\n" + "description": "Minimum number of uppercase alphabet characters in the result. Default value is `0`.\n" }, "number": { "type": "boolean", - "description": "(default true) Include numeric characters in random\nstring.\n" + "description": "Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead.\n", + "deprecationMessage": "**NOTE**: This is deprecated, use `numeric` instead." + }, + "numeric": { + "type": "boolean", + "description": "Include numeric characters in the result. Default value is `true`.\n" }, "overrideSpecial": { "type": "string", - "description": "Supply your own list of special characters to\nuse for string generation. This overrides the default character list in the special\nargument. The special argument must still be set to true for any overwritten\ncharacters to be used in generation.\n" + "description": "Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation.\n" }, "result": { "type": "string", - "description": "Random string generated.\n" + "description": "The generated random string.\n" }, "special": { "type": "boolean", - "description": "(default true) Include special characters in random\nstring. These are `!@#$%\u0026*()-_=+[]{}\u003c\u003e:?`\n" + "description": "Include special characters in the result. These are `!@#$%\u0026*()-_=+[]{}\u003c\u003e:?`. Default value is `true`.\n" }, "upper": { "type": "boolean", - "description": "(default true) Include uppercase alphabet characters\nin random string.\n" + "description": "Include uppercase alphabet characters in the result. Default value is `true`.\n" } }, "required": [ "length", - "result" + "lower", + "minLower", + "minNumeric", + "minSpecial", + "minUpper", + "number", + "numeric", + "result", + "special", + "upper" ], "inputProperties": { "keepers": { "type": "object", "additionalProperties": { - "$ref": "pulumi.json#/Any" + "type": "string" }, - "description": "Arbitrary map of values that, when changed, will\ntrigger a new id to be generated. See\nthe main provider documentation for more information.\n", - "willReplaceOnChanges": true + "description": "Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information.\n" }, "length": { "type": "integer", - "description": "The length of the string desired\n", - "willReplaceOnChanges": true + "description": "The length of the string desired. The minimum value for length is 1 and, length must also be \u003e= (`min_upper` + `min_lower` + `min_numeric` + `min_special`).\n" }, "lower": { "type": "boolean", - "description": "(default true) Include lowercase alphabet characters\nin random string.\n", - "willReplaceOnChanges": true + "description": "Include lowercase alphabet characters in the result. Default value is `true`.\n" }, "minLower": { "type": "integer", - "description": "(default 0) Minimum number of lowercase alphabet\ncharacters in random string.\n", - "willReplaceOnChanges": true + "description": "Minimum number of lowercase alphabet characters in the result. Default value is `0`.\n" }, "minNumeric": { "type": "integer", - "description": "(default 0) Minimum number of numeric characters\nin random string.\n", - "willReplaceOnChanges": true + "description": "Minimum number of numeric characters in the result. Default value is `0`.\n" }, "minSpecial": { "type": "integer", - "description": "(default 0) Minimum number of special characters\nin random string.\n", - "willReplaceOnChanges": true + "description": "Minimum number of special characters in the result. Default value is `0`.\n" }, "minUpper": { "type": "integer", - "description": "(default 0) Minimum number of uppercase alphabet\ncharacters in random string.\n", - "willReplaceOnChanges": true + "description": "Minimum number of uppercase alphabet characters in the result. Default value is `0`.\n" }, "number": { "type": "boolean", - "description": "(default true) Include numeric characters in random\nstring.\n", - "willReplaceOnChanges": true + "description": "Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead.\n", + "deprecationMessage": "**NOTE**: This is deprecated, use `numeric` instead." + }, + "numeric": { + "type": "boolean", + "description": "Include numeric characters in the result. Default value is `true`.\n" }, "overrideSpecial": { "type": "string", - "description": "Supply your own list of special characters to\nuse for string generation. This overrides the default character list in the special\nargument. The special argument must still be set to true for any overwritten\ncharacters to be used in generation.\n", - "willReplaceOnChanges": true + "description": "Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation.\n" }, "special": { "type": "boolean", - "description": "(default true) Include special characters in random\nstring. These are `!@#$%\u0026*()-_=+[]{}\u003c\u003e:?`\n", - "willReplaceOnChanges": true + "description": "Include special characters in the result. These are `!@#$%\u0026*()-_=+[]{}\u003c\u003e:?`. Default value is `true`.\n" }, "upper": { "type": "boolean", - "description": "(default true) Include uppercase alphabet characters\nin random string.\n", - "willReplaceOnChanges": true + "description": "Include uppercase alphabet characters in the result. Default value is `true`.\n" } }, "requiredInputs": [ @@ -762,78 +757,72 @@ "keepers": { "type": "object", "additionalProperties": { - "$ref": "pulumi.json#/Any" + "type": "string" }, - "description": "Arbitrary map of values that, when changed, will\ntrigger a new id to be generated. See\nthe main provider documentation for more information.\n", - "willReplaceOnChanges": true + "description": "Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information.\n" }, "length": { "type": "integer", - "description": "The length of the string desired\n", - "willReplaceOnChanges": true + "description": "The length of the string desired. The minimum value for length is 1 and, length must also be \u003e= (`min_upper` + `min_lower` + `min_numeric` + `min_special`).\n" }, "lower": { "type": "boolean", - "description": "(default true) Include lowercase alphabet characters\nin random string.\n", - "willReplaceOnChanges": true + "description": "Include lowercase alphabet characters in the result. Default value is `true`.\n" }, "minLower": { "type": "integer", - "description": "(default 0) Minimum number of lowercase alphabet\ncharacters in random string.\n", - "willReplaceOnChanges": true + "description": "Minimum number of lowercase alphabet characters in the result. Default value is `0`.\n" }, "minNumeric": { "type": "integer", - "description": "(default 0) Minimum number of numeric characters\nin random string.\n", - "willReplaceOnChanges": true + "description": "Minimum number of numeric characters in the result. Default value is `0`.\n" }, "minSpecial": { "type": "integer", - "description": "(default 0) Minimum number of special characters\nin random string.\n", - "willReplaceOnChanges": true + "description": "Minimum number of special characters in the result. Default value is `0`.\n" }, "minUpper": { "type": "integer", - "description": "(default 0) Minimum number of uppercase alphabet\ncharacters in random string.\n", - "willReplaceOnChanges": true + "description": "Minimum number of uppercase alphabet characters in the result. Default value is `0`.\n" }, "number": { "type": "boolean", - "description": "(default true) Include numeric characters in random\nstring.\n", - "willReplaceOnChanges": true + "description": "Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead.\n", + "deprecationMessage": "**NOTE**: This is deprecated, use `numeric` instead." + }, + "numeric": { + "type": "boolean", + "description": "Include numeric characters in the result. Default value is `true`.\n" }, "overrideSpecial": { "type": "string", - "description": "Supply your own list of special characters to\nuse for string generation. This overrides the default character list in the special\nargument. The special argument must still be set to true for any overwritten\ncharacters to be used in generation.\n", - "willReplaceOnChanges": true + "description": "Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation.\n" }, "result": { "type": "string", - "description": "Random string generated.\n" + "description": "The generated random string.\n" }, "special": { "type": "boolean", - "description": "(default true) Include special characters in random\nstring. These are `!@#$%\u0026*()-_=+[]{}\u003c\u003e:?`\n", - "willReplaceOnChanges": true + "description": "Include special characters in the result. These are `!@#$%\u0026*()-_=+[]{}\u003c\u003e:?`. Default value is `true`.\n" }, "upper": { "type": "boolean", - "description": "(default true) Include uppercase alphabet characters\nin random string.\n", - "willReplaceOnChanges": true + "description": "Include uppercase alphabet characters in the result. Default value is `true`.\n" } }, "type": "object" } }, "random:index/randomUuid:RandomUuid": { - "description": "The resource `random.RandomUuid` generates random uuid string that is intended to be\nused as unique identifiers for other resources.\n\nThis resource uses the `hashicorp/go-uuid` to generate a UUID-formatted string\nfor use with services needed a unique string identifier.\n\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n\nThe following example shows how to generate a unique name for an Azure Resource Group.\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure from \"@pulumi/azure\";\nimport * as random from \"@pulumi/random\";\n\nconst testRandomUuid = new random.RandomUuid(\"testRandomUuid\", {});\nconst testResourceGroup = new azure.core.ResourceGroup(\"testResourceGroup\", {location: \"Central US\"});\n```\n```python\nimport pulumi\nimport pulumi_azure as azure\nimport pulumi_random as random\n\ntest_random_uuid = random.RandomUuid(\"testRandomUuid\")\ntest_resource_group = azure.core.ResourceGroup(\"testResourceGroup\", location=\"Central US\")\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Azure = Pulumi.Azure;\nusing Random = Pulumi.Random;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var testRandomUuid = new Random.RandomUuid(\"testRandomUuid\");\n\n var testResourceGroup = new Azure.Core.ResourceGroup(\"testResourceGroup\", new()\n {\n Location = \"Central US\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core\"\n\t\"github.com/pulumi/pulumi-random/sdk/v4/go/random\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := random.NewRandomUuid(ctx, \"testRandomUuid\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = core.NewResourceGroup(ctx, \"testResourceGroup\", \u0026core.ResourceGroupArgs{\n\t\t\tLocation: pulumi.String(\"Central US\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.random.RandomUuid;\nimport com.pulumi.azure.core.ResourceGroup;\nimport com.pulumi.azure.core.ResourceGroupArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var testRandomUuid = new RandomUuid(\"testRandomUuid\");\n\n var testResourceGroup = new ResourceGroup(\"testResourceGroup\", ResourceGroupArgs.builder() \n .location(\"Central US\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n testRandomUuid:\n type: random:RandomUuid\n testResourceGroup:\n type: azure:core:ResourceGroup\n properties:\n location: Central US\n```\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\nRandom 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. Example\n\n```sh\n $ pulumi import random:index/randomUuid:RandomUuid main aabbccdd-eeff-0011-2233-445566778899\n```\n\n ", + "description": "The resource `random.RandomUuid` generates random uuid string that is intended to be used as unique identifiers for other resources.\n\nThis resource uses [hashicorp/go-uuid](https://github.com/hashicorp/go-uuid) to generate a UUID-formatted string for use with services needed a unique string identifier.\n\n{{% examples %}}\n## Example Usage\n{{% example %}}\n\n```typescript\nimport * as pulumi from \"@pulumi/pulumi\";\nimport * as azure from \"@pulumi/azure\";\nimport * as random from \"@pulumi/random\";\n\nconst testRandomUuid = new random.RandomUuid(\"testRandomUuid\", {});\nconst testResourceGroup = new azure.core.ResourceGroup(\"testResourceGroup\", {location: \"Central US\"});\n```\n```python\nimport pulumi\nimport pulumi_azure as azure\nimport pulumi_random as random\n\ntest_random_uuid = random.RandomUuid(\"testRandomUuid\")\ntest_resource_group = azure.core.ResourceGroup(\"testResourceGroup\", location=\"Central US\")\n```\n```csharp\nusing System.Collections.Generic;\nusing Pulumi;\nusing Azure = Pulumi.Azure;\nusing Random = Pulumi.Random;\n\nreturn await Deployment.RunAsync(() =\u003e \n{\n var testRandomUuid = new Random.RandomUuid(\"testRandomUuid\");\n\n var testResourceGroup = new Azure.Core.ResourceGroup(\"testResourceGroup\", new()\n {\n Location = \"Central US\",\n });\n\n});\n```\n```go\npackage main\n\nimport (\n\t\"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core\"\n\t\"github.com/pulumi/pulumi-random/sdk/v4/go/random\"\n\t\"github.com/pulumi/pulumi/sdk/v3/go/pulumi\"\n)\n\nfunc main() {\n\tpulumi.Run(func(ctx *pulumi.Context) error {\n\t\t_, err := random.NewRandomUuid(ctx, \"testRandomUuid\", nil)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = core.NewResourceGroup(ctx, \"testResourceGroup\", \u0026core.ResourceGroupArgs{\n\t\t\tLocation: pulumi.String(\"Central US\"),\n\t\t})\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t})\n}\n```\n```java\npackage generated_program;\n\nimport com.pulumi.Context;\nimport com.pulumi.Pulumi;\nimport com.pulumi.core.Output;\nimport com.pulumi.random.RandomUuid;\nimport com.pulumi.azure.core.ResourceGroup;\nimport com.pulumi.azure.core.ResourceGroupArgs;\nimport java.util.List;\nimport java.util.ArrayList;\nimport java.util.Map;\nimport java.io.File;\nimport java.nio.file.Files;\nimport java.nio.file.Paths;\n\npublic class App {\n public static void main(String[] args) {\n Pulumi.run(App::stack);\n }\n\n public static void stack(Context ctx) {\n var testRandomUuid = new RandomUuid(\"testRandomUuid\");\n\n var testResourceGroup = new ResourceGroup(\"testResourceGroup\", ResourceGroupArgs.builder() \n .location(\"Central US\")\n .build());\n\n }\n}\n```\n```yaml\nresources:\n testRandomUuid:\n type: random:RandomUuid\n testResourceGroup:\n type: azure:core:ResourceGroup\n properties:\n location: Central US\n```\n{{% /example %}}\n{{% /examples %}}\n\n## Import\n\nRandom 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.\n\n```sh\n $ pulumi import random:index/randomUuid:RandomUuid main aabbccdd-eeff-0011-2233-445566778899\n```\n\n ", "properties": { "keepers": { "type": "object", "additionalProperties": { - "$ref": "pulumi.json#/Any" + "type": "string" }, - "description": "Arbitrary map of values that, when changed, will\ntrigger a new uuid to be generated. See\nthe main provider documentation for more information.\n" + "description": "Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information.\n" }, "result": { "type": "string", @@ -847,10 +836,9 @@ "keepers": { "type": "object", "additionalProperties": { - "$ref": "pulumi.json#/Any" + "type": "string" }, - "description": "Arbitrary map of values that, when changed, will\ntrigger a new uuid to be generated. See\nthe main provider documentation for more information.\n", - "willReplaceOnChanges": true + "description": "Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information.\n" } }, "stateInputs": { @@ -859,10 +847,9 @@ "keepers": { "type": "object", "additionalProperties": { - "$ref": "pulumi.json#/Any" + "type": "string" }, - "description": "Arbitrary map of values that, when changed, will\ntrigger a new uuid to be generated. See\nthe main provider documentation for more information.\n", - "willReplaceOnChanges": true + "description": "Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information.\n" }, "result": { "type": "string", diff --git a/provider/cmd/pulumi-tfgen-random/main.go b/provider/cmd/pulumi-tfgen-random/main.go index 2e5c88a02d..3a6d6ba4bc 100644 --- a/provider/cmd/pulumi-tfgen-random/main.go +++ b/provider/cmd/pulumi-tfgen-random/main.go @@ -15,11 +15,11 @@ package main import ( + "github.com/pulumi/pulumi-terraform-bridge/pf/tfgen" + random "github.com/pulumi/pulumi-random/provider/v4" - "github.com/pulumi/pulumi-random/provider/v4/pkg/version" - "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfgen" ) func main() { - tfgen.Main("random", version.Version, random.Provider()) + tfgen.Main("random", random.Provider()) } diff --git a/provider/go.mod b/provider/go.mod index f2734e387e..08820dbfad 100644 --- a/provider/go.mod +++ b/provider/go.mod @@ -3,14 +3,14 @@ module github.com/pulumi/pulumi-random/provider/v4 go 1.19 require ( - github.com/pulumi/pulumi-terraform-bridge/v3 v3.39.3 + github.com/pulumi/pulumi-terraform-bridge/pf v0.1.1-0.20230207204608-6dbd650bf8bb + github.com/pulumi/pulumi-terraform-bridge/v3 v3.38.1-0.20230120143314-6ffb2faf051e github.com/pulumi/pulumi/sdk/v3 v3.53.1 github.com/terraform-providers/terraform-provider-random/shim v0.0.0 ) replace ( - github.com/hashicorp/terraform-plugin-sdk/v2 => github.com/pulumi/terraform-plugin-sdk/v2 v2.0.0-20220725190814-23001ad6ec03 - github.com/terraform-providers/terraform-provider-random => github.com/pulumi/terraform-provider-random v1.3.2-0.20210112153945-304bbf724bde + github.com/terraform-providers/terraform-provider-random => github.com/terraform-providers/terraform-provider-random v1.3.2-0.20230117062402-cab81572f740 github.com/terraform-providers/terraform-provider-random/shim => ./shim ) @@ -40,7 +40,7 @@ require ( github.com/AzureAD/microsoft-authentication-library-for-go v0.4.0 // indirect github.com/Masterminds/goutils v1.1.1 // indirect github.com/Masterminds/semver/v3 v3.1.1 // indirect - github.com/Masterminds/sprig/v3 v3.2.0 // indirect + github.com/Masterminds/sprig/v3 v3.2.2 // indirect github.com/Microsoft/go-winio v0.5.2 // indirect github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7 // indirect github.com/acomagu/bufpipe v1.0.3 // indirect @@ -112,7 +112,7 @@ require ( github.com/hashicorp/go-hclog v1.2.2 // indirect github.com/hashicorp/go-immutable-radix v1.3.1 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect - github.com/hashicorp/go-plugin v1.4.5 // indirect + github.com/hashicorp/go-plugin v1.4.8 // indirect github.com/hashicorp/go-retryablehttp v0.7.1 // indirect github.com/hashicorp/go-rootcerts v1.0.2 // indirect github.com/hashicorp/go-safetemp v1.0.0 // indirect @@ -126,10 +126,11 @@ require ( github.com/hashicorp/hcl v1.0.0 // indirect github.com/hashicorp/hcl/v2 v2.15.0 // indirect github.com/hashicorp/hil v0.0.0-20190212132231-97b3a9cdfa93 // indirect - github.com/hashicorp/logutils v1.0.0 // indirect - github.com/hashicorp/terraform-plugin-go v0.14.0 // indirect + github.com/hashicorp/terraform-plugin-framework v1.1.1 // indirect + github.com/hashicorp/terraform-plugin-framework-validators v0.9.0 // indirect + github.com/hashicorp/terraform-plugin-go v0.14.3 // indirect github.com/hashicorp/terraform-plugin-log v0.7.0 // indirect - github.com/hashicorp/terraform-plugin-sdk/v2 v2.19.0 // indirect + github.com/hashicorp/terraform-registry-address v0.1.0 // indirect github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 // indirect github.com/hashicorp/vault/api v1.8.2 // indirect github.com/hashicorp/vault/sdk v0.6.1 // indirect @@ -137,7 +138,7 @@ require ( github.com/huandu/xstrings v1.3.2 // indirect github.com/iancoleman/strcase v0.2.0 // indirect github.com/ijc/Gotty v0.0.0-20170406111628-a8b993ba6abd // indirect - github.com/imdario/mergo v0.3.12 // indirect + github.com/imdario/mergo v0.3.13 // indirect github.com/inconshreveable/mousetrap v1.0.1 // indirect github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect github.com/jmespath/go-jmespath v0.4.0 // indirect @@ -150,7 +151,7 @@ require ( github.com/mattn/go-isatty v0.0.14 // indirect github.com/mattn/go-runewidth v0.0.13 // indirect github.com/mgutz/ansi v0.0.0-20170206155736-9520e82c474b // indirect - github.com/mitchellh/cli v1.1.3 // indirect + github.com/mitchellh/cli v1.1.4 // indirect github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/go-ps v1.0.0 // indirect @@ -177,7 +178,6 @@ require ( github.com/pulumi/pulumi-yaml v1.0.4 // indirect github.com/pulumi/pulumi/pkg/v3 v3.53.1 // indirect github.com/pulumi/schema-tools v0.1.0 // indirect - github.com/pulumi/terraform-diff-reader v0.0.0-20201211191010-ad4715e9285e // indirect github.com/rivo/uniseg v0.2.0 // indirect github.com/rogpeppe/go-internal v1.9.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect @@ -187,21 +187,20 @@ require ( github.com/segmentio/asm v1.1.3 // indirect github.com/segmentio/encoding v0.3.5 // indirect github.com/sergi/go-diff v1.2.0 // indirect - github.com/shopspring/decimal v1.2.0 // indirect + github.com/shopspring/decimal v1.3.1 // indirect github.com/spf13/afero v1.6.0 // indirect - github.com/spf13/cast v1.4.1 // indirect + github.com/spf13/cast v1.5.0 // indirect github.com/spf13/cobra v1.6.1 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/stretchr/testify v1.8.1 // indirect - github.com/terraform-providers/terraform-provider-random v1.3.2-0.20210112153945-304bbf724bde // indirect + github.com/terraform-providers/terraform-provider-random v1.3.2-0.20230207192255-f3a69cbc0904 // indirect github.com/texttheater/golang-levenshtein v1.0.1 // indirect github.com/tweekmonster/luser v0.0.0-20161003172636-3fa38070dbd7 // indirect github.com/uber/jaeger-client-go v2.30.0+incompatible // indirect github.com/uber/jaeger-lib v2.4.1+incompatible // indirect github.com/ulikunitz/xz v0.5.8 // indirect - github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect github.com/vmihailenco/msgpack/v4 v4.3.12 // indirect - github.com/vmihailenco/tagparser v0.1.1 // indirect + github.com/vmihailenco/tagparser v0.1.2 // indirect github.com/xanzy/ssh-agent v0.3.2 // indirect github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f // indirect github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect diff --git a/provider/go.sum b/provider/go.sum index 66a5f0a08c..7683caba39 100644 --- a/provider/go.sum +++ b/provider/go.sum @@ -161,8 +161,9 @@ github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJ github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU= github.com/Masterminds/semver/v3 v3.1.1 h1:hLg3sBzpNErnxhQtUy/mmLR2I9foDujNK030IGemrRc= github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs= -github.com/Masterminds/sprig/v3 v3.2.0 h1:P1ekkbuU73Ui/wS0nK1HOM37hh4xdfZo485UPf8rc+Y= github.com/Masterminds/sprig/v3 v3.2.0/go.mod h1:tWhwTbUTndesPNeF0C900vKoq283u6zp4APT9vaF3SI= +github.com/Masterminds/sprig/v3 v3.2.2 h1:17jRggJu518dr3QaafizSXOjKYp94wKfABxUmyxvxX8= +github.com/Masterminds/sprig/v3 v3.2.2/go.mod h1:UoaO7Yp8KlPnJIYWTFkMaqPUYKTfGFPhxNuwnnxkKlk= github.com/Microsoft/go-winio v0.4.11/go.mod h1:VhR8bwka0BXejwEJY73c50VrPtXAaKcyvVC4A4RozmA= github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA= github.com/Microsoft/go-winio v0.4.15-0.20190919025122-fc70bd9a86b5/go.mod h1:tTuCMEN+UleMWgg9dVx4Hu52b1bJo+59jBh3ajtinzw= @@ -207,11 +208,8 @@ github.com/acomagu/bufpipe v1.0.3/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da h1:KjTM2ks9d14ZYCvmHS9iAKVt9AyzRSqNU1qabPih5BY= github.com/aead/chacha20 v0.0.0-20180709150244-8b13a72661da/go.mod h1:eHEWzANqSiWQsof+nXEI9bUVUyV6F53Fp89EuCh2EAA= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= -github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= -github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/agext/levenshtein v1.2.3 h1:YB2fHEn0UJagG8T1rrWknE3ZQzWM06O8AMAatNn7lmo= github.com/agext/levenshtein v1.2.3/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= -github.com/agl/ed25519 v0.0.0-20170116200512-5312a6153412/go.mod h1:WPjqKcmVOxf0XSf3YxCJs6N6AOSrOx3obionmG7T0y0= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0= @@ -225,12 +223,8 @@ github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYU github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/apparentlymart/go-cidr v1.0.1/go.mod h1:EBcsNrHc3zQeuaeCeCtQruQm+n9/YjEn/vI25Lg7Gwc= github.com/apparentlymart/go-cidr v1.1.0 h1:2mAhrMoF+nhXqxTzSZMUzDHkLjmIHC+Zzn4tdgBZjnU= github.com/apparentlymart/go-cidr v1.1.0/go.mod h1:EBcsNrHc3zQeuaeCeCtQruQm+n9/YjEn/vI25Lg7Gwc= -github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM= -github.com/apparentlymart/go-dump v0.0.0-20190214190832-042adf3cf4a0 h1:MzVXffFUye+ZcSR6opIgz9Co7WcDx6ZcY+RjfFHoA0I= -github.com/apparentlymart/go-dump v0.0.0-20190214190832-042adf3cf4a0/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM= github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk= github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= @@ -255,7 +249,6 @@ github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQ github.com/aws/aws-sdk-go v1.15.11/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= github.com/aws/aws-sdk-go v1.15.27/go.mod h1:mFuSZ37Z9YOHbQEwBWztmVzqXrEkub65tZoCYDt7FT0= github.com/aws/aws-sdk-go v1.15.78/go.mod h1:E3/ieXAlvM0XWO57iftYVDLLvQ824smPP3ATZkfNZeM= -github.com/aws/aws-sdk-go v1.25.3/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.38.35/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go v1.43.11/go.mod h1:y4AeaBuwd2Lk+GepC1E9v0qOiTws0MIWAX4oIKwKHZo= @@ -556,7 +549,6 @@ github.com/docopt/docopt-go v0.0.0-20180111231733-ee0de3bc6815/go.mod h1:WwZ+bS3 github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= -github.com/dustinkirkland/golang-petname v0.0.0-20170105215008-242afa0b4f8a/go.mod h1:V+Qd57rJe8gd4eiGzZyg4h54VLHmYVVw54iMnlAMrF8= github.com/dustinkirkland/golang-petname v0.0.0-20191129215211-8e5a1ed0cff0 h1:90Ly+6UfUypEF6vvvW5rQIv9opIL8CbmW9FT20LDQoY= github.com/dustinkirkland/golang-petname v0.0.0-20191129215211-8e5a1ed0cff0/go.mod h1:V+Qd57rJe8gd4eiGzZyg4h54VLHmYVVw54iMnlAMrF8= github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs= @@ -608,8 +600,8 @@ github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVB github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.10.0/go.mod h1:ui7WezCLWMWxVWr1GETZY3smRy0G4KWq9vcPtJmFl7Y= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= -github.com/frankban/quicktest v1.13.0 h1:yNZif1OkDfNoDfb9zZa9aXIpejNR4F23Wely0c+Qdqk= github.com/frankban/quicktest v1.13.0/go.mod h1:qLE0fzW0VuyUAJgPU19zByoIr0HtCHN/r/VLSOOIySU= +github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= @@ -702,7 +694,6 @@ github.com/go-stack/stack v1.8.1/go.mod h1:dcoOX6HbPZSZptuspn9bctJ+N/CnF5gGygcUP github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= github.com/go-test/deep v1.0.2/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= -github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/gobuffalo/attrs v0.0.0-20190224210810-a9411de4debd/go.mod h1:4duuawTqi2wkkpB4ePgWMaai6/Kc6WEz83bhFwpHzj0= github.com/gobuffalo/depgen v0.0.0-20190329151759-d478694a28d3/go.mod h1:3STtPUQYuzV0gBVOY3vy6CfMm/ljR4pABfrTeHNLHUY= @@ -929,23 +920,19 @@ github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brv github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-checkpoint v0.5.0 h1:MFYpPZCnQqQTE18jFwSII6eUQrD/oxMFp3mlgcqk5mU= -github.com/hashicorp/go-checkpoint v0.5.0/go.mod h1:7nfLNL10NsxqO4iWuW6tWW0HjZuDrwkBuEQsVcpCOgg= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48= github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 h1:1/D3zfFHttUKaCaGKZ/dR2roBXv0vKbSCnssIldfQdI= github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320/go.mod h1:EiZBMaudVLy8fmjf9Npq1dq9RalhveqZG5w/yz3mHWs= -github.com/hashicorp/go-getter v1.4.0/go.mod h1:7qxyCd8rBfcShwsvxgIguu4KbS3l8bUCwg2Umn7RjeY= github.com/hashicorp/go-getter v1.6.1 h1:NASsgP4q6tL94WH6nJxKWj8As2H/2kop/bB1d8JMyRY= github.com/hashicorp/go-getter v1.6.1/go.mod h1:IZCrswsZPeWv9IkVnLElzRU/gz/QPi6pZHn4tv6vbwA= -github.com/hashicorp/go-hclog v0.0.0-20180709165350-ff2cf002a8dd/go.mod h1:9bjs9uLqI8l75knNv3lV1kA55veR+WUPSiKIWcQHudI= github.com/hashicorp/go-hclog v0.9.2/go.mod h1:5CU+agLiy3J7N7QjHK5d05KxGsuXiQLrjA0H7acj2lQ= github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v0.12.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v0.14.1/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-hclog v0.16.2/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= -github.com/hashicorp/go-hclog v1.2.1/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-hclog v1.2.2 h1:ihRI7YFwcZdiSD7SIenIhHfQH3OuDvWerAUBZbeQS3M= github.com/hashicorp/go-hclog v1.2.2/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= @@ -959,11 +946,10 @@ github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHh github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/go-plugin v1.0.1/go.mod h1:++UyYGoz3o5w9ZzAdZxtQKrWWP+iqPBn3cQptSMzBuY= github.com/hashicorp/go-plugin v1.4.3/go.mod h1:5fGEH17QVwTTcR0zV7yhDPLLmFX9YSZ38b18Udy6vYQ= github.com/hashicorp/go-plugin v1.4.4/go.mod h1:viDMjcLJuDui6pXb8U4HVfb8AamCWhHGUjr2IrTF67s= -github.com/hashicorp/go-plugin v1.4.5 h1:oTE/oQR4eghggRg8VY7PAz3dr++VwDNBGCcOfIvHpBo= -github.com/hashicorp/go-plugin v1.4.5/go.mod h1:viDMjcLJuDui6pXb8U4HVfb8AamCWhHGUjr2IrTF67s= +github.com/hashicorp/go-plugin v1.4.8 h1:CHGwpxYDOttQOY7HOWgETU9dyVjOXzniXDqJcYJE1zM= +github.com/hashicorp/go-plugin v1.4.8/go.mod h1:viDMjcLJuDui6pXb8U4HVfb8AamCWhHGUjr2IrTF67s= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-retryablehttp v0.6.6/go.mod h1:vAew36LZh98gCBJNLH42IQ1ER/9wtLZZ8meHqQvEYWY= github.com/hashicorp/go-retryablehttp v0.7.1 h1:sUiuQAnLlbvmExtFQs72iFW/HXeUn8Z1aJLQ4LJJbTQ= @@ -996,7 +982,6 @@ github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/C github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= github.com/hashicorp/go-version v1.1.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/go-version v1.5.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= github.com/hashicorp/go-version v1.6.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= github.com/hashicorp/go.net v0.0.1/go.mod h1:hjKkEWcCURg++eb33jQU7oqQcI9XDCnUzHA0oac0k90= @@ -1005,12 +990,8 @@ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc= github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= github.com/hashicorp/hc-install v0.4.0 h1:cZkRFr1WVa0Ty6x5fTvL1TuO1flul231rWkGH92oYYk= -github.com/hashicorp/hc-install v0.4.0/go.mod h1:5d155H8EC5ewegao9A4PUTMNPZaq+TbOzkJJZ4vrXeI= -github.com/hashicorp/hcl v0.0.0-20170504190234-a4b07c25de5f/go.mod h1:oZtUIOe8dh44I2q6ScRibXws4Ajl+d+nod3AaR9vL5w= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= -github.com/hashicorp/hcl/v2 v2.0.0/go.mod h1:oVVDG71tEinNGYCxinCYadcmKU9bglqW9pV3txagJ90= -github.com/hashicorp/hcl/v2 v2.13.0/go.mod h1:e4z5nxYlWNPdDSNYX+ph14EvWYMFm3eP0zIUqPc2jr0= github.com/hashicorp/hcl/v2 v2.15.0 h1:CPDXO6+uORPjKflkWCCwoWc9uRp+zSIPcCQ+BrxV7m8= github.com/hashicorp/hcl/v2 v2.15.0/go.mod h1:JRmR89jycNkrrqnMmvPDMd56n1rQJ2Q6KocSLCMCXng= github.com/hashicorp/hil v0.0.0-20190212132231-97b3a9cdfa93 h1:T1Q6ag9tCwun16AW+XK3tAql24P4uTGUMIn1/92WsQQ= @@ -1025,24 +1006,20 @@ github.com/hashicorp/memberlist v0.3.1/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOn github.com/hashicorp/nomad/api v0.0.0-20220629141207-c2428e1673ec/go.mod h1:jP79oXjopTyH6E8LF0CEMq67STgrlmBRIyijA0tuR5o= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4= -github.com/hashicorp/terraform-config-inspect v0.0.0-20191115094559-17f92b0546e8/go.mod h1:p+ivJws3dpqbp1iP84+npOyAmTTOLMgCzrXd3GSdn/A= -github.com/hashicorp/terraform-exec v0.17.2 h1:EU7i3Fh7vDUI9nNRdMATCEfnm9axzTnad8zszYZ73Go= -github.com/hashicorp/terraform-exec v0.17.2/go.mod h1:tuIbsL2l4MlwwIZx9HPM+LOV9vVyEfBYu2GsO1uH3/8= -github.com/hashicorp/terraform-json v0.4.0/go.mod h1:eAbqb4w0pSlRmdvl8fOyHAi/+8jnkVYN28gJkSJrLhU= +github.com/hashicorp/terraform-exec v0.17.3 h1:MX14Kvnka/oWGmIkyuyvL6POx25ZmKrjlaclkx3eErU= github.com/hashicorp/terraform-json v0.14.0 h1:sh9iZ1Y8IFJLx+xQiKHGud6/TSUCM0N8e17dKDpqV7s= -github.com/hashicorp/terraform-json v0.14.0/go.mod h1:5A9HIWPkk4e5aeeXIBbkcOvaZbIYnAIkEyqP2pNSckM= -github.com/hashicorp/terraform-plugin-go v0.12.0/go.mod h1:kwhmaWHNDvT1B3QiSJdAtrB/D4RaKSY/v3r2BuoWK4M= -github.com/hashicorp/terraform-plugin-go v0.14.0 h1:ttnSlS8bz3ZPYbMb84DpcPhY4F5DsQtcAS7cHo8uvP4= -github.com/hashicorp/terraform-plugin-go v0.14.0/go.mod h1:2nNCBeRLaenyQEi78xrGrs9hMbulveqG/zDMQSvVJTE= -github.com/hashicorp/terraform-plugin-log v0.6.0/go.mod h1:p4R1jWBXRTvL4odmEkFfDdhUjHf9zcs/BCoNHAc7IK4= +github.com/hashicorp/terraform-plugin-framework v1.1.1 h1:PbnEKHsIU8KTTzoztHQGgjZUWx7Kk8uGtpGMMc1p+oI= +github.com/hashicorp/terraform-plugin-framework v1.1.1/go.mod h1:DyZPxQA+4OKK5ELxFIIcqggcszqdWWUpTLPHAhS/tkY= +github.com/hashicorp/terraform-plugin-framework-validators v0.9.0 h1:LYz4bXh3t7bTEydXOmPDPupRRnA480B/9+jV8yZvxBA= +github.com/hashicorp/terraform-plugin-framework-validators v0.9.0/go.mod h1:+BVERsnfdlhYR2YkXMBtPnmn9UsL19U3qUtSZ+Y/5MY= +github.com/hashicorp/terraform-plugin-go v0.14.3 h1:nlnJ1GXKdMwsC8g1Nh05tK2wsC3+3BL/DBBxFEki+j0= +github.com/hashicorp/terraform-plugin-go v0.14.3/go.mod h1:7ees7DMZ263q8wQ6E4RdIdR6nHHJtrdt4ogX5lPkX1A= github.com/hashicorp/terraform-plugin-log v0.7.0 h1:SDxJUyT8TwN4l5b5/VkiTIaQgY6R+Y2BQ0sRZftGKQs= github.com/hashicorp/terraform-plugin-log v0.7.0/go.mod h1:p4R1jWBXRTvL4odmEkFfDdhUjHf9zcs/BCoNHAc7IK4= github.com/hashicorp/terraform-plugin-sdk v1.7.0 h1:B//oq0ZORG+EkVrIJy0uPGSonvmXqxSzXe8+GhknoW0= -github.com/hashicorp/terraform-plugin-sdk v1.7.0/go.mod h1:OjgQmey5VxnPej/buEhe+YqKm0KNvV3QqU4hkqHqPCY= -github.com/hashicorp/terraform-plugin-test v1.2.0/go.mod h1:QIJHYz8j+xJtdtLrFTlzQVC0ocr3rf/OjIpgZLK56Hs= -github.com/hashicorp/terraform-registry-address v0.0.0-20220623143253-7d51757b572c h1:D8aRO6+mTqHfLsK/BC3j5OAoogv1WLRWzY1AaTo3rBg= -github.com/hashicorp/terraform-registry-address v0.0.0-20220623143253-7d51757b572c/go.mod h1:Wn3Na71knbXc1G8Lh+yu/dQWWJeFQEpDeJMtWMtlmNI= -github.com/hashicorp/terraform-svchost v0.0.0-20191011084731-65d371908596/go.mod h1:kNDNcF7sN4DocDLBkQYz73HGKwN1ANB1blq4lIYLYvg= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.1 h1:zHcMbxY0+rFO9gY99elV/XC/UnQVg7FhRCbj1i5b7vM= +github.com/hashicorp/terraform-registry-address v0.1.0 h1:W6JkV9wbum+m516rCl5/NjKxCyTVaaUBbzYcMzBDO3U= +github.com/hashicorp/terraform-registry-address v0.1.0/go.mod h1:EnyO2jYO6j29DTHbJcm00E5nQTFeTtyZH3H5ycydQ5A= github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 h1:HKLsbzeOsfXmKNpr3GiT18XAblV0BjCbzL8KQAMZGa0= github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734/go.mod h1:kNDNcF7sN4DocDLBkQYz73HGKwN1ANB1blq4lIYLYvg= github.com/hashicorp/vault/api v1.7.2/go.mod h1:xbfA+1AvxFseDzxxdWaL0uO99n1+tndus4GCrtouy0M= @@ -1053,7 +1030,6 @@ github.com/hashicorp/vault/sdk v0.5.3/go.mod h1:DoGraE9kKGNcVgPmTuX357Fm6WAx1Okv github.com/hashicorp/vault/sdk v0.6.1 h1:sjZC1z4j5Rh2GXYbkxn5BLK05S1p7+MhW4AgdUmgRUA= github.com/hashicorp/vault/sdk v0.6.1/go.mod h1:Ck4JuAC6usTphfrrRJCRH+7/N7O2ozZzkm/fzQFt4uM= github.com/hashicorp/yamux v0.0.0-20180604194846-3520598351bb/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= -github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d/go.mod h1:+NfK9FKeTrX5uv1uIXGdwYDTeHna2qgaIlx54MXqjAM= github.com/hashicorp/yamux v0.1.1 h1:yrQxtgseBDrq9Y652vSRDvsKCJKOUD+GzTS4Y0Y8pvE= github.com/hashicorp/yamux v0.1.1/go.mod h1:CtWFDAQgb7dxtzFs4tWbplKIe2jSi3+5vKbgIO0SLnQ= github.com/hetznercloud/hcloud-go v1.33.1/go.mod h1:XX/TQub3ge0yWR2yHWmnDVIrB+MQbda1pHxkUmDlUME= @@ -1080,8 +1056,9 @@ github.com/imdario/mergo v0.3.5/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJ github.com/imdario/mergo v0.3.8/go.mod h1:2EnlNZ0deacrJVfApfmtdGgDfMuh/nq6Ok1EcJh5FfA= github.com/imdario/mergo v0.3.10/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= github.com/imdario/mergo v0.3.11/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= -github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU= github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA= +github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= +github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc= github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= @@ -1167,7 +1144,6 @@ github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51/go.mod h1:C github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= github.com/kevinburke/ssh_config v1.1.0 h1:pH/t1WS9NzT8go394IqZeJTMHVm6Cr6ZJ6AQ+mdNo/o= github.com/kevinburke/ssh_config v1.1.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= -github.com/keybase/go-crypto v0.0.0-20161004153544-93f5b35093ba/go.mod h1:ghbZscTyKdM07+Fw3KSi0hcJm+AlEUWj8QLlPtijN/M= github.com/kisielk/errcheck v1.1.0/go.mod h1:EZBBE59ingxPouuu3KfxchcWSUPOHkagtvWXihfKN4Q= github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= @@ -1267,9 +1243,8 @@ github.com/miekg/pkcs11 v1.0.3/go.mod h1:XsNlhZGX73bx86s2hdc/FuaLm2CPZJemRLMA+WT github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible/go.mod h1:8AuVvqP/mXw1px98n46wfvcGfQ4ci2FwoAjKYxuo3Z4= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= -github.com/mitchellh/cli v1.1.3 h1:xrX6lWnp1wgXZ65TGY2SB5URdQYcXu6VILdxDf5NttQ= -github.com/mitchellh/cli v1.1.3/go.mod h1:vTLESy5mRhKOs9KDp0/RATawxP1UqBmdrpVRMnpcvKQ= -github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw= +github.com/mitchellh/cli v1.1.4 h1:qj8czE26AU4PbiaPXK5uVmMSM+V5BYsFBiM9HhGRLUA= +github.com/mitchellh/cli v1.1.4/go.mod h1:vTLESy5mRhKOs9KDp0/RATawxP1UqBmdrpVRMnpcvKQ= github.com/mitchellh/copystructure v1.0.0/go.mod h1:SNtv71yrdKgLRyLFxmLdkAbkKEFWgYaq1OVrnRcwhnw= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= @@ -1282,7 +1257,6 @@ github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77/go. github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= -github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/go-wordwrap v1.0.1 h1:TLuKupo69TCn6TQSyGxwI1EblZZEsQ0vMlAFQflz0v0= github.com/mitchellh/go-wordwrap v1.0.1/go.mod h1:R62XHJLzvMFRBbcrT7m7WgmE1eOyTSsCt+hzestvNj0= @@ -1293,14 +1267,12 @@ github.com/mitchellh/iochan v1.0.0/go.mod h1:JwYml1nuB7xOzsp52dPpHFffvOCDupsG0Qu github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.3.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= -github.com/mitchellh/mapstructure v1.4.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.1/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.4.3/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/osext v0.0.0-20151018003038-5e2d6d41470f/go.mod h1:OkQIRizQZAeMln+1tSwduZz7+Af5oFlKirV/MSYes2A= github.com/mitchellh/reflectwalk v1.0.0/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/mitchellh/reflectwalk v1.0.1/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= github.com/moby/locker v1.0.1/go.mod h1:S7SDdo5zpBK84bzzVlKr2V0hz+7x9hWbYC/kq7oQppc= @@ -1345,8 +1317,6 @@ github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OS github.com/ncw/swift v1.0.47/go.mod h1:23YIA4yWVnGwv2dQlN4bB7egfYX6YLn0Yo/S6zZO/ZM= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= github.com/nightlyone/lockfile v1.0.0 h1:RHep2cFKK4PonZJDdEl4GmkabuhbsRMgk/k3uAmxBiA= -github.com/nsf/jsondiff v0.0.0-20200515183724-f29ed568f4ce h1:RPclfga2SEJmgMmz2k+Mg7cowZ8yv4Trqw9UsJby758= -github.com/nsf/jsondiff v0.0.0-20200515183724-f29ed568f4ce/go.mod h1:uFMI8w+ref4v2r9jz+c9i1IfIttS/OkmLfrk1jne5hs= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= @@ -1451,7 +1421,6 @@ github.com/pkg/term v1.1.0/go.mod h1:E25nymQcrSllhX42Ok8MRm1+hyBdHY0dCeiKZ9jpNGw github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= -github.com/posener/complete v1.2.1/go.mod h1:6gapUrK/U1TAN7ciCoNRIdVC5sbdBTUh1DKN0g6uH7E= github.com/posener/complete v1.2.3 h1:NP0eAhjcjImqslEwo/1hq7gpajME0fTLTezBKDqfXqo= github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/pquerna/cachecontrol v0.0.0-20171018203845-0dec1b30a021/go.mod h1:prYjPmNq4d1NPVmpShWobRqXY3q7Vp+80DqgxxUrUIA= @@ -1513,8 +1482,10 @@ github.com/prometheus/prometheus v0.37.0/go.mod h1:egARUgz+K93zwqsVIAneFlLZefyGO github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= github.com/pulumi/pulumi-java/pkg v0.7.1 h1:3tl36+I5BRYVXbq10mqDeh3X5kdJBaNDYiATOfEfgSY= github.com/pulumi/pulumi-java/pkg v0.7.1/go.mod h1:XdN2jYNlcQewr0MFecZfBnY3gnGcvV+WoPTzQqH48k4= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.39.3 h1:RWr0sNrurBOQhPmkeUS4E5+tEeAvFPhqjTBp07SSBJc= -github.com/pulumi/pulumi-terraform-bridge/v3 v3.39.3/go.mod h1:McH/PLanWyrObVQIPwwZAffK26hxNXQScjp6NyGibpo= +github.com/pulumi/pulumi-terraform-bridge/pf v0.1.1-0.20230207204608-6dbd650bf8bb h1:wfFdCd3g3mUr7bCGOAz0kKLsA01IyYt17x+Jup3xKoM= +github.com/pulumi/pulumi-terraform-bridge/pf v0.1.1-0.20230207204608-6dbd650bf8bb/go.mod h1:1z9JEISCnJUjLLAgc0rJG2yLk0IbiEgkwv076AUafYo= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.38.1-0.20230120143314-6ffb2faf051e h1:+FRdpUEigEWHwquSO9VPNOWDMpyODWg5ek3roDXGA+g= +github.com/pulumi/pulumi-terraform-bridge/v3 v3.38.1-0.20230120143314-6ffb2faf051e/go.mod h1:Lp+GVsSZUMeS7vtyCE1ytBxXDdsXWe4RxMaFTvL973s= github.com/pulumi/pulumi-yaml v1.0.4 h1:p+989rW3AqkkxbzxtxccHKAN4xCJi3K2cRpvA2K84tw= github.com/pulumi/pulumi-yaml v1.0.4/go.mod h1:Szj8ud4Vqyq3oO1n3kzIUfaP3AiCjYZM4FYjOVWwJn8= github.com/pulumi/pulumi/pkg/v3 v3.53.1 h1:NSgzjci0ykEoKC2BHmp/brP7/V8ARafl8ovr76B9Jak= @@ -1524,11 +1495,6 @@ github.com/pulumi/pulumi/sdk/v3 v3.53.1/go.mod h1:IYcBrkAwKEGRVq7R1ne3XJKB5bcux5 github.com/pulumi/schema-tools v0.1.0 h1:o1nVQaJEnmcA+3trxe+0sIDlrILxEIOvgUQ2Ze4OFsk= github.com/pulumi/schema-tools v0.1.0/go.mod h1:feL1siLWdcCNUm+irXoHyNHbGaqoX7pfYojpGZe2ziY= github.com/pulumi/terraform-diff-reader v0.0.0-20201211191010-ad4715e9285e h1:Dik4Qe/+xguB8JagPyXNlbOnRiXGmq/PSPQTGunYnTk= -github.com/pulumi/terraform-diff-reader v0.0.0-20201211191010-ad4715e9285e/go.mod h1:sZ9FUzGO+yM41hsQHs/yIcj/Y993qMdBxBU5mpDmAfQ= -github.com/pulumi/terraform-plugin-sdk/v2 v2.0.0-20220725190814-23001ad6ec03 h1:J06u+TRoOQ9C6JZlXNvmOE5Il4/WdXslx5bOUIRZtDI= -github.com/pulumi/terraform-plugin-sdk/v2 v2.0.0-20220725190814-23001ad6ec03/go.mod h1:/WYikYjhKB7c2j1HmXZhRsAARldRb4M38bLCLOhC3so= -github.com/pulumi/terraform-provider-random v1.3.2-0.20210112153945-304bbf724bde h1:Pa9KsFBVBXOcML2zbKRTSYVEO6uhW4NtxP3z9MW/1os= -github.com/pulumi/terraform-provider-random v1.3.2-0.20210112153945-304bbf724bde/go.mod h1:ocvAwgbZm0BWftNHUHAZZqM9h78vlNMlOlGLWxoC5Fw= github.com/rakyll/embedmd v0.0.0-20171029212350-c8060a0752a2/go.mod h1:7jOTMgqac46PZcF54q6l2hkLEG8op93fZu61KmxWDV4= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= @@ -1564,20 +1530,19 @@ github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9/go.mod h1:fCa7OJZ/9DRTnOKmxvT6 github.com/sclevine/agouti v3.0.0+incompatible/go.mod h1:b4WX9W9L1sfQKXeJf1mUTLZKJ48R1S7H23Ji7oFO5Bw= github.com/sclevine/spec v1.2.0/go.mod h1:W4J29eT/Kzv7/b9IWLB055Z+qvVC9vt0Arko24q7p+U= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= -github.com/sebdah/goldie v1.0.0/go.mod h1:jXP4hmWywNEwZzhMuv2ccnqTSFpuq8iyQhtQdkkZBH4= github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= github.com/seccomp/libseccomp-golang v0.9.2-0.20210429002308-3879420cc921/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= github.com/segmentio/asm v1.1.3 h1:WM03sfUOENvvKexOLp+pCqgb/WDjsi7EK8gIsICtzhc= github.com/segmentio/asm v1.1.3/go.mod h1:Ld3L4ZXGNcSLRg4JBsZ3//1+f/TjYl0Mzen/DQy1EJg= github.com/segmentio/encoding v0.3.5 h1:UZEiaZ55nlXGDL92scoVuw00RmiRCazIEmvPSbSvt8Y= github.com/segmentio/encoding v0.3.5/go.mod h1:n0JeuIqEQrQoPDGsjo8UNd1iA0U8d8+oHAA4E3G3OxM= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4= -github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ= github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= +github.com/shopspring/decimal v1.3.1 h1:2Usl1nmF/WZucqkFZhnfFYxxxu8LG21F6nPQBE5gKV8= +github.com/shopspring/decimal v1.3.1/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o= github.com/shurcooL/go-goon v0.0.0-20210110234559-7585751d9a17 h1:lRAUE0dIvigSSFAmaM2dfg7OH8T+a8zJ5smEh09a/GI= github.com/shurcooL/httpfs v0.0.0-20190707220628-8d4bc4ba7749/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= @@ -1605,8 +1570,8 @@ github.com/spf13/afero v1.6.0 h1:xoax2sJ2DT8S8xA2paPFjDCScCNeWsg75VG0DLRreiY= github.com/spf13/afero v1.6.0/go.mod h1:Ai8FlHk4v/PARR026UzYexafAt9roJ7LcLMAmO6Z93I= github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= github.com/spf13/cast v1.3.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= -github.com/spf13/cast v1.4.1 h1:s0hze+J0196ZfEMTs80N7UlFt0BDuQ7Q+JDnHiMWKdA= -github.com/spf13/cast v1.4.1/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE= +github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w= +github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU= github.com/spf13/cobra v0.0.2-0.20171109065643-2da4a54c5cee/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= github.com/spf13/cobra v1.0.0/go.mod h1:/6GTrnGXV9HjY+aR4k0oJ5tcvakLuG6EuKReYlHNrgE= @@ -1617,7 +1582,6 @@ github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb6 github.com/spf13/pflag v0.0.0-20170130214245-9ff6c6923cff/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1-0.20171106142849-4c012f6dcd95/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= @@ -1655,6 +1619,8 @@ github.com/syndtr/gocapability v0.0.0-20180916011248-d98352740cb2/go.mod h1:hkRG github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/tchap/go-patricia v2.2.6+incompatible/go.mod h1:bmLyhP68RS6kStMGxByiQ23RP/odRBOTVjwp2cDyi6I= github.com/tedsuo/ifrit v0.0.0-20180802180643-bea94bb476cc/go.mod h1:eyZnKCc955uh98WQvzOm0dgAeLnf2O0Rz0LPoC5ze+0= +github.com/terraform-providers/terraform-provider-random v1.3.2-0.20230117062402-cab81572f740 h1:0V9n7QPDx4qEdcRrvBOCDEL9pYNg/zizNnve3b768FU= +github.com/terraform-providers/terraform-provider-random v1.3.2-0.20230117062402-cab81572f740/go.mod h1:5APMWTc7IExtGAEIMvV26B2PzN+lwqEqqu2dWrk8fn4= github.com/texttheater/golang-levenshtein v1.0.1 h1:+cRNoVrfiwufQPhoMzB6N0Yf/Mqajr6t1lOv8GyGE2U= github.com/texttheater/golang-levenshtein v1.0.1/go.mod h1:PYAKrbF5sAiq9wd+H82hs7gNaen0CplQ9uvm6+enD/8= github.com/tidwall/pretty v1.0.0/go.mod h1:XNkn88O1ChpSDQmQeStsy+sBenx6DDtFZJxhVysOjyk= @@ -1672,7 +1638,6 @@ github.com/uber/jaeger-lib v2.4.1+incompatible/go.mod h1:ComeNDZlWwrWnDv8aPp0Ba6 github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc= github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw= github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY= -github.com/ulikunitz/xz v0.5.5/go.mod h1:2bypXElzHzzJZwzH67Y6wb67pO62Rzfn7BSiF4ABRW8= github.com/ulikunitz/xz v0.5.8 h1:ERv8V6GKqVi23rgu5cj9pVfVzJbOqAY2Ntl88O6c2nQ= github.com/ulikunitz/xz v0.5.8/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/urfave/cli v0.0.0-20171014202726-7bc6a0acffa5/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= @@ -1688,13 +1653,12 @@ github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17 github.com/vishvananda/netns v0.0.0-20200728191858-db3c7e526aae/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= github.com/vishvananda/netns v0.0.0-20210104183010-2eb08e3e575f/go.mod h1:DD4vA1DwXk04H54A1oHXtwZmA0grkVMdPxx/VGLCah0= github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= -github.com/vmihailenco/msgpack v4.0.1+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI= -github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmihailenco/msgpack/v4 v4.3.12 h1:07s4sz9IReOgdikxLTKNbBdqDMLsjPKXwvCazn8G65U= github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= -github.com/vmihailenco/tagparser v0.1.1 h1:quXMXlA39OCbd2wAdTsGDlK9RkOk6Wuw+x37wVyIuWY= github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= +github.com/vmihailenco/tagparser v0.1.2 h1:gnjoVuB/kljJ5wICEEOpx98oXMWPLj22G67Vbd1qPqc= +github.com/vmihailenco/tagparser v0.1.2/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= github.com/vultr/govultr/v2 v2.17.2/go.mod h1:ZFOKGWmgjytfyjeyAdhQlSWwTjh2ig+X49cAp50dzXI= github.com/willf/bitset v1.1.11-0.20200630133818-d5bec3311243/go.mod h1:RjeCKbqT1RxIR/KWY6phxZiaY1IyutSBfGjNPySAYV4= github.com/willf/bitset v1.1.11/go.mod h1:83CECat5yLh5zVOf4P1ErAgKA5UDvKtgyUABdr3+MjI= @@ -1724,17 +1688,10 @@ github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1 github.com/yvasiyarov/go-metrics v0.0.0-20140926110328-57bccd1ccd43/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs= github.com/yvasiyarov/gorelic v0.0.0-20141212073537-a9bba5b9ab50/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA= github.com/yvasiyarov/newrelic_platform_go v0.0.0-20140908184405-b21fdbd4370f/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg= -github.com/zclconf/go-cty v1.0.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= github.com/zclconf/go-cty v1.1.0/go.mod h1:xnAOWiHeOqg2nWS62VtQ7pbOu17FtxJNW8RLEih+O3s= -github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= -github.com/zclconf/go-cty v1.2.1/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= -github.com/zclconf/go-cty v1.8.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= -github.com/zclconf/go-cty v1.10.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= github.com/zclconf/go-cty v1.12.1 h1:PcupnljUm9EIvbgSHQnHhUr3fO6oFmkOrvs2BAFNXXY= github.com/zclconf/go-cty v1.12.1/go.mod h1:s9IfD1LK5ccNMSWCVFCE2rJfHiZgi7JijgeWIMfhLvA= -github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8= github.com/zclconf/go-cty-yaml v1.0.1 h1:up11wlgAaDvlAGENcFDnZgkn0qUJurso7k6EpURKNF8= -github.com/zclconf/go-cty-yaml v1.0.1/go.mod h1:IP3Ylp0wQpYm50IHK8OZWKMu6sPJIUgKa8XhiVHura0= github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= @@ -1842,7 +1799,6 @@ golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnf golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= golang.org/x/crypto v0.0.0-20190422162423-af44ce270edf/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE= -golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190530122614-20be4c3c3ed5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= @@ -1871,7 +1827,6 @@ golang.org/x/crypto v0.0.0-20211202192323-5770296d904e/go.mod h1:IxCIyHEi3zRg3s0 golang.org/x/crypto v0.0.0-20211215153901-e495a2d5b3d3/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220511200225-c6db032c6c88/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/crypto v0.0.0-20220517005047-85d78b3ac167/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220824171710-5757bc0c5503 h1:vJ2V3lFLg+bBhgroYuRfyN583UzVveQmIXjc8T/y3to= @@ -2047,7 +2002,6 @@ golang.org/x/sys v0.0.0-20181026203630-95b1ffbd15a5/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181107165924-66b7b1311ac8/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190129075346-302c3dd5f1cc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2056,7 +2010,6 @@ golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190419153524-e8e3143a4f4a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190514135907-3a4b5fb9f71f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190522044717-8097e1b27ff5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2070,7 +2023,6 @@ golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190801041406-cbf593c0f2f3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190804053845-51ab0e2deafa/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190812073006-9eafafc0a87e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -2279,7 +2231,6 @@ golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20200616133436-c1934b75d054/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= -golang.org/x/tools v0.0.0-20200713011307-fd294ab11aed/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= @@ -2406,7 +2357,6 @@ google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1m google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= google.golang.org/genproto v0.0.0-20200527145253-8367513e4ece/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= -google.golang.org/genproto v0.0.0-20200711021454-869866162049/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= @@ -2476,7 +2426,6 @@ google.golang.org/genproto v0.0.0-20220802133213-ce4fa296bf78 h1:QntLWYqZeuBtJkt google.golang.org/genproto v0.0.0-20220802133213-ce4fa296bf78/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc= google.golang.org/grpc v0.0.0-20160317175043-d3ddb4469d5a/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.8.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= -google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -2521,7 +2470,6 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.51.0 h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U= google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.2.0/go.mod h1:DNq5QpG7LJqD2AamLZ7zvKE0DEpVl2BSEVjFycAAjRY= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= @@ -2582,6 +2530,7 @@ gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C gopkg.in/yaml.v3 v3.0.0-20200605160147-a5ece683394c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= diff --git a/provider/resources.go b/provider/resources.go index 9cd5f214cd..b6e1f89834 100644 --- a/provider/resources.go +++ b/provider/resources.go @@ -1,4 +1,4 @@ -// Copyright 2016-2018, Pulumi Corporation. +// Copyright 2016-2023, Pulumi Corporation. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -19,10 +19,11 @@ import ( "path/filepath" "unicode" - "github.com/pulumi/pulumi-random/provider/v4/pkg/version" + pf "github.com/pulumi/pulumi-terraform-bridge/pf/tfbridge" "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfbridge" - shimv2 "github.com/pulumi/pulumi-terraform-bridge/v3/pkg/tfshim/sdk-v2" "github.com/pulumi/pulumi/sdk/v3/go/common/tokens" + + "github.com/pulumi/pulumi-random/provider/v4/pkg/version" "github.com/terraform-providers/terraform-provider-random/shim" ) @@ -50,15 +51,15 @@ func randomResource(mod string, res string) tokens.Type { } // Provider returns additional overlaid schema and metadata associated with the random package. -func Provider() tfbridge.ProviderInfo { - return tfbridge.ProviderInfo{ - P: shimv2.NewProvider(shim.NewProvider()), +func Provider() pf.ProviderInfo { + info := tfbridge.ProviderInfo{ Name: "random", Description: "A Pulumi package to safely use randomness in Pulumi programs.", Keywords: []string{"pulumi", "random"}, License: "Apache-2.0", Homepage: "https://pulumi.io", Repository: "https://github.com/pulumi/pulumi-random", + Version: version.Version, Resources: map[string]*tfbridge.ResourceInfo{ "random_id": {Tok: randomResource(randomMod, "RandomId")}, "random_password": {Tok: randomResource(randomMod, "RandomPassword")}, @@ -99,4 +100,8 @@ func Provider() tfbridge.ProviderInfo { }, }, } + return pf.ProviderInfo{ + ProviderInfo: info, + NewProvider: shim.NewProvider, + } } diff --git a/provider/shim/go.mod b/provider/shim/go.mod index 6c716f1cbc..e6e5dcac71 100644 --- a/provider/shim/go.mod +++ b/provider/shim/go.mod @@ -3,44 +3,27 @@ module github.com/terraform-providers/terraform-provider-random/shim go 1.19 require ( - github.com/hashicorp/terraform-plugin-sdk/v2 v2.17.0 - github.com/terraform-providers/terraform-provider-random v1.3.2-0.20210112153945-304bbf724bde + github.com/hashicorp/terraform-plugin-framework v1.1.1 + github.com/terraform-providers/terraform-provider-random v1.3.2-0.20230207192255-f3a69cbc0904 ) require ( - github.com/agext/levenshtein v1.2.2 // indirect - github.com/apparentlymart/go-textseg/v13 v13.0.0 // indirect github.com/dustinkirkland/golang-petname v0.0.0-20191129215211-8e5a1ed0cff0 // indirect github.com/fatih/color v1.13.0 // indirect github.com/golang/protobuf v1.5.2 // indirect - github.com/google/go-cmp v0.5.8 // indirect - github.com/hashicorp/errwrap v1.1.0 // indirect - github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 // indirect - github.com/hashicorp/go-hclog v1.2.0 // indirect - github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/go-hclog v1.2.1 // indirect github.com/hashicorp/go-uuid v1.0.3 // indirect - github.com/hashicorp/go-version v1.5.0 // indirect - github.com/hashicorp/hcl/v2 v2.12.0 // indirect - github.com/hashicorp/logutils v1.0.0 // indirect - github.com/hashicorp/terraform-plugin-go v0.9.1 // indirect - github.com/hashicorp/terraform-plugin-log v0.4.0 // indirect + github.com/hashicorp/terraform-plugin-framework-validators v0.9.0 // indirect + github.com/hashicorp/terraform-plugin-go v0.14.3 // indirect + github.com/hashicorp/terraform-plugin-log v0.7.0 // indirect github.com/mattn/go-colorable v0.1.12 // indirect github.com/mattn/go-isatty v0.0.14 // indirect - github.com/mitchellh/copystructure v1.2.0 // indirect github.com/mitchellh/go-testing-interface v1.14.1 // indirect - github.com/mitchellh/go-wordwrap v1.0.0 // indirect - github.com/mitchellh/mapstructure v1.5.0 // indirect - github.com/mitchellh/reflectwalk v1.0.2 // indirect - github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect github.com/vmihailenco/msgpack/v4 v4.3.12 // indirect - github.com/vmihailenco/tagparser v0.1.1 // indirect - github.com/zclconf/go-cty v1.10.0 // indirect - golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect - golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 // indirect - golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a // indirect - golang.org/x/text v0.3.7 // indirect - google.golang.org/appengine v1.6.6 // indirect - google.golang.org/protobuf v1.28.0 // indirect + github.com/vmihailenco/tagparser v0.1.2 // indirect + golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d // indirect + golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect + golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect + google.golang.org/appengine v1.6.7 // indirect + google.golang.org/protobuf v1.28.1 // indirect ) - -replace github.com/terraform-providers/terraform-provider-random => github.com/pulumi/terraform-provider-random v1.3.2-0.20220627122729-2ed10370a61b diff --git a/provider/shim/go.sum b/provider/shim/go.sum index 0d7df4ef20..e092733a72 100644 --- a/provider/shim/go.sum +++ b/provider/shim/go.sum @@ -1,150 +1,110 @@ -github.com/agext/levenshtein v1.2.1/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= github.com/agext/levenshtein v1.2.2 h1:0S/Yg6LYmFJ5stwQeRp6EeOcCbj7xiqQSdNelsXvaqE= -github.com/agext/levenshtein v1.2.2/go.mod h1:JEDfjyjHDjOF/1e4FlBE/PkbqA9OfWu2ki2W0IB5558= -github.com/apparentlymart/go-dump v0.0.0-20180507223929-23540a00eaa3/go.mod h1:oL81AME2rN47vu18xqj1S1jPIPuN7afo62yKTNn3XMM= -github.com/apparentlymart/go-dump v0.0.0-20190214190832-042adf3cf4a0 h1:MzVXffFUye+ZcSR6opIgz9Co7WcDx6ZcY+RjfFHoA0I= -github.com/apparentlymart/go-textseg v1.0.0/go.mod h1:z96Txxhf3xSFMPmb5X/1W05FF/Nj9VFpLOpjS5yuumk= -github.com/apparentlymart/go-textseg/v12 v12.0.0/go.mod h1:S/4uRK2UtaQttw1GenVJEynmyUenKwP++x/+DdGV/Ec= github.com/apparentlymart/go-textseg/v13 v13.0.0 h1:Y+KvPE1NYz0xl601PVImeQfFyEy6iT90AvPUL1NNfNw= -github.com/apparentlymart/go-textseg/v13 v13.0.0/go.mod h1:ZK2fH7c4NqDTLtiYLvIkEghdlcqw7yxLeM89kiTRPUo= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/dustinkirkland/golang-petname v0.0.0-20191129215211-8e5a1ed0cff0 h1:90Ly+6UfUypEF6vvvW5rQIv9opIL8CbmW9FT20LDQoY= github.com/dustinkirkland/golang-petname v0.0.0-20191129215211-8e5a1ed0cff0/go.mod h1:V+Qd57rJe8gd4eiGzZyg4h54VLHmYVVw54iMnlAMrF8= -github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w= github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk= -github.com/go-test/deep v1.0.3 h1:ZrJSEWsXzPOxaZnFteGEfooLba+ju3FYIbOrS+rQd68= -github.com/go-test/deep v1.0.3/go.mod h1:wGDj63lr65AM2AQyKZd/NYHGb0R+1RLqB8NKt3aSFNA= -github.com/golang/protobuf v1.1.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw= github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= -github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= -github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg= -github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= +github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38= github.com/hashicorp/errwrap v1.1.0 h1:OxrOeh75EUXMY8TBjag2fzXGZ40LB6IKw45YeGUDY2I= -github.com/hashicorp/errwrap v1.1.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-checkpoint v0.5.0 h1:MFYpPZCnQqQTE18jFwSII6eUQrD/oxMFp3mlgcqk5mU= github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ= github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320 h1:1/D3zfFHttUKaCaGKZ/dR2roBXv0vKbSCnssIldfQdI= -github.com/hashicorp/go-cty v1.4.1-0.20200414143053-d3edf31b6320/go.mod h1:EiZBMaudVLy8fmjf9Npq1dq9RalhveqZG5w/yz3mHWs= -github.com/hashicorp/go-hclog v1.2.0 h1:La19f8d7WIlm4ogzNHB0JGqs5AUDAZ2UfCY4sJXcJdM= -github.com/hashicorp/go-hclog v1.2.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= +github.com/hashicorp/go-hclog v1.2.1 h1:YQsLlGDJgwhXFpucSPyVbCBviQtjlHv3jLTlp8YmtEw= +github.com/hashicorp/go-hclog v1.2.1/go.mod h1:W4Qnvbt70Wk/zYJryRzDRU/4r0kIg0PVHBcfoyhpF5M= github.com/hashicorp/go-multierror v1.1.1 h1:H5DkEtf6CXdFp0N0Em5UCwQpXMWke8IA0+lD48awMYo= -github.com/hashicorp/go-multierror v1.1.1/go.mod h1:iw975J/qwKPdAO1clOe2L8331t/9/fmwbPZ6JB6eMoM= -github.com/hashicorp/go-plugin v1.4.4 h1:NVdrSdFRt3SkZtNckJ6tog7gbpRrcbOjQi/rgF7JYWQ= +github.com/hashicorp/go-plugin v1.4.8 h1:CHGwpxYDOttQOY7HOWgETU9dyVjOXzniXDqJcYJE1zM= github.com/hashicorp/go-uuid v1.0.3 h1:2gKiV6YVmrJ1i2CKKa9obLvRieoRGviZFL26PcT/Co8= github.com/hashicorp/go-uuid v1.0.3/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= -github.com/hashicorp/go-version v1.5.0 h1:O293SZ2Eg+AAYijkVK3jR786Am1bhDEh2GHT0tIVE5E= -github.com/hashicorp/go-version v1.5.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA= -github.com/hashicorp/hc-install v0.3.2 h1:oiQdJZvXmkNcRcEOOfM5n+VTsvNjWQeOjfAoO6dKSH8= -github.com/hashicorp/hcl/v2 v2.12.0 h1:PsYxySWpMD4KPaoJLnsHwtK5Qptvj/4Q6s0t4sUxZf4= -github.com/hashicorp/hcl/v2 v2.12.0/go.mod h1:FwWsfWEjyV/CMj8s/gqAuiviY72rJ1/oayI9WftqcKg= +github.com/hashicorp/go-version v1.6.0 h1:feTTfFNnjP967rlCxM/I9g701jU+RN74YKx2mOkIeek= +github.com/hashicorp/hc-install v0.4.0 h1:cZkRFr1WVa0Ty6x5fTvL1TuO1flul231rWkGH92oYYk= +github.com/hashicorp/hcl/v2 v2.15.0 h1:CPDXO6+uORPjKflkWCCwoWc9uRp+zSIPcCQ+BrxV7m8= github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= -github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= -github.com/hashicorp/terraform-exec v0.16.1 h1:NAwZFJW2L2SaCBVZoVaH8LPImLOGbPLkSHy0IYbs2uE= +github.com/hashicorp/terraform-exec v0.17.3 h1:MX14Kvnka/oWGmIkyuyvL6POx25ZmKrjlaclkx3eErU= github.com/hashicorp/terraform-json v0.14.0 h1:sh9iZ1Y8IFJLx+xQiKHGud6/TSUCM0N8e17dKDpqV7s= -github.com/hashicorp/terraform-plugin-go v0.9.1 h1:vXdHaQ6aqL+OF076nMSBV+JKPdmXlzG5mzVDD04WyPs= -github.com/hashicorp/terraform-plugin-go v0.9.1/go.mod h1:ItjVSlQs70otlzcCwlPcU8FRXLdO973oYFRZwAOxy8M= -github.com/hashicorp/terraform-plugin-log v0.4.0 h1:F3eVnm8r2EfQCe2k9blPIiF/r2TT01SHijXnS7bujvc= -github.com/hashicorp/terraform-plugin-log v0.4.0/go.mod h1:9KclxdunFownr4pIm1jdmwKRmE4d6HVG2c9XDq47rpg= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.17.0 h1:Qr5fWNg1SPSfCRMtou67Y6Kcy9UnMYRNlIJTKRuUvXU= -github.com/hashicorp/terraform-plugin-sdk/v2 v2.17.0/go.mod h1:b+LFg8WpYgFgvEBP/6Htk5H9/pJp1V1E8NJAekfH2Ws= -github.com/hashicorp/terraform-registry-address v0.0.0-20210412075316-9b2996cce896 h1:1FGtlkJw87UsTMg5s8jrekrHmUPUJaMcu6ELiVhQrNw= +github.com/hashicorp/terraform-plugin-framework v1.1.1 h1:PbnEKHsIU8KTTzoztHQGgjZUWx7Kk8uGtpGMMc1p+oI= +github.com/hashicorp/terraform-plugin-framework v1.1.1/go.mod h1:DyZPxQA+4OKK5ELxFIIcqggcszqdWWUpTLPHAhS/tkY= +github.com/hashicorp/terraform-plugin-framework-validators v0.9.0 h1:LYz4bXh3t7bTEydXOmPDPupRRnA480B/9+jV8yZvxBA= +github.com/hashicorp/terraform-plugin-framework-validators v0.9.0/go.mod h1:+BVERsnfdlhYR2YkXMBtPnmn9UsL19U3qUtSZ+Y/5MY= +github.com/hashicorp/terraform-plugin-go v0.14.3 h1:nlnJ1GXKdMwsC8g1Nh05tK2wsC3+3BL/DBBxFEki+j0= +github.com/hashicorp/terraform-plugin-go v0.14.3/go.mod h1:7ees7DMZ263q8wQ6E4RdIdR6nHHJtrdt4ogX5lPkX1A= +github.com/hashicorp/terraform-plugin-log v0.7.0 h1:SDxJUyT8TwN4l5b5/VkiTIaQgY6R+Y2BQ0sRZftGKQs= +github.com/hashicorp/terraform-plugin-log v0.7.0/go.mod h1:p4R1jWBXRTvL4odmEkFfDdhUjHf9zcs/BCoNHAc7IK4= +github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.1 h1:zHcMbxY0+rFO9gY99elV/XC/UnQVg7FhRCbj1i5b7vM= +github.com/hashicorp/terraform-registry-address v0.1.0 h1:W6JkV9wbum+m516rCl5/NjKxCyTVaaUBbzYcMzBDO3U= github.com/hashicorp/terraform-svchost v0.0.0-20200729002733-f050f53b9734 h1:HKLsbzeOsfXmKNpr3GiT18XAblV0BjCbzL8KQAMZGa0= -github.com/hashicorp/yamux v0.0.0-20181012175058-2f1d1f20f75d h1:kJCB4vdITiW1eC1vq2e6IsrXKrZit1bv/TDYFGMp4BQ= +github.com/hashicorp/yamux v0.0.0-20211028200310-0bc27b27de87 h1:xixZ2bWeofWV68J+x6AzmKuVM/JWCQwkWm6GW/MUR6I= github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/kylelemons/godebug v0.0.0-20170820004349-d65d576e9348/go.mod h1:B69LEHPfb2qLo0BaaOLcbitczOKLWTsrBG9LczfCD4k= -github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc= -github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40= github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4= -github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= -github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y= github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94= github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw= -github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s= github.com/mitchellh/go-testing-interface v1.14.1 h1:jrgshOhYAUVNMAJiKbEu7EqAwgJJ2JqpQmpLJOu07cU= github.com/mitchellh/go-testing-interface v1.14.1/go.mod h1:gfgS7OtZj6MA4U1UrDRp04twqAjfvlZyCfX3sDjEym8= -github.com/mitchellh/go-wordwrap v0.0.0-20150314170334-ad45545899c7/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/go-wordwrap v1.0.0 h1:6GlHJ/LTGMrIJbwgdqdl2eEH8o+Exx/0m8ir9Gns0u4= -github.com/mitchellh/go-wordwrap v1.0.0/go.mod h1:ZXFpozHsX6DPmq2I0TCekCxypsnAUbP2oI0UX1GXzOo= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= -github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ= -github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw= -github.com/nsf/jsondiff v0.0.0-20200515183724-f29ed568f4ce h1:RPclfga2SEJmgMmz2k+Mg7cowZ8yv4Trqw9UsJby758= -github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw= +github.com/oklog/run v1.1.0 h1:GEenZ1cK0+q0+wsJew9qUg/DyD8k3JzYsZAi5gYi2mA= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= -github.com/pulumi/terraform-provider-random v1.3.2-0.20220627122729-2ed10370a61b h1:TXd0DsmkJtKyxDN4pwrtwO4cp4W6DMvurVyOCopU5QI= -github.com/pulumi/terraform-provider-random v1.3.2-0.20220627122729-2ed10370a61b/go.mod h1:o2Gf46wsD87EwpjBODVSCjKA85IsrujYeHKIwfbzHcM= -github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= -github.com/spf13/pflag v1.0.2/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= -github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs= -github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= -github.com/vmihailenco/msgpack v3.3.3+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/testify v1.7.2 h1:4jaiDzPyXQvSd7D0EjG45355tLlV3VOECpq10pLC+8s= +github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals= +github.com/terraform-providers/terraform-provider-random v1.3.2-0.20230207192255-f3a69cbc0904 h1:shQpXcEEe5jpigyTZl5zGneyiPn3kv3rRy8dR//kix0= +github.com/terraform-providers/terraform-provider-random v1.3.2-0.20230207192255-f3a69cbc0904/go.mod h1:5APMWTc7IExtGAEIMvV26B2PzN+lwqEqqu2dWrk8fn4= github.com/vmihailenco/msgpack v4.0.4+incompatible h1:dSLoQfGFAo3F6OoNhwUmLwVgaUXK79GlxNBwueZn0xI= -github.com/vmihailenco/msgpack v4.0.4+incompatible/go.mod h1:fy3FlTQTDXWkZ7Bh6AcGMlsjHatGryHQYUTf1ShIgkk= github.com/vmihailenco/msgpack/v4 v4.3.12 h1:07s4sz9IReOgdikxLTKNbBdqDMLsjPKXwvCazn8G65U= github.com/vmihailenco/msgpack/v4 v4.3.12/go.mod h1:gborTTJjAo/GWTqqRjrLCn9pgNN+NXzzngzBKDPIqw4= -github.com/vmihailenco/tagparser v0.1.1 h1:quXMXlA39OCbd2wAdTsGDlK9RkOk6Wuw+x37wVyIuWY= github.com/vmihailenco/tagparser v0.1.1/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= -github.com/zclconf/go-cty v1.2.0/go.mod h1:hOPWgoHbaTUnI5k4D2ld+GRpFJSCe6bCM7m1q/N4PQ8= -github.com/zclconf/go-cty v1.8.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= -github.com/zclconf/go-cty v1.10.0 h1:mp9ZXQeIcN8kAwuqorjH+Q+njbJKjLrvB2yIh4q7U+0= -github.com/zclconf/go-cty v1.10.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uUAzyuvAk= -github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8= +github.com/vmihailenco/tagparser v0.1.2 h1:gnjoVuB/kljJ5wICEEOpx98oXMWPLj22G67Vbd1qPqc= +github.com/vmihailenco/tagparser v0.1.2/go.mod h1:OeAg3pn3UbLjkWt+rN9oFYB6u/cQgqMEUPoW2WPyhdI= +github.com/zclconf/go-cty v1.12.1 h1:PcupnljUm9EIvbgSHQnHhUr3fO6oFmkOrvs2BAFNXXY= golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190426145343-a29dc8fdc734/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= -golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e h1:T8NU3HyQ8ClP4SEE+KbFlg6n0NhuTsN4MyznaarGsZM= -golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= -golang.org/x/net v0.0.0-20180811021610-c39426892332/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d h1:sK3txAijHtOK88l68nt020reeT1ZdKLIYetKl95FzVY= +golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 h1:CIJ76btIcR3eFI5EgSo6k1qKw9KJexJuRLI9G7Hp5wE= -golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= -golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20190502175342-a43fa875dd82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k= -golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f h1:v4INt8xihDGvnrfjMDVXGxw9wrfxYyCjk0KbXjhR55s= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= -golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk= -golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.6 h1:lMO5rYAqUxkmaj76jAkRUvt5JZgFymx/+Q5Mzfivuhc= -google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/genproto v0.0.0-20200711021454-869866162049 h1:YFTFpQhgvrLrmxtiIncJxFXeCyq84ixuKWVCaCAi9Oc= -google.golang.org/grpc v1.46.0 h1:oCjezcn6g6A75TGoKYBPgKmVBLexhYLM6MebdrPApP8= +google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3 h1:q1kiSVscqoDeqTF27eQ2NnLLDmqF0I373qQNXYMy0fo= +google.golang.org/grpc v1.51.0 h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= -google.golang.org/protobuf v1.28.0 h1:w43yiav+6bVFTBQFZX0r7ipe9JQ1QsbMgHwbBziscLw= -google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w= +google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= +gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/provider/shim/shim.go b/provider/shim/shim.go index 5aff89e741..023d603904 100644 --- a/provider/shim/shim.go +++ b/provider/shim/shim.go @@ -1,10 +1,10 @@ package shim import ( - "github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema" + tfpf "github.com/hashicorp/terraform-plugin-framework/provider" "github.com/terraform-providers/terraform-provider-random/internal/provider" ) -func NewProvider() *schema.Provider { +func NewProvider() tfpf.Provider { return provider.New() } diff --git a/sdk/dotnet/RandomId.cs b/sdk/dotnet/RandomId.cs index 9dad8ea1ec..4d04901563 100644 --- a/sdk/dotnet/RandomId.cs +++ b/sdk/dotnet/RandomId.cs @@ -25,9 +25,6 @@ namespace Pulumi.Random /// /// ## Example Usage /// - /// The following example shows how to generate a unique name for an AWS EC2 - /// instance that changes each time a new AMI id is selected. - /// /// ```csharp /// using System.Collections.Generic; /// using Pulumi; @@ -36,36 +33,39 @@ namespace Pulumi.Random /// /// return await Deployment.RunAsync(() => /// { + /// // The following example shows how to generate a unique name for an AWS EC2 + /// // instance that changes each time a new AMI id is selected. /// var serverRandomId = new Random.RandomId("serverRandomId", new() /// { - /// ByteLength = 8, /// Keepers = /// { /// { "ami_id", @var.Ami_id }, /// }, + /// ByteLength = 8, /// }); /// /// var serverInstance = new Aws.Ec2.Instance("serverInstance", new() /// { - /// Ami = serverRandomId.Keepers.Apply(keepers => keepers?.AmiId), /// Tags = /// { /// { "Name", serverRandomId.Hex.Apply(hex => $"web-server {hex}") }, /// }, + /// Ami = serverRandomId.Keepers.Apply(keepers => keepers?.AmiId), /// }); /// + /// // ... (other aws_instance arguments) ... /// }); /// ``` /// /// ## Import /// - /// Random Ids can be imported using the `b64_url` with an optional `prefix`. This can be used to replace a config value with a value interpolated from the random provider without experiencing diffs. Example with no prefix + /// Random IDs can be imported using the b64_url with an optional prefix. This can be used to replace a config value with a value interpolated from the random provider without experiencing diffs. Example with no prefix /// /// ```sh /// $ pulumi import random:index/randomId:RandomId server p-9hUg /// ``` /// - /// Example with prefix (prefix is separated by a `,`) + /// Example with prefix (prefix is separated by a ,) /// /// ```sh /// $ pulumi import random:index/randomId:RandomId server my-prefix-,p-9hUg @@ -87,8 +87,7 @@ public partial class RandomId : global::Pulumi.CustomResource public Output B64Url { get; private set; } = null!; /// - /// The number of random bytes to produce. The - /// minimum value is 1, which produces eight bits of randomness. + /// The number of random bytes to produce. The minimum value is 1, which produces eight bits of randomness. /// [Output("byteLength")] public Output ByteLength { get; private set; } = null!; @@ -106,17 +105,13 @@ public partial class RandomId : global::Pulumi.CustomResource public Output Hex { get; private set; } = null!; /// - /// Arbitrary map of values that, when changed, will - /// trigger a new id to be generated. See - /// the main provider documentation for more information. + /// Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. /// [Output("keepers")] - public Output?> Keepers { get; private set; } = null!; + public Output?> Keepers { get; private set; } = null!; /// - /// Arbitrary string to prefix the output value with. This - /// string is supplied as-is, meaning it is not guaranteed to be URL-safe or - /// base64 encoded. + /// Arbitrary string to prefix the output value with. This string is supplied as-is, meaning it is not guaranteed to be URL-safe or base64 encoded. /// [Output("prefix")] public Output Prefix { get; private set; } = null!; @@ -168,30 +163,25 @@ public static RandomId Get(string name, Input id, RandomIdState? state = public sealed class RandomIdArgs : global::Pulumi.ResourceArgs { /// - /// The number of random bytes to produce. The - /// minimum value is 1, which produces eight bits of randomness. + /// The number of random bytes to produce. The minimum value is 1, which produces eight bits of randomness. /// [Input("byteLength", required: true)] public Input ByteLength { get; set; } = null!; [Input("keepers")] - private InputMap? _keepers; + private InputMap? _keepers; /// - /// Arbitrary map of values that, when changed, will - /// trigger a new id to be generated. See - /// the main provider documentation for more information. + /// Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. /// - public InputMap Keepers + public InputMap Keepers { - get => _keepers ?? (_keepers = new InputMap()); + get => _keepers ?? (_keepers = new InputMap()); set => _keepers = value; } /// - /// Arbitrary string to prefix the output value with. This - /// string is supplied as-is, meaning it is not guaranteed to be URL-safe or - /// base64 encoded. + /// Arbitrary string to prefix the output value with. This string is supplied as-is, meaning it is not guaranteed to be URL-safe or base64 encoded. /// [Input("prefix")] public Input? Prefix { get; set; } @@ -217,8 +207,7 @@ public sealed class RandomIdState : global::Pulumi.ResourceArgs public Input? B64Url { get; set; } /// - /// The number of random bytes to produce. The - /// minimum value is 1, which produces eight bits of randomness. + /// The number of random bytes to produce. The minimum value is 1, which produces eight bits of randomness. /// [Input("byteLength")] public Input? ByteLength { get; set; } @@ -236,23 +225,19 @@ public sealed class RandomIdState : global::Pulumi.ResourceArgs public Input? Hex { get; set; } [Input("keepers")] - private InputMap? _keepers; + private InputMap? _keepers; /// - /// Arbitrary map of values that, when changed, will - /// trigger a new id to be generated. See - /// the main provider documentation for more information. + /// Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. /// - public InputMap Keepers + public InputMap Keepers { - get => _keepers ?? (_keepers = new InputMap()); + get => _keepers ?? (_keepers = new InputMap()); set => _keepers = value; } /// - /// Arbitrary string to prefix the output value with. This - /// string is supplied as-is, meaning it is not guaranteed to be URL-safe or - /// base64 encoded. + /// Arbitrary string to prefix the output value with. This string is supplied as-is, meaning it is not guaranteed to be URL-safe or base64 encoded. /// [Input("prefix")] public Input? Prefix { get; set; } diff --git a/sdk/dotnet/RandomInteger.cs b/sdk/dotnet/RandomInteger.cs index 492ed6d8e9..b842982bce 100644 --- a/sdk/dotnet/RandomInteger.cs +++ b/sdk/dotnet/RandomInteger.cs @@ -12,16 +12,10 @@ namespace Pulumi.Random /// /// The resource `random.RandomInteger` generates random values from a given range, described by the `min` and `max` attributes of a given resource. /// - /// This resource can be used in conjunction with resources that have - /// the `create_before_destroy` lifecycle flag set, to avoid conflicts with - /// unique names during the brief period where both the old and new resources - /// exist concurrently. + /// This resource can be used in conjunction with resources that have the `create_before_destroy` lifecycle flag set, to avoid conflicts with unique names during the brief period where both the old and new resources exist concurrently. /// /// ## Example Usage /// - /// The following example shows how to generate a random priority between 1 and 50000 for - /// a `aws_alb_listener_rule` resource: - /// /// ```csharp /// using System.Collections.Generic; /// using Pulumi; @@ -30,38 +24,39 @@ namespace Pulumi.Random /// /// return await Deployment.RunAsync(() => /// { + /// // The following example shows how to generate a random priority + /// // between 1 and 50000 for a aws_alb_listener_rule resource: /// var priority = new Random.RandomInteger("priority", new() /// { + /// Min = 1, + /// Max = 50000, /// Keepers = /// { /// { "listener_arn", @var.Listener_arn }, /// }, - /// Max = 50000, - /// Min = 1, /// }); /// /// var main = new Aws.Alb.ListenerRule("main", new() /// { + /// ListenerArn = priority.Keepers.Apply(keepers => keepers?.ListenerArn), + /// Priority = priority.Result, /// Actions = new[] /// { /// new Aws.Alb.Inputs.ListenerRuleActionArgs /// { - /// TargetGroupArn = @var.Target_group_arn, /// Type = "forward", + /// TargetGroupArn = @var.Target_group_arn, /// }, /// }, - /// ListenerArn = @var.Listener_arn, - /// Priority = priority.Result, /// }); /// + /// // ... (other aws_alb_listener_rule arguments) ... /// }); /// ``` /// - /// The result of the above will set a random priority. - /// /// ## Import /// - /// Random integers can be imported using the `result`, `min`, and `max`, with an optional `seed`. This can be used to replace a config value with a value interpolated from the random provider without experiencing diffs. Example (values are separated by a `,`) + /// Random integers can be imported using the result, min, and max, with an optional seed. This can be used to replace a config value with a value interpolated from the random provider without experiencing diffs. Example (values are separated by a ,) /// /// ```sh /// $ pulumi import random:index/randomInteger:RandomInteger priority 15390,1,50000 @@ -71,12 +66,10 @@ namespace Pulumi.Random public partial class RandomInteger : global::Pulumi.CustomResource { /// - /// Arbitrary map of values that, when changed, will - /// trigger a new id to be generated. See - /// the main provider documentation for more information. + /// Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. /// [Output("keepers")] - public Output?> Keepers { get; private set; } = null!; + public Output?> Keepers { get; private set; } = null!; /// /// The maximum inclusive value of the range. @@ -91,7 +84,7 @@ public partial class RandomInteger : global::Pulumi.CustomResource public Output Min { get; private set; } = null!; /// - /// (int) The random Integer result. + /// The random integer result. /// [Output("result")] public Output Result { get; private set; } = null!; @@ -149,16 +142,14 @@ public static RandomInteger Get(string name, Input id, RandomIntegerStat public sealed class RandomIntegerArgs : global::Pulumi.ResourceArgs { [Input("keepers")] - private InputMap? _keepers; + private InputMap? _keepers; /// - /// Arbitrary map of values that, when changed, will - /// trigger a new id to be generated. See - /// the main provider documentation for more information. + /// Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. /// - public InputMap Keepers + public InputMap Keepers { - get => _keepers ?? (_keepers = new InputMap()); + get => _keepers ?? (_keepers = new InputMap()); set => _keepers = value; } @@ -189,16 +180,14 @@ public RandomIntegerArgs() public sealed class RandomIntegerState : global::Pulumi.ResourceArgs { [Input("keepers")] - private InputMap? _keepers; + private InputMap? _keepers; /// - /// Arbitrary map of values that, when changed, will - /// trigger a new id to be generated. See - /// the main provider documentation for more information. + /// Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. /// - public InputMap Keepers + public InputMap Keepers { - get => _keepers ?? (_keepers = new InputMap()); + get => _keepers ?? (_keepers = new InputMap()); set => _keepers = value; } @@ -215,7 +204,7 @@ public InputMap Keepers public Input? Min { get; set; } /// - /// (int) The random Integer result. + /// The random integer result. /// [Input("result")] public Input? Result { get; set; } diff --git a/sdk/dotnet/RandomPassword.cs b/sdk/dotnet/RandomPassword.cs index d3e6f4bf72..077a796bcf 100644 --- a/sdk/dotnet/RandomPassword.cs +++ b/sdk/dotnet/RandomPassword.cs @@ -10,17 +10,6 @@ namespace Pulumi.Random { /// - /// > **Note:** Requires random provider version >= 2.2.0 - /// - /// Identical to random.RandomString with the exception that the - /// result is treated as sensitive and, thus, _not_ displayed in console output. - /// - /// > **Note:** All attributes including the generated password will be stored in - /// the raw state as plain-text. [Read more about sensitive data in - /// state](https://www.terraform.io/docs/state/sensitive-data.html). - /// - /// This resource *does* use a cryptographic random number generator. - /// /// ## Example Usage /// /// ```csharp @@ -35,7 +24,7 @@ namespace Pulumi.Random /// { /// Length = 16, /// Special = true, - /// OverrideSpecial = "_%@", + /// OverrideSpecial = "!#$%&*()-_=+[]{}<>:?", /// }); /// /// var example = new Aws.Rds.Instance("example", new() @@ -52,68 +41,127 @@ namespace Pulumi.Random /// /// ## Import /// - /// Random Password can be imported by specifying the value of the string + /// ### Avoiding Replacement /// /// ```sh - /// $ pulumi import random:index/randomPassword:RandomPassword password securepassword + /// $ pulumi import random:index/randomPassword:RandomPassword If the resource were imported using `random_password.password securepassword`, /// ``` + /// + /// replacement could be avoided by using1. Attribute values that match the imported ID and defaults: + /// + /// terraform + /// + /// resource "random_password" "password" { + /// + /// length = 14 + /// + /// lower + /// + /// = true + /// + /// } 2. Attribute values that match the imported ID and omit the attributes with defaults: + /// + /// terraform + /// + /// resource "random_password" "password" { + /// + /// length = 14 + /// + /// } 3. `ignore_changes` specifying the attributes to ignore: + /// + /// terraform + /// + /// resource "random_password" "password" { + /// + /// length = 16 + /// + /// lower + /// + /// = false + /// + /// lifecycle { + /// + /// ignore_changes = [ + /// + /// length, + /// + /// lower, + /// + /// ] + /// + /// } + /// + /// } + /// + /// **NOTE** `ignore_changes` is only required until the resource is recreated after import, + /// + /// after which it will use the configuration values specified. /// [RandomResourceType("random:index/randomPassword:RandomPassword")] public partial class RandomPassword : global::Pulumi.CustomResource { /// - /// Arbitrary map of values that, when changed, will trigger recreation of resource. See [the main provider - /// documentation](../index.html) for more information. + /// A bcrypt hash of the generated random string. + /// + [Output("bcryptHash")] + public Output BcryptHash { get; private set; } = null!; + + /// + /// Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. /// [Output("keepers")] - public Output?> Keepers { get; private set; } = null!; + public Output?> Keepers { get; private set; } = null!; /// - /// The length of the string desired. + /// The length of the string desired. The minimum value for length is 1 and, length must also be >= (`min_upper` + `min_lower` + `min_numeric` + `min_special`). /// [Output("length")] public Output Length { get; private set; } = null!; /// - /// Include lowercase alphabet characters in the result. + /// Include lowercase alphabet characters in the result. Default value is `true`. /// [Output("lower")] - public Output Lower { get; private set; } = null!; + public Output Lower { get; private set; } = null!; /// - /// Minimum number of lowercase alphabet characters in the result. + /// Minimum number of lowercase alphabet characters in the result. Default value is `0`. /// [Output("minLower")] - public Output MinLower { get; private set; } = null!; + public Output MinLower { get; private set; } = null!; /// - /// Minimum number of numeric characters in the result. + /// Minimum number of numeric characters in the result. Default value is `0`. /// [Output("minNumeric")] - public Output MinNumeric { get; private set; } = null!; + public Output MinNumeric { get; private set; } = null!; /// - /// Minimum number of special characters in the result. + /// Minimum number of special characters in the result. Default value is `0`. /// [Output("minSpecial")] - public Output MinSpecial { get; private set; } = null!; + public Output MinSpecial { get; private set; } = null!; /// - /// Minimum number of uppercase alphabet characters in the result. + /// Minimum number of uppercase alphabet characters in the result. Default value is `0`. /// [Output("minUpper")] - public Output MinUpper { get; private set; } = null!; + public Output MinUpper { get; private set; } = null!; /// - /// Include numeric characters in the result. + /// Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. /// [Output("number")] - public Output Number { get; private set; } = null!; + public Output Number { get; private set; } = null!; /// - /// Supply your own list of special characters to use for string generation. This overrides the default character list in - /// the special argument. The `special` argument must still be set to true for any overwritten characters to be used in - /// generation. + /// Include numeric characters in the result. Default value is `true`. + /// + [Output("numeric")] + public Output Numeric { get; private set; } = null!; + + /// + /// Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. /// [Output("overrideSpecial")] public Output OverrideSpecial { get; private set; } = null!; @@ -125,16 +173,16 @@ public partial class RandomPassword : global::Pulumi.CustomResource public Output Result { get; private set; } = null!; /// - /// Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?` + /// Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. /// [Output("special")] - public Output Special { get; private set; } = null!; + public Output Special { get; private set; } = null!; /// - /// Include uppercase alphabet characters in the result. + /// Include uppercase alphabet characters in the result. Default value is `true`. /// [Output("upper")] - public Output Upper { get; private set; } = null!; + public Output Upper { get; private set; } = null!; /// @@ -161,6 +209,7 @@ private static CustomResourceOptions MakeResourceOptions(CustomResourceOptions? Version = Utilities.Version, AdditionalSecretOutputs = { + "bcryptHash", "result", }, }; @@ -187,76 +236,79 @@ public static RandomPassword Get(string name, Input id, RandomPasswordSt public sealed class RandomPasswordArgs : global::Pulumi.ResourceArgs { [Input("keepers")] - private InputMap? _keepers; + private InputMap? _keepers; /// - /// Arbitrary map of values that, when changed, will trigger recreation of resource. See [the main provider - /// documentation](../index.html) for more information. + /// Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. /// - public InputMap Keepers + public InputMap Keepers { - get => _keepers ?? (_keepers = new InputMap()); + get => _keepers ?? (_keepers = new InputMap()); set => _keepers = value; } /// - /// The length of the string desired. + /// The length of the string desired. The minimum value for length is 1 and, length must also be >= (`min_upper` + `min_lower` + `min_numeric` + `min_special`). /// [Input("length", required: true)] public Input Length { get; set; } = null!; /// - /// Include lowercase alphabet characters in the result. + /// Include lowercase alphabet characters in the result. Default value is `true`. /// [Input("lower")] public Input? Lower { get; set; } /// - /// Minimum number of lowercase alphabet characters in the result. + /// Minimum number of lowercase alphabet characters in the result. Default value is `0`. /// [Input("minLower")] public Input? MinLower { get; set; } /// - /// Minimum number of numeric characters in the result. + /// Minimum number of numeric characters in the result. Default value is `0`. /// [Input("minNumeric")] public Input? MinNumeric { get; set; } /// - /// Minimum number of special characters in the result. + /// Minimum number of special characters in the result. Default value is `0`. /// [Input("minSpecial")] public Input? MinSpecial { get; set; } /// - /// Minimum number of uppercase alphabet characters in the result. + /// Minimum number of uppercase alphabet characters in the result. Default value is `0`. /// [Input("minUpper")] public Input? MinUpper { get; set; } /// - /// Include numeric characters in the result. + /// Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. /// [Input("number")] public Input? Number { get; set; } /// - /// Supply your own list of special characters to use for string generation. This overrides the default character list in - /// the special argument. The `special` argument must still be set to true for any overwritten characters to be used in - /// generation. + /// Include numeric characters in the result. Default value is `true`. + /// + [Input("numeric")] + public Input? Numeric { get; set; } + + /// + /// Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. /// [Input("overrideSpecial")] public Input? OverrideSpecial { get; set; } /// - /// Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?` + /// Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. /// [Input("special")] public Input? Special { get; set; } /// - /// Include uppercase alphabet characters in the result. + /// Include uppercase alphabet characters in the result. Default value is `true`. /// [Input("upper")] public Input? Upper { get; set; } @@ -269,65 +321,84 @@ public RandomPasswordArgs() public sealed class RandomPasswordState : global::Pulumi.ResourceArgs { + [Input("bcryptHash")] + private Input? _bcryptHash; + + /// + /// A bcrypt hash of the generated random string. + /// + public Input? BcryptHash + { + get => _bcryptHash; + set + { + var emptySecret = Output.CreateSecret(0); + _bcryptHash = Output.Tuple?, int>(value, emptySecret).Apply(t => t.Item1); + } + } + [Input("keepers")] - private InputMap? _keepers; + private InputMap? _keepers; /// - /// Arbitrary map of values that, when changed, will trigger recreation of resource. See [the main provider - /// documentation](../index.html) for more information. + /// Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. /// - public InputMap Keepers + public InputMap Keepers { - get => _keepers ?? (_keepers = new InputMap()); + get => _keepers ?? (_keepers = new InputMap()); set => _keepers = value; } /// - /// The length of the string desired. + /// The length of the string desired. The minimum value for length is 1 and, length must also be >= (`min_upper` + `min_lower` + `min_numeric` + `min_special`). /// [Input("length")] public Input? Length { get; set; } /// - /// Include lowercase alphabet characters in the result. + /// Include lowercase alphabet characters in the result. Default value is `true`. /// [Input("lower")] public Input? Lower { get; set; } /// - /// Minimum number of lowercase alphabet characters in the result. + /// Minimum number of lowercase alphabet characters in the result. Default value is `0`. /// [Input("minLower")] public Input? MinLower { get; set; } /// - /// Minimum number of numeric characters in the result. + /// Minimum number of numeric characters in the result. Default value is `0`. /// [Input("minNumeric")] public Input? MinNumeric { get; set; } /// - /// Minimum number of special characters in the result. + /// Minimum number of special characters in the result. Default value is `0`. /// [Input("minSpecial")] public Input? MinSpecial { get; set; } /// - /// Minimum number of uppercase alphabet characters in the result. + /// Minimum number of uppercase alphabet characters in the result. Default value is `0`. /// [Input("minUpper")] public Input? MinUpper { get; set; } /// - /// Include numeric characters in the result. + /// Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. /// [Input("number")] public Input? Number { get; set; } /// - /// Supply your own list of special characters to use for string generation. This overrides the default character list in - /// the special argument. The `special` argument must still be set to true for any overwritten characters to be used in - /// generation. + /// Include numeric characters in the result. Default value is `true`. + /// + [Input("numeric")] + public Input? Numeric { get; set; } + + /// + /// Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. /// [Input("overrideSpecial")] public Input? OverrideSpecial { get; set; } @@ -349,13 +420,13 @@ public Input? Result } /// - /// Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?` + /// Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. /// [Input("special")] public Input? Special { get; set; } /// - /// Include uppercase alphabet characters in the result. + /// Include uppercase alphabet characters in the result. Default value is `true`. /// [Input("upper")] public Input? Upper { get; set; } diff --git a/sdk/dotnet/RandomPet.cs b/sdk/dotnet/RandomPet.cs index 2d598c7f0d..684fe2eb26 100644 --- a/sdk/dotnet/RandomPet.cs +++ b/sdk/dotnet/RandomPet.cs @@ -10,19 +10,12 @@ namespace Pulumi.Random { /// - /// The resource `random.RandomPet` generates random pet names that are intended to be - /// used as unique identifiers for other resources. + /// The resource `random.RandomPet` generates random pet names that are intended to be used as unique identifiers for other resources. /// - /// This resource can be used in conjunction with resources that have - /// the `create_before_destroy` lifecycle flag set, to avoid conflicts with - /// unique names during the brief period where both the old and new resources - /// exist concurrently. + /// This resource can be used in conjunction with resources that have the `create_before_destroy` lifecycle flag set, to avoid conflicts with unique names during the brief period where both the old and new resources exist concurrently. /// /// ## Example Usage /// - /// The following example shows how to generate a unique pet name for an AWS EC2 - /// instance that changes each time a new AMI id is selected. - /// /// ```csharp /// using System.Collections.Generic; /// using Pulumi; @@ -31,6 +24,9 @@ namespace Pulumi.Random /// /// return await Deployment.RunAsync(() => /// { + /// // The following example shows how to generate a unique pet name + /// // for an AWS EC2 instance that changes each time a new AMI id is + /// // selected. /// var serverRandomPet = new Random.RandomPet("serverRandomPet", new() /// { /// Keepers = @@ -41,35 +37,31 @@ namespace Pulumi.Random /// /// var serverInstance = new Aws.Ec2.Instance("serverInstance", new() /// { - /// Ami = serverRandomPet.Keepers.Apply(keepers => keepers?.AmiId), /// Tags = /// { /// { "Name", serverRandomPet.Id.Apply(id => $"web-server-{id}") }, /// }, + /// Ami = serverRandomPet.Keepers.Apply(keepers => keepers?.AmiId), /// }); /// + /// // ... (other aws_instance arguments) ... /// }); /// ``` - /// - /// The result of the above will set the Name of the AWS Instance to - /// `web-server-simple-snake`. /// [RandomResourceType("random:index/randomPet:RandomPet")] public partial class RandomPet : global::Pulumi.CustomResource { /// - /// Arbitrary map of values that, when changed, will - /// trigger a new id to be generated. See - /// the main provider documentation for more information. + /// Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. /// [Output("keepers")] - public Output?> Keepers { get; private set; } = null!; + public Output?> Keepers { get; private set; } = null!; /// - /// The length (in words) of the pet name. + /// The length (in words) of the pet name. Defaults to 2 /// [Output("length")] - public Output Length { get; private set; } = null!; + public Output Length { get; private set; } = null!; /// /// A string to prefix the name with. @@ -78,10 +70,10 @@ public partial class RandomPet : global::Pulumi.CustomResource public Output Prefix { get; private set; } = null!; /// - /// The character to separate words in the pet name. + /// The character to separate words in the pet name. Defaults to "-" /// [Output("separator")] - public Output Separator { get; private set; } = null!; + public Output Separator { get; private set; } = null!; /// @@ -130,21 +122,19 @@ public static RandomPet Get(string name, Input id, RandomPetState? state public sealed class RandomPetArgs : global::Pulumi.ResourceArgs { [Input("keepers")] - private InputMap? _keepers; + private InputMap? _keepers; /// - /// Arbitrary map of values that, when changed, will - /// trigger a new id to be generated. See - /// the main provider documentation for more information. + /// Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. /// - public InputMap Keepers + public InputMap Keepers { - get => _keepers ?? (_keepers = new InputMap()); + get => _keepers ?? (_keepers = new InputMap()); set => _keepers = value; } /// - /// The length (in words) of the pet name. + /// The length (in words) of the pet name. Defaults to 2 /// [Input("length")] public Input? Length { get; set; } @@ -156,7 +146,7 @@ public InputMap Keepers public Input? Prefix { get; set; } /// - /// The character to separate words in the pet name. + /// The character to separate words in the pet name. Defaults to "-" /// [Input("separator")] public Input? Separator { get; set; } @@ -170,21 +160,19 @@ public RandomPetArgs() public sealed class RandomPetState : global::Pulumi.ResourceArgs { [Input("keepers")] - private InputMap? _keepers; + private InputMap? _keepers; /// - /// Arbitrary map of values that, when changed, will - /// trigger a new id to be generated. See - /// the main provider documentation for more information. + /// Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. /// - public InputMap Keepers + public InputMap Keepers { - get => _keepers ?? (_keepers = new InputMap()); + get => _keepers ?? (_keepers = new InputMap()); set => _keepers = value; } /// - /// The length (in words) of the pet name. + /// The length (in words) of the pet name. Defaults to 2 /// [Input("length")] public Input? Length { get; set; } @@ -196,7 +184,7 @@ public InputMap Keepers public Input? Prefix { get; set; } /// - /// The character to separate words in the pet name. + /// The character to separate words in the pet name. Defaults to "-" /// [Input("separator")] public Input? Separator { get; set; } diff --git a/sdk/dotnet/RandomShuffle.cs b/sdk/dotnet/RandomShuffle.cs index 028067953b..daac10df50 100644 --- a/sdk/dotnet/RandomShuffle.cs +++ b/sdk/dotnet/RandomShuffle.cs @@ -10,8 +10,7 @@ namespace Pulumi.Random { /// - /// The resource `random.RandomShuffle` generates a random permutation of a list - /// of strings given as an argument. + /// The resource `random.RandomShuffle` generates a random permutation of a list of strings given as an argument. /// /// ## Example Usage /// @@ -37,9 +36,13 @@ namespace Pulumi.Random /// /// var example = new Aws.Elb.LoadBalancer("example", new() /// { - /// AvailabilityZones = az.Results, + /// AvailabilityZones = new[] + /// { + /// az.Results, + /// }, /// }); /// + /// // ... and other aws_elb arguments ... /// }); /// ``` /// @@ -53,19 +56,13 @@ public partial class RandomShuffle : global::Pulumi.CustomResource public Output> Inputs { get; private set; } = null!; /// - /// Arbitrary map of values that, when changed, will - /// trigger a new id to be generated. See - /// the main provider documentation for more information. + /// Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. /// [Output("keepers")] - public Output?> Keepers { get; private set; } = null!; + public Output?> Keepers { get; private set; } = null!; /// - /// The number of results to return. Defaults to - /// the number of items in the `input` list. If fewer items are requested, - /// some elements will be excluded from the result. If more items are requested, - /// items will be repeated in the result but not more frequently than the number - /// of items in the input list. + /// The number of results to return. Defaults to the number of items in the `input` list. If fewer items are requested, some elements will be excluded from the result. If more items are requested, items will be repeated in the result but not more frequently than the number of items in the input list. /// [Output("resultCount")] public Output ResultCount { get; private set; } = null!; @@ -77,9 +74,7 @@ public partial class RandomShuffle : global::Pulumi.CustomResource public Output> Results { get; private set; } = null!; /// - /// Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the - /// list. **Important:** Even with an identical seed, it is not guaranteed that the same permutation will be produced across - /// different versions of Terraform. This argument causes the result to be *less volatile*, but not fixed for all time. + /// Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the list. /// [Output("seed")] public Output Seed { get; private set; } = null!; @@ -143,33 +138,25 @@ public InputList Inputs } [Input("keepers")] - private InputMap? _keepers; + private InputMap? _keepers; /// - /// Arbitrary map of values that, when changed, will - /// trigger a new id to be generated. See - /// the main provider documentation for more information. + /// Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. /// - public InputMap Keepers + public InputMap Keepers { - get => _keepers ?? (_keepers = new InputMap()); + get => _keepers ?? (_keepers = new InputMap()); set => _keepers = value; } /// - /// The number of results to return. Defaults to - /// the number of items in the `input` list. If fewer items are requested, - /// some elements will be excluded from the result. If more items are requested, - /// items will be repeated in the result but not more frequently than the number - /// of items in the input list. + /// The number of results to return. Defaults to the number of items in the `input` list. If fewer items are requested, some elements will be excluded from the result. If more items are requested, items will be repeated in the result but not more frequently than the number of items in the input list. /// [Input("resultCount")] public Input? ResultCount { get; set; } /// - /// Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the - /// list. **Important:** Even with an identical seed, it is not guaranteed that the same permutation will be produced across - /// different versions of Terraform. This argument causes the result to be *less volatile*, but not fixed for all time. + /// Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the list. /// [Input("seed")] public Input? Seed { get; set; } @@ -195,25 +182,19 @@ public InputList Inputs } [Input("keepers")] - private InputMap? _keepers; + private InputMap? _keepers; /// - /// Arbitrary map of values that, when changed, will - /// trigger a new id to be generated. See - /// the main provider documentation for more information. + /// Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. /// - public InputMap Keepers + public InputMap Keepers { - get => _keepers ?? (_keepers = new InputMap()); + get => _keepers ?? (_keepers = new InputMap()); set => _keepers = value; } /// - /// The number of results to return. Defaults to - /// the number of items in the `input` list. If fewer items are requested, - /// some elements will be excluded from the result. If more items are requested, - /// items will be repeated in the result but not more frequently than the number - /// of items in the input list. + /// The number of results to return. Defaults to the number of items in the `input` list. If fewer items are requested, some elements will be excluded from the result. If more items are requested, items will be repeated in the result but not more frequently than the number of items in the input list. /// [Input("resultCount")] public Input? ResultCount { get; set; } @@ -231,9 +212,7 @@ public InputList Results } /// - /// Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the - /// list. **Important:** Even with an identical seed, it is not guaranteed that the same permutation will be produced across - /// different versions of Terraform. This argument causes the result to be *less volatile*, but not fixed for all time. + /// Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the list. /// [Input("seed")] public Input? Seed { get; set; } diff --git a/sdk/dotnet/RandomString.cs b/sdk/dotnet/RandomString.cs index d06f4fd472..a9c81d67ec 100644 --- a/sdk/dotnet/RandomString.cs +++ b/sdk/dotnet/RandomString.cs @@ -10,15 +10,11 @@ namespace Pulumi.Random { /// - /// The resource `random.RandomString` generates a random permutation of alphanumeric - /// characters and optionally special characters. + /// The resource `random.RandomString` generates a random permutation of alphanumeric characters and optionally special characters. /// /// This resource *does* use a cryptographic random number generator. /// - /// Historically this resource's intended usage has been ambiguous as the original example - /// used it in a password. For backwards compatibility it will - /// continue to exist. For unique ids please use random_id, for sensitive - /// random values please use random_password. + /// Historically this resource's intended usage has been ambiguous as the original example used it in a password. For backwards compatibility it will continue to exist. For unique ids please use random_id, for sensitive random values please use random_password. /// /// ## Example Usage /// @@ -41,99 +37,142 @@ namespace Pulumi.Random /// /// ## Import /// - /// Strings can be imported by just specifying the value of the string + /// ### Avoiding Replacement /// /// ```sh - /// $ pulumi import random:index/randomString:RandomString test test + /// $ pulumi import random:index/randomString:RandomString If the resource were imported using `random_string.test test`, /// ``` + /// + /// replacement can be avoided by using1. Attribute values that match the imported ID and defaults: + /// + /// terraform + /// + /// resource "random_string" "test" { + /// + /// length = 4 + /// + /// lower + /// + /// = true + /// + /// } 2. Attribute values that match the imported ID and omit the attributes with defaults: + /// + /// terraform + /// + /// resource "random_string" "test" { + /// + /// length = 4 + /// + /// } 3. `ignore_changes` specifying the attributes to ignore: + /// + /// terraform + /// + /// resource "random_string" "test" { + /// + /// length = 16 + /// + /// lower + /// + /// = false + /// + /// lifecycle { + /// + /// ignore_changes = [ + /// + /// length, + /// + /// lower, + /// + /// ] + /// + /// } + /// + /// } + /// + /// **NOTE** `ignore_changes` is only required until the resource is recreated after import, + /// + /// after which it will use the configuration values specified. /// [RandomResourceType("random:index/randomString:RandomString")] public partial class RandomString : global::Pulumi.CustomResource { /// - /// Arbitrary map of values that, when changed, will - /// trigger a new id to be generated. See - /// the main provider documentation for more information. + /// Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. /// [Output("keepers")] - public Output?> Keepers { get; private set; } = null!; + public Output?> Keepers { get; private set; } = null!; /// - /// The length of the string desired + /// The length of the string desired. The minimum value for length is 1 and, length must also be >= (`min_upper` + `min_lower` + `min_numeric` + `min_special`). /// [Output("length")] public Output Length { get; private set; } = null!; /// - /// (default true) Include lowercase alphabet characters - /// in random string. + /// Include lowercase alphabet characters in the result. Default value is `true`. /// [Output("lower")] - public Output Lower { get; private set; } = null!; + public Output Lower { get; private set; } = null!; /// - /// (default 0) Minimum number of lowercase alphabet - /// characters in random string. + /// Minimum number of lowercase alphabet characters in the result. Default value is `0`. /// [Output("minLower")] - public Output MinLower { get; private set; } = null!; + public Output MinLower { get; private set; } = null!; /// - /// (default 0) Minimum number of numeric characters - /// in random string. + /// Minimum number of numeric characters in the result. Default value is `0`. /// [Output("minNumeric")] - public Output MinNumeric { get; private set; } = null!; + public Output MinNumeric { get; private set; } = null!; /// - /// (default 0) Minimum number of special characters - /// in random string. + /// Minimum number of special characters in the result. Default value is `0`. /// [Output("minSpecial")] - public Output MinSpecial { get; private set; } = null!; + public Output MinSpecial { get; private set; } = null!; /// - /// (default 0) Minimum number of uppercase alphabet - /// characters in random string. + /// Minimum number of uppercase alphabet characters in the result. Default value is `0`. /// [Output("minUpper")] - public Output MinUpper { get; private set; } = null!; + public Output MinUpper { get; private set; } = null!; /// - /// (default true) Include numeric characters in random - /// string. + /// Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. /// [Output("number")] - public Output Number { get; private set; } = null!; + public Output Number { get; private set; } = null!; /// - /// Supply your own list of special characters to - /// use for string generation. This overrides the default character list in the special - /// argument. The special argument must still be set to true for any overwritten - /// characters to be used in generation. + /// Include numeric characters in the result. Default value is `true`. + /// + [Output("numeric")] + public Output Numeric { get; private set; } = null!; + + /// + /// Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. /// [Output("overrideSpecial")] public Output OverrideSpecial { get; private set; } = null!; /// - /// Random string generated. + /// The generated random string. /// [Output("result")] public Output Result { get; private set; } = null!; /// - /// (default true) Include special characters in random - /// string. These are `!@#$%&*()-_=+[]{}<>:?` + /// Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. /// [Output("special")] - public Output Special { get; private set; } = null!; + public Output Special { get; private set; } = null!; /// - /// (default true) Include uppercase alphabet characters - /// in random string. + /// Include uppercase alphabet characters in the result. Default value is `true`. /// [Output("upper")] - public Output Upper { get; private set; } = null!; + public Output Upper { get; private set; } = null!; /// @@ -182,86 +221,79 @@ public static RandomString Get(string name, Input id, RandomStringState? public sealed class RandomStringArgs : global::Pulumi.ResourceArgs { [Input("keepers")] - private InputMap? _keepers; + private InputMap? _keepers; /// - /// Arbitrary map of values that, when changed, will - /// trigger a new id to be generated. See - /// the main provider documentation for more information. + /// Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. /// - public InputMap Keepers + public InputMap Keepers { - get => _keepers ?? (_keepers = new InputMap()); + get => _keepers ?? (_keepers = new InputMap()); set => _keepers = value; } /// - /// The length of the string desired + /// The length of the string desired. The minimum value for length is 1 and, length must also be >= (`min_upper` + `min_lower` + `min_numeric` + `min_special`). /// [Input("length", required: true)] public Input Length { get; set; } = null!; /// - /// (default true) Include lowercase alphabet characters - /// in random string. + /// Include lowercase alphabet characters in the result. Default value is `true`. /// [Input("lower")] public Input? Lower { get; set; } /// - /// (default 0) Minimum number of lowercase alphabet - /// characters in random string. + /// Minimum number of lowercase alphabet characters in the result. Default value is `0`. /// [Input("minLower")] public Input? MinLower { get; set; } /// - /// (default 0) Minimum number of numeric characters - /// in random string. + /// Minimum number of numeric characters in the result. Default value is `0`. /// [Input("minNumeric")] public Input? MinNumeric { get; set; } /// - /// (default 0) Minimum number of special characters - /// in random string. + /// Minimum number of special characters in the result. Default value is `0`. /// [Input("minSpecial")] public Input? MinSpecial { get; set; } /// - /// (default 0) Minimum number of uppercase alphabet - /// characters in random string. + /// Minimum number of uppercase alphabet characters in the result. Default value is `0`. /// [Input("minUpper")] public Input? MinUpper { get; set; } /// - /// (default true) Include numeric characters in random - /// string. + /// Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. /// [Input("number")] public Input? Number { get; set; } /// - /// Supply your own list of special characters to - /// use for string generation. This overrides the default character list in the special - /// argument. The special argument must still be set to true for any overwritten - /// characters to be used in generation. + /// Include numeric characters in the result. Default value is `true`. + /// + [Input("numeric")] + public Input? Numeric { get; set; } + + /// + /// Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. /// [Input("overrideSpecial")] public Input? OverrideSpecial { get; set; } /// - /// (default true) Include special characters in random - /// string. These are `!@#$%&*()-_=+[]{}<>:?` + /// Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. /// [Input("special")] public Input? Special { get; set; } /// - /// (default true) Include uppercase alphabet characters - /// in random string. + /// Include uppercase alphabet characters in the result. Default value is `true`. /// [Input("upper")] public Input? Upper { get; set; } @@ -275,92 +307,85 @@ public RandomStringArgs() public sealed class RandomStringState : global::Pulumi.ResourceArgs { [Input("keepers")] - private InputMap? _keepers; + private InputMap? _keepers; /// - /// Arbitrary map of values that, when changed, will - /// trigger a new id to be generated. See - /// the main provider documentation for more information. + /// Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. /// - public InputMap Keepers + public InputMap Keepers { - get => _keepers ?? (_keepers = new InputMap()); + get => _keepers ?? (_keepers = new InputMap()); set => _keepers = value; } /// - /// The length of the string desired + /// The length of the string desired. The minimum value for length is 1 and, length must also be >= (`min_upper` + `min_lower` + `min_numeric` + `min_special`). /// [Input("length")] public Input? Length { get; set; } /// - /// (default true) Include lowercase alphabet characters - /// in random string. + /// Include lowercase alphabet characters in the result. Default value is `true`. /// [Input("lower")] public Input? Lower { get; set; } /// - /// (default 0) Minimum number of lowercase alphabet - /// characters in random string. + /// Minimum number of lowercase alphabet characters in the result. Default value is `0`. /// [Input("minLower")] public Input? MinLower { get; set; } /// - /// (default 0) Minimum number of numeric characters - /// in random string. + /// Minimum number of numeric characters in the result. Default value is `0`. /// [Input("minNumeric")] public Input? MinNumeric { get; set; } /// - /// (default 0) Minimum number of special characters - /// in random string. + /// Minimum number of special characters in the result. Default value is `0`. /// [Input("minSpecial")] public Input? MinSpecial { get; set; } /// - /// (default 0) Minimum number of uppercase alphabet - /// characters in random string. + /// Minimum number of uppercase alphabet characters in the result. Default value is `0`. /// [Input("minUpper")] public Input? MinUpper { get; set; } /// - /// (default true) Include numeric characters in random - /// string. + /// Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. /// [Input("number")] public Input? Number { get; set; } /// - /// Supply your own list of special characters to - /// use for string generation. This overrides the default character list in the special - /// argument. The special argument must still be set to true for any overwritten - /// characters to be used in generation. + /// Include numeric characters in the result. Default value is `true`. + /// + [Input("numeric")] + public Input? Numeric { get; set; } + + /// + /// Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. /// [Input("overrideSpecial")] public Input? OverrideSpecial { get; set; } /// - /// Random string generated. + /// The generated random string. /// [Input("result")] public Input? Result { get; set; } /// - /// (default true) Include special characters in random - /// string. These are `!@#$%&*()-_=+[]{}<>:?` + /// Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. /// [Input("special")] public Input? Special { get; set; } /// - /// (default true) Include uppercase alphabet characters - /// in random string. + /// Include uppercase alphabet characters in the result. Default value is `true`. /// [Input("upper")] public Input? Upper { get; set; } diff --git a/sdk/dotnet/RandomUuid.cs b/sdk/dotnet/RandomUuid.cs index b140af06ad..55a882cc07 100644 --- a/sdk/dotnet/RandomUuid.cs +++ b/sdk/dotnet/RandomUuid.cs @@ -10,16 +10,12 @@ namespace Pulumi.Random { /// - /// The resource `random.RandomUuid` generates random uuid string that is intended to be - /// used as unique identifiers for other resources. + /// The resource `random.RandomUuid` generates random uuid string that is intended to be used as unique identifiers for other resources. /// - /// This resource uses the `hashicorp/go-uuid` to generate a UUID-formatted string - /// for use with services needed a unique string identifier. + /// This resource uses [hashicorp/go-uuid](https://github.com/hashicorp/go-uuid) to generate a UUID-formatted string for use with services needed a unique string identifier. /// /// ## Example Usage /// - /// The following example shows how to generate a unique name for an Azure Resource Group. - /// /// ```csharp /// using System.Collections.Generic; /// using Pulumi; @@ -40,7 +36,7 @@ namespace Pulumi.Random /// /// ## Import /// - /// 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. Example + /// 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. /// /// ```sh /// $ pulumi import random:index/randomUuid:RandomUuid main aabbccdd-eeff-0011-2233-445566778899 @@ -50,12 +46,10 @@ namespace Pulumi.Random public partial class RandomUuid : global::Pulumi.CustomResource { /// - /// Arbitrary map of values that, when changed, will - /// trigger a new uuid to be generated. See - /// the main provider documentation for more information. + /// Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. /// [Output("keepers")] - public Output?> Keepers { get; private set; } = null!; + public Output?> Keepers { get; private set; } = null!; /// /// The generated uuid presented in string format. @@ -110,16 +104,14 @@ public static RandomUuid Get(string name, Input id, RandomUuidState? sta public sealed class RandomUuidArgs : global::Pulumi.ResourceArgs { [Input("keepers")] - private InputMap? _keepers; + private InputMap? _keepers; /// - /// Arbitrary map of values that, when changed, will - /// trigger a new uuid to be generated. See - /// the main provider documentation for more information. + /// Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. /// - public InputMap Keepers + public InputMap Keepers { - get => _keepers ?? (_keepers = new InputMap()); + get => _keepers ?? (_keepers = new InputMap()); set => _keepers = value; } @@ -132,16 +124,14 @@ public RandomUuidArgs() public sealed class RandomUuidState : global::Pulumi.ResourceArgs { [Input("keepers")] - private InputMap? _keepers; + private InputMap? _keepers; /// - /// Arbitrary map of values that, when changed, will - /// trigger a new uuid to be generated. See - /// the main provider documentation for more information. + /// Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. /// - public InputMap Keepers + public InputMap Keepers { - get => _keepers ?? (_keepers = new InputMap()); + get => _keepers ?? (_keepers = new InputMap()); set => _keepers = value; } diff --git a/sdk/go/random/randomId.go b/sdk/go/random/randomId.go index e6f554edcf..b62e7e3a4e 100644 --- a/sdk/go/random/randomId.go +++ b/sdk/go/random/randomId.go @@ -24,9 +24,54 @@ import ( // unique names during the brief period where both the old and new resources // exist concurrently. // +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "fmt" +// +// "github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ec2" +// "github.com/pulumi/pulumi-random/sdk/v4/go/random" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// serverRandomId, err := random.NewRandomId(ctx, "serverRandomId", &random.RandomIdArgs{ +// Keepers: pulumi.StringMap{ +// "ami_id": pulumi.Any(_var.Ami_id), +// }, +// ByteLength: pulumi.Int(8), +// }) +// if err != nil { +// return err +// } +// _, err = ec2.NewInstance(ctx, "serverInstance", &ec2.InstanceArgs{ +// Tags: pulumi.StringMap{ +// "Name": serverRandomId.Hex.ApplyT(func(hex string) (string, error) { +// return fmt.Sprintf("web-server %v", hex), nil +// }).(pulumi.StringOutput), +// }, +// Ami: serverRandomId.Keepers.ApplyT(func(keepers interface{}) (*string, error) { +// return &keepers.AmiId, nil +// }).(pulumi.StringPtrOutput), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` +// // ## Import // -// Random Ids can be imported using the `b64_url` with an optional `prefix`. This can be used to replace a config value with a value interpolated from the random provider without experiencing diffs. Example with no prefix +// Random IDs can be imported using the b64_url with an optional prefix. This can be used to replace a config value with a value interpolated from the random provider without experiencing diffs. Example with no prefix // // ```sh // @@ -34,7 +79,7 @@ import ( // // ``` // -// Example with prefix (prefix is separated by a `,`) +// Example with prefix (prefix is separated by a ,) // // ```sh // @@ -48,20 +93,15 @@ type RandomId struct { B64Std pulumi.StringOutput `pulumi:"b64Std"` // The generated id presented in base64, using the URL-friendly character set: case-sensitive letters, digits and the characters `_` and `-`. B64Url pulumi.StringOutput `pulumi:"b64Url"` - // The number of random bytes to produce. The - // minimum value is 1, which produces eight bits of randomness. + // The number of random bytes to produce. The minimum value is 1, which produces eight bits of randomness. ByteLength pulumi.IntOutput `pulumi:"byteLength"` // The generated id presented in non-padded decimal digits. Dec pulumi.StringOutput `pulumi:"dec"` // The generated id presented in padded hexadecimal digits. This result will always be twice as long as the requested byte length. Hex pulumi.StringOutput `pulumi:"hex"` - // Arbitrary map of values that, when changed, will - // trigger a new id to be generated. See - // the main provider documentation for more information. - Keepers pulumi.MapOutput `pulumi:"keepers"` - // Arbitrary string to prefix the output value with. This - // string is supplied as-is, meaning it is not guaranteed to be URL-safe or - // base64 encoded. + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers pulumi.StringMapOutput `pulumi:"keepers"` + // Arbitrary string to prefix the output value with. This string is supplied as-is, meaning it is not guaranteed to be URL-safe or base64 encoded. Prefix pulumi.StringPtrOutput `pulumi:"prefix"` } @@ -101,20 +141,15 @@ type randomIdState struct { B64Std *string `pulumi:"b64Std"` // The generated id presented in base64, using the URL-friendly character set: case-sensitive letters, digits and the characters `_` and `-`. B64Url *string `pulumi:"b64Url"` - // The number of random bytes to produce. The - // minimum value is 1, which produces eight bits of randomness. + // The number of random bytes to produce. The minimum value is 1, which produces eight bits of randomness. ByteLength *int `pulumi:"byteLength"` // The generated id presented in non-padded decimal digits. Dec *string `pulumi:"dec"` // The generated id presented in padded hexadecimal digits. This result will always be twice as long as the requested byte length. Hex *string `pulumi:"hex"` - // Arbitrary map of values that, when changed, will - // trigger a new id to be generated. See - // the main provider documentation for more information. - Keepers map[string]interface{} `pulumi:"keepers"` - // Arbitrary string to prefix the output value with. This - // string is supplied as-is, meaning it is not guaranteed to be URL-safe or - // base64 encoded. + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers map[string]string `pulumi:"keepers"` + // Arbitrary string to prefix the output value with. This string is supplied as-is, meaning it is not guaranteed to be URL-safe or base64 encoded. Prefix *string `pulumi:"prefix"` } @@ -123,20 +158,15 @@ type RandomIdState struct { B64Std pulumi.StringPtrInput // The generated id presented in base64, using the URL-friendly character set: case-sensitive letters, digits and the characters `_` and `-`. B64Url pulumi.StringPtrInput - // The number of random bytes to produce. The - // minimum value is 1, which produces eight bits of randomness. + // The number of random bytes to produce. The minimum value is 1, which produces eight bits of randomness. ByteLength pulumi.IntPtrInput // The generated id presented in non-padded decimal digits. Dec pulumi.StringPtrInput // The generated id presented in padded hexadecimal digits. This result will always be twice as long as the requested byte length. Hex pulumi.StringPtrInput - // Arbitrary map of values that, when changed, will - // trigger a new id to be generated. See - // the main provider documentation for more information. - Keepers pulumi.MapInput - // Arbitrary string to prefix the output value with. This - // string is supplied as-is, meaning it is not guaranteed to be URL-safe or - // base64 encoded. + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers pulumi.StringMapInput + // Arbitrary string to prefix the output value with. This string is supplied as-is, meaning it is not guaranteed to be URL-safe or base64 encoded. Prefix pulumi.StringPtrInput } @@ -145,31 +175,21 @@ func (RandomIdState) ElementType() reflect.Type { } type randomIdArgs struct { - // The number of random bytes to produce. The - // minimum value is 1, which produces eight bits of randomness. + // The number of random bytes to produce. The minimum value is 1, which produces eight bits of randomness. ByteLength int `pulumi:"byteLength"` - // Arbitrary map of values that, when changed, will - // trigger a new id to be generated. See - // the main provider documentation for more information. - Keepers map[string]interface{} `pulumi:"keepers"` - // Arbitrary string to prefix the output value with. This - // string is supplied as-is, meaning it is not guaranteed to be URL-safe or - // base64 encoded. + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers map[string]string `pulumi:"keepers"` + // Arbitrary string to prefix the output value with. This string is supplied as-is, meaning it is not guaranteed to be URL-safe or base64 encoded. Prefix *string `pulumi:"prefix"` } // The set of arguments for constructing a RandomId resource. type RandomIdArgs struct { - // The number of random bytes to produce. The - // minimum value is 1, which produces eight bits of randomness. + // The number of random bytes to produce. The minimum value is 1, which produces eight bits of randomness. ByteLength pulumi.IntInput - // Arbitrary map of values that, when changed, will - // trigger a new id to be generated. See - // the main provider documentation for more information. - Keepers pulumi.MapInput - // Arbitrary string to prefix the output value with. This - // string is supplied as-is, meaning it is not guaranteed to be URL-safe or - // base64 encoded. + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers pulumi.StringMapInput + // Arbitrary string to prefix the output value with. This string is supplied as-is, meaning it is not guaranteed to be URL-safe or base64 encoded. Prefix pulumi.StringPtrInput } @@ -270,8 +290,7 @@ func (o RandomIdOutput) B64Url() pulumi.StringOutput { return o.ApplyT(func(v *RandomId) pulumi.StringOutput { return v.B64Url }).(pulumi.StringOutput) } -// The number of random bytes to produce. The -// minimum value is 1, which produces eight bits of randomness. +// The number of random bytes to produce. The minimum value is 1, which produces eight bits of randomness. func (o RandomIdOutput) ByteLength() pulumi.IntOutput { return o.ApplyT(func(v *RandomId) pulumi.IntOutput { return v.ByteLength }).(pulumi.IntOutput) } @@ -286,16 +305,12 @@ func (o RandomIdOutput) Hex() pulumi.StringOutput { return o.ApplyT(func(v *RandomId) pulumi.StringOutput { return v.Hex }).(pulumi.StringOutput) } -// Arbitrary map of values that, when changed, will -// trigger a new id to be generated. See -// the main provider documentation for more information. -func (o RandomIdOutput) Keepers() pulumi.MapOutput { - return o.ApplyT(func(v *RandomId) pulumi.MapOutput { return v.Keepers }).(pulumi.MapOutput) +// Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. +func (o RandomIdOutput) Keepers() pulumi.StringMapOutput { + return o.ApplyT(func(v *RandomId) pulumi.StringMapOutput { return v.Keepers }).(pulumi.StringMapOutput) } -// Arbitrary string to prefix the output value with. This -// string is supplied as-is, meaning it is not guaranteed to be URL-safe or -// base64 encoded. +// Arbitrary string to prefix the output value with. This string is supplied as-is, meaning it is not guaranteed to be URL-safe or base64 encoded. func (o RandomIdOutput) Prefix() pulumi.StringPtrOutput { return o.ApplyT(func(v *RandomId) pulumi.StringPtrOutput { return v.Prefix }).(pulumi.StringPtrOutput) } diff --git a/sdk/go/random/randomInteger.go b/sdk/go/random/randomInteger.go index 0890ac8cb8..ff1095ee9d 100644 --- a/sdk/go/random/randomInteger.go +++ b/sdk/go/random/randomInteger.go @@ -13,16 +13,10 @@ import ( // The resource `RandomInteger` generates random values from a given range, described by the `min` and `max` attributes of a given resource. // -// This resource can be used in conjunction with resources that have -// the `createBeforeDestroy` lifecycle flag set, to avoid conflicts with -// unique names during the brief period where both the old and new resources -// exist concurrently. +// This resource can be used in conjunction with resources that have the `createBeforeDestroy` lifecycle flag set, to avoid conflicts with unique names during the brief period where both the old and new resources exist concurrently. // // ## Example Usage // -// The following example shows how to generate a random priority between 1 and 50000 for -// a `awsAlbListenerRule` resource: -// // ```go // package main // @@ -37,24 +31,26 @@ import ( // func main() { // pulumi.Run(func(ctx *pulumi.Context) error { // priority, err := random.NewRandomInteger(ctx, "priority", &random.RandomIntegerArgs{ -// Keepers: pulumi.AnyMap{ +// Min: pulumi.Int(1), +// Max: pulumi.Int(50000), +// Keepers: pulumi.StringMap{ // "listener_arn": pulumi.Any(_var.Listener_arn), // }, -// Max: pulumi.Int(50000), -// Min: pulumi.Int(1), // }) // if err != nil { // return err // } // _, err = alb.NewListenerRule(ctx, "main", &alb.ListenerRuleArgs{ +// ListenerArn: priority.Keepers.ApplyT(func(keepers interface{}) (*string, error) { +// return &keepers.ListenerArn, nil +// }).(pulumi.StringPtrOutput), +// Priority: priority.Result, // Actions: alb.ListenerRuleActionArray{ // &alb.ListenerRuleActionArgs{ -// TargetGroupArn: pulumi.Any(_var.Target_group_arn), // Type: pulumi.String("forward"), +// TargetGroupArn: pulumi.Any(_var.Target_group_arn), // }, // }, -// ListenerArn: pulumi.Any(_var.Listener_arn), -// Priority: priority.Result, // }) // if err != nil { // return err @@ -65,11 +61,9 @@ import ( // // ``` // -// The result of the above will set a random priority. -// // ## Import // -// Random integers can be imported using the `result`, `min`, and `max`, with an optional `seed`. This can be used to replace a config value with a value interpolated from the random provider without experiencing diffs. Example (values are separated by a `,`) +// Random integers can be imported using the result, min, and max, with an optional seed. This can be used to replace a config value with a value interpolated from the random provider without experiencing diffs. Example (values are separated by a ,) // // ```sh // @@ -79,15 +73,13 @@ import ( type RandomInteger struct { pulumi.CustomResourceState - // Arbitrary map of values that, when changed, will - // trigger a new id to be generated. See - // the main provider documentation for more information. - Keepers pulumi.MapOutput `pulumi:"keepers"` + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers pulumi.StringMapOutput `pulumi:"keepers"` // The maximum inclusive value of the range. Max pulumi.IntOutput `pulumi:"max"` // The minimum inclusive value of the range. Min pulumi.IntOutput `pulumi:"min"` - // (int) The random Integer result. + // The random integer result. Result pulumi.IntOutput `pulumi:"result"` // A custom seed to always produce the same value. Seed pulumi.StringPtrOutput `pulumi:"seed"` @@ -128,30 +120,26 @@ func GetRandomInteger(ctx *pulumi.Context, // Input properties used for looking up and filtering RandomInteger resources. type randomIntegerState struct { - // Arbitrary map of values that, when changed, will - // trigger a new id to be generated. See - // the main provider documentation for more information. - Keepers map[string]interface{} `pulumi:"keepers"` + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers map[string]string `pulumi:"keepers"` // The maximum inclusive value of the range. Max *int `pulumi:"max"` // The minimum inclusive value of the range. Min *int `pulumi:"min"` - // (int) The random Integer result. + // The random integer result. Result *int `pulumi:"result"` // A custom seed to always produce the same value. Seed *string `pulumi:"seed"` } type RandomIntegerState struct { - // Arbitrary map of values that, when changed, will - // trigger a new id to be generated. See - // the main provider documentation for more information. - Keepers pulumi.MapInput + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers pulumi.StringMapInput // The maximum inclusive value of the range. Max pulumi.IntPtrInput // The minimum inclusive value of the range. Min pulumi.IntPtrInput - // (int) The random Integer result. + // The random integer result. Result pulumi.IntPtrInput // A custom seed to always produce the same value. Seed pulumi.StringPtrInput @@ -162,10 +150,8 @@ func (RandomIntegerState) ElementType() reflect.Type { } type randomIntegerArgs struct { - // Arbitrary map of values that, when changed, will - // trigger a new id to be generated. See - // the main provider documentation for more information. - Keepers map[string]interface{} `pulumi:"keepers"` + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers map[string]string `pulumi:"keepers"` // The maximum inclusive value of the range. Max int `pulumi:"max"` // The minimum inclusive value of the range. @@ -176,10 +162,8 @@ type randomIntegerArgs struct { // The set of arguments for constructing a RandomInteger resource. type RandomIntegerArgs struct { - // Arbitrary map of values that, when changed, will - // trigger a new id to be generated. See - // the main provider documentation for more information. - Keepers pulumi.MapInput + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers pulumi.StringMapInput // The maximum inclusive value of the range. Max pulumi.IntInput // The minimum inclusive value of the range. @@ -275,11 +259,9 @@ func (o RandomIntegerOutput) ToRandomIntegerOutputWithContext(ctx context.Contex return o } -// Arbitrary map of values that, when changed, will -// trigger a new id to be generated. See -// the main provider documentation for more information. -func (o RandomIntegerOutput) Keepers() pulumi.MapOutput { - return o.ApplyT(func(v *RandomInteger) pulumi.MapOutput { return v.Keepers }).(pulumi.MapOutput) +// Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. +func (o RandomIntegerOutput) Keepers() pulumi.StringMapOutput { + return o.ApplyT(func(v *RandomInteger) pulumi.StringMapOutput { return v.Keepers }).(pulumi.StringMapOutput) } // The maximum inclusive value of the range. @@ -292,7 +274,7 @@ func (o RandomIntegerOutput) Min() pulumi.IntOutput { return o.ApplyT(func(v *RandomInteger) pulumi.IntOutput { return v.Min }).(pulumi.IntOutput) } -// (int) The random Integer result. +// The random integer result. func (o RandomIntegerOutput) Result() pulumi.IntOutput { return o.ApplyT(func(v *RandomInteger) pulumi.IntOutput { return v.Result }).(pulumi.IntOutput) } diff --git a/sdk/go/random/randomPassword.go b/sdk/go/random/randomPassword.go index 8befdb9920..aa00ad655d 100644 --- a/sdk/go/random/randomPassword.go +++ b/sdk/go/random/randomPassword.go @@ -11,17 +11,6 @@ import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) -// > **Note:** Requires random provider version >= 2.2.0 -// -// Identical to RandomString with the exception that the -// result is treated as sensitive and, thus, _not_ displayed in console output. -// -// > **Note:** All attributes including the generated password will be stored in -// the raw state as plain-text. [Read more about sensitive data in -// state](https://www.terraform.io/docs/state/sensitive-data.html). -// -// This resource *does* use a cryptographic random number generator. -// // ## Example Usage // // ```go @@ -42,7 +31,7 @@ import ( // password, err := random.NewRandomPassword(ctx, "password", &random.RandomPasswordArgs{ // Length: pulumi.Int(16), // Special: pulumi.Bool(true), -// OverrideSpecial: pulumi.String(fmt.Sprintf("_%v@", "%")), +// OverrideSpecial: pulumi.String(fmt.Sprintf("!#$%v&*()-_=+[]{}<>:?", "%")), // }) // if err != nil { // return err @@ -65,43 +54,96 @@ import ( // // ## Import // -// # Random Password can be imported by specifying the value of the string +// ### Avoiding Replacement // // ```sh // -// $ pulumi import random:index/randomPassword:RandomPassword password securepassword +// $ pulumi import random:index/randomPassword:RandomPassword If the resource were imported using `random_password.password securepassword`, // // ``` +// +// replacement could be avoided by using1. Attribute values that match the imported ID and defaults: +// +// terraform +// +// resource "random_password" "password" { +// +// length = 14 +// +// lower +// +// = true +// +// } 2. Attribute values that match the imported ID and omit the attributes with defaults: +// +// terraform +// +// resource "random_password" "password" { +// +// length = 14 +// +// } 3. `ignore_changes` specifying the attributes to ignore: +// +// terraform +// +// resource "random_password" "password" { +// +// length = 16 +// +// lower +// +// = false +// +// lifecycle { +// +// ignore_changes = [ +// +// length, +// +// lower, +// +// ] +// +// } +// +// } +// +// **NOTE** `ignore_changes` is only required until the resource is recreated after import, +// +// after which it will use the configuration values specified. type RandomPassword struct { pulumi.CustomResourceState - // Arbitrary map of values that, when changed, will trigger recreation of resource. See [the main provider - // documentation](../index.html) for more information. - Keepers pulumi.MapOutput `pulumi:"keepers"` - // The length of the string desired. + // A bcrypt hash of the generated random string. + BcryptHash pulumi.StringOutput `pulumi:"bcryptHash"` + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers pulumi.StringMapOutput `pulumi:"keepers"` + // The length of the string desired. The minimum value for length is 1 and, length must also be >= (`minUpper` + `minLower` + `minNumeric` + `minSpecial`). Length pulumi.IntOutput `pulumi:"length"` - // Include lowercase alphabet characters in the result. - Lower pulumi.BoolPtrOutput `pulumi:"lower"` - // Minimum number of lowercase alphabet characters in the result. - MinLower pulumi.IntPtrOutput `pulumi:"minLower"` - // Minimum number of numeric characters in the result. - MinNumeric pulumi.IntPtrOutput `pulumi:"minNumeric"` - // Minimum number of special characters in the result. - MinSpecial pulumi.IntPtrOutput `pulumi:"minSpecial"` - // Minimum number of uppercase alphabet characters in the result. - MinUpper pulumi.IntPtrOutput `pulumi:"minUpper"` - // Include numeric characters in the result. - Number pulumi.BoolPtrOutput `pulumi:"number"` - // Supply your own list of special characters to use for string generation. This overrides the default character list in - // the special argument. The `special` argument must still be set to true for any overwritten characters to be used in - // generation. + // Include lowercase alphabet characters in the result. Default value is `true`. + Lower pulumi.BoolOutput `pulumi:"lower"` + // Minimum number of lowercase alphabet characters in the result. Default value is `0`. + MinLower pulumi.IntOutput `pulumi:"minLower"` + // Minimum number of numeric characters in the result. Default value is `0`. + MinNumeric pulumi.IntOutput `pulumi:"minNumeric"` + // Minimum number of special characters in the result. Default value is `0`. + MinSpecial pulumi.IntOutput `pulumi:"minSpecial"` + // Minimum number of uppercase alphabet characters in the result. Default value is `0`. + MinUpper pulumi.IntOutput `pulumi:"minUpper"` + // Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. + // + // Deprecated: **NOTE**: This is deprecated, use `numeric` instead. + Number pulumi.BoolOutput `pulumi:"number"` + // Include numeric characters in the result. Default value is `true`. + Numeric pulumi.BoolOutput `pulumi:"numeric"` + // Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. OverrideSpecial pulumi.StringPtrOutput `pulumi:"overrideSpecial"` // The generated random string. Result pulumi.StringOutput `pulumi:"result"` - // Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?` - Special pulumi.BoolPtrOutput `pulumi:"special"` - // Include uppercase alphabet characters in the result. - Upper pulumi.BoolPtrOutput `pulumi:"upper"` + // Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. + Special pulumi.BoolOutput `pulumi:"special"` + // Include uppercase alphabet characters in the result. Default value is `true`. + Upper pulumi.BoolOutput `pulumi:"upper"` } // NewRandomPassword registers a new resource with the given unique name, arguments, and options. @@ -115,6 +157,7 @@ func NewRandomPassword(ctx *pulumi.Context, return nil, errors.New("invalid value for required argument 'Length'") } secrets := pulumi.AdditionalSecretOutputs([]string{ + "bcryptHash", "result", }) opts = append(opts, secrets) @@ -140,62 +183,68 @@ func GetRandomPassword(ctx *pulumi.Context, // Input properties used for looking up and filtering RandomPassword resources. type randomPasswordState struct { - // Arbitrary map of values that, when changed, will trigger recreation of resource. See [the main provider - // documentation](../index.html) for more information. - Keepers map[string]interface{} `pulumi:"keepers"` - // The length of the string desired. + // A bcrypt hash of the generated random string. + BcryptHash *string `pulumi:"bcryptHash"` + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers map[string]string `pulumi:"keepers"` + // The length of the string desired. The minimum value for length is 1 and, length must also be >= (`minUpper` + `minLower` + `minNumeric` + `minSpecial`). Length *int `pulumi:"length"` - // Include lowercase alphabet characters in the result. + // Include lowercase alphabet characters in the result. Default value is `true`. Lower *bool `pulumi:"lower"` - // Minimum number of lowercase alphabet characters in the result. + // Minimum number of lowercase alphabet characters in the result. Default value is `0`. MinLower *int `pulumi:"minLower"` - // Minimum number of numeric characters in the result. + // Minimum number of numeric characters in the result. Default value is `0`. MinNumeric *int `pulumi:"minNumeric"` - // Minimum number of special characters in the result. + // Minimum number of special characters in the result. Default value is `0`. MinSpecial *int `pulumi:"minSpecial"` - // Minimum number of uppercase alphabet characters in the result. + // Minimum number of uppercase alphabet characters in the result. Default value is `0`. MinUpper *int `pulumi:"minUpper"` - // Include numeric characters in the result. + // Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. + // + // Deprecated: **NOTE**: This is deprecated, use `numeric` instead. Number *bool `pulumi:"number"` - // Supply your own list of special characters to use for string generation. This overrides the default character list in - // the special argument. The `special` argument must still be set to true for any overwritten characters to be used in - // generation. + // Include numeric characters in the result. Default value is `true`. + Numeric *bool `pulumi:"numeric"` + // Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. OverrideSpecial *string `pulumi:"overrideSpecial"` // The generated random string. Result *string `pulumi:"result"` - // Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?` + // Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. Special *bool `pulumi:"special"` - // Include uppercase alphabet characters in the result. + // Include uppercase alphabet characters in the result. Default value is `true`. Upper *bool `pulumi:"upper"` } type RandomPasswordState struct { - // Arbitrary map of values that, when changed, will trigger recreation of resource. See [the main provider - // documentation](../index.html) for more information. - Keepers pulumi.MapInput - // The length of the string desired. + // A bcrypt hash of the generated random string. + BcryptHash pulumi.StringPtrInput + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers pulumi.StringMapInput + // The length of the string desired. The minimum value for length is 1 and, length must also be >= (`minUpper` + `minLower` + `minNumeric` + `minSpecial`). Length pulumi.IntPtrInput - // Include lowercase alphabet characters in the result. + // Include lowercase alphabet characters in the result. Default value is `true`. Lower pulumi.BoolPtrInput - // Minimum number of lowercase alphabet characters in the result. + // Minimum number of lowercase alphabet characters in the result. Default value is `0`. MinLower pulumi.IntPtrInput - // Minimum number of numeric characters in the result. + // Minimum number of numeric characters in the result. Default value is `0`. MinNumeric pulumi.IntPtrInput - // Minimum number of special characters in the result. + // Minimum number of special characters in the result. Default value is `0`. MinSpecial pulumi.IntPtrInput - // Minimum number of uppercase alphabet characters in the result. + // Minimum number of uppercase alphabet characters in the result. Default value is `0`. MinUpper pulumi.IntPtrInput - // Include numeric characters in the result. + // Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. + // + // Deprecated: **NOTE**: This is deprecated, use `numeric` instead. Number pulumi.BoolPtrInput - // Supply your own list of special characters to use for string generation. This overrides the default character list in - // the special argument. The `special` argument must still be set to true for any overwritten characters to be used in - // generation. + // Include numeric characters in the result. Default value is `true`. + Numeric pulumi.BoolPtrInput + // Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. OverrideSpecial pulumi.StringPtrInput // The generated random string. Result pulumi.StringPtrInput - // Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?` + // Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. Special pulumi.BoolPtrInput - // Include uppercase alphabet characters in the result. + // Include uppercase alphabet characters in the result. Default value is `true`. Upper pulumi.BoolPtrInput } @@ -204,59 +253,61 @@ func (RandomPasswordState) ElementType() reflect.Type { } type randomPasswordArgs struct { - // Arbitrary map of values that, when changed, will trigger recreation of resource. See [the main provider - // documentation](../index.html) for more information. - Keepers map[string]interface{} `pulumi:"keepers"` - // The length of the string desired. + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers map[string]string `pulumi:"keepers"` + // The length of the string desired. The minimum value for length is 1 and, length must also be >= (`minUpper` + `minLower` + `minNumeric` + `minSpecial`). Length int `pulumi:"length"` - // Include lowercase alphabet characters in the result. + // Include lowercase alphabet characters in the result. Default value is `true`. Lower *bool `pulumi:"lower"` - // Minimum number of lowercase alphabet characters in the result. + // Minimum number of lowercase alphabet characters in the result. Default value is `0`. MinLower *int `pulumi:"minLower"` - // Minimum number of numeric characters in the result. + // Minimum number of numeric characters in the result. Default value is `0`. MinNumeric *int `pulumi:"minNumeric"` - // Minimum number of special characters in the result. + // Minimum number of special characters in the result. Default value is `0`. MinSpecial *int `pulumi:"minSpecial"` - // Minimum number of uppercase alphabet characters in the result. + // Minimum number of uppercase alphabet characters in the result. Default value is `0`. MinUpper *int `pulumi:"minUpper"` - // Include numeric characters in the result. + // Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. + // + // Deprecated: **NOTE**: This is deprecated, use `numeric` instead. Number *bool `pulumi:"number"` - // Supply your own list of special characters to use for string generation. This overrides the default character list in - // the special argument. The `special` argument must still be set to true for any overwritten characters to be used in - // generation. + // Include numeric characters in the result. Default value is `true`. + Numeric *bool `pulumi:"numeric"` + // Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. OverrideSpecial *string `pulumi:"overrideSpecial"` - // Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?` + // Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. Special *bool `pulumi:"special"` - // Include uppercase alphabet characters in the result. + // Include uppercase alphabet characters in the result. Default value is `true`. Upper *bool `pulumi:"upper"` } // The set of arguments for constructing a RandomPassword resource. type RandomPasswordArgs struct { - // Arbitrary map of values that, when changed, will trigger recreation of resource. See [the main provider - // documentation](../index.html) for more information. - Keepers pulumi.MapInput - // The length of the string desired. + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers pulumi.StringMapInput + // The length of the string desired. The minimum value for length is 1 and, length must also be >= (`minUpper` + `minLower` + `minNumeric` + `minSpecial`). Length pulumi.IntInput - // Include lowercase alphabet characters in the result. + // Include lowercase alphabet characters in the result. Default value is `true`. Lower pulumi.BoolPtrInput - // Minimum number of lowercase alphabet characters in the result. + // Minimum number of lowercase alphabet characters in the result. Default value is `0`. MinLower pulumi.IntPtrInput - // Minimum number of numeric characters in the result. + // Minimum number of numeric characters in the result. Default value is `0`. MinNumeric pulumi.IntPtrInput - // Minimum number of special characters in the result. + // Minimum number of special characters in the result. Default value is `0`. MinSpecial pulumi.IntPtrInput - // Minimum number of uppercase alphabet characters in the result. + // Minimum number of uppercase alphabet characters in the result. Default value is `0`. MinUpper pulumi.IntPtrInput - // Include numeric characters in the result. + // Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. + // + // Deprecated: **NOTE**: This is deprecated, use `numeric` instead. Number pulumi.BoolPtrInput - // Supply your own list of special characters to use for string generation. This overrides the default character list in - // the special argument. The `special` argument must still be set to true for any overwritten characters to be used in - // generation. + // Include numeric characters in the result. Default value is `true`. + Numeric pulumi.BoolPtrInput + // Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. OverrideSpecial pulumi.StringPtrInput - // Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?` + // Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. Special pulumi.BoolPtrInput - // Include uppercase alphabet characters in the result. + // Include uppercase alphabet characters in the result. Default value is `true`. Upper pulumi.BoolPtrInput } @@ -347,50 +398,59 @@ func (o RandomPasswordOutput) ToRandomPasswordOutputWithContext(ctx context.Cont return o } -// Arbitrary map of values that, when changed, will trigger recreation of resource. See [the main provider -// documentation](../index.html) for more information. -func (o RandomPasswordOutput) Keepers() pulumi.MapOutput { - return o.ApplyT(func(v *RandomPassword) pulumi.MapOutput { return v.Keepers }).(pulumi.MapOutput) +// A bcrypt hash of the generated random string. +func (o RandomPasswordOutput) BcryptHash() pulumi.StringOutput { + return o.ApplyT(func(v *RandomPassword) pulumi.StringOutput { return v.BcryptHash }).(pulumi.StringOutput) } -// The length of the string desired. +// Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. +func (o RandomPasswordOutput) Keepers() pulumi.StringMapOutput { + return o.ApplyT(func(v *RandomPassword) pulumi.StringMapOutput { return v.Keepers }).(pulumi.StringMapOutput) +} + +// The length of the string desired. The minimum value for length is 1 and, length must also be >= (`minUpper` + `minLower` + `minNumeric` + `minSpecial`). func (o RandomPasswordOutput) Length() pulumi.IntOutput { return o.ApplyT(func(v *RandomPassword) pulumi.IntOutput { return v.Length }).(pulumi.IntOutput) } -// Include lowercase alphabet characters in the result. -func (o RandomPasswordOutput) Lower() pulumi.BoolPtrOutput { - return o.ApplyT(func(v *RandomPassword) pulumi.BoolPtrOutput { return v.Lower }).(pulumi.BoolPtrOutput) +// Include lowercase alphabet characters in the result. Default value is `true`. +func (o RandomPasswordOutput) Lower() pulumi.BoolOutput { + return o.ApplyT(func(v *RandomPassword) pulumi.BoolOutput { return v.Lower }).(pulumi.BoolOutput) +} + +// Minimum number of lowercase alphabet characters in the result. Default value is `0`. +func (o RandomPasswordOutput) MinLower() pulumi.IntOutput { + return o.ApplyT(func(v *RandomPassword) pulumi.IntOutput { return v.MinLower }).(pulumi.IntOutput) } -// Minimum number of lowercase alphabet characters in the result. -func (o RandomPasswordOutput) MinLower() pulumi.IntPtrOutput { - return o.ApplyT(func(v *RandomPassword) pulumi.IntPtrOutput { return v.MinLower }).(pulumi.IntPtrOutput) +// Minimum number of numeric characters in the result. Default value is `0`. +func (o RandomPasswordOutput) MinNumeric() pulumi.IntOutput { + return o.ApplyT(func(v *RandomPassword) pulumi.IntOutput { return v.MinNumeric }).(pulumi.IntOutput) } -// Minimum number of numeric characters in the result. -func (o RandomPasswordOutput) MinNumeric() pulumi.IntPtrOutput { - return o.ApplyT(func(v *RandomPassword) pulumi.IntPtrOutput { return v.MinNumeric }).(pulumi.IntPtrOutput) +// Minimum number of special characters in the result. Default value is `0`. +func (o RandomPasswordOutput) MinSpecial() pulumi.IntOutput { + return o.ApplyT(func(v *RandomPassword) pulumi.IntOutput { return v.MinSpecial }).(pulumi.IntOutput) } -// Minimum number of special characters in the result. -func (o RandomPasswordOutput) MinSpecial() pulumi.IntPtrOutput { - return o.ApplyT(func(v *RandomPassword) pulumi.IntPtrOutput { return v.MinSpecial }).(pulumi.IntPtrOutput) +// Minimum number of uppercase alphabet characters in the result. Default value is `0`. +func (o RandomPasswordOutput) MinUpper() pulumi.IntOutput { + return o.ApplyT(func(v *RandomPassword) pulumi.IntOutput { return v.MinUpper }).(pulumi.IntOutput) } -// Minimum number of uppercase alphabet characters in the result. -func (o RandomPasswordOutput) MinUpper() pulumi.IntPtrOutput { - return o.ApplyT(func(v *RandomPassword) pulumi.IntPtrOutput { return v.MinUpper }).(pulumi.IntPtrOutput) +// Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. +// +// Deprecated: **NOTE**: This is deprecated, use `numeric` instead. +func (o RandomPasswordOutput) Number() pulumi.BoolOutput { + return o.ApplyT(func(v *RandomPassword) pulumi.BoolOutput { return v.Number }).(pulumi.BoolOutput) } -// Include numeric characters in the result. -func (o RandomPasswordOutput) Number() pulumi.BoolPtrOutput { - return o.ApplyT(func(v *RandomPassword) pulumi.BoolPtrOutput { return v.Number }).(pulumi.BoolPtrOutput) +// Include numeric characters in the result. Default value is `true`. +func (o RandomPasswordOutput) Numeric() pulumi.BoolOutput { + return o.ApplyT(func(v *RandomPassword) pulumi.BoolOutput { return v.Numeric }).(pulumi.BoolOutput) } -// Supply your own list of special characters to use for string generation. This overrides the default character list in -// the special argument. The `special` argument must still be set to true for any overwritten characters to be used in -// generation. +// Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. func (o RandomPasswordOutput) OverrideSpecial() pulumi.StringPtrOutput { return o.ApplyT(func(v *RandomPassword) pulumi.StringPtrOutput { return v.OverrideSpecial }).(pulumi.StringPtrOutput) } @@ -400,14 +460,14 @@ func (o RandomPasswordOutput) Result() pulumi.StringOutput { return o.ApplyT(func(v *RandomPassword) pulumi.StringOutput { return v.Result }).(pulumi.StringOutput) } -// Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?` -func (o RandomPasswordOutput) Special() pulumi.BoolPtrOutput { - return o.ApplyT(func(v *RandomPassword) pulumi.BoolPtrOutput { return v.Special }).(pulumi.BoolPtrOutput) +// Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. +func (o RandomPasswordOutput) Special() pulumi.BoolOutput { + return o.ApplyT(func(v *RandomPassword) pulumi.BoolOutput { return v.Special }).(pulumi.BoolOutput) } -// Include uppercase alphabet characters in the result. -func (o RandomPasswordOutput) Upper() pulumi.BoolPtrOutput { - return o.ApplyT(func(v *RandomPassword) pulumi.BoolPtrOutput { return v.Upper }).(pulumi.BoolPtrOutput) +// Include uppercase alphabet characters in the result. Default value is `true`. +func (o RandomPasswordOutput) Upper() pulumi.BoolOutput { + return o.ApplyT(func(v *RandomPassword) pulumi.BoolOutput { return v.Upper }).(pulumi.BoolOutput) } type RandomPasswordArrayOutput struct{ *pulumi.OutputState } diff --git a/sdk/go/random/randomPet.go b/sdk/go/random/randomPet.go index 4647a0deaa..8107fab07a 100644 --- a/sdk/go/random/randomPet.go +++ b/sdk/go/random/randomPet.go @@ -10,26 +10,64 @@ import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) -// The resource `RandomPet` generates random pet names that are intended to be -// used as unique identifiers for other resources. +// The resource `RandomPet` generates random pet names that are intended to be used as unique identifiers for other resources. // -// This resource can be used in conjunction with resources that have -// the `createBeforeDestroy` lifecycle flag set, to avoid conflicts with -// unique names during the brief period where both the old and new resources -// exist concurrently. +// This resource can be used in conjunction with resources that have the `createBeforeDestroy` lifecycle flag set, to avoid conflicts with unique names during the brief period where both the old and new resources exist concurrently. +// +// ## Example Usage +// +// ```go +// package main +// +// import ( +// +// "fmt" +// +// "github.com/pulumi/pulumi-aws/sdk/v5/go/aws/ec2" +// "github.com/pulumi/pulumi-random/sdk/v4/go/random" +// "github.com/pulumi/pulumi/sdk/v3/go/pulumi" +// +// ) +// +// func main() { +// pulumi.Run(func(ctx *pulumi.Context) error { +// serverRandomPet, err := random.NewRandomPet(ctx, "serverRandomPet", &random.RandomPetArgs{ +// Keepers: pulumi.StringMap{ +// "ami_id": pulumi.Any(_var.Ami_id), +// }, +// }) +// if err != nil { +// return err +// } +// _, err = ec2.NewInstance(ctx, "serverInstance", &ec2.InstanceArgs{ +// Tags: pulumi.StringMap{ +// "Name": serverRandomPet.ID().ApplyT(func(id string) (string, error) { +// return fmt.Sprintf("web-server-%v", id), nil +// }).(pulumi.StringOutput), +// }, +// Ami: serverRandomPet.Keepers.ApplyT(func(keepers interface{}) (*string, error) { +// return &keepers.AmiId, nil +// }).(pulumi.StringPtrOutput), +// }) +// if err != nil { +// return err +// } +// return nil +// }) +// } +// +// ``` type RandomPet struct { pulumi.CustomResourceState - // Arbitrary map of values that, when changed, will - // trigger a new id to be generated. See - // the main provider documentation for more information. - Keepers pulumi.MapOutput `pulumi:"keepers"` - // The length (in words) of the pet name. - Length pulumi.IntPtrOutput `pulumi:"length"` + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers pulumi.StringMapOutput `pulumi:"keepers"` + // The length (in words) of the pet name. Defaults to 2 + Length pulumi.IntOutput `pulumi:"length"` // A string to prefix the name with. Prefix pulumi.StringPtrOutput `pulumi:"prefix"` - // The character to separate words in the pet name. - Separator pulumi.StringPtrOutput `pulumi:"separator"` + // The character to separate words in the pet name. Defaults to "-" + Separator pulumi.StringOutput `pulumi:"separator"` } // NewRandomPet registers a new resource with the given unique name, arguments, and options. @@ -61,28 +99,24 @@ func GetRandomPet(ctx *pulumi.Context, // Input properties used for looking up and filtering RandomPet resources. type randomPetState struct { - // Arbitrary map of values that, when changed, will - // trigger a new id to be generated. See - // the main provider documentation for more information. - Keepers map[string]interface{} `pulumi:"keepers"` - // The length (in words) of the pet name. + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers map[string]string `pulumi:"keepers"` + // The length (in words) of the pet name. Defaults to 2 Length *int `pulumi:"length"` // A string to prefix the name with. Prefix *string `pulumi:"prefix"` - // The character to separate words in the pet name. + // The character to separate words in the pet name. Defaults to "-" Separator *string `pulumi:"separator"` } type RandomPetState struct { - // Arbitrary map of values that, when changed, will - // trigger a new id to be generated. See - // the main provider documentation for more information. - Keepers pulumi.MapInput - // The length (in words) of the pet name. + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers pulumi.StringMapInput + // The length (in words) of the pet name. Defaults to 2 Length pulumi.IntPtrInput // A string to prefix the name with. Prefix pulumi.StringPtrInput - // The character to separate words in the pet name. + // The character to separate words in the pet name. Defaults to "-" Separator pulumi.StringPtrInput } @@ -91,29 +125,25 @@ func (RandomPetState) ElementType() reflect.Type { } type randomPetArgs struct { - // Arbitrary map of values that, when changed, will - // trigger a new id to be generated. See - // the main provider documentation for more information. - Keepers map[string]interface{} `pulumi:"keepers"` - // The length (in words) of the pet name. + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers map[string]string `pulumi:"keepers"` + // The length (in words) of the pet name. Defaults to 2 Length *int `pulumi:"length"` // A string to prefix the name with. Prefix *string `pulumi:"prefix"` - // The character to separate words in the pet name. + // The character to separate words in the pet name. Defaults to "-" Separator *string `pulumi:"separator"` } // The set of arguments for constructing a RandomPet resource. type RandomPetArgs struct { - // Arbitrary map of values that, when changed, will - // trigger a new id to be generated. See - // the main provider documentation for more information. - Keepers pulumi.MapInput - // The length (in words) of the pet name. + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers pulumi.StringMapInput + // The length (in words) of the pet name. Defaults to 2 Length pulumi.IntPtrInput // A string to prefix the name with. Prefix pulumi.StringPtrInput - // The character to separate words in the pet name. + // The character to separate words in the pet name. Defaults to "-" Separator pulumi.StringPtrInput } @@ -204,16 +234,14 @@ func (o RandomPetOutput) ToRandomPetOutputWithContext(ctx context.Context) Rando return o } -// Arbitrary map of values that, when changed, will -// trigger a new id to be generated. See -// the main provider documentation for more information. -func (o RandomPetOutput) Keepers() pulumi.MapOutput { - return o.ApplyT(func(v *RandomPet) pulumi.MapOutput { return v.Keepers }).(pulumi.MapOutput) +// Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. +func (o RandomPetOutput) Keepers() pulumi.StringMapOutput { + return o.ApplyT(func(v *RandomPet) pulumi.StringMapOutput { return v.Keepers }).(pulumi.StringMapOutput) } -// The length (in words) of the pet name. -func (o RandomPetOutput) Length() pulumi.IntPtrOutput { - return o.ApplyT(func(v *RandomPet) pulumi.IntPtrOutput { return v.Length }).(pulumi.IntPtrOutput) +// The length (in words) of the pet name. Defaults to 2 +func (o RandomPetOutput) Length() pulumi.IntOutput { + return o.ApplyT(func(v *RandomPet) pulumi.IntOutput { return v.Length }).(pulumi.IntOutput) } // A string to prefix the name with. @@ -221,9 +249,9 @@ func (o RandomPetOutput) Prefix() pulumi.StringPtrOutput { return o.ApplyT(func(v *RandomPet) pulumi.StringPtrOutput { return v.Prefix }).(pulumi.StringPtrOutput) } -// The character to separate words in the pet name. -func (o RandomPetOutput) Separator() pulumi.StringPtrOutput { - return o.ApplyT(func(v *RandomPet) pulumi.StringPtrOutput { return v.Separator }).(pulumi.StringPtrOutput) +// The character to separate words in the pet name. Defaults to "-" +func (o RandomPetOutput) Separator() pulumi.StringOutput { + return o.ApplyT(func(v *RandomPet) pulumi.StringOutput { return v.Separator }).(pulumi.StringOutput) } type RandomPetArrayOutput struct{ *pulumi.OutputState } diff --git a/sdk/go/random/randomShuffle.go b/sdk/go/random/randomShuffle.go index 3be28fad18..ff6c339136 100644 --- a/sdk/go/random/randomShuffle.go +++ b/sdk/go/random/randomShuffle.go @@ -11,8 +11,7 @@ import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) -// The resource `RandomShuffle` generates a random permutation of a list -// of strings given as an argument. +// The resource `RandomShuffle` generates a random permutation of a list of strings given as an argument. // // ## Example Usage // @@ -42,7 +41,9 @@ import ( // return err // } // _, err = elb.NewLoadBalancer(ctx, "example", &elb.LoadBalancerArgs{ -// AvailabilityZones: az.Results, +// AvailabilityZones: pulumi.StringArray{ +// az.Results, +// }, // }) // if err != nil { // return err @@ -57,21 +58,13 @@ type RandomShuffle struct { // The list of strings to shuffle. Inputs pulumi.StringArrayOutput `pulumi:"inputs"` - // Arbitrary map of values that, when changed, will - // trigger a new id to be generated. See - // the main provider documentation for more information. - Keepers pulumi.MapOutput `pulumi:"keepers"` - // The number of results to return. Defaults to - // the number of items in the `input` list. If fewer items are requested, - // some elements will be excluded from the result. If more items are requested, - // items will be repeated in the result but not more frequently than the number - // of items in the input list. + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers pulumi.StringMapOutput `pulumi:"keepers"` + // The number of results to return. Defaults to the number of items in the `input` list. If fewer items are requested, some elements will be excluded from the result. If more items are requested, items will be repeated in the result but not more frequently than the number of items in the input list. ResultCount pulumi.IntPtrOutput `pulumi:"resultCount"` // Random permutation of the list of strings given in `input`. Results pulumi.StringArrayOutput `pulumi:"results"` - // Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the - // list. **Important:** Even with an identical seed, it is not guaranteed that the same permutation will be produced across - // different versions of Terraform. This argument causes the result to be *less volatile*, but not fixed for all time. + // Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the list. Seed pulumi.StringPtrOutput `pulumi:"seed"` } @@ -109,42 +102,26 @@ func GetRandomShuffle(ctx *pulumi.Context, type randomShuffleState struct { // The list of strings to shuffle. Inputs []string `pulumi:"inputs"` - // Arbitrary map of values that, when changed, will - // trigger a new id to be generated. See - // the main provider documentation for more information. - Keepers map[string]interface{} `pulumi:"keepers"` - // The number of results to return. Defaults to - // the number of items in the `input` list. If fewer items are requested, - // some elements will be excluded from the result. If more items are requested, - // items will be repeated in the result but not more frequently than the number - // of items in the input list. + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers map[string]string `pulumi:"keepers"` + // The number of results to return. Defaults to the number of items in the `input` list. If fewer items are requested, some elements will be excluded from the result. If more items are requested, items will be repeated in the result but not more frequently than the number of items in the input list. ResultCount *int `pulumi:"resultCount"` // Random permutation of the list of strings given in `input`. Results []string `pulumi:"results"` - // Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the - // list. **Important:** Even with an identical seed, it is not guaranteed that the same permutation will be produced across - // different versions of Terraform. This argument causes the result to be *less volatile*, but not fixed for all time. + // Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the list. Seed *string `pulumi:"seed"` } type RandomShuffleState struct { // The list of strings to shuffle. Inputs pulumi.StringArrayInput - // Arbitrary map of values that, when changed, will - // trigger a new id to be generated. See - // the main provider documentation for more information. - Keepers pulumi.MapInput - // The number of results to return. Defaults to - // the number of items in the `input` list. If fewer items are requested, - // some elements will be excluded from the result. If more items are requested, - // items will be repeated in the result but not more frequently than the number - // of items in the input list. + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers pulumi.StringMapInput + // The number of results to return. Defaults to the number of items in the `input` list. If fewer items are requested, some elements will be excluded from the result. If more items are requested, items will be repeated in the result but not more frequently than the number of items in the input list. ResultCount pulumi.IntPtrInput // Random permutation of the list of strings given in `input`. Results pulumi.StringArrayInput - // Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the - // list. **Important:** Even with an identical seed, it is not guaranteed that the same permutation will be produced across - // different versions of Terraform. This argument causes the result to be *less volatile*, but not fixed for all time. + // Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the list. Seed pulumi.StringPtrInput } @@ -155,19 +132,11 @@ func (RandomShuffleState) ElementType() reflect.Type { type randomShuffleArgs struct { // The list of strings to shuffle. Inputs []string `pulumi:"inputs"` - // Arbitrary map of values that, when changed, will - // trigger a new id to be generated. See - // the main provider documentation for more information. - Keepers map[string]interface{} `pulumi:"keepers"` - // The number of results to return. Defaults to - // the number of items in the `input` list. If fewer items are requested, - // some elements will be excluded from the result. If more items are requested, - // items will be repeated in the result but not more frequently than the number - // of items in the input list. + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers map[string]string `pulumi:"keepers"` + // The number of results to return. Defaults to the number of items in the `input` list. If fewer items are requested, some elements will be excluded from the result. If more items are requested, items will be repeated in the result but not more frequently than the number of items in the input list. ResultCount *int `pulumi:"resultCount"` - // Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the - // list. **Important:** Even with an identical seed, it is not guaranteed that the same permutation will be produced across - // different versions of Terraform. This argument causes the result to be *less volatile*, but not fixed for all time. + // Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the list. Seed *string `pulumi:"seed"` } @@ -175,19 +144,11 @@ type randomShuffleArgs struct { type RandomShuffleArgs struct { // The list of strings to shuffle. Inputs pulumi.StringArrayInput - // Arbitrary map of values that, when changed, will - // trigger a new id to be generated. See - // the main provider documentation for more information. - Keepers pulumi.MapInput - // The number of results to return. Defaults to - // the number of items in the `input` list. If fewer items are requested, - // some elements will be excluded from the result. If more items are requested, - // items will be repeated in the result but not more frequently than the number - // of items in the input list. + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers pulumi.StringMapInput + // The number of results to return. Defaults to the number of items in the `input` list. If fewer items are requested, some elements will be excluded from the result. If more items are requested, items will be repeated in the result but not more frequently than the number of items in the input list. ResultCount pulumi.IntPtrInput - // Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the - // list. **Important:** Even with an identical seed, it is not guaranteed that the same permutation will be produced across - // different versions of Terraform. This argument causes the result to be *less volatile*, but not fixed for all time. + // Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the list. Seed pulumi.StringPtrInput } @@ -283,18 +244,12 @@ func (o RandomShuffleOutput) Inputs() pulumi.StringArrayOutput { return o.ApplyT(func(v *RandomShuffle) pulumi.StringArrayOutput { return v.Inputs }).(pulumi.StringArrayOutput) } -// Arbitrary map of values that, when changed, will -// trigger a new id to be generated. See -// the main provider documentation for more information. -func (o RandomShuffleOutput) Keepers() pulumi.MapOutput { - return o.ApplyT(func(v *RandomShuffle) pulumi.MapOutput { return v.Keepers }).(pulumi.MapOutput) +// Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. +func (o RandomShuffleOutput) Keepers() pulumi.StringMapOutput { + return o.ApplyT(func(v *RandomShuffle) pulumi.StringMapOutput { return v.Keepers }).(pulumi.StringMapOutput) } -// The number of results to return. Defaults to -// the number of items in the `input` list. If fewer items are requested, -// some elements will be excluded from the result. If more items are requested, -// items will be repeated in the result but not more frequently than the number -// of items in the input list. +// The number of results to return. Defaults to the number of items in the `input` list. If fewer items are requested, some elements will be excluded from the result. If more items are requested, items will be repeated in the result but not more frequently than the number of items in the input list. func (o RandomShuffleOutput) ResultCount() pulumi.IntPtrOutput { return o.ApplyT(func(v *RandomShuffle) pulumi.IntPtrOutput { return v.ResultCount }).(pulumi.IntPtrOutput) } @@ -304,9 +259,7 @@ func (o RandomShuffleOutput) Results() pulumi.StringArrayOutput { return o.ApplyT(func(v *RandomShuffle) pulumi.StringArrayOutput { return v.Results }).(pulumi.StringArrayOutput) } -// Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the -// list. **Important:** Even with an identical seed, it is not guaranteed that the same permutation will be produced across -// different versions of Terraform. This argument causes the result to be *less volatile*, but not fixed for all time. +// Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the list. func (o RandomShuffleOutput) Seed() pulumi.StringPtrOutput { return o.ApplyT(func(v *RandomShuffle) pulumi.StringPtrOutput { return v.Seed }).(pulumi.StringPtrOutput) } diff --git a/sdk/go/random/randomString.go b/sdk/go/random/randomString.go index 6a10ce91c9..d020e6f2ea 100644 --- a/sdk/go/random/randomString.go +++ b/sdk/go/random/randomString.go @@ -11,15 +11,11 @@ import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) -// The resource `RandomString` generates a random permutation of alphanumeric -// characters and optionally special characters. +// The resource `RandomString` generates a random permutation of alphanumeric characters and optionally special characters. // // This resource *does* use a cryptographic random number generator. // -// Historically this resource's intended usage has been ambiguous as the original example -// used it in a password. For backwards compatibility it will -// continue to exist. For unique ids please use random_id, for sensitive -// random values please use random_password. +// Historically this resource's intended usage has been ambiguous as the original example used it in a password. For backwards compatibility it will continue to exist. For unique ids please use random_id, for sensitive random values please use random_password. // // ## Example Usage // @@ -53,53 +49,94 @@ import ( // // ## Import // -// # Strings can be imported by just specifying the value of the string +// ### Avoiding Replacement // // ```sh // -// $ pulumi import random:index/randomString:RandomString test test +// $ pulumi import random:index/randomString:RandomString If the resource were imported using `random_string.test test`, // // ``` +// +// replacement can be avoided by using1. Attribute values that match the imported ID and defaults: +// +// terraform +// +// resource "random_string" "test" { +// +// length = 4 +// +// lower +// +// = true +// +// } 2. Attribute values that match the imported ID and omit the attributes with defaults: +// +// terraform +// +// resource "random_string" "test" { +// +// length = 4 +// +// } 3. `ignore_changes` specifying the attributes to ignore: +// +// terraform +// +// resource "random_string" "test" { +// +// length = 16 +// +// lower +// +// = false +// +// lifecycle { +// +// ignore_changes = [ +// +// length, +// +// lower, +// +// ] +// +// } +// +// } +// +// **NOTE** `ignore_changes` is only required until the resource is recreated after import, +// +// after which it will use the configuration values specified. type RandomString struct { pulumi.CustomResourceState - // Arbitrary map of values that, when changed, will - // trigger a new id to be generated. See - // the main provider documentation for more information. - Keepers pulumi.MapOutput `pulumi:"keepers"` - // The length of the string desired + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers pulumi.StringMapOutput `pulumi:"keepers"` + // The length of the string desired. The minimum value for length is 1 and, length must also be >= (`minUpper` + `minLower` + `minNumeric` + `minSpecial`). Length pulumi.IntOutput `pulumi:"length"` - // (default true) Include lowercase alphabet characters - // in random string. - Lower pulumi.BoolPtrOutput `pulumi:"lower"` - // (default 0) Minimum number of lowercase alphabet - // characters in random string. - MinLower pulumi.IntPtrOutput `pulumi:"minLower"` - // (default 0) Minimum number of numeric characters - // in random string. - MinNumeric pulumi.IntPtrOutput `pulumi:"minNumeric"` - // (default 0) Minimum number of special characters - // in random string. - MinSpecial pulumi.IntPtrOutput `pulumi:"minSpecial"` - // (default 0) Minimum number of uppercase alphabet - // characters in random string. - MinUpper pulumi.IntPtrOutput `pulumi:"minUpper"` - // (default true) Include numeric characters in random - // string. - Number pulumi.BoolPtrOutput `pulumi:"number"` - // Supply your own list of special characters to - // use for string generation. This overrides the default character list in the special - // argument. The special argument must still be set to true for any overwritten - // characters to be used in generation. + // Include lowercase alphabet characters in the result. Default value is `true`. + Lower pulumi.BoolOutput `pulumi:"lower"` + // Minimum number of lowercase alphabet characters in the result. Default value is `0`. + MinLower pulumi.IntOutput `pulumi:"minLower"` + // Minimum number of numeric characters in the result. Default value is `0`. + MinNumeric pulumi.IntOutput `pulumi:"minNumeric"` + // Minimum number of special characters in the result. Default value is `0`. + MinSpecial pulumi.IntOutput `pulumi:"minSpecial"` + // Minimum number of uppercase alphabet characters in the result. Default value is `0`. + MinUpper pulumi.IntOutput `pulumi:"minUpper"` + // Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. + // + // Deprecated: **NOTE**: This is deprecated, use `numeric` instead. + Number pulumi.BoolOutput `pulumi:"number"` + // Include numeric characters in the result. Default value is `true`. + Numeric pulumi.BoolOutput `pulumi:"numeric"` + // Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. OverrideSpecial pulumi.StringPtrOutput `pulumi:"overrideSpecial"` - // Random string generated. + // The generated random string. Result pulumi.StringOutput `pulumi:"result"` - // (default true) Include special characters in random - // string. These are `!@#$%&*()-_=+[]{}<>:?` - Special pulumi.BoolPtrOutput `pulumi:"special"` - // (default true) Include uppercase alphabet characters - // in random string. - Upper pulumi.BoolPtrOutput `pulumi:"upper"` + // Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. + Special pulumi.BoolOutput `pulumi:"special"` + // Include uppercase alphabet characters in the result. Default value is `true`. + Upper pulumi.BoolOutput `pulumi:"upper"` } // NewRandomString registers a new resource with the given unique name, arguments, and options. @@ -134,82 +171,64 @@ func GetRandomString(ctx *pulumi.Context, // Input properties used for looking up and filtering RandomString resources. type randomStringState struct { - // Arbitrary map of values that, when changed, will - // trigger a new id to be generated. See - // the main provider documentation for more information. - Keepers map[string]interface{} `pulumi:"keepers"` - // The length of the string desired + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers map[string]string `pulumi:"keepers"` + // The length of the string desired. The minimum value for length is 1 and, length must also be >= (`minUpper` + `minLower` + `minNumeric` + `minSpecial`). Length *int `pulumi:"length"` - // (default true) Include lowercase alphabet characters - // in random string. + // Include lowercase alphabet characters in the result. Default value is `true`. Lower *bool `pulumi:"lower"` - // (default 0) Minimum number of lowercase alphabet - // characters in random string. + // Minimum number of lowercase alphabet characters in the result. Default value is `0`. MinLower *int `pulumi:"minLower"` - // (default 0) Minimum number of numeric characters - // in random string. + // Minimum number of numeric characters in the result. Default value is `0`. MinNumeric *int `pulumi:"minNumeric"` - // (default 0) Minimum number of special characters - // in random string. + // Minimum number of special characters in the result. Default value is `0`. MinSpecial *int `pulumi:"minSpecial"` - // (default 0) Minimum number of uppercase alphabet - // characters in random string. + // Minimum number of uppercase alphabet characters in the result. Default value is `0`. MinUpper *int `pulumi:"minUpper"` - // (default true) Include numeric characters in random - // string. + // Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. + // + // Deprecated: **NOTE**: This is deprecated, use `numeric` instead. Number *bool `pulumi:"number"` - // Supply your own list of special characters to - // use for string generation. This overrides the default character list in the special - // argument. The special argument must still be set to true for any overwritten - // characters to be used in generation. + // Include numeric characters in the result. Default value is `true`. + Numeric *bool `pulumi:"numeric"` + // Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. OverrideSpecial *string `pulumi:"overrideSpecial"` - // Random string generated. + // The generated random string. Result *string `pulumi:"result"` - // (default true) Include special characters in random - // string. These are `!@#$%&*()-_=+[]{}<>:?` + // Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. Special *bool `pulumi:"special"` - // (default true) Include uppercase alphabet characters - // in random string. + // Include uppercase alphabet characters in the result. Default value is `true`. Upper *bool `pulumi:"upper"` } type RandomStringState struct { - // Arbitrary map of values that, when changed, will - // trigger a new id to be generated. See - // the main provider documentation for more information. - Keepers pulumi.MapInput - // The length of the string desired + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers pulumi.StringMapInput + // The length of the string desired. The minimum value for length is 1 and, length must also be >= (`minUpper` + `minLower` + `minNumeric` + `minSpecial`). Length pulumi.IntPtrInput - // (default true) Include lowercase alphabet characters - // in random string. + // Include lowercase alphabet characters in the result. Default value is `true`. Lower pulumi.BoolPtrInput - // (default 0) Minimum number of lowercase alphabet - // characters in random string. + // Minimum number of lowercase alphabet characters in the result. Default value is `0`. MinLower pulumi.IntPtrInput - // (default 0) Minimum number of numeric characters - // in random string. + // Minimum number of numeric characters in the result. Default value is `0`. MinNumeric pulumi.IntPtrInput - // (default 0) Minimum number of special characters - // in random string. + // Minimum number of special characters in the result. Default value is `0`. MinSpecial pulumi.IntPtrInput - // (default 0) Minimum number of uppercase alphabet - // characters in random string. + // Minimum number of uppercase alphabet characters in the result. Default value is `0`. MinUpper pulumi.IntPtrInput - // (default true) Include numeric characters in random - // string. + // Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. + // + // Deprecated: **NOTE**: This is deprecated, use `numeric` instead. Number pulumi.BoolPtrInput - // Supply your own list of special characters to - // use for string generation. This overrides the default character list in the special - // argument. The special argument must still be set to true for any overwritten - // characters to be used in generation. + // Include numeric characters in the result. Default value is `true`. + Numeric pulumi.BoolPtrInput + // Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. OverrideSpecial pulumi.StringPtrInput - // Random string generated. + // The generated random string. Result pulumi.StringPtrInput - // (default true) Include special characters in random - // string. These are `!@#$%&*()-_=+[]{}<>:?` + // Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. Special pulumi.BoolPtrInput - // (default true) Include uppercase alphabet characters - // in random string. + // Include uppercase alphabet characters in the result. Default value is `true`. Upper pulumi.BoolPtrInput } @@ -218,79 +237,61 @@ func (RandomStringState) ElementType() reflect.Type { } type randomStringArgs struct { - // Arbitrary map of values that, when changed, will - // trigger a new id to be generated. See - // the main provider documentation for more information. - Keepers map[string]interface{} `pulumi:"keepers"` - // The length of the string desired + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers map[string]string `pulumi:"keepers"` + // The length of the string desired. The minimum value for length is 1 and, length must also be >= (`minUpper` + `minLower` + `minNumeric` + `minSpecial`). Length int `pulumi:"length"` - // (default true) Include lowercase alphabet characters - // in random string. + // Include lowercase alphabet characters in the result. Default value is `true`. Lower *bool `pulumi:"lower"` - // (default 0) Minimum number of lowercase alphabet - // characters in random string. + // Minimum number of lowercase alphabet characters in the result. Default value is `0`. MinLower *int `pulumi:"minLower"` - // (default 0) Minimum number of numeric characters - // in random string. + // Minimum number of numeric characters in the result. Default value is `0`. MinNumeric *int `pulumi:"minNumeric"` - // (default 0) Minimum number of special characters - // in random string. + // Minimum number of special characters in the result. Default value is `0`. MinSpecial *int `pulumi:"minSpecial"` - // (default 0) Minimum number of uppercase alphabet - // characters in random string. + // Minimum number of uppercase alphabet characters in the result. Default value is `0`. MinUpper *int `pulumi:"minUpper"` - // (default true) Include numeric characters in random - // string. + // Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. + // + // Deprecated: **NOTE**: This is deprecated, use `numeric` instead. Number *bool `pulumi:"number"` - // Supply your own list of special characters to - // use for string generation. This overrides the default character list in the special - // argument. The special argument must still be set to true for any overwritten - // characters to be used in generation. + // Include numeric characters in the result. Default value is `true`. + Numeric *bool `pulumi:"numeric"` + // Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. OverrideSpecial *string `pulumi:"overrideSpecial"` - // (default true) Include special characters in random - // string. These are `!@#$%&*()-_=+[]{}<>:?` + // Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. Special *bool `pulumi:"special"` - // (default true) Include uppercase alphabet characters - // in random string. + // Include uppercase alphabet characters in the result. Default value is `true`. Upper *bool `pulumi:"upper"` } // The set of arguments for constructing a RandomString resource. type RandomStringArgs struct { - // Arbitrary map of values that, when changed, will - // trigger a new id to be generated. See - // the main provider documentation for more information. - Keepers pulumi.MapInput - // The length of the string desired + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers pulumi.StringMapInput + // The length of the string desired. The minimum value for length is 1 and, length must also be >= (`minUpper` + `minLower` + `minNumeric` + `minSpecial`). Length pulumi.IntInput - // (default true) Include lowercase alphabet characters - // in random string. + // Include lowercase alphabet characters in the result. Default value is `true`. Lower pulumi.BoolPtrInput - // (default 0) Minimum number of lowercase alphabet - // characters in random string. + // Minimum number of lowercase alphabet characters in the result. Default value is `0`. MinLower pulumi.IntPtrInput - // (default 0) Minimum number of numeric characters - // in random string. + // Minimum number of numeric characters in the result. Default value is `0`. MinNumeric pulumi.IntPtrInput - // (default 0) Minimum number of special characters - // in random string. + // Minimum number of special characters in the result. Default value is `0`. MinSpecial pulumi.IntPtrInput - // (default 0) Minimum number of uppercase alphabet - // characters in random string. + // Minimum number of uppercase alphabet characters in the result. Default value is `0`. MinUpper pulumi.IntPtrInput - // (default true) Include numeric characters in random - // string. + // Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. + // + // Deprecated: **NOTE**: This is deprecated, use `numeric` instead. Number pulumi.BoolPtrInput - // Supply your own list of special characters to - // use for string generation. This overrides the default character list in the special - // argument. The special argument must still be set to true for any overwritten - // characters to be used in generation. + // Include numeric characters in the result. Default value is `true`. + Numeric pulumi.BoolPtrInput + // Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. OverrideSpecial pulumi.StringPtrInput - // (default true) Include special characters in random - // string. These are `!@#$%&*()-_=+[]{}<>:?` + // Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. Special pulumi.BoolPtrInput - // (default true) Include uppercase alphabet characters - // in random string. + // Include uppercase alphabet characters in the result. Default value is `true`. Upper pulumi.BoolPtrInput } @@ -381,77 +382,71 @@ func (o RandomStringOutput) ToRandomStringOutputWithContext(ctx context.Context) return o } -// Arbitrary map of values that, when changed, will -// trigger a new id to be generated. See -// the main provider documentation for more information. -func (o RandomStringOutput) Keepers() pulumi.MapOutput { - return o.ApplyT(func(v *RandomString) pulumi.MapOutput { return v.Keepers }).(pulumi.MapOutput) +// Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. +func (o RandomStringOutput) Keepers() pulumi.StringMapOutput { + return o.ApplyT(func(v *RandomString) pulumi.StringMapOutput { return v.Keepers }).(pulumi.StringMapOutput) } -// The length of the string desired +// The length of the string desired. The minimum value for length is 1 and, length must also be >= (`minUpper` + `minLower` + `minNumeric` + `minSpecial`). func (o RandomStringOutput) Length() pulumi.IntOutput { return o.ApplyT(func(v *RandomString) pulumi.IntOutput { return v.Length }).(pulumi.IntOutput) } -// (default true) Include lowercase alphabet characters -// in random string. -func (o RandomStringOutput) Lower() pulumi.BoolPtrOutput { - return o.ApplyT(func(v *RandomString) pulumi.BoolPtrOutput { return v.Lower }).(pulumi.BoolPtrOutput) +// Include lowercase alphabet characters in the result. Default value is `true`. +func (o RandomStringOutput) Lower() pulumi.BoolOutput { + return o.ApplyT(func(v *RandomString) pulumi.BoolOutput { return v.Lower }).(pulumi.BoolOutput) } -// (default 0) Minimum number of lowercase alphabet -// characters in random string. -func (o RandomStringOutput) MinLower() pulumi.IntPtrOutput { - return o.ApplyT(func(v *RandomString) pulumi.IntPtrOutput { return v.MinLower }).(pulumi.IntPtrOutput) +// Minimum number of lowercase alphabet characters in the result. Default value is `0`. +func (o RandomStringOutput) MinLower() pulumi.IntOutput { + return o.ApplyT(func(v *RandomString) pulumi.IntOutput { return v.MinLower }).(pulumi.IntOutput) } -// (default 0) Minimum number of numeric characters -// in random string. -func (o RandomStringOutput) MinNumeric() pulumi.IntPtrOutput { - return o.ApplyT(func(v *RandomString) pulumi.IntPtrOutput { return v.MinNumeric }).(pulumi.IntPtrOutput) +// Minimum number of numeric characters in the result. Default value is `0`. +func (o RandomStringOutput) MinNumeric() pulumi.IntOutput { + return o.ApplyT(func(v *RandomString) pulumi.IntOutput { return v.MinNumeric }).(pulumi.IntOutput) } -// (default 0) Minimum number of special characters -// in random string. -func (o RandomStringOutput) MinSpecial() pulumi.IntPtrOutput { - return o.ApplyT(func(v *RandomString) pulumi.IntPtrOutput { return v.MinSpecial }).(pulumi.IntPtrOutput) +// Minimum number of special characters in the result. Default value is `0`. +func (o RandomStringOutput) MinSpecial() pulumi.IntOutput { + return o.ApplyT(func(v *RandomString) pulumi.IntOutput { return v.MinSpecial }).(pulumi.IntOutput) } -// (default 0) Minimum number of uppercase alphabet -// characters in random string. -func (o RandomStringOutput) MinUpper() pulumi.IntPtrOutput { - return o.ApplyT(func(v *RandomString) pulumi.IntPtrOutput { return v.MinUpper }).(pulumi.IntPtrOutput) +// Minimum number of uppercase alphabet characters in the result. Default value is `0`. +func (o RandomStringOutput) MinUpper() pulumi.IntOutput { + return o.ApplyT(func(v *RandomString) pulumi.IntOutput { return v.MinUpper }).(pulumi.IntOutput) +} + +// Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. +// +// Deprecated: **NOTE**: This is deprecated, use `numeric` instead. +func (o RandomStringOutput) Number() pulumi.BoolOutput { + return o.ApplyT(func(v *RandomString) pulumi.BoolOutput { return v.Number }).(pulumi.BoolOutput) } -// (default true) Include numeric characters in random -// string. -func (o RandomStringOutput) Number() pulumi.BoolPtrOutput { - return o.ApplyT(func(v *RandomString) pulumi.BoolPtrOutput { return v.Number }).(pulumi.BoolPtrOutput) +// Include numeric characters in the result. Default value is `true`. +func (o RandomStringOutput) Numeric() pulumi.BoolOutput { + return o.ApplyT(func(v *RandomString) pulumi.BoolOutput { return v.Numeric }).(pulumi.BoolOutput) } -// Supply your own list of special characters to -// use for string generation. This overrides the default character list in the special -// argument. The special argument must still be set to true for any overwritten -// characters to be used in generation. +// Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. func (o RandomStringOutput) OverrideSpecial() pulumi.StringPtrOutput { return o.ApplyT(func(v *RandomString) pulumi.StringPtrOutput { return v.OverrideSpecial }).(pulumi.StringPtrOutput) } -// Random string generated. +// The generated random string. func (o RandomStringOutput) Result() pulumi.StringOutput { return o.ApplyT(func(v *RandomString) pulumi.StringOutput { return v.Result }).(pulumi.StringOutput) } -// (default true) Include special characters in random -// string. These are `!@#$%&*()-_=+[]{}<>:?` -func (o RandomStringOutput) Special() pulumi.BoolPtrOutput { - return o.ApplyT(func(v *RandomString) pulumi.BoolPtrOutput { return v.Special }).(pulumi.BoolPtrOutput) +// Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. +func (o RandomStringOutput) Special() pulumi.BoolOutput { + return o.ApplyT(func(v *RandomString) pulumi.BoolOutput { return v.Special }).(pulumi.BoolOutput) } -// (default true) Include uppercase alphabet characters -// in random string. -func (o RandomStringOutput) Upper() pulumi.BoolPtrOutput { - return o.ApplyT(func(v *RandomString) pulumi.BoolPtrOutput { return v.Upper }).(pulumi.BoolPtrOutput) +// Include uppercase alphabet characters in the result. Default value is `true`. +func (o RandomStringOutput) Upper() pulumi.BoolOutput { + return o.ApplyT(func(v *RandomString) pulumi.BoolOutput { return v.Upper }).(pulumi.BoolOutput) } type RandomStringArrayOutput struct{ *pulumi.OutputState } diff --git a/sdk/go/random/randomUuid.go b/sdk/go/random/randomUuid.go index 77d8df063c..5856696097 100644 --- a/sdk/go/random/randomUuid.go +++ b/sdk/go/random/randomUuid.go @@ -10,16 +10,12 @@ import ( "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) -// The resource `RandomUuid` generates random uuid string that is intended to be -// used as unique identifiers for other resources. +// The resource `RandomUuid` generates random uuid string that is intended to be used as unique identifiers for other resources. // -// This resource uses the `hashicorp/go-uuid` to generate a UUID-formatted string -// for use with services needed a unique string identifier. +// This resource uses [hashicorp/go-uuid](https://github.com/hashicorp/go-uuid) to generate a UUID-formatted string for use with services needed a unique string identifier. // // ## Example Usage // -// The following example shows how to generate a unique name for an Azure Resource Group. -// // ```go // package main // @@ -51,7 +47,7 @@ import ( // // ## Import // -// 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. Example +// 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. // // ```sh // @@ -61,10 +57,8 @@ import ( type RandomUuid struct { pulumi.CustomResourceState - // Arbitrary map of values that, when changed, will - // trigger a new uuid to be generated. See - // the main provider documentation for more information. - Keepers pulumi.MapOutput `pulumi:"keepers"` + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers pulumi.StringMapOutput `pulumi:"keepers"` // The generated uuid presented in string format. Result pulumi.StringOutput `pulumi:"result"` } @@ -98,19 +92,15 @@ func GetRandomUuid(ctx *pulumi.Context, // Input properties used for looking up and filtering RandomUuid resources. type randomUuidState struct { - // Arbitrary map of values that, when changed, will - // trigger a new uuid to be generated. See - // the main provider documentation for more information. - Keepers map[string]interface{} `pulumi:"keepers"` + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers map[string]string `pulumi:"keepers"` // The generated uuid presented in string format. Result *string `pulumi:"result"` } type RandomUuidState struct { - // Arbitrary map of values that, when changed, will - // trigger a new uuid to be generated. See - // the main provider documentation for more information. - Keepers pulumi.MapInput + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers pulumi.StringMapInput // The generated uuid presented in string format. Result pulumi.StringPtrInput } @@ -120,18 +110,14 @@ func (RandomUuidState) ElementType() reflect.Type { } type randomUuidArgs struct { - // Arbitrary map of values that, when changed, will - // trigger a new uuid to be generated. See - // the main provider documentation for more information. - Keepers map[string]interface{} `pulumi:"keepers"` + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers map[string]string `pulumi:"keepers"` } // The set of arguments for constructing a RandomUuid resource. type RandomUuidArgs struct { - // Arbitrary map of values that, when changed, will - // trigger a new uuid to be generated. See - // the main provider documentation for more information. - Keepers pulumi.MapInput + // Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + Keepers pulumi.StringMapInput } func (RandomUuidArgs) ElementType() reflect.Type { @@ -221,11 +207,9 @@ func (o RandomUuidOutput) ToRandomUuidOutputWithContext(ctx context.Context) Ran return o } -// Arbitrary map of values that, when changed, will -// trigger a new uuid to be generated. See -// the main provider documentation for more information. -func (o RandomUuidOutput) Keepers() pulumi.MapOutput { - return o.ApplyT(func(v *RandomUuid) pulumi.MapOutput { return v.Keepers }).(pulumi.MapOutput) +// Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. +func (o RandomUuidOutput) Keepers() pulumi.StringMapOutput { + return o.ApplyT(func(v *RandomUuid) pulumi.StringMapOutput { return v.Keepers }).(pulumi.StringMapOutput) } // The generated uuid presented in string format. diff --git a/sdk/java/src/main/java/com/pulumi/random/RandomId.java b/sdk/java/src/main/java/com/pulumi/random/RandomId.java index d89cc6ea9e..aa2e3b7e05 100644 --- a/sdk/java/src/main/java/com/pulumi/random/RandomId.java +++ b/sdk/java/src/main/java/com/pulumi/random/RandomId.java @@ -11,7 +11,6 @@ import com.pulumi.random.Utilities; import com.pulumi.random.inputs.RandomIdState; import java.lang.Integer; -import java.lang.Object; import java.lang.String; import java.util.Map; import java.util.Optional; @@ -32,9 +31,6 @@ * exist concurrently. * * ## Example Usage - * - * The following example shows how to generate a unique name for an AWS EC2 - * instance that changes each time a new AMI id is selected. * ```java * package generated_program; * @@ -59,13 +55,13 @@ * * public static void stack(Context ctx) { * var serverRandomId = new RandomId("serverRandomId", RandomIdArgs.builder() - * .byteLength(8) * .keepers(Map.of("ami_id", var_.ami_id())) + * .byteLength(8) * .build()); * * var serverInstance = new Instance("serverInstance", InstanceArgs.builder() - * .ami(serverRandomId.keepers().applyValue(keepers -> keepers.amiId())) * .tags(Map.of("Name", serverRandomId.hex().applyValue(hex -> String.format("web-server %s", hex)))) + * .ami(serverRandomId.keepers().applyValue(keepers -> keepers.amiId())) * .build()); * * } @@ -74,13 +70,13 @@ * * ## Import * - * Random Ids can be imported using the `b64_url` with an optional `prefix`. This can be used to replace a config value with a value interpolated from the random provider without experiencing diffs. Example with no prefix + * Random IDs can be imported using the b64_url with an optional prefix. This can be used to replace a config value with a value interpolated from the random provider without experiencing diffs. Example with no prefix * * ```sh * $ pulumi import random:index/randomId:RandomId server p-9hUg * ``` * - * Example with prefix (prefix is separated by a `,`) + * Example with prefix (prefix is separated by a ,) * * ```sh * $ pulumi import random:index/randomId:RandomId server my-prefix-,p-9hUg @@ -118,16 +114,14 @@ public Output b64Url() { return this.b64Url; } /** - * The number of random bytes to produce. The - * minimum value is 1, which produces eight bits of randomness. + * The number of random bytes to produce. The minimum value is 1, which produces eight bits of randomness. * */ @Export(name="byteLength", type=Integer.class, parameters={}) private Output byteLength; /** - * @return The number of random bytes to produce. The - * minimum value is 1, which produces eight bits of randomness. + * @return The number of random bytes to produce. The minimum value is 1, which produces eight bits of randomness. * */ public Output byteLength() { @@ -162,36 +156,28 @@ public Output hex() { return this.hex; } /** - * Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * */ - @Export(name="keepers", type=Map.class, parameters={String.class, Object.class}) - private Output> keepers; + @Export(name="keepers", type=Map.class, parameters={String.class, String.class}) + private Output> keepers; /** - * @return Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * @return Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * */ - public Output>> keepers() { + public Output>> keepers() { return Codegen.optional(this.keepers); } /** - * Arbitrary string to prefix the output value with. This - * string is supplied as-is, meaning it is not guaranteed to be URL-safe or - * base64 encoded. + * Arbitrary string to prefix the output value with. This string is supplied as-is, meaning it is not guaranteed to be URL-safe or base64 encoded. * */ @Export(name="prefix", type=String.class, parameters={}) private Output prefix; /** - * @return Arbitrary string to prefix the output value with. This - * string is supplied as-is, meaning it is not guaranteed to be URL-safe or - * base64 encoded. + * @return Arbitrary string to prefix the output value with. This string is supplied as-is, meaning it is not guaranteed to be URL-safe or base64 encoded. * */ public Output> prefix() { diff --git a/sdk/java/src/main/java/com/pulumi/random/RandomIdArgs.java b/sdk/java/src/main/java/com/pulumi/random/RandomIdArgs.java index d47af7a81f..8e602851e5 100644 --- a/sdk/java/src/main/java/com/pulumi/random/RandomIdArgs.java +++ b/sdk/java/src/main/java/com/pulumi/random/RandomIdArgs.java @@ -6,7 +6,6 @@ import com.pulumi.core.Output; import com.pulumi.core.annotations.Import; import java.lang.Integer; -import java.lang.Object; import java.lang.String; import java.util.Map; import java.util.Objects; @@ -19,16 +18,14 @@ public final class RandomIdArgs extends com.pulumi.resources.ResourceArgs { public static final RandomIdArgs Empty = new RandomIdArgs(); /** - * The number of random bytes to produce. The - * minimum value is 1, which produces eight bits of randomness. + * The number of random bytes to produce. The minimum value is 1, which produces eight bits of randomness. * */ @Import(name="byteLength", required=true) private Output byteLength; /** - * @return The number of random bytes to produce. The - * minimum value is 1, which produces eight bits of randomness. + * @return The number of random bytes to produce. The minimum value is 1, which produces eight bits of randomness. * */ public Output byteLength() { @@ -36,37 +33,29 @@ public Output byteLength() { } /** - * Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * */ @Import(name="keepers") - private @Nullable Output> keepers; + private @Nullable Output> keepers; /** - * @return Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * @return Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * */ - public Optional>> keepers() { + public Optional>> keepers() { return Optional.ofNullable(this.keepers); } /** - * Arbitrary string to prefix the output value with. This - * string is supplied as-is, meaning it is not guaranteed to be URL-safe or - * base64 encoded. + * Arbitrary string to prefix the output value with. This string is supplied as-is, meaning it is not guaranteed to be URL-safe or base64 encoded. * */ @Import(name="prefix") private @Nullable Output prefix; /** - * @return Arbitrary string to prefix the output value with. This - * string is supplied as-is, meaning it is not guaranteed to be URL-safe or - * base64 encoded. + * @return Arbitrary string to prefix the output value with. This string is supplied as-is, meaning it is not guaranteed to be URL-safe or base64 encoded. * */ public Optional> prefix() { @@ -100,8 +89,7 @@ public Builder(RandomIdArgs defaults) { } /** - * @param byteLength The number of random bytes to produce. The - * minimum value is 1, which produces eight bits of randomness. + * @param byteLength The number of random bytes to produce. The minimum value is 1, which produces eight bits of randomness. * * @return builder * @@ -112,8 +100,7 @@ public Builder byteLength(Output byteLength) { } /** - * @param byteLength The number of random bytes to produce. The - * minimum value is 1, which produces eight bits of randomness. + * @param byteLength The number of random bytes to produce. The minimum value is 1, which produces eight bits of randomness. * * @return builder * @@ -123,34 +110,28 @@ public Builder byteLength(Integer byteLength) { } /** - * @param keepers Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * @param keepers Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * * @return builder * */ - public Builder keepers(@Nullable Output> keepers) { + public Builder keepers(@Nullable Output> keepers) { $.keepers = keepers; return this; } /** - * @param keepers Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * @param keepers Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * * @return builder * */ - public Builder keepers(Map keepers) { + public Builder keepers(Map keepers) { return keepers(Output.of(keepers)); } /** - * @param prefix Arbitrary string to prefix the output value with. This - * string is supplied as-is, meaning it is not guaranteed to be URL-safe or - * base64 encoded. + * @param prefix Arbitrary string to prefix the output value with. This string is supplied as-is, meaning it is not guaranteed to be URL-safe or base64 encoded. * * @return builder * @@ -161,9 +142,7 @@ public Builder prefix(@Nullable Output prefix) { } /** - * @param prefix Arbitrary string to prefix the output value with. This - * string is supplied as-is, meaning it is not guaranteed to be URL-safe or - * base64 encoded. + * @param prefix Arbitrary string to prefix the output value with. This string is supplied as-is, meaning it is not guaranteed to be URL-safe or base64 encoded. * * @return builder * diff --git a/sdk/java/src/main/java/com/pulumi/random/RandomInteger.java b/sdk/java/src/main/java/com/pulumi/random/RandomInteger.java index e65f1749fb..94f915bfa7 100644 --- a/sdk/java/src/main/java/com/pulumi/random/RandomInteger.java +++ b/sdk/java/src/main/java/com/pulumi/random/RandomInteger.java @@ -11,7 +11,6 @@ import com.pulumi.random.Utilities; import com.pulumi.random.inputs.RandomIntegerState; import java.lang.Integer; -import java.lang.Object; import java.lang.String; import java.util.Map; import java.util.Optional; @@ -20,15 +19,9 @@ /** * The resource `random.RandomInteger` generates random values from a given range, described by the `min` and `max` attributes of a given resource. * - * This resource can be used in conjunction with resources that have - * the `create_before_destroy` lifecycle flag set, to avoid conflicts with - * unique names during the brief period where both the old and new resources - * exist concurrently. + * This resource can be used in conjunction with resources that have the `create_before_destroy` lifecycle flag set, to avoid conflicts with unique names during the brief period where both the old and new resources exist concurrently. * * ## Example Usage - * - * The following example shows how to generate a random priority between 1 and 50000 for - * a `aws_alb_listener_rule` resource: * ```java * package generated_program; * @@ -54,29 +47,27 @@ * * public static void stack(Context ctx) { * var priority = new RandomInteger("priority", RandomIntegerArgs.builder() - * .keepers(Map.of("listener_arn", var_.listener_arn())) - * .max(50000) * .min(1) + * .max(50000) + * .keepers(Map.of("listener_arn", var_.listener_arn())) * .build()); * * var main = new ListenerRule("main", ListenerRuleArgs.builder() + * .listenerArn(priority.keepers().applyValue(keepers -> keepers.listenerArn())) + * .priority(priority.result()) * .actions(ListenerRuleActionArgs.builder() - * .targetGroupArn(var_.target_group_arn()) * .type("forward") + * .targetGroupArn(var_.target_group_arn()) * .build()) - * .listenerArn(var_.listener_arn()) - * .priority(priority.result()) * .build()); * * } * } * ``` * - * The result of the above will set a random priority. - * * ## Import * - * Random integers can be imported using the `result`, `min`, and `max`, with an optional `seed`. This can be used to replace a config value with a value interpolated from the random provider without experiencing diffs. Example (values are separated by a `,`) + * Random integers can be imported using the result, min, and max, with an optional seed. This can be used to replace a config value with a value interpolated from the random provider without experiencing diffs. Example (values are separated by a ,) * * ```sh * $ pulumi import random:index/randomInteger:RandomInteger priority 15390,1,50000 @@ -86,21 +77,17 @@ @ResourceType(type="random:index/randomInteger:RandomInteger") public class RandomInteger extends com.pulumi.resources.CustomResource { /** - * Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * */ - @Export(name="keepers", type=Map.class, parameters={String.class, Object.class}) - private Output> keepers; + @Export(name="keepers", type=Map.class, parameters={String.class, String.class}) + private Output> keepers; /** - * @return Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * @return Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * */ - public Output>> keepers() { + public Output>> keepers() { return Codegen.optional(this.keepers); } /** @@ -132,14 +119,14 @@ public Output min() { return this.min; } /** - * (int) The random Integer result. + * The random integer result. * */ @Export(name="result", type=Integer.class, parameters={}) private Output result; /** - * @return (int) The random Integer result. + * @return The random integer result. * */ public Output result() { diff --git a/sdk/java/src/main/java/com/pulumi/random/RandomIntegerArgs.java b/sdk/java/src/main/java/com/pulumi/random/RandomIntegerArgs.java index 43f4d1c5ad..f89f1aa5d5 100644 --- a/sdk/java/src/main/java/com/pulumi/random/RandomIntegerArgs.java +++ b/sdk/java/src/main/java/com/pulumi/random/RandomIntegerArgs.java @@ -6,7 +6,6 @@ import com.pulumi.core.Output; import com.pulumi.core.annotations.Import; import java.lang.Integer; -import java.lang.Object; import java.lang.String; import java.util.Map; import java.util.Objects; @@ -19,21 +18,17 @@ public final class RandomIntegerArgs extends com.pulumi.resources.ResourceArgs { public static final RandomIntegerArgs Empty = new RandomIntegerArgs(); /** - * Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * */ @Import(name="keepers") - private @Nullable Output> keepers; + private @Nullable Output> keepers; /** - * @return Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * @return Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * */ - public Optional>> keepers() { + public Optional>> keepers() { return Optional.ofNullable(this.keepers); } @@ -110,27 +105,23 @@ public Builder(RandomIntegerArgs defaults) { } /** - * @param keepers Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * @param keepers Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * * @return builder * */ - public Builder keepers(@Nullable Output> keepers) { + public Builder keepers(@Nullable Output> keepers) { $.keepers = keepers; return this; } /** - * @param keepers Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * @param keepers Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * * @return builder * */ - public Builder keepers(Map keepers) { + public Builder keepers(Map keepers) { return keepers(Output.of(keepers)); } diff --git a/sdk/java/src/main/java/com/pulumi/random/RandomPassword.java b/sdk/java/src/main/java/com/pulumi/random/RandomPassword.java index f24592ce7d..2e230b6dce 100644 --- a/sdk/java/src/main/java/com/pulumi/random/RandomPassword.java +++ b/sdk/java/src/main/java/com/pulumi/random/RandomPassword.java @@ -12,7 +12,6 @@ import com.pulumi.random.inputs.RandomPasswordState; import java.lang.Boolean; import java.lang.Integer; -import java.lang.Object; import java.lang.String; import java.util.List; import java.util.Map; @@ -20,17 +19,6 @@ import javax.annotation.Nullable; /** - * > **Note:** Requires random provider version >= 2.2.0 - * - * Identical to random.RandomString with the exception that the - * result is treated as sensitive and, thus, _not_ displayed in console output. - * - * > **Note:** All attributes including the generated password will be stored in - * the raw state as plain-text. [Read more about sensitive data in - * state](https://www.terraform.io/docs/state/sensitive-data.html). - * - * This resource *does* use a cryptographic random number generator. - * * ## Example Usage * ```java * package generated_program; @@ -58,7 +46,7 @@ * var password = new RandomPassword("password", RandomPasswordArgs.builder() * .length(16) * .special(true) - * .overrideSpecial("_%@") + * .overrideSpecial("!#$%&*()-_=+[]{}<>:?") * .build()); * * var example = new Instance("example", InstanceArgs.builder() @@ -75,142 +63,218 @@ * * ## Import * - * Random Password can be imported by specifying the value of the string + * ### Avoiding Replacement * * ```sh - * $ pulumi import random:index/randomPassword:RandomPassword password securepassword + * $ pulumi import random:index/randomPassword:RandomPassword If the resource were imported using `random_password.password securepassword`, * ``` * + * replacement could be avoided by using1. Attribute values that match the imported ID and defaults: + * + * terraform + * + * resource "random_password" "password" { + * + * length = 14 + * + * lower + * + * = true + * + * } 2. Attribute values that match the imported ID and omit the attributes with defaults: + * + * terraform + * + * resource "random_password" "password" { + * + * length = 14 + * + * } 3. `ignore_changes` specifying the attributes to ignore: + * + * terraform + * + * resource "random_password" "password" { + * + * length = 16 + * + * lower + * + * = false + * + * lifecycle { + * + * ignore_changes = [ + * + * length, + * + * lower, + * + * ] + * + * } + * + * } + * + * **NOTE** `ignore_changes` is only required until the resource is recreated after import, + * + * after which it will use the configuration values specified. + * */ @ResourceType(type="random:index/randomPassword:RandomPassword") public class RandomPassword extends com.pulumi.resources.CustomResource { /** - * Arbitrary map of values that, when changed, will trigger recreation of resource. See [the main provider - * documentation](../index.html) for more information. + * A bcrypt hash of the generated random string. * */ - @Export(name="keepers", type=Map.class, parameters={String.class, Object.class}) - private Output> keepers; + @Export(name="bcryptHash", type=String.class, parameters={}) + private Output bcryptHash; /** - * @return Arbitrary map of values that, when changed, will trigger recreation of resource. See [the main provider - * documentation](../index.html) for more information. + * @return A bcrypt hash of the generated random string. * */ - public Output>> keepers() { + public Output bcryptHash() { + return this.bcryptHash; + } + /** + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + * + */ + @Export(name="keepers", type=Map.class, parameters={String.class, String.class}) + private Output> keepers; + + /** + * @return Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + * + */ + public Output>> keepers() { return Codegen.optional(this.keepers); } /** - * The length of the string desired. + * The length of the string desired. The minimum value for length is 1 and, length must also be >= (`min_upper` + `min_lower` + `min_numeric` + `min_special`). * */ @Export(name="length", type=Integer.class, parameters={}) private Output length; /** - * @return The length of the string desired. + * @return The length of the string desired. The minimum value for length is 1 and, length must also be >= (`min_upper` + `min_lower` + `min_numeric` + `min_special`). * */ public Output length() { return this.length; } /** - * Include lowercase alphabet characters in the result. + * Include lowercase alphabet characters in the result. Default value is `true`. * */ @Export(name="lower", type=Boolean.class, parameters={}) - private Output lower; + private Output lower; /** - * @return Include lowercase alphabet characters in the result. + * @return Include lowercase alphabet characters in the result. Default value is `true`. * */ - public Output> lower() { - return Codegen.optional(this.lower); + public Output lower() { + return this.lower; } /** - * Minimum number of lowercase alphabet characters in the result. + * Minimum number of lowercase alphabet characters in the result. Default value is `0`. * */ @Export(name="minLower", type=Integer.class, parameters={}) - private Output minLower; + private Output minLower; /** - * @return Minimum number of lowercase alphabet characters in the result. + * @return Minimum number of lowercase alphabet characters in the result. Default value is `0`. * */ - public Output> minLower() { - return Codegen.optional(this.minLower); + public Output minLower() { + return this.minLower; } /** - * Minimum number of numeric characters in the result. + * Minimum number of numeric characters in the result. Default value is `0`. * */ @Export(name="minNumeric", type=Integer.class, parameters={}) - private Output minNumeric; + private Output minNumeric; /** - * @return Minimum number of numeric characters in the result. + * @return Minimum number of numeric characters in the result. Default value is `0`. * */ - public Output> minNumeric() { - return Codegen.optional(this.minNumeric); + public Output minNumeric() { + return this.minNumeric; } /** - * Minimum number of special characters in the result. + * Minimum number of special characters in the result. Default value is `0`. * */ @Export(name="minSpecial", type=Integer.class, parameters={}) - private Output minSpecial; + private Output minSpecial; /** - * @return Minimum number of special characters in the result. + * @return Minimum number of special characters in the result. Default value is `0`. * */ - public Output> minSpecial() { - return Codegen.optional(this.minSpecial); + public Output minSpecial() { + return this.minSpecial; } /** - * Minimum number of uppercase alphabet characters in the result. + * Minimum number of uppercase alphabet characters in the result. Default value is `0`. * */ @Export(name="minUpper", type=Integer.class, parameters={}) - private Output minUpper; + private Output minUpper; /** - * @return Minimum number of uppercase alphabet characters in the result. + * @return Minimum number of uppercase alphabet characters in the result. Default value is `0`. * */ - public Output> minUpper() { - return Codegen.optional(this.minUpper); + public Output minUpper() { + return this.minUpper; } /** - * Include numeric characters in the result. + * Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. + * + * @deprecated + * **NOTE**: This is deprecated, use `numeric` instead. * */ + @Deprecated /* **NOTE**: This is deprecated, use `numeric` instead. */ @Export(name="number", type=Boolean.class, parameters={}) - private Output number; + private Output number; + + /** + * @return Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. + * + */ + public Output number() { + return this.number; + } + /** + * Include numeric characters in the result. Default value is `true`. + * + */ + @Export(name="numeric", type=Boolean.class, parameters={}) + private Output numeric; /** - * @return Include numeric characters in the result. + * @return Include numeric characters in the result. Default value is `true`. * */ - public Output> number() { - return Codegen.optional(this.number); + public Output numeric() { + return this.numeric; } /** - * Supply your own list of special characters to use for string generation. This overrides the default character list in - * the special argument. The `special` argument must still be set to true for any overwritten characters to be used in - * generation. + * Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. * */ @Export(name="overrideSpecial", type=String.class, parameters={}) private Output overrideSpecial; /** - * @return Supply your own list of special characters to use for string generation. This overrides the default character list in - * the special argument. The `special` argument must still be set to true for any overwritten characters to be used in - * generation. + * @return Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. * */ public Output> overrideSpecial() { @@ -231,32 +295,32 @@ public Output result() { return this.result; } /** - * Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?` + * Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. * */ @Export(name="special", type=Boolean.class, parameters={}) - private Output special; + private Output special; /** - * @return Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?` + * @return Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. * */ - public Output> special() { - return Codegen.optional(this.special); + public Output special() { + return this.special; } /** - * Include uppercase alphabet characters in the result. + * Include uppercase alphabet characters in the result. Default value is `true`. * */ @Export(name="upper", type=Boolean.class, parameters={}) - private Output upper; + private Output upper; /** - * @return Include uppercase alphabet characters in the result. + * @return Include uppercase alphabet characters in the result. Default value is `true`. * */ - public Output> upper() { - return Codegen.optional(this.upper); + public Output upper() { + return this.upper; } /** @@ -292,6 +356,7 @@ private static com.pulumi.resources.CustomResourceOptions makeResourceOptions(@N var defaultOptions = com.pulumi.resources.CustomResourceOptions.builder() .version(Utilities.getVersion()) .additionalSecretOutputs(List.of( + "bcryptHash", "result" )) .build(); diff --git a/sdk/java/src/main/java/com/pulumi/random/RandomPasswordArgs.java b/sdk/java/src/main/java/com/pulumi/random/RandomPasswordArgs.java index 19bddea216..ae8dc64bcf 100644 --- a/sdk/java/src/main/java/com/pulumi/random/RandomPasswordArgs.java +++ b/sdk/java/src/main/java/com/pulumi/random/RandomPasswordArgs.java @@ -7,7 +7,6 @@ import com.pulumi.core.annotations.Import; import java.lang.Boolean; import java.lang.Integer; -import java.lang.Object; import java.lang.String; import java.util.Map; import java.util.Objects; @@ -20,31 +19,29 @@ public final class RandomPasswordArgs extends com.pulumi.resources.ResourceArgs public static final RandomPasswordArgs Empty = new RandomPasswordArgs(); /** - * Arbitrary map of values that, when changed, will trigger recreation of resource. See [the main provider - * documentation](../index.html) for more information. + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * */ @Import(name="keepers") - private @Nullable Output> keepers; + private @Nullable Output> keepers; /** - * @return Arbitrary map of values that, when changed, will trigger recreation of resource. See [the main provider - * documentation](../index.html) for more information. + * @return Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * */ - public Optional>> keepers() { + public Optional>> keepers() { return Optional.ofNullable(this.keepers); } /** - * The length of the string desired. + * The length of the string desired. The minimum value for length is 1 and, length must also be >= (`min_upper` + `min_lower` + `min_numeric` + `min_special`). * */ @Import(name="length", required=true) private Output length; /** - * @return The length of the string desired. + * @return The length of the string desired. The minimum value for length is 1 and, length must also be >= (`min_upper` + `min_lower` + `min_numeric` + `min_special`). * */ public Output length() { @@ -52,14 +49,14 @@ public Output length() { } /** - * Include lowercase alphabet characters in the result. + * Include lowercase alphabet characters in the result. Default value is `true`. * */ @Import(name="lower") private @Nullable Output lower; /** - * @return Include lowercase alphabet characters in the result. + * @return Include lowercase alphabet characters in the result. Default value is `true`. * */ public Optional> lower() { @@ -67,14 +64,14 @@ public Optional> lower() { } /** - * Minimum number of lowercase alphabet characters in the result. + * Minimum number of lowercase alphabet characters in the result. Default value is `0`. * */ @Import(name="minLower") private @Nullable Output minLower; /** - * @return Minimum number of lowercase alphabet characters in the result. + * @return Minimum number of lowercase alphabet characters in the result. Default value is `0`. * */ public Optional> minLower() { @@ -82,14 +79,14 @@ public Optional> minLower() { } /** - * Minimum number of numeric characters in the result. + * Minimum number of numeric characters in the result. Default value is `0`. * */ @Import(name="minNumeric") private @Nullable Output minNumeric; /** - * @return Minimum number of numeric characters in the result. + * @return Minimum number of numeric characters in the result. Default value is `0`. * */ public Optional> minNumeric() { @@ -97,14 +94,14 @@ public Optional> minNumeric() { } /** - * Minimum number of special characters in the result. + * Minimum number of special characters in the result. Default value is `0`. * */ @Import(name="minSpecial") private @Nullable Output minSpecial; /** - * @return Minimum number of special characters in the result. + * @return Minimum number of special characters in the result. Default value is `0`. * */ public Optional> minSpecial() { @@ -112,14 +109,14 @@ public Optional> minSpecial() { } /** - * Minimum number of uppercase alphabet characters in the result. + * Minimum number of uppercase alphabet characters in the result. Default value is `0`. * */ @Import(name="minUpper") private @Nullable Output minUpper; /** - * @return Minimum number of uppercase alphabet characters in the result. + * @return Minimum number of uppercase alphabet characters in the result. Default value is `0`. * */ public Optional> minUpper() { @@ -127,33 +124,52 @@ public Optional> minUpper() { } /** - * Include numeric characters in the result. + * Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. + * + * @deprecated + * **NOTE**: This is deprecated, use `numeric` instead. * */ + @Deprecated /* **NOTE**: This is deprecated, use `numeric` instead. */ @Import(name="number") private @Nullable Output number; /** - * @return Include numeric characters in the result. + * @return Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. + * + * @deprecated + * **NOTE**: This is deprecated, use `numeric` instead. * */ + @Deprecated /* **NOTE**: This is deprecated, use `numeric` instead. */ public Optional> number() { return Optional.ofNullable(this.number); } /** - * Supply your own list of special characters to use for string generation. This overrides the default character list in - * the special argument. The `special` argument must still be set to true for any overwritten characters to be used in - * generation. + * Include numeric characters in the result. Default value is `true`. + * + */ + @Import(name="numeric") + private @Nullable Output numeric; + + /** + * @return Include numeric characters in the result. Default value is `true`. + * + */ + public Optional> numeric() { + return Optional.ofNullable(this.numeric); + } + + /** + * Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. * */ @Import(name="overrideSpecial") private @Nullable Output overrideSpecial; /** - * @return Supply your own list of special characters to use for string generation. This overrides the default character list in - * the special argument. The `special` argument must still be set to true for any overwritten characters to be used in - * generation. + * @return Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. * */ public Optional> overrideSpecial() { @@ -161,14 +177,14 @@ public Optional> overrideSpecial() { } /** - * Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?` + * Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. * */ @Import(name="special") private @Nullable Output special; /** - * @return Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?` + * @return Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. * */ public Optional> special() { @@ -176,14 +192,14 @@ public Optional> special() { } /** - * Include uppercase alphabet characters in the result. + * Include uppercase alphabet characters in the result. Default value is `true`. * */ @Import(name="upper") private @Nullable Output upper; /** - * @return Include uppercase alphabet characters in the result. + * @return Include uppercase alphabet characters in the result. Default value is `true`. * */ public Optional> upper() { @@ -201,6 +217,7 @@ private RandomPasswordArgs(RandomPasswordArgs $) { this.minSpecial = $.minSpecial; this.minUpper = $.minUpper; this.number = $.number; + this.numeric = $.numeric; this.overrideSpecial = $.overrideSpecial; this.special = $.special; this.upper = $.upper; @@ -225,30 +242,28 @@ public Builder(RandomPasswordArgs defaults) { } /** - * @param keepers Arbitrary map of values that, when changed, will trigger recreation of resource. See [the main provider - * documentation](../index.html) for more information. + * @param keepers Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * * @return builder * */ - public Builder keepers(@Nullable Output> keepers) { + public Builder keepers(@Nullable Output> keepers) { $.keepers = keepers; return this; } /** - * @param keepers Arbitrary map of values that, when changed, will trigger recreation of resource. See [the main provider - * documentation](../index.html) for more information. + * @param keepers Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * * @return builder * */ - public Builder keepers(Map keepers) { + public Builder keepers(Map keepers) { return keepers(Output.of(keepers)); } /** - * @param length The length of the string desired. + * @param length The length of the string desired. The minimum value for length is 1 and, length must also be >= (`min_upper` + `min_lower` + `min_numeric` + `min_special`). * * @return builder * @@ -259,7 +274,7 @@ public Builder length(Output length) { } /** - * @param length The length of the string desired. + * @param length The length of the string desired. The minimum value for length is 1 and, length must also be >= (`min_upper` + `min_lower` + `min_numeric` + `min_special`). * * @return builder * @@ -269,7 +284,7 @@ public Builder length(Integer length) { } /** - * @param lower Include lowercase alphabet characters in the result. + * @param lower Include lowercase alphabet characters in the result. Default value is `true`. * * @return builder * @@ -280,7 +295,7 @@ public Builder lower(@Nullable Output lower) { } /** - * @param lower Include lowercase alphabet characters in the result. + * @param lower Include lowercase alphabet characters in the result. Default value is `true`. * * @return builder * @@ -290,7 +305,7 @@ public Builder lower(Boolean lower) { } /** - * @param minLower Minimum number of lowercase alphabet characters in the result. + * @param minLower Minimum number of lowercase alphabet characters in the result. Default value is `0`. * * @return builder * @@ -301,7 +316,7 @@ public Builder minLower(@Nullable Output minLower) { } /** - * @param minLower Minimum number of lowercase alphabet characters in the result. + * @param minLower Minimum number of lowercase alphabet characters in the result. Default value is `0`. * * @return builder * @@ -311,7 +326,7 @@ public Builder minLower(Integer minLower) { } /** - * @param minNumeric Minimum number of numeric characters in the result. + * @param minNumeric Minimum number of numeric characters in the result. Default value is `0`. * * @return builder * @@ -322,7 +337,7 @@ public Builder minNumeric(@Nullable Output minNumeric) { } /** - * @param minNumeric Minimum number of numeric characters in the result. + * @param minNumeric Minimum number of numeric characters in the result. Default value is `0`. * * @return builder * @@ -332,7 +347,7 @@ public Builder minNumeric(Integer minNumeric) { } /** - * @param minSpecial Minimum number of special characters in the result. + * @param minSpecial Minimum number of special characters in the result. Default value is `0`. * * @return builder * @@ -343,7 +358,7 @@ public Builder minSpecial(@Nullable Output minSpecial) { } /** - * @param minSpecial Minimum number of special characters in the result. + * @param minSpecial Minimum number of special characters in the result. Default value is `0`. * * @return builder * @@ -353,7 +368,7 @@ public Builder minSpecial(Integer minSpecial) { } /** - * @param minUpper Minimum number of uppercase alphabet characters in the result. + * @param minUpper Minimum number of uppercase alphabet characters in the result. Default value is `0`. * * @return builder * @@ -364,7 +379,7 @@ public Builder minUpper(@Nullable Output minUpper) { } /** - * @param minUpper Minimum number of uppercase alphabet characters in the result. + * @param minUpper Minimum number of uppercase alphabet characters in the result. Default value is `0`. * * @return builder * @@ -374,30 +389,57 @@ public Builder minUpper(Integer minUpper) { } /** - * @param number Include numeric characters in the result. + * @param number Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. * * @return builder * + * @deprecated + * **NOTE**: This is deprecated, use `numeric` instead. + * */ + @Deprecated /* **NOTE**: This is deprecated, use `numeric` instead. */ public Builder number(@Nullable Output number) { $.number = number; return this; } /** - * @param number Include numeric characters in the result. + * @param number Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. * * @return builder * + * @deprecated + * **NOTE**: This is deprecated, use `numeric` instead. + * */ + @Deprecated /* **NOTE**: This is deprecated, use `numeric` instead. */ public Builder number(Boolean number) { return number(Output.of(number)); } /** - * @param overrideSpecial Supply your own list of special characters to use for string generation. This overrides the default character list in - * the special argument. The `special` argument must still be set to true for any overwritten characters to be used in - * generation. + * @param numeric Include numeric characters in the result. Default value is `true`. + * + * @return builder + * + */ + public Builder numeric(@Nullable Output numeric) { + $.numeric = numeric; + return this; + } + + /** + * @param numeric Include numeric characters in the result. Default value is `true`. + * + * @return builder + * + */ + public Builder numeric(Boolean numeric) { + return numeric(Output.of(numeric)); + } + + /** + * @param overrideSpecial Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. * * @return builder * @@ -408,9 +450,7 @@ public Builder overrideSpecial(@Nullable Output overrideSpecial) { } /** - * @param overrideSpecial Supply your own list of special characters to use for string generation. This overrides the default character list in - * the special argument. The `special` argument must still be set to true for any overwritten characters to be used in - * generation. + * @param overrideSpecial Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. * * @return builder * @@ -420,7 +460,7 @@ public Builder overrideSpecial(String overrideSpecial) { } /** - * @param special Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?` + * @param special Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. * * @return builder * @@ -431,7 +471,7 @@ public Builder special(@Nullable Output special) { } /** - * @param special Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?` + * @param special Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. * * @return builder * @@ -441,7 +481,7 @@ public Builder special(Boolean special) { } /** - * @param upper Include uppercase alphabet characters in the result. + * @param upper Include uppercase alphabet characters in the result. Default value is `true`. * * @return builder * @@ -452,7 +492,7 @@ public Builder upper(@Nullable Output upper) { } /** - * @param upper Include uppercase alphabet characters in the result. + * @param upper Include uppercase alphabet characters in the result. Default value is `true`. * * @return builder * diff --git a/sdk/java/src/main/java/com/pulumi/random/RandomPet.java b/sdk/java/src/main/java/com/pulumi/random/RandomPet.java index c17fefc102..a00b423dd5 100644 --- a/sdk/java/src/main/java/com/pulumi/random/RandomPet.java +++ b/sdk/java/src/main/java/com/pulumi/random/RandomPet.java @@ -11,25 +11,17 @@ import com.pulumi.random.Utilities; import com.pulumi.random.inputs.RandomPetState; import java.lang.Integer; -import java.lang.Object; import java.lang.String; import java.util.Map; import java.util.Optional; import javax.annotation.Nullable; /** - * The resource `random.RandomPet` generates random pet names that are intended to be - * used as unique identifiers for other resources. + * The resource `random.RandomPet` generates random pet names that are intended to be used as unique identifiers for other resources. * - * This resource can be used in conjunction with resources that have - * the `create_before_destroy` lifecycle flag set, to avoid conflicts with - * unique names during the brief period where both the old and new resources - * exist concurrently. + * This resource can be used in conjunction with resources that have the `create_before_destroy` lifecycle flag set, to avoid conflicts with unique names during the brief period where both the old and new resources exist concurrently. * * ## Example Usage - * - * The following example shows how to generate a unique pet name for an AWS EC2 - * instance that changes each time a new AMI id is selected. * ```java * package generated_program; * @@ -58,51 +50,44 @@ * .build()); * * var serverInstance = new Instance("serverInstance", InstanceArgs.builder() - * .ami(serverRandomPet.keepers().applyValue(keepers -> keepers.amiId())) * .tags(Map.of("Name", serverRandomPet.id().applyValue(id -> String.format("web-server-%s", id)))) + * .ami(serverRandomPet.keepers().applyValue(keepers -> keepers.amiId())) * .build()); * * } * } * ``` * - * The result of the above will set the Name of the AWS Instance to - * `web-server-simple-snake`. - * */ @ResourceType(type="random:index/randomPet:RandomPet") public class RandomPet extends com.pulumi.resources.CustomResource { /** - * Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * */ - @Export(name="keepers", type=Map.class, parameters={String.class, Object.class}) - private Output> keepers; + @Export(name="keepers", type=Map.class, parameters={String.class, String.class}) + private Output> keepers; /** - * @return Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * @return Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * */ - public Output>> keepers() { + public Output>> keepers() { return Codegen.optional(this.keepers); } /** - * The length (in words) of the pet name. + * The length (in words) of the pet name. Defaults to 2 * */ @Export(name="length", type=Integer.class, parameters={}) - private Output length; + private Output length; /** - * @return The length (in words) of the pet name. + * @return The length (in words) of the pet name. Defaults to 2 * */ - public Output> length() { - return Codegen.optional(this.length); + public Output length() { + return this.length; } /** * A string to prefix the name with. @@ -119,18 +104,18 @@ public Output> prefix() { return Codegen.optional(this.prefix); } /** - * The character to separate words in the pet name. + * The character to separate words in the pet name. Defaults to "-" * */ @Export(name="separator", type=String.class, parameters={}) - private Output separator; + private Output separator; /** - * @return The character to separate words in the pet name. + * @return The character to separate words in the pet name. Defaults to "-" * */ - public Output> separator() { - return Codegen.optional(this.separator); + public Output separator() { + return this.separator; } /** diff --git a/sdk/java/src/main/java/com/pulumi/random/RandomPetArgs.java b/sdk/java/src/main/java/com/pulumi/random/RandomPetArgs.java index f1e1e528e7..22778731e1 100644 --- a/sdk/java/src/main/java/com/pulumi/random/RandomPetArgs.java +++ b/sdk/java/src/main/java/com/pulumi/random/RandomPetArgs.java @@ -6,7 +6,6 @@ import com.pulumi.core.Output; import com.pulumi.core.annotations.Import; import java.lang.Integer; -import java.lang.Object; import java.lang.String; import java.util.Map; import java.util.Objects; @@ -19,33 +18,29 @@ public final class RandomPetArgs extends com.pulumi.resources.ResourceArgs { public static final RandomPetArgs Empty = new RandomPetArgs(); /** - * Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * */ @Import(name="keepers") - private @Nullable Output> keepers; + private @Nullable Output> keepers; /** - * @return Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * @return Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * */ - public Optional>> keepers() { + public Optional>> keepers() { return Optional.ofNullable(this.keepers); } /** - * The length (in words) of the pet name. + * The length (in words) of the pet name. Defaults to 2 * */ @Import(name="length") private @Nullable Output length; /** - * @return The length (in words) of the pet name. + * @return The length (in words) of the pet name. Defaults to 2 * */ public Optional> length() { @@ -68,14 +63,14 @@ public Optional> prefix() { } /** - * The character to separate words in the pet name. + * The character to separate words in the pet name. Defaults to "-" * */ @Import(name="separator") private @Nullable Output separator; /** - * @return The character to separate words in the pet name. + * @return The character to separate words in the pet name. Defaults to "-" * */ public Optional> separator() { @@ -110,32 +105,28 @@ public Builder(RandomPetArgs defaults) { } /** - * @param keepers Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * @param keepers Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * * @return builder * */ - public Builder keepers(@Nullable Output> keepers) { + public Builder keepers(@Nullable Output> keepers) { $.keepers = keepers; return this; } /** - * @param keepers Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * @param keepers Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * * @return builder * */ - public Builder keepers(Map keepers) { + public Builder keepers(Map keepers) { return keepers(Output.of(keepers)); } /** - * @param length The length (in words) of the pet name. + * @param length The length (in words) of the pet name. Defaults to 2 * * @return builder * @@ -146,7 +137,7 @@ public Builder length(@Nullable Output length) { } /** - * @param length The length (in words) of the pet name. + * @param length The length (in words) of the pet name. Defaults to 2 * * @return builder * @@ -177,7 +168,7 @@ public Builder prefix(String prefix) { } /** - * @param separator The character to separate words in the pet name. + * @param separator The character to separate words in the pet name. Defaults to "-" * * @return builder * @@ -188,7 +179,7 @@ public Builder separator(@Nullable Output separator) { } /** - * @param separator The character to separate words in the pet name. + * @param separator The character to separate words in the pet name. Defaults to "-" * * @return builder * diff --git a/sdk/java/src/main/java/com/pulumi/random/RandomShuffle.java b/sdk/java/src/main/java/com/pulumi/random/RandomShuffle.java index 690fe913c3..910baf289f 100644 --- a/sdk/java/src/main/java/com/pulumi/random/RandomShuffle.java +++ b/sdk/java/src/main/java/com/pulumi/random/RandomShuffle.java @@ -11,7 +11,6 @@ import com.pulumi.random.Utilities; import com.pulumi.random.inputs.RandomShuffleState; import java.lang.Integer; -import java.lang.Object; import java.lang.String; import java.util.List; import java.util.Map; @@ -19,8 +18,7 @@ import javax.annotation.Nullable; /** - * The resource `random.RandomShuffle` generates a random permutation of a list - * of strings given as an argument. + * The resource `random.RandomShuffle` generates a random permutation of a list of strings given as an argument. * * ## Example Usage * ```java @@ -81,40 +79,28 @@ public Output> inputs() { return this.inputs; } /** - * Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * */ - @Export(name="keepers", type=Map.class, parameters={String.class, Object.class}) - private Output> keepers; + @Export(name="keepers", type=Map.class, parameters={String.class, String.class}) + private Output> keepers; /** - * @return Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * @return Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * */ - public Output>> keepers() { + public Output>> keepers() { return Codegen.optional(this.keepers); } /** - * The number of results to return. Defaults to - * the number of items in the `input` list. If fewer items are requested, - * some elements will be excluded from the result. If more items are requested, - * items will be repeated in the result but not more frequently than the number - * of items in the input list. + * The number of results to return. Defaults to the number of items in the `input` list. If fewer items are requested, some elements will be excluded from the result. If more items are requested, items will be repeated in the result but not more frequently than the number of items in the input list. * */ @Export(name="resultCount", type=Integer.class, parameters={}) private Output resultCount; /** - * @return The number of results to return. Defaults to - * the number of items in the `input` list. If fewer items are requested, - * some elements will be excluded from the result. If more items are requested, - * items will be repeated in the result but not more frequently than the number - * of items in the input list. + * @return The number of results to return. Defaults to the number of items in the `input` list. If fewer items are requested, some elements will be excluded from the result. If more items are requested, items will be repeated in the result but not more frequently than the number of items in the input list. * */ public Output> resultCount() { @@ -135,18 +121,14 @@ public Output> results() { return this.results; } /** - * Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the - * list. **Important:** Even with an identical seed, it is not guaranteed that the same permutation will be produced across - * different versions of Terraform. This argument causes the result to be *less volatile*, but not fixed for all time. + * Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the list. * */ @Export(name="seed", type=String.class, parameters={}) private Output seed; /** - * @return Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the - * list. **Important:** Even with an identical seed, it is not guaranteed that the same permutation will be produced across - * different versions of Terraform. This argument causes the result to be *less volatile*, but not fixed for all time. + * @return Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the list. * */ public Output> seed() { diff --git a/sdk/java/src/main/java/com/pulumi/random/RandomShuffleArgs.java b/sdk/java/src/main/java/com/pulumi/random/RandomShuffleArgs.java index 8f9c079715..4d167261bb 100644 --- a/sdk/java/src/main/java/com/pulumi/random/RandomShuffleArgs.java +++ b/sdk/java/src/main/java/com/pulumi/random/RandomShuffleArgs.java @@ -6,7 +6,6 @@ import com.pulumi.core.Output; import com.pulumi.core.annotations.Import; import java.lang.Integer; -import java.lang.Object; import java.lang.String; import java.util.List; import java.util.Map; @@ -35,41 +34,29 @@ public Output> inputs() { } /** - * Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * */ @Import(name="keepers") - private @Nullable Output> keepers; + private @Nullable Output> keepers; /** - * @return Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * @return Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * */ - public Optional>> keepers() { + public Optional>> keepers() { return Optional.ofNullable(this.keepers); } /** - * The number of results to return. Defaults to - * the number of items in the `input` list. If fewer items are requested, - * some elements will be excluded from the result. If more items are requested, - * items will be repeated in the result but not more frequently than the number - * of items in the input list. + * The number of results to return. Defaults to the number of items in the `input` list. If fewer items are requested, some elements will be excluded from the result. If more items are requested, items will be repeated in the result but not more frequently than the number of items in the input list. * */ @Import(name="resultCount") private @Nullable Output resultCount; /** - * @return The number of results to return. Defaults to - * the number of items in the `input` list. If fewer items are requested, - * some elements will be excluded from the result. If more items are requested, - * items will be repeated in the result but not more frequently than the number - * of items in the input list. + * @return The number of results to return. Defaults to the number of items in the `input` list. If fewer items are requested, some elements will be excluded from the result. If more items are requested, items will be repeated in the result but not more frequently than the number of items in the input list. * */ public Optional> resultCount() { @@ -77,18 +64,14 @@ public Optional> resultCount() { } /** - * Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the - * list. **Important:** Even with an identical seed, it is not guaranteed that the same permutation will be produced across - * different versions of Terraform. This argument causes the result to be *less volatile*, but not fixed for all time. + * Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the list. * */ @Import(name="seed") private @Nullable Output seed; /** - * @return Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the - * list. **Important:** Even with an identical seed, it is not guaranteed that the same permutation will be produced across - * different versions of Terraform. This argument causes the result to be *less volatile*, but not fixed for all time. + * @return Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the list. * */ public Optional> seed() { @@ -154,36 +137,28 @@ public Builder inputs(String... inputs) { } /** - * @param keepers Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * @param keepers Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * * @return builder * */ - public Builder keepers(@Nullable Output> keepers) { + public Builder keepers(@Nullable Output> keepers) { $.keepers = keepers; return this; } /** - * @param keepers Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * @param keepers Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * * @return builder * */ - public Builder keepers(Map keepers) { + public Builder keepers(Map keepers) { return keepers(Output.of(keepers)); } /** - * @param resultCount The number of results to return. Defaults to - * the number of items in the `input` list. If fewer items are requested, - * some elements will be excluded from the result. If more items are requested, - * items will be repeated in the result but not more frequently than the number - * of items in the input list. + * @param resultCount The number of results to return. Defaults to the number of items in the `input` list. If fewer items are requested, some elements will be excluded from the result. If more items are requested, items will be repeated in the result but not more frequently than the number of items in the input list. * * @return builder * @@ -194,11 +169,7 @@ public Builder resultCount(@Nullable Output resultCount) { } /** - * @param resultCount The number of results to return. Defaults to - * the number of items in the `input` list. If fewer items are requested, - * some elements will be excluded from the result. If more items are requested, - * items will be repeated in the result but not more frequently than the number - * of items in the input list. + * @param resultCount The number of results to return. Defaults to the number of items in the `input` list. If fewer items are requested, some elements will be excluded from the result. If more items are requested, items will be repeated in the result but not more frequently than the number of items in the input list. * * @return builder * @@ -208,9 +179,7 @@ public Builder resultCount(Integer resultCount) { } /** - * @param seed Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the - * list. **Important:** Even with an identical seed, it is not guaranteed that the same permutation will be produced across - * different versions of Terraform. This argument causes the result to be *less volatile*, but not fixed for all time. + * @param seed Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the list. * * @return builder * @@ -221,9 +190,7 @@ public Builder seed(@Nullable Output seed) { } /** - * @param seed Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the - * list. **Important:** Even with an identical seed, it is not guaranteed that the same permutation will be produced across - * different versions of Terraform. This argument causes the result to be *less volatile*, but not fixed for all time. + * @param seed Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the list. * * @return builder * diff --git a/sdk/java/src/main/java/com/pulumi/random/RandomString.java b/sdk/java/src/main/java/com/pulumi/random/RandomString.java index 1e23e4a552..dc564e4378 100644 --- a/sdk/java/src/main/java/com/pulumi/random/RandomString.java +++ b/sdk/java/src/main/java/com/pulumi/random/RandomString.java @@ -12,22 +12,17 @@ import com.pulumi.random.inputs.RandomStringState; import java.lang.Boolean; import java.lang.Integer; -import java.lang.Object; import java.lang.String; import java.util.Map; import java.util.Optional; import javax.annotation.Nullable; /** - * The resource `random.RandomString` generates a random permutation of alphanumeric - * characters and optionally special characters. + * The resource `random.RandomString` generates a random permutation of alphanumeric characters and optionally special characters. * * This resource *does* use a cryptographic random number generator. * - * Historically this resource's intended usage has been ambiguous as the original example - * used it in a password. For backwards compatibility it will - * continue to exist. For unique ids please use random_id, for sensitive - * random values please use random_password. + * Historically this resource's intended usage has been ambiguous as the original example used it in a password. For backwards compatibility it will continue to exist. For unique ids please use random_id, for sensitive random values please use random_password. * * ## Example Usage * ```java @@ -63,208 +58,250 @@ * * ## Import * - * Strings can be imported by just specifying the value of the string + * ### Avoiding Replacement * * ```sh - * $ pulumi import random:index/randomString:RandomString test test + * $ pulumi import random:index/randomString:RandomString If the resource were imported using `random_string.test test`, * ``` * + * replacement can be avoided by using1. Attribute values that match the imported ID and defaults: + * + * terraform + * + * resource "random_string" "test" { + * + * length = 4 + * + * lower + * + * = true + * + * } 2. Attribute values that match the imported ID and omit the attributes with defaults: + * + * terraform + * + * resource "random_string" "test" { + * + * length = 4 + * + * } 3. `ignore_changes` specifying the attributes to ignore: + * + * terraform + * + * resource "random_string" "test" { + * + * length = 16 + * + * lower + * + * = false + * + * lifecycle { + * + * ignore_changes = [ + * + * length, + * + * lower, + * + * ] + * + * } + * + * } + * + * **NOTE** `ignore_changes` is only required until the resource is recreated after import, + * + * after which it will use the configuration values specified. + * */ @ResourceType(type="random:index/randomString:RandomString") public class RandomString extends com.pulumi.resources.CustomResource { /** - * Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * */ - @Export(name="keepers", type=Map.class, parameters={String.class, Object.class}) - private Output> keepers; + @Export(name="keepers", type=Map.class, parameters={String.class, String.class}) + private Output> keepers; /** - * @return Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * @return Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * */ - public Output>> keepers() { + public Output>> keepers() { return Codegen.optional(this.keepers); } /** - * The length of the string desired + * The length of the string desired. The minimum value for length is 1 and, length must also be >= (`min_upper` + `min_lower` + `min_numeric` + `min_special`). * */ @Export(name="length", type=Integer.class, parameters={}) private Output length; /** - * @return The length of the string desired + * @return The length of the string desired. The minimum value for length is 1 and, length must also be >= (`min_upper` + `min_lower` + `min_numeric` + `min_special`). * */ public Output length() { return this.length; } /** - * (default true) Include lowercase alphabet characters - * in random string. + * Include lowercase alphabet characters in the result. Default value is `true`. * */ @Export(name="lower", type=Boolean.class, parameters={}) - private Output lower; + private Output lower; /** - * @return (default true) Include lowercase alphabet characters - * in random string. + * @return Include lowercase alphabet characters in the result. Default value is `true`. * */ - public Output> lower() { - return Codegen.optional(this.lower); + public Output lower() { + return this.lower; } /** - * (default 0) Minimum number of lowercase alphabet - * characters in random string. + * Minimum number of lowercase alphabet characters in the result. Default value is `0`. * */ @Export(name="minLower", type=Integer.class, parameters={}) - private Output minLower; + private Output minLower; /** - * @return (default 0) Minimum number of lowercase alphabet - * characters in random string. + * @return Minimum number of lowercase alphabet characters in the result. Default value is `0`. * */ - public Output> minLower() { - return Codegen.optional(this.minLower); + public Output minLower() { + return this.minLower; } /** - * (default 0) Minimum number of numeric characters - * in random string. + * Minimum number of numeric characters in the result. Default value is `0`. * */ @Export(name="minNumeric", type=Integer.class, parameters={}) - private Output minNumeric; + private Output minNumeric; /** - * @return (default 0) Minimum number of numeric characters - * in random string. + * @return Minimum number of numeric characters in the result. Default value is `0`. * */ - public Output> minNumeric() { - return Codegen.optional(this.minNumeric); + public Output minNumeric() { + return this.minNumeric; } /** - * (default 0) Minimum number of special characters - * in random string. + * Minimum number of special characters in the result. Default value is `0`. * */ @Export(name="minSpecial", type=Integer.class, parameters={}) - private Output minSpecial; + private Output minSpecial; /** - * @return (default 0) Minimum number of special characters - * in random string. + * @return Minimum number of special characters in the result. Default value is `0`. * */ - public Output> minSpecial() { - return Codegen.optional(this.minSpecial); + public Output minSpecial() { + return this.minSpecial; } /** - * (default 0) Minimum number of uppercase alphabet - * characters in random string. + * Minimum number of uppercase alphabet characters in the result. Default value is `0`. * */ @Export(name="minUpper", type=Integer.class, parameters={}) - private Output minUpper; + private Output minUpper; /** - * @return (default 0) Minimum number of uppercase alphabet - * characters in random string. + * @return Minimum number of uppercase alphabet characters in the result. Default value is `0`. * */ - public Output> minUpper() { - return Codegen.optional(this.minUpper); + public Output minUpper() { + return this.minUpper; } /** - * (default true) Include numeric characters in random - * string. + * Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. + * + * @deprecated + * **NOTE**: This is deprecated, use `numeric` instead. * */ + @Deprecated /* **NOTE**: This is deprecated, use `numeric` instead. */ @Export(name="number", type=Boolean.class, parameters={}) - private Output number; + private Output number; + + /** + * @return Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. + * + */ + public Output number() { + return this.number; + } + /** + * Include numeric characters in the result. Default value is `true`. + * + */ + @Export(name="numeric", type=Boolean.class, parameters={}) + private Output numeric; /** - * @return (default true) Include numeric characters in random - * string. + * @return Include numeric characters in the result. Default value is `true`. * */ - public Output> number() { - return Codegen.optional(this.number); + public Output numeric() { + return this.numeric; } /** - * Supply your own list of special characters to - * use for string generation. This overrides the default character list in the special - * argument. The special argument must still be set to true for any overwritten - * characters to be used in generation. + * Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. * */ @Export(name="overrideSpecial", type=String.class, parameters={}) private Output overrideSpecial; /** - * @return Supply your own list of special characters to - * use for string generation. This overrides the default character list in the special - * argument. The special argument must still be set to true for any overwritten - * characters to be used in generation. + * @return Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. * */ public Output> overrideSpecial() { return Codegen.optional(this.overrideSpecial); } /** - * Random string generated. + * The generated random string. * */ @Export(name="result", type=String.class, parameters={}) private Output result; /** - * @return Random string generated. + * @return The generated random string. * */ public Output result() { return this.result; } /** - * (default true) Include special characters in random - * string. These are `!@#$%&*()-_=+[]{}<>:?` + * Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. * */ @Export(name="special", type=Boolean.class, parameters={}) - private Output special; + private Output special; /** - * @return (default true) Include special characters in random - * string. These are `!@#$%&*()-_=+[]{}<>:?` + * @return Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. * */ - public Output> special() { - return Codegen.optional(this.special); + public Output special() { + return this.special; } /** - * (default true) Include uppercase alphabet characters - * in random string. + * Include uppercase alphabet characters in the result. Default value is `true`. * */ @Export(name="upper", type=Boolean.class, parameters={}) - private Output upper; + private Output upper; /** - * @return (default true) Include uppercase alphabet characters - * in random string. + * @return Include uppercase alphabet characters in the result. Default value is `true`. * */ - public Output> upper() { - return Codegen.optional(this.upper); + public Output upper() { + return this.upper; } /** diff --git a/sdk/java/src/main/java/com/pulumi/random/RandomStringArgs.java b/sdk/java/src/main/java/com/pulumi/random/RandomStringArgs.java index ecd59f1f65..8fe15c9994 100644 --- a/sdk/java/src/main/java/com/pulumi/random/RandomStringArgs.java +++ b/sdk/java/src/main/java/com/pulumi/random/RandomStringArgs.java @@ -7,7 +7,6 @@ import com.pulumi.core.annotations.Import; import java.lang.Boolean; import java.lang.Integer; -import java.lang.Object; import java.lang.String; import java.util.Map; import java.util.Objects; @@ -20,33 +19,29 @@ public final class RandomStringArgs extends com.pulumi.resources.ResourceArgs { public static final RandomStringArgs Empty = new RandomStringArgs(); /** - * Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * */ @Import(name="keepers") - private @Nullable Output> keepers; + private @Nullable Output> keepers; /** - * @return Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * @return Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * */ - public Optional>> keepers() { + public Optional>> keepers() { return Optional.ofNullable(this.keepers); } /** - * The length of the string desired + * The length of the string desired. The minimum value for length is 1 and, length must also be >= (`min_upper` + `min_lower` + `min_numeric` + `min_special`). * */ @Import(name="length", required=true) private Output length; /** - * @return The length of the string desired + * @return The length of the string desired. The minimum value for length is 1 and, length must also be >= (`min_upper` + `min_lower` + `min_numeric` + `min_special`). * */ public Output length() { @@ -54,16 +49,14 @@ public Output length() { } /** - * (default true) Include lowercase alphabet characters - * in random string. + * Include lowercase alphabet characters in the result. Default value is `true`. * */ @Import(name="lower") private @Nullable Output lower; /** - * @return (default true) Include lowercase alphabet characters - * in random string. + * @return Include lowercase alphabet characters in the result. Default value is `true`. * */ public Optional> lower() { @@ -71,16 +64,14 @@ public Optional> lower() { } /** - * (default 0) Minimum number of lowercase alphabet - * characters in random string. + * Minimum number of lowercase alphabet characters in the result. Default value is `0`. * */ @Import(name="minLower") private @Nullable Output minLower; /** - * @return (default 0) Minimum number of lowercase alphabet - * characters in random string. + * @return Minimum number of lowercase alphabet characters in the result. Default value is `0`. * */ public Optional> minLower() { @@ -88,16 +79,14 @@ public Optional> minLower() { } /** - * (default 0) Minimum number of numeric characters - * in random string. + * Minimum number of numeric characters in the result. Default value is `0`. * */ @Import(name="minNumeric") private @Nullable Output minNumeric; /** - * @return (default 0) Minimum number of numeric characters - * in random string. + * @return Minimum number of numeric characters in the result. Default value is `0`. * */ public Optional> minNumeric() { @@ -105,16 +94,14 @@ public Optional> minNumeric() { } /** - * (default 0) Minimum number of special characters - * in random string. + * Minimum number of special characters in the result. Default value is `0`. * */ @Import(name="minSpecial") private @Nullable Output minSpecial; /** - * @return (default 0) Minimum number of special characters - * in random string. + * @return Minimum number of special characters in the result. Default value is `0`. * */ public Optional> minSpecial() { @@ -122,16 +109,14 @@ public Optional> minSpecial() { } /** - * (default 0) Minimum number of uppercase alphabet - * characters in random string. + * Minimum number of uppercase alphabet characters in the result. Default value is `0`. * */ @Import(name="minUpper") private @Nullable Output minUpper; /** - * @return (default 0) Minimum number of uppercase alphabet - * characters in random string. + * @return Minimum number of uppercase alphabet characters in the result. Default value is `0`. * */ public Optional> minUpper() { @@ -139,37 +124,52 @@ public Optional> minUpper() { } /** - * (default true) Include numeric characters in random - * string. + * Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. + * + * @deprecated + * **NOTE**: This is deprecated, use `numeric` instead. * */ + @Deprecated /* **NOTE**: This is deprecated, use `numeric` instead. */ @Import(name="number") private @Nullable Output number; /** - * @return (default true) Include numeric characters in random - * string. + * @return Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. + * + * @deprecated + * **NOTE**: This is deprecated, use `numeric` instead. * */ + @Deprecated /* **NOTE**: This is deprecated, use `numeric` instead. */ public Optional> number() { return Optional.ofNullable(this.number); } /** - * Supply your own list of special characters to - * use for string generation. This overrides the default character list in the special - * argument. The special argument must still be set to true for any overwritten - * characters to be used in generation. + * Include numeric characters in the result. Default value is `true`. + * + */ + @Import(name="numeric") + private @Nullable Output numeric; + + /** + * @return Include numeric characters in the result. Default value is `true`. + * + */ + public Optional> numeric() { + return Optional.ofNullable(this.numeric); + } + + /** + * Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. * */ @Import(name="overrideSpecial") private @Nullable Output overrideSpecial; /** - * @return Supply your own list of special characters to - * use for string generation. This overrides the default character list in the special - * argument. The special argument must still be set to true for any overwritten - * characters to be used in generation. + * @return Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. * */ public Optional> overrideSpecial() { @@ -177,16 +177,14 @@ public Optional> overrideSpecial() { } /** - * (default true) Include special characters in random - * string. These are `!@#$%&*()-_=+[]{}<>:?` + * Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. * */ @Import(name="special") private @Nullable Output special; /** - * @return (default true) Include special characters in random - * string. These are `!@#$%&*()-_=+[]{}<>:?` + * @return Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. * */ public Optional> special() { @@ -194,16 +192,14 @@ public Optional> special() { } /** - * (default true) Include uppercase alphabet characters - * in random string. + * Include uppercase alphabet characters in the result. Default value is `true`. * */ @Import(name="upper") private @Nullable Output upper; /** - * @return (default true) Include uppercase alphabet characters - * in random string. + * @return Include uppercase alphabet characters in the result. Default value is `true`. * */ public Optional> upper() { @@ -221,6 +217,7 @@ private RandomStringArgs(RandomStringArgs $) { this.minSpecial = $.minSpecial; this.minUpper = $.minUpper; this.number = $.number; + this.numeric = $.numeric; this.overrideSpecial = $.overrideSpecial; this.special = $.special; this.upper = $.upper; @@ -245,32 +242,28 @@ public Builder(RandomStringArgs defaults) { } /** - * @param keepers Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * @param keepers Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * * @return builder * */ - public Builder keepers(@Nullable Output> keepers) { + public Builder keepers(@Nullable Output> keepers) { $.keepers = keepers; return this; } /** - * @param keepers Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * @param keepers Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * * @return builder * */ - public Builder keepers(Map keepers) { + public Builder keepers(Map keepers) { return keepers(Output.of(keepers)); } /** - * @param length The length of the string desired + * @param length The length of the string desired. The minimum value for length is 1 and, length must also be >= (`min_upper` + `min_lower` + `min_numeric` + `min_special`). * * @return builder * @@ -281,7 +274,7 @@ public Builder length(Output length) { } /** - * @param length The length of the string desired + * @param length The length of the string desired. The minimum value for length is 1 and, length must also be >= (`min_upper` + `min_lower` + `min_numeric` + `min_special`). * * @return builder * @@ -291,8 +284,7 @@ public Builder length(Integer length) { } /** - * @param lower (default true) Include lowercase alphabet characters - * in random string. + * @param lower Include lowercase alphabet characters in the result. Default value is `true`. * * @return builder * @@ -303,8 +295,7 @@ public Builder lower(@Nullable Output lower) { } /** - * @param lower (default true) Include lowercase alphabet characters - * in random string. + * @param lower Include lowercase alphabet characters in the result. Default value is `true`. * * @return builder * @@ -314,8 +305,7 @@ public Builder lower(Boolean lower) { } /** - * @param minLower (default 0) Minimum number of lowercase alphabet - * characters in random string. + * @param minLower Minimum number of lowercase alphabet characters in the result. Default value is `0`. * * @return builder * @@ -326,8 +316,7 @@ public Builder minLower(@Nullable Output minLower) { } /** - * @param minLower (default 0) Minimum number of lowercase alphabet - * characters in random string. + * @param minLower Minimum number of lowercase alphabet characters in the result. Default value is `0`. * * @return builder * @@ -337,8 +326,7 @@ public Builder minLower(Integer minLower) { } /** - * @param minNumeric (default 0) Minimum number of numeric characters - * in random string. + * @param minNumeric Minimum number of numeric characters in the result. Default value is `0`. * * @return builder * @@ -349,8 +337,7 @@ public Builder minNumeric(@Nullable Output minNumeric) { } /** - * @param minNumeric (default 0) Minimum number of numeric characters - * in random string. + * @param minNumeric Minimum number of numeric characters in the result. Default value is `0`. * * @return builder * @@ -360,8 +347,7 @@ public Builder minNumeric(Integer minNumeric) { } /** - * @param minSpecial (default 0) Minimum number of special characters - * in random string. + * @param minSpecial Minimum number of special characters in the result. Default value is `0`. * * @return builder * @@ -372,8 +358,7 @@ public Builder minSpecial(@Nullable Output minSpecial) { } /** - * @param minSpecial (default 0) Minimum number of special characters - * in random string. + * @param minSpecial Minimum number of special characters in the result. Default value is `0`. * * @return builder * @@ -383,8 +368,7 @@ public Builder minSpecial(Integer minSpecial) { } /** - * @param minUpper (default 0) Minimum number of uppercase alphabet - * characters in random string. + * @param minUpper Minimum number of uppercase alphabet characters in the result. Default value is `0`. * * @return builder * @@ -395,8 +379,7 @@ public Builder minUpper(@Nullable Output minUpper) { } /** - * @param minUpper (default 0) Minimum number of uppercase alphabet - * characters in random string. + * @param minUpper Minimum number of uppercase alphabet characters in the result. Default value is `0`. * * @return builder * @@ -406,33 +389,57 @@ public Builder minUpper(Integer minUpper) { } /** - * @param number (default true) Include numeric characters in random - * string. + * @param number Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. * * @return builder * + * @deprecated + * **NOTE**: This is deprecated, use `numeric` instead. + * */ + @Deprecated /* **NOTE**: This is deprecated, use `numeric` instead. */ public Builder number(@Nullable Output number) { $.number = number; return this; } /** - * @param number (default true) Include numeric characters in random - * string. + * @param number Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. * * @return builder * + * @deprecated + * **NOTE**: This is deprecated, use `numeric` instead. + * */ + @Deprecated /* **NOTE**: This is deprecated, use `numeric` instead. */ public Builder number(Boolean number) { return number(Output.of(number)); } /** - * @param overrideSpecial Supply your own list of special characters to - * use for string generation. This overrides the default character list in the special - * argument. The special argument must still be set to true for any overwritten - * characters to be used in generation. + * @param numeric Include numeric characters in the result. Default value is `true`. + * + * @return builder + * + */ + public Builder numeric(@Nullable Output numeric) { + $.numeric = numeric; + return this; + } + + /** + * @param numeric Include numeric characters in the result. Default value is `true`. + * + * @return builder + * + */ + public Builder numeric(Boolean numeric) { + return numeric(Output.of(numeric)); + } + + /** + * @param overrideSpecial Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. * * @return builder * @@ -443,10 +450,7 @@ public Builder overrideSpecial(@Nullable Output overrideSpecial) { } /** - * @param overrideSpecial Supply your own list of special characters to - * use for string generation. This overrides the default character list in the special - * argument. The special argument must still be set to true for any overwritten - * characters to be used in generation. + * @param overrideSpecial Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. * * @return builder * @@ -456,8 +460,7 @@ public Builder overrideSpecial(String overrideSpecial) { } /** - * @param special (default true) Include special characters in random - * string. These are `!@#$%&*()-_=+[]{}<>:?` + * @param special Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. * * @return builder * @@ -468,8 +471,7 @@ public Builder special(@Nullable Output special) { } /** - * @param special (default true) Include special characters in random - * string. These are `!@#$%&*()-_=+[]{}<>:?` + * @param special Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. * * @return builder * @@ -479,8 +481,7 @@ public Builder special(Boolean special) { } /** - * @param upper (default true) Include uppercase alphabet characters - * in random string. + * @param upper Include uppercase alphabet characters in the result. Default value is `true`. * * @return builder * @@ -491,8 +492,7 @@ public Builder upper(@Nullable Output upper) { } /** - * @param upper (default true) Include uppercase alphabet characters - * in random string. + * @param upper Include uppercase alphabet characters in the result. Default value is `true`. * * @return builder * diff --git a/sdk/java/src/main/java/com/pulumi/random/RandomUuid.java b/sdk/java/src/main/java/com/pulumi/random/RandomUuid.java index 90f8f4e90c..f1b9911e64 100644 --- a/sdk/java/src/main/java/com/pulumi/random/RandomUuid.java +++ b/sdk/java/src/main/java/com/pulumi/random/RandomUuid.java @@ -10,22 +10,17 @@ import com.pulumi.random.RandomUuidArgs; import com.pulumi.random.Utilities; import com.pulumi.random.inputs.RandomUuidState; -import java.lang.Object; import java.lang.String; import java.util.Map; import java.util.Optional; import javax.annotation.Nullable; /** - * The resource `random.RandomUuid` generates random uuid string that is intended to be - * used as unique identifiers for other resources. + * The resource `random.RandomUuid` generates random uuid string that is intended to be used as unique identifiers for other resources. * - * This resource uses the `hashicorp/go-uuid` to generate a UUID-formatted string - * for use with services needed a unique string identifier. + * This resource uses [hashicorp/go-uuid](https://github.com/hashicorp/go-uuid) to generate a UUID-formatted string for use with services needed a unique string identifier. * * ## Example Usage - * - * The following example shows how to generate a unique name for an Azure Resource Group. * ```java * package generated_program; * @@ -60,7 +55,7 @@ * * ## Import * - * 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. Example + * 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. * * ```sh * $ pulumi import random:index/randomUuid:RandomUuid main aabbccdd-eeff-0011-2233-445566778899 @@ -70,21 +65,17 @@ @ResourceType(type="random:index/randomUuid:RandomUuid") public class RandomUuid extends com.pulumi.resources.CustomResource { /** - * Arbitrary map of values that, when changed, will - * trigger a new uuid to be generated. See - * the main provider documentation for more information. + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * */ - @Export(name="keepers", type=Map.class, parameters={String.class, Object.class}) - private Output> keepers; + @Export(name="keepers", type=Map.class, parameters={String.class, String.class}) + private Output> keepers; /** - * @return Arbitrary map of values that, when changed, will - * trigger a new uuid to be generated. See - * the main provider documentation for more information. + * @return Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * */ - public Output>> keepers() { + public Output>> keepers() { return Codegen.optional(this.keepers); } /** diff --git a/sdk/java/src/main/java/com/pulumi/random/RandomUuidArgs.java b/sdk/java/src/main/java/com/pulumi/random/RandomUuidArgs.java index ff05c2ce15..be6327ba4a 100644 --- a/sdk/java/src/main/java/com/pulumi/random/RandomUuidArgs.java +++ b/sdk/java/src/main/java/com/pulumi/random/RandomUuidArgs.java @@ -5,7 +5,6 @@ import com.pulumi.core.Output; import com.pulumi.core.annotations.Import; -import java.lang.Object; import java.lang.String; import java.util.Map; import java.util.Objects; @@ -18,21 +17,17 @@ public final class RandomUuidArgs extends com.pulumi.resources.ResourceArgs { public static final RandomUuidArgs Empty = new RandomUuidArgs(); /** - * Arbitrary map of values that, when changed, will - * trigger a new uuid to be generated. See - * the main provider documentation for more information. + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * */ @Import(name="keepers") - private @Nullable Output> keepers; + private @Nullable Output> keepers; /** - * @return Arbitrary map of values that, when changed, will - * trigger a new uuid to be generated. See - * the main provider documentation for more information. + * @return Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * */ - public Optional>> keepers() { + public Optional>> keepers() { return Optional.ofNullable(this.keepers); } @@ -61,27 +56,23 @@ public Builder(RandomUuidArgs defaults) { } /** - * @param keepers Arbitrary map of values that, when changed, will - * trigger a new uuid to be generated. See - * the main provider documentation for more information. + * @param keepers Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * * @return builder * */ - public Builder keepers(@Nullable Output> keepers) { + public Builder keepers(@Nullable Output> keepers) { $.keepers = keepers; return this; } /** - * @param keepers Arbitrary map of values that, when changed, will - * trigger a new uuid to be generated. See - * the main provider documentation for more information. + * @param keepers Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * * @return builder * */ - public Builder keepers(Map keepers) { + public Builder keepers(Map keepers) { return keepers(Output.of(keepers)); } diff --git a/sdk/java/src/main/java/com/pulumi/random/inputs/RandomIdState.java b/sdk/java/src/main/java/com/pulumi/random/inputs/RandomIdState.java index e3b236a076..7b799aa791 100644 --- a/sdk/java/src/main/java/com/pulumi/random/inputs/RandomIdState.java +++ b/sdk/java/src/main/java/com/pulumi/random/inputs/RandomIdState.java @@ -6,7 +6,6 @@ import com.pulumi.core.Output; import com.pulumi.core.annotations.Import; import java.lang.Integer; -import java.lang.Object; import java.lang.String; import java.util.Map; import java.util.Objects; @@ -49,16 +48,14 @@ public Optional> b64Url() { } /** - * The number of random bytes to produce. The - * minimum value is 1, which produces eight bits of randomness. + * The number of random bytes to produce. The minimum value is 1, which produces eight bits of randomness. * */ @Import(name="byteLength") private @Nullable Output byteLength; /** - * @return The number of random bytes to produce. The - * minimum value is 1, which produces eight bits of randomness. + * @return The number of random bytes to produce. The minimum value is 1, which produces eight bits of randomness. * */ public Optional> byteLength() { @@ -96,37 +93,29 @@ public Optional> hex() { } /** - * Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * */ @Import(name="keepers") - private @Nullable Output> keepers; + private @Nullable Output> keepers; /** - * @return Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * @return Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * */ - public Optional>> keepers() { + public Optional>> keepers() { return Optional.ofNullable(this.keepers); } /** - * Arbitrary string to prefix the output value with. This - * string is supplied as-is, meaning it is not guaranteed to be URL-safe or - * base64 encoded. + * Arbitrary string to prefix the output value with. This string is supplied as-is, meaning it is not guaranteed to be URL-safe or base64 encoded. * */ @Import(name="prefix") private @Nullable Output prefix; /** - * @return Arbitrary string to prefix the output value with. This - * string is supplied as-is, meaning it is not guaranteed to be URL-safe or - * base64 encoded. + * @return Arbitrary string to prefix the output value with. This string is supplied as-is, meaning it is not guaranteed to be URL-safe or base64 encoded. * */ public Optional> prefix() { @@ -206,8 +195,7 @@ public Builder b64Url(String b64Url) { } /** - * @param byteLength The number of random bytes to produce. The - * minimum value is 1, which produces eight bits of randomness. + * @param byteLength The number of random bytes to produce. The minimum value is 1, which produces eight bits of randomness. * * @return builder * @@ -218,8 +206,7 @@ public Builder byteLength(@Nullable Output byteLength) { } /** - * @param byteLength The number of random bytes to produce. The - * minimum value is 1, which produces eight bits of randomness. + * @param byteLength The number of random bytes to produce. The minimum value is 1, which produces eight bits of randomness. * * @return builder * @@ -271,34 +258,28 @@ public Builder hex(String hex) { } /** - * @param keepers Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * @param keepers Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * * @return builder * */ - public Builder keepers(@Nullable Output> keepers) { + public Builder keepers(@Nullable Output> keepers) { $.keepers = keepers; return this; } /** - * @param keepers Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * @param keepers Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * * @return builder * */ - public Builder keepers(Map keepers) { + public Builder keepers(Map keepers) { return keepers(Output.of(keepers)); } /** - * @param prefix Arbitrary string to prefix the output value with. This - * string is supplied as-is, meaning it is not guaranteed to be URL-safe or - * base64 encoded. + * @param prefix Arbitrary string to prefix the output value with. This string is supplied as-is, meaning it is not guaranteed to be URL-safe or base64 encoded. * * @return builder * @@ -309,9 +290,7 @@ public Builder prefix(@Nullable Output prefix) { } /** - * @param prefix Arbitrary string to prefix the output value with. This - * string is supplied as-is, meaning it is not guaranteed to be URL-safe or - * base64 encoded. + * @param prefix Arbitrary string to prefix the output value with. This string is supplied as-is, meaning it is not guaranteed to be URL-safe or base64 encoded. * * @return builder * diff --git a/sdk/java/src/main/java/com/pulumi/random/inputs/RandomIntegerState.java b/sdk/java/src/main/java/com/pulumi/random/inputs/RandomIntegerState.java index 049e2482fd..55ab10162e 100644 --- a/sdk/java/src/main/java/com/pulumi/random/inputs/RandomIntegerState.java +++ b/sdk/java/src/main/java/com/pulumi/random/inputs/RandomIntegerState.java @@ -6,7 +6,6 @@ import com.pulumi.core.Output; import com.pulumi.core.annotations.Import; import java.lang.Integer; -import java.lang.Object; import java.lang.String; import java.util.Map; import java.util.Objects; @@ -19,21 +18,17 @@ public final class RandomIntegerState extends com.pulumi.resources.ResourceArgs public static final RandomIntegerState Empty = new RandomIntegerState(); /** - * Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * */ @Import(name="keepers") - private @Nullable Output> keepers; + private @Nullable Output> keepers; /** - * @return Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * @return Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * */ - public Optional>> keepers() { + public Optional>> keepers() { return Optional.ofNullable(this.keepers); } @@ -68,14 +63,14 @@ public Optional> min() { } /** - * (int) The random Integer result. + * The random integer result. * */ @Import(name="result") private @Nullable Output result; /** - * @return (int) The random Integer result. + * @return The random integer result. * */ public Optional> result() { @@ -126,27 +121,23 @@ public Builder(RandomIntegerState defaults) { } /** - * @param keepers Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * @param keepers Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * * @return builder * */ - public Builder keepers(@Nullable Output> keepers) { + public Builder keepers(@Nullable Output> keepers) { $.keepers = keepers; return this; } /** - * @param keepers Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * @param keepers Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * * @return builder * */ - public Builder keepers(Map keepers) { + public Builder keepers(Map keepers) { return keepers(Output.of(keepers)); } @@ -193,7 +184,7 @@ public Builder min(Integer min) { } /** - * @param result (int) The random Integer result. + * @param result The random integer result. * * @return builder * @@ -204,7 +195,7 @@ public Builder result(@Nullable Output result) { } /** - * @param result (int) The random Integer result. + * @param result The random integer result. * * @return builder * diff --git a/sdk/java/src/main/java/com/pulumi/random/inputs/RandomPasswordState.java b/sdk/java/src/main/java/com/pulumi/random/inputs/RandomPasswordState.java index e87a483390..196c914cd3 100644 --- a/sdk/java/src/main/java/com/pulumi/random/inputs/RandomPasswordState.java +++ b/sdk/java/src/main/java/com/pulumi/random/inputs/RandomPasswordState.java @@ -7,7 +7,6 @@ import com.pulumi.core.annotations.Import; import java.lang.Boolean; import java.lang.Integer; -import java.lang.Object; import java.lang.String; import java.util.Map; import java.util.Objects; @@ -20,31 +19,44 @@ public final class RandomPasswordState extends com.pulumi.resources.ResourceArgs public static final RandomPasswordState Empty = new RandomPasswordState(); /** - * Arbitrary map of values that, when changed, will trigger recreation of resource. See [the main provider - * documentation](../index.html) for more information. + * A bcrypt hash of the generated random string. + * + */ + @Import(name="bcryptHash") + private @Nullable Output bcryptHash; + + /** + * @return A bcrypt hash of the generated random string. + * + */ + public Optional> bcryptHash() { + return Optional.ofNullable(this.bcryptHash); + } + + /** + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * */ @Import(name="keepers") - private @Nullable Output> keepers; + private @Nullable Output> keepers; /** - * @return Arbitrary map of values that, when changed, will trigger recreation of resource. See [the main provider - * documentation](../index.html) for more information. + * @return Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * */ - public Optional>> keepers() { + public Optional>> keepers() { return Optional.ofNullable(this.keepers); } /** - * The length of the string desired. + * The length of the string desired. The minimum value for length is 1 and, length must also be >= (`min_upper` + `min_lower` + `min_numeric` + `min_special`). * */ @Import(name="length") private @Nullable Output length; /** - * @return The length of the string desired. + * @return The length of the string desired. The minimum value for length is 1 and, length must also be >= (`min_upper` + `min_lower` + `min_numeric` + `min_special`). * */ public Optional> length() { @@ -52,14 +64,14 @@ public Optional> length() { } /** - * Include lowercase alphabet characters in the result. + * Include lowercase alphabet characters in the result. Default value is `true`. * */ @Import(name="lower") private @Nullable Output lower; /** - * @return Include lowercase alphabet characters in the result. + * @return Include lowercase alphabet characters in the result. Default value is `true`. * */ public Optional> lower() { @@ -67,14 +79,14 @@ public Optional> lower() { } /** - * Minimum number of lowercase alphabet characters in the result. + * Minimum number of lowercase alphabet characters in the result. Default value is `0`. * */ @Import(name="minLower") private @Nullable Output minLower; /** - * @return Minimum number of lowercase alphabet characters in the result. + * @return Minimum number of lowercase alphabet characters in the result. Default value is `0`. * */ public Optional> minLower() { @@ -82,14 +94,14 @@ public Optional> minLower() { } /** - * Minimum number of numeric characters in the result. + * Minimum number of numeric characters in the result. Default value is `0`. * */ @Import(name="minNumeric") private @Nullable Output minNumeric; /** - * @return Minimum number of numeric characters in the result. + * @return Minimum number of numeric characters in the result. Default value is `0`. * */ public Optional> minNumeric() { @@ -97,14 +109,14 @@ public Optional> minNumeric() { } /** - * Minimum number of special characters in the result. + * Minimum number of special characters in the result. Default value is `0`. * */ @Import(name="minSpecial") private @Nullable Output minSpecial; /** - * @return Minimum number of special characters in the result. + * @return Minimum number of special characters in the result. Default value is `0`. * */ public Optional> minSpecial() { @@ -112,14 +124,14 @@ public Optional> minSpecial() { } /** - * Minimum number of uppercase alphabet characters in the result. + * Minimum number of uppercase alphabet characters in the result. Default value is `0`. * */ @Import(name="minUpper") private @Nullable Output minUpper; /** - * @return Minimum number of uppercase alphabet characters in the result. + * @return Minimum number of uppercase alphabet characters in the result. Default value is `0`. * */ public Optional> minUpper() { @@ -127,33 +139,52 @@ public Optional> minUpper() { } /** - * Include numeric characters in the result. + * Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. + * + * @deprecated + * **NOTE**: This is deprecated, use `numeric` instead. * */ + @Deprecated /* **NOTE**: This is deprecated, use `numeric` instead. */ @Import(name="number") private @Nullable Output number; /** - * @return Include numeric characters in the result. + * @return Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. + * + * @deprecated + * **NOTE**: This is deprecated, use `numeric` instead. * */ + @Deprecated /* **NOTE**: This is deprecated, use `numeric` instead. */ public Optional> number() { return Optional.ofNullable(this.number); } /** - * Supply your own list of special characters to use for string generation. This overrides the default character list in - * the special argument. The `special` argument must still be set to true for any overwritten characters to be used in - * generation. + * Include numeric characters in the result. Default value is `true`. + * + */ + @Import(name="numeric") + private @Nullable Output numeric; + + /** + * @return Include numeric characters in the result. Default value is `true`. + * + */ + public Optional> numeric() { + return Optional.ofNullable(this.numeric); + } + + /** + * Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. * */ @Import(name="overrideSpecial") private @Nullable Output overrideSpecial; /** - * @return Supply your own list of special characters to use for string generation. This overrides the default character list in - * the special argument. The `special` argument must still be set to true for any overwritten characters to be used in - * generation. + * @return Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. * */ public Optional> overrideSpecial() { @@ -176,14 +207,14 @@ public Optional> result() { } /** - * Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?` + * Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. * */ @Import(name="special") private @Nullable Output special; /** - * @return Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?` + * @return Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. * */ public Optional> special() { @@ -191,14 +222,14 @@ public Optional> special() { } /** - * Include uppercase alphabet characters in the result. + * Include uppercase alphabet characters in the result. Default value is `true`. * */ @Import(name="upper") private @Nullable Output upper; /** - * @return Include uppercase alphabet characters in the result. + * @return Include uppercase alphabet characters in the result. Default value is `true`. * */ public Optional> upper() { @@ -208,6 +239,7 @@ public Optional> upper() { private RandomPasswordState() {} private RandomPasswordState(RandomPasswordState $) { + this.bcryptHash = $.bcryptHash; this.keepers = $.keepers; this.length = $.length; this.lower = $.lower; @@ -216,6 +248,7 @@ private RandomPasswordState(RandomPasswordState $) { this.minSpecial = $.minSpecial; this.minUpper = $.minUpper; this.number = $.number; + this.numeric = $.numeric; this.overrideSpecial = $.overrideSpecial; this.result = $.result; this.special = $.special; @@ -241,30 +274,49 @@ public Builder(RandomPasswordState defaults) { } /** - * @param keepers Arbitrary map of values that, when changed, will trigger recreation of resource. See [the main provider - * documentation](../index.html) for more information. + * @param bcryptHash A bcrypt hash of the generated random string. + * + * @return builder + * + */ + public Builder bcryptHash(@Nullable Output bcryptHash) { + $.bcryptHash = bcryptHash; + return this; + } + + /** + * @param bcryptHash A bcrypt hash of the generated random string. * * @return builder * */ - public Builder keepers(@Nullable Output> keepers) { + public Builder bcryptHash(String bcryptHash) { + return bcryptHash(Output.of(bcryptHash)); + } + + /** + * @param keepers Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + * + * @return builder + * + */ + public Builder keepers(@Nullable Output> keepers) { $.keepers = keepers; return this; } /** - * @param keepers Arbitrary map of values that, when changed, will trigger recreation of resource. See [the main provider - * documentation](../index.html) for more information. + * @param keepers Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * * @return builder * */ - public Builder keepers(Map keepers) { + public Builder keepers(Map keepers) { return keepers(Output.of(keepers)); } /** - * @param length The length of the string desired. + * @param length The length of the string desired. The minimum value for length is 1 and, length must also be >= (`min_upper` + `min_lower` + `min_numeric` + `min_special`). * * @return builder * @@ -275,7 +327,7 @@ public Builder length(@Nullable Output length) { } /** - * @param length The length of the string desired. + * @param length The length of the string desired. The minimum value for length is 1 and, length must also be >= (`min_upper` + `min_lower` + `min_numeric` + `min_special`). * * @return builder * @@ -285,7 +337,7 @@ public Builder length(Integer length) { } /** - * @param lower Include lowercase alphabet characters in the result. + * @param lower Include lowercase alphabet characters in the result. Default value is `true`. * * @return builder * @@ -296,7 +348,7 @@ public Builder lower(@Nullable Output lower) { } /** - * @param lower Include lowercase alphabet characters in the result. + * @param lower Include lowercase alphabet characters in the result. Default value is `true`. * * @return builder * @@ -306,7 +358,7 @@ public Builder lower(Boolean lower) { } /** - * @param minLower Minimum number of lowercase alphabet characters in the result. + * @param minLower Minimum number of lowercase alphabet characters in the result. Default value is `0`. * * @return builder * @@ -317,7 +369,7 @@ public Builder minLower(@Nullable Output minLower) { } /** - * @param minLower Minimum number of lowercase alphabet characters in the result. + * @param minLower Minimum number of lowercase alphabet characters in the result. Default value is `0`. * * @return builder * @@ -327,7 +379,7 @@ public Builder minLower(Integer minLower) { } /** - * @param minNumeric Minimum number of numeric characters in the result. + * @param minNumeric Minimum number of numeric characters in the result. Default value is `0`. * * @return builder * @@ -338,7 +390,7 @@ public Builder minNumeric(@Nullable Output minNumeric) { } /** - * @param minNumeric Minimum number of numeric characters in the result. + * @param minNumeric Minimum number of numeric characters in the result. Default value is `0`. * * @return builder * @@ -348,7 +400,7 @@ public Builder minNumeric(Integer minNumeric) { } /** - * @param minSpecial Minimum number of special characters in the result. + * @param minSpecial Minimum number of special characters in the result. Default value is `0`. * * @return builder * @@ -359,7 +411,7 @@ public Builder minSpecial(@Nullable Output minSpecial) { } /** - * @param minSpecial Minimum number of special characters in the result. + * @param minSpecial Minimum number of special characters in the result. Default value is `0`. * * @return builder * @@ -369,7 +421,7 @@ public Builder minSpecial(Integer minSpecial) { } /** - * @param minUpper Minimum number of uppercase alphabet characters in the result. + * @param minUpper Minimum number of uppercase alphabet characters in the result. Default value is `0`. * * @return builder * @@ -380,7 +432,7 @@ public Builder minUpper(@Nullable Output minUpper) { } /** - * @param minUpper Minimum number of uppercase alphabet characters in the result. + * @param minUpper Minimum number of uppercase alphabet characters in the result. Default value is `0`. * * @return builder * @@ -390,30 +442,57 @@ public Builder minUpper(Integer minUpper) { } /** - * @param number Include numeric characters in the result. + * @param number Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. * * @return builder * + * @deprecated + * **NOTE**: This is deprecated, use `numeric` instead. + * */ + @Deprecated /* **NOTE**: This is deprecated, use `numeric` instead. */ public Builder number(@Nullable Output number) { $.number = number; return this; } /** - * @param number Include numeric characters in the result. + * @param number Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. * * @return builder * + * @deprecated + * **NOTE**: This is deprecated, use `numeric` instead. + * */ + @Deprecated /* **NOTE**: This is deprecated, use `numeric` instead. */ public Builder number(Boolean number) { return number(Output.of(number)); } /** - * @param overrideSpecial Supply your own list of special characters to use for string generation. This overrides the default character list in - * the special argument. The `special` argument must still be set to true for any overwritten characters to be used in - * generation. + * @param numeric Include numeric characters in the result. Default value is `true`. + * + * @return builder + * + */ + public Builder numeric(@Nullable Output numeric) { + $.numeric = numeric; + return this; + } + + /** + * @param numeric Include numeric characters in the result. Default value is `true`. + * + * @return builder + * + */ + public Builder numeric(Boolean numeric) { + return numeric(Output.of(numeric)); + } + + /** + * @param overrideSpecial Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. * * @return builder * @@ -424,9 +503,7 @@ public Builder overrideSpecial(@Nullable Output overrideSpecial) { } /** - * @param overrideSpecial Supply your own list of special characters to use for string generation. This overrides the default character list in - * the special argument. The `special` argument must still be set to true for any overwritten characters to be used in - * generation. + * @param overrideSpecial Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. * * @return builder * @@ -457,7 +534,7 @@ public Builder result(String result) { } /** - * @param special Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?` + * @param special Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. * * @return builder * @@ -468,7 +545,7 @@ public Builder special(@Nullable Output special) { } /** - * @param special Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?` + * @param special Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. * * @return builder * @@ -478,7 +555,7 @@ public Builder special(Boolean special) { } /** - * @param upper Include uppercase alphabet characters in the result. + * @param upper Include uppercase alphabet characters in the result. Default value is `true`. * * @return builder * @@ -489,7 +566,7 @@ public Builder upper(@Nullable Output upper) { } /** - * @param upper Include uppercase alphabet characters in the result. + * @param upper Include uppercase alphabet characters in the result. Default value is `true`. * * @return builder * diff --git a/sdk/java/src/main/java/com/pulumi/random/inputs/RandomPetState.java b/sdk/java/src/main/java/com/pulumi/random/inputs/RandomPetState.java index 5db9744fc1..cb5b921cf2 100644 --- a/sdk/java/src/main/java/com/pulumi/random/inputs/RandomPetState.java +++ b/sdk/java/src/main/java/com/pulumi/random/inputs/RandomPetState.java @@ -6,7 +6,6 @@ import com.pulumi.core.Output; import com.pulumi.core.annotations.Import; import java.lang.Integer; -import java.lang.Object; import java.lang.String; import java.util.Map; import java.util.Objects; @@ -19,33 +18,29 @@ public final class RandomPetState extends com.pulumi.resources.ResourceArgs { public static final RandomPetState Empty = new RandomPetState(); /** - * Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * */ @Import(name="keepers") - private @Nullable Output> keepers; + private @Nullable Output> keepers; /** - * @return Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * @return Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * */ - public Optional>> keepers() { + public Optional>> keepers() { return Optional.ofNullable(this.keepers); } /** - * The length (in words) of the pet name. + * The length (in words) of the pet name. Defaults to 2 * */ @Import(name="length") private @Nullable Output length; /** - * @return The length (in words) of the pet name. + * @return The length (in words) of the pet name. Defaults to 2 * */ public Optional> length() { @@ -68,14 +63,14 @@ public Optional> prefix() { } /** - * The character to separate words in the pet name. + * The character to separate words in the pet name. Defaults to "-" * */ @Import(name="separator") private @Nullable Output separator; /** - * @return The character to separate words in the pet name. + * @return The character to separate words in the pet name. Defaults to "-" * */ public Optional> separator() { @@ -110,32 +105,28 @@ public Builder(RandomPetState defaults) { } /** - * @param keepers Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * @param keepers Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * * @return builder * */ - public Builder keepers(@Nullable Output> keepers) { + public Builder keepers(@Nullable Output> keepers) { $.keepers = keepers; return this; } /** - * @param keepers Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * @param keepers Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * * @return builder * */ - public Builder keepers(Map keepers) { + public Builder keepers(Map keepers) { return keepers(Output.of(keepers)); } /** - * @param length The length (in words) of the pet name. + * @param length The length (in words) of the pet name. Defaults to 2 * * @return builder * @@ -146,7 +137,7 @@ public Builder length(@Nullable Output length) { } /** - * @param length The length (in words) of the pet name. + * @param length The length (in words) of the pet name. Defaults to 2 * * @return builder * @@ -177,7 +168,7 @@ public Builder prefix(String prefix) { } /** - * @param separator The character to separate words in the pet name. + * @param separator The character to separate words in the pet name. Defaults to "-" * * @return builder * @@ -188,7 +179,7 @@ public Builder separator(@Nullable Output separator) { } /** - * @param separator The character to separate words in the pet name. + * @param separator The character to separate words in the pet name. Defaults to "-" * * @return builder * diff --git a/sdk/java/src/main/java/com/pulumi/random/inputs/RandomShuffleState.java b/sdk/java/src/main/java/com/pulumi/random/inputs/RandomShuffleState.java index aa3cefa498..28e6972893 100644 --- a/sdk/java/src/main/java/com/pulumi/random/inputs/RandomShuffleState.java +++ b/sdk/java/src/main/java/com/pulumi/random/inputs/RandomShuffleState.java @@ -6,7 +6,6 @@ import com.pulumi.core.Output; import com.pulumi.core.annotations.Import; import java.lang.Integer; -import java.lang.Object; import java.lang.String; import java.util.List; import java.util.Map; @@ -35,41 +34,29 @@ public Optional>> inputs() { } /** - * Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * */ @Import(name="keepers") - private @Nullable Output> keepers; + private @Nullable Output> keepers; /** - * @return Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * @return Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * */ - public Optional>> keepers() { + public Optional>> keepers() { return Optional.ofNullable(this.keepers); } /** - * The number of results to return. Defaults to - * the number of items in the `input` list. If fewer items are requested, - * some elements will be excluded from the result. If more items are requested, - * items will be repeated in the result but not more frequently than the number - * of items in the input list. + * The number of results to return. Defaults to the number of items in the `input` list. If fewer items are requested, some elements will be excluded from the result. If more items are requested, items will be repeated in the result but not more frequently than the number of items in the input list. * */ @Import(name="resultCount") private @Nullable Output resultCount; /** - * @return The number of results to return. Defaults to - * the number of items in the `input` list. If fewer items are requested, - * some elements will be excluded from the result. If more items are requested, - * items will be repeated in the result but not more frequently than the number - * of items in the input list. + * @return The number of results to return. Defaults to the number of items in the `input` list. If fewer items are requested, some elements will be excluded from the result. If more items are requested, items will be repeated in the result but not more frequently than the number of items in the input list. * */ public Optional> resultCount() { @@ -92,18 +79,14 @@ public Optional>> results() { } /** - * Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the - * list. **Important:** Even with an identical seed, it is not guaranteed that the same permutation will be produced across - * different versions of Terraform. This argument causes the result to be *less volatile*, but not fixed for all time. + * Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the list. * */ @Import(name="seed") private @Nullable Output seed; /** - * @return Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the - * list. **Important:** Even with an identical seed, it is not guaranteed that the same permutation will be produced across - * different versions of Terraform. This argument causes the result to be *less volatile*, but not fixed for all time. + * @return Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the list. * */ public Optional> seed() { @@ -170,36 +153,28 @@ public Builder inputs(String... inputs) { } /** - * @param keepers Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * @param keepers Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * * @return builder * */ - public Builder keepers(@Nullable Output> keepers) { + public Builder keepers(@Nullable Output> keepers) { $.keepers = keepers; return this; } /** - * @param keepers Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * @param keepers Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * * @return builder * */ - public Builder keepers(Map keepers) { + public Builder keepers(Map keepers) { return keepers(Output.of(keepers)); } /** - * @param resultCount The number of results to return. Defaults to - * the number of items in the `input` list. If fewer items are requested, - * some elements will be excluded from the result. If more items are requested, - * items will be repeated in the result but not more frequently than the number - * of items in the input list. + * @param resultCount The number of results to return. Defaults to the number of items in the `input` list. If fewer items are requested, some elements will be excluded from the result. If more items are requested, items will be repeated in the result but not more frequently than the number of items in the input list. * * @return builder * @@ -210,11 +185,7 @@ public Builder resultCount(@Nullable Output resultCount) { } /** - * @param resultCount The number of results to return. Defaults to - * the number of items in the `input` list. If fewer items are requested, - * some elements will be excluded from the result. If more items are requested, - * items will be repeated in the result but not more frequently than the number - * of items in the input list. + * @param resultCount The number of results to return. Defaults to the number of items in the `input` list. If fewer items are requested, some elements will be excluded from the result. If more items are requested, items will be repeated in the result but not more frequently than the number of items in the input list. * * @return builder * @@ -255,9 +226,7 @@ public Builder results(String... results) { } /** - * @param seed Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the - * list. **Important:** Even with an identical seed, it is not guaranteed that the same permutation will be produced across - * different versions of Terraform. This argument causes the result to be *less volatile*, but not fixed for all time. + * @param seed Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the list. * * @return builder * @@ -268,9 +237,7 @@ public Builder seed(@Nullable Output seed) { } /** - * @param seed Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the - * list. **Important:** Even with an identical seed, it is not guaranteed that the same permutation will be produced across - * different versions of Terraform. This argument causes the result to be *less volatile*, but not fixed for all time. + * @param seed Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the list. * * @return builder * diff --git a/sdk/java/src/main/java/com/pulumi/random/inputs/RandomStringState.java b/sdk/java/src/main/java/com/pulumi/random/inputs/RandomStringState.java index 04d9d7b17c..d6ccb8b501 100644 --- a/sdk/java/src/main/java/com/pulumi/random/inputs/RandomStringState.java +++ b/sdk/java/src/main/java/com/pulumi/random/inputs/RandomStringState.java @@ -7,7 +7,6 @@ import com.pulumi.core.annotations.Import; import java.lang.Boolean; import java.lang.Integer; -import java.lang.Object; import java.lang.String; import java.util.Map; import java.util.Objects; @@ -20,33 +19,29 @@ public final class RandomStringState extends com.pulumi.resources.ResourceArgs { public static final RandomStringState Empty = new RandomStringState(); /** - * Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * */ @Import(name="keepers") - private @Nullable Output> keepers; + private @Nullable Output> keepers; /** - * @return Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * @return Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * */ - public Optional>> keepers() { + public Optional>> keepers() { return Optional.ofNullable(this.keepers); } /** - * The length of the string desired + * The length of the string desired. The minimum value for length is 1 and, length must also be >= (`min_upper` + `min_lower` + `min_numeric` + `min_special`). * */ @Import(name="length") private @Nullable Output length; /** - * @return The length of the string desired + * @return The length of the string desired. The minimum value for length is 1 and, length must also be >= (`min_upper` + `min_lower` + `min_numeric` + `min_special`). * */ public Optional> length() { @@ -54,16 +49,14 @@ public Optional> length() { } /** - * (default true) Include lowercase alphabet characters - * in random string. + * Include lowercase alphabet characters in the result. Default value is `true`. * */ @Import(name="lower") private @Nullable Output lower; /** - * @return (default true) Include lowercase alphabet characters - * in random string. + * @return Include lowercase alphabet characters in the result. Default value is `true`. * */ public Optional> lower() { @@ -71,16 +64,14 @@ public Optional> lower() { } /** - * (default 0) Minimum number of lowercase alphabet - * characters in random string. + * Minimum number of lowercase alphabet characters in the result. Default value is `0`. * */ @Import(name="minLower") private @Nullable Output minLower; /** - * @return (default 0) Minimum number of lowercase alphabet - * characters in random string. + * @return Minimum number of lowercase alphabet characters in the result. Default value is `0`. * */ public Optional> minLower() { @@ -88,16 +79,14 @@ public Optional> minLower() { } /** - * (default 0) Minimum number of numeric characters - * in random string. + * Minimum number of numeric characters in the result. Default value is `0`. * */ @Import(name="minNumeric") private @Nullable Output minNumeric; /** - * @return (default 0) Minimum number of numeric characters - * in random string. + * @return Minimum number of numeric characters in the result. Default value is `0`. * */ public Optional> minNumeric() { @@ -105,16 +94,14 @@ public Optional> minNumeric() { } /** - * (default 0) Minimum number of special characters - * in random string. + * Minimum number of special characters in the result. Default value is `0`. * */ @Import(name="minSpecial") private @Nullable Output minSpecial; /** - * @return (default 0) Minimum number of special characters - * in random string. + * @return Minimum number of special characters in the result. Default value is `0`. * */ public Optional> minSpecial() { @@ -122,16 +109,14 @@ public Optional> minSpecial() { } /** - * (default 0) Minimum number of uppercase alphabet - * characters in random string. + * Minimum number of uppercase alphabet characters in the result. Default value is `0`. * */ @Import(name="minUpper") private @Nullable Output minUpper; /** - * @return (default 0) Minimum number of uppercase alphabet - * characters in random string. + * @return Minimum number of uppercase alphabet characters in the result. Default value is `0`. * */ public Optional> minUpper() { @@ -139,37 +124,52 @@ public Optional> minUpper() { } /** - * (default true) Include numeric characters in random - * string. + * Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. + * + * @deprecated + * **NOTE**: This is deprecated, use `numeric` instead. * */ + @Deprecated /* **NOTE**: This is deprecated, use `numeric` instead. */ @Import(name="number") private @Nullable Output number; /** - * @return (default true) Include numeric characters in random - * string. + * @return Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. + * + * @deprecated + * **NOTE**: This is deprecated, use `numeric` instead. * */ + @Deprecated /* **NOTE**: This is deprecated, use `numeric` instead. */ public Optional> number() { return Optional.ofNullable(this.number); } /** - * Supply your own list of special characters to - * use for string generation. This overrides the default character list in the special - * argument. The special argument must still be set to true for any overwritten - * characters to be used in generation. + * Include numeric characters in the result. Default value is `true`. + * + */ + @Import(name="numeric") + private @Nullable Output numeric; + + /** + * @return Include numeric characters in the result. Default value is `true`. + * + */ + public Optional> numeric() { + return Optional.ofNullable(this.numeric); + } + + /** + * Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. * */ @Import(name="overrideSpecial") private @Nullable Output overrideSpecial; /** - * @return Supply your own list of special characters to - * use for string generation. This overrides the default character list in the special - * argument. The special argument must still be set to true for any overwritten - * characters to be used in generation. + * @return Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. * */ public Optional> overrideSpecial() { @@ -177,14 +177,14 @@ public Optional> overrideSpecial() { } /** - * Random string generated. + * The generated random string. * */ @Import(name="result") private @Nullable Output result; /** - * @return Random string generated. + * @return The generated random string. * */ public Optional> result() { @@ -192,16 +192,14 @@ public Optional> result() { } /** - * (default true) Include special characters in random - * string. These are `!@#$%&*()-_=+[]{}<>:?` + * Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. * */ @Import(name="special") private @Nullable Output special; /** - * @return (default true) Include special characters in random - * string. These are `!@#$%&*()-_=+[]{}<>:?` + * @return Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. * */ public Optional> special() { @@ -209,16 +207,14 @@ public Optional> special() { } /** - * (default true) Include uppercase alphabet characters - * in random string. + * Include uppercase alphabet characters in the result. Default value is `true`. * */ @Import(name="upper") private @Nullable Output upper; /** - * @return (default true) Include uppercase alphabet characters - * in random string. + * @return Include uppercase alphabet characters in the result. Default value is `true`. * */ public Optional> upper() { @@ -236,6 +232,7 @@ private RandomStringState(RandomStringState $) { this.minSpecial = $.minSpecial; this.minUpper = $.minUpper; this.number = $.number; + this.numeric = $.numeric; this.overrideSpecial = $.overrideSpecial; this.result = $.result; this.special = $.special; @@ -261,32 +258,28 @@ public Builder(RandomStringState defaults) { } /** - * @param keepers Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * @param keepers Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * * @return builder * */ - public Builder keepers(@Nullable Output> keepers) { + public Builder keepers(@Nullable Output> keepers) { $.keepers = keepers; return this; } /** - * @param keepers Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * @param keepers Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * * @return builder * */ - public Builder keepers(Map keepers) { + public Builder keepers(Map keepers) { return keepers(Output.of(keepers)); } /** - * @param length The length of the string desired + * @param length The length of the string desired. The minimum value for length is 1 and, length must also be >= (`min_upper` + `min_lower` + `min_numeric` + `min_special`). * * @return builder * @@ -297,7 +290,7 @@ public Builder length(@Nullable Output length) { } /** - * @param length The length of the string desired + * @param length The length of the string desired. The minimum value for length is 1 and, length must also be >= (`min_upper` + `min_lower` + `min_numeric` + `min_special`). * * @return builder * @@ -307,8 +300,7 @@ public Builder length(Integer length) { } /** - * @param lower (default true) Include lowercase alphabet characters - * in random string. + * @param lower Include lowercase alphabet characters in the result. Default value is `true`. * * @return builder * @@ -319,8 +311,7 @@ public Builder lower(@Nullable Output lower) { } /** - * @param lower (default true) Include lowercase alphabet characters - * in random string. + * @param lower Include lowercase alphabet characters in the result. Default value is `true`. * * @return builder * @@ -330,8 +321,7 @@ public Builder lower(Boolean lower) { } /** - * @param minLower (default 0) Minimum number of lowercase alphabet - * characters in random string. + * @param minLower Minimum number of lowercase alphabet characters in the result. Default value is `0`. * * @return builder * @@ -342,8 +332,7 @@ public Builder minLower(@Nullable Output minLower) { } /** - * @param minLower (default 0) Minimum number of lowercase alphabet - * characters in random string. + * @param minLower Minimum number of lowercase alphabet characters in the result. Default value is `0`. * * @return builder * @@ -353,8 +342,7 @@ public Builder minLower(Integer minLower) { } /** - * @param minNumeric (default 0) Minimum number of numeric characters - * in random string. + * @param minNumeric Minimum number of numeric characters in the result. Default value is `0`. * * @return builder * @@ -365,8 +353,7 @@ public Builder minNumeric(@Nullable Output minNumeric) { } /** - * @param minNumeric (default 0) Minimum number of numeric characters - * in random string. + * @param minNumeric Minimum number of numeric characters in the result. Default value is `0`. * * @return builder * @@ -376,8 +363,7 @@ public Builder minNumeric(Integer minNumeric) { } /** - * @param minSpecial (default 0) Minimum number of special characters - * in random string. + * @param minSpecial Minimum number of special characters in the result. Default value is `0`. * * @return builder * @@ -388,8 +374,7 @@ public Builder minSpecial(@Nullable Output minSpecial) { } /** - * @param minSpecial (default 0) Minimum number of special characters - * in random string. + * @param minSpecial Minimum number of special characters in the result. Default value is `0`. * * @return builder * @@ -399,8 +384,7 @@ public Builder minSpecial(Integer minSpecial) { } /** - * @param minUpper (default 0) Minimum number of uppercase alphabet - * characters in random string. + * @param minUpper Minimum number of uppercase alphabet characters in the result. Default value is `0`. * * @return builder * @@ -411,8 +395,7 @@ public Builder minUpper(@Nullable Output minUpper) { } /** - * @param minUpper (default 0) Minimum number of uppercase alphabet - * characters in random string. + * @param minUpper Minimum number of uppercase alphabet characters in the result. Default value is `0`. * * @return builder * @@ -422,33 +405,57 @@ public Builder minUpper(Integer minUpper) { } /** - * @param number (default true) Include numeric characters in random - * string. + * @param number Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. * * @return builder * + * @deprecated + * **NOTE**: This is deprecated, use `numeric` instead. + * */ + @Deprecated /* **NOTE**: This is deprecated, use `numeric` instead. */ public Builder number(@Nullable Output number) { $.number = number; return this; } /** - * @param number (default true) Include numeric characters in random - * string. + * @param number Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. * * @return builder * + * @deprecated + * **NOTE**: This is deprecated, use `numeric` instead. + * */ + @Deprecated /* **NOTE**: This is deprecated, use `numeric` instead. */ public Builder number(Boolean number) { return number(Output.of(number)); } /** - * @param overrideSpecial Supply your own list of special characters to - * use for string generation. This overrides the default character list in the special - * argument. The special argument must still be set to true for any overwritten - * characters to be used in generation. + * @param numeric Include numeric characters in the result. Default value is `true`. + * + * @return builder + * + */ + public Builder numeric(@Nullable Output numeric) { + $.numeric = numeric; + return this; + } + + /** + * @param numeric Include numeric characters in the result. Default value is `true`. + * + * @return builder + * + */ + public Builder numeric(Boolean numeric) { + return numeric(Output.of(numeric)); + } + + /** + * @param overrideSpecial Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. * * @return builder * @@ -459,10 +466,7 @@ public Builder overrideSpecial(@Nullable Output overrideSpecial) { } /** - * @param overrideSpecial Supply your own list of special characters to - * use for string generation. This overrides the default character list in the special - * argument. The special argument must still be set to true for any overwritten - * characters to be used in generation. + * @param overrideSpecial Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. * * @return builder * @@ -472,7 +476,7 @@ public Builder overrideSpecial(String overrideSpecial) { } /** - * @param result Random string generated. + * @param result The generated random string. * * @return builder * @@ -483,7 +487,7 @@ public Builder result(@Nullable Output result) { } /** - * @param result Random string generated. + * @param result The generated random string. * * @return builder * @@ -493,8 +497,7 @@ public Builder result(String result) { } /** - * @param special (default true) Include special characters in random - * string. These are `!@#$%&*()-_=+[]{}<>:?` + * @param special Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. * * @return builder * @@ -505,8 +508,7 @@ public Builder special(@Nullable Output special) { } /** - * @param special (default true) Include special characters in random - * string. These are `!@#$%&*()-_=+[]{}<>:?` + * @param special Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. * * @return builder * @@ -516,8 +518,7 @@ public Builder special(Boolean special) { } /** - * @param upper (default true) Include uppercase alphabet characters - * in random string. + * @param upper Include uppercase alphabet characters in the result. Default value is `true`. * * @return builder * @@ -528,8 +529,7 @@ public Builder upper(@Nullable Output upper) { } /** - * @param upper (default true) Include uppercase alphabet characters - * in random string. + * @param upper Include uppercase alphabet characters in the result. Default value is `true`. * * @return builder * diff --git a/sdk/java/src/main/java/com/pulumi/random/inputs/RandomUuidState.java b/sdk/java/src/main/java/com/pulumi/random/inputs/RandomUuidState.java index 554b6e6341..795db1d51f 100644 --- a/sdk/java/src/main/java/com/pulumi/random/inputs/RandomUuidState.java +++ b/sdk/java/src/main/java/com/pulumi/random/inputs/RandomUuidState.java @@ -5,7 +5,6 @@ import com.pulumi.core.Output; import com.pulumi.core.annotations.Import; -import java.lang.Object; import java.lang.String; import java.util.Map; import java.util.Objects; @@ -18,21 +17,17 @@ public final class RandomUuidState extends com.pulumi.resources.ResourceArgs { public static final RandomUuidState Empty = new RandomUuidState(); /** - * Arbitrary map of values that, when changed, will - * trigger a new uuid to be generated. See - * the main provider documentation for more information. + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * */ @Import(name="keepers") - private @Nullable Output> keepers; + private @Nullable Output> keepers; /** - * @return Arbitrary map of values that, when changed, will - * trigger a new uuid to be generated. See - * the main provider documentation for more information. + * @return Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * */ - public Optional>> keepers() { + public Optional>> keepers() { return Optional.ofNullable(this.keepers); } @@ -77,27 +72,23 @@ public Builder(RandomUuidState defaults) { } /** - * @param keepers Arbitrary map of values that, when changed, will - * trigger a new uuid to be generated. See - * the main provider documentation for more information. + * @param keepers Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * * @return builder * */ - public Builder keepers(@Nullable Output> keepers) { + public Builder keepers(@Nullable Output> keepers) { $.keepers = keepers; return this; } /** - * @param keepers Arbitrary map of values that, when changed, will - * trigger a new uuid to be generated. See - * the main provider documentation for more information. + * @param keepers Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. * * @return builder * */ - public Builder keepers(Map keepers) { + public Builder keepers(Map keepers) { return keepers(Output.of(keepers)); } diff --git a/sdk/nodejs/randomId.ts b/sdk/nodejs/randomId.ts index 3b37f0f64f..55bca53729 100644 --- a/sdk/nodejs/randomId.ts +++ b/sdk/nodejs/randomId.ts @@ -20,37 +20,37 @@ import * as utilities from "./utilities"; * * ## Example Usage * - * The following example shows how to generate a unique name for an AWS EC2 - * instance that changes each time a new AMI id is selected. - * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * import * as random from "@pulumi/random"; * + * // The following example shows how to generate a unique name for an AWS EC2 + * // instance that changes each time a new AMI id is selected. * const serverRandomId = new random.RandomId("serverRandomId", { - * byteLength: 8, * keepers: { * ami_id: _var.ami_id, * }, + * byteLength: 8, * }); * const serverInstance = new aws.ec2.Instance("serverInstance", { - * ami: serverRandomId.keepers.apply(keepers => keepers?.amiId), * tags: { * Name: pulumi.interpolate`web-server ${serverRandomId.hex}`, * }, + * ami: serverRandomId.keepers.apply(keepers => keepers?.amiId), * }); + * // ... (other aws_instance arguments) ... * ``` * * ## Import * - * Random Ids can be imported using the `b64_url` with an optional `prefix`. This can be used to replace a config value with a value interpolated from the random provider without experiencing diffs. Example with no prefix + * Random IDs can be imported using the b64_url with an optional prefix. This can be used to replace a config value with a value interpolated from the random provider without experiencing diffs. Example with no prefix * * ```sh * $ pulumi import random:index/randomId:RandomId server p-9hUg * ``` * - * Example with prefix (prefix is separated by a `,`) + * Example with prefix (prefix is separated by a ,) * * ```sh * $ pulumi import random:index/randomId:RandomId server my-prefix-,p-9hUg @@ -93,8 +93,7 @@ export class RandomId extends pulumi.CustomResource { */ public /*out*/ readonly b64Url!: pulumi.Output; /** - * The number of random bytes to produce. The - * minimum value is 1, which produces eight bits of randomness. + * The number of random bytes to produce. The minimum value is 1, which produces eight bits of randomness. */ public readonly byteLength!: pulumi.Output; /** @@ -106,15 +105,11 @@ export class RandomId extends pulumi.CustomResource { */ public /*out*/ readonly hex!: pulumi.Output; /** - * Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. */ - public readonly keepers!: pulumi.Output<{[key: string]: any} | undefined>; + public readonly keepers!: pulumi.Output<{[key: string]: string} | undefined>; /** - * Arbitrary string to prefix the output value with. This - * string is supplied as-is, meaning it is not guaranteed to be URL-safe or - * base64 encoded. + * Arbitrary string to prefix the output value with. This string is supplied as-is, meaning it is not guaranteed to be URL-safe or base64 encoded. */ public readonly prefix!: pulumi.Output; @@ -169,8 +164,7 @@ export interface RandomIdState { */ b64Url?: pulumi.Input; /** - * The number of random bytes to produce. The - * minimum value is 1, which produces eight bits of randomness. + * The number of random bytes to produce. The minimum value is 1, which produces eight bits of randomness. */ byteLength?: pulumi.Input; /** @@ -182,15 +176,11 @@ export interface RandomIdState { */ hex?: pulumi.Input; /** - * Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. */ - keepers?: pulumi.Input<{[key: string]: any}>; + keepers?: pulumi.Input<{[key: string]: pulumi.Input}>; /** - * Arbitrary string to prefix the output value with. This - * string is supplied as-is, meaning it is not guaranteed to be URL-safe or - * base64 encoded. + * Arbitrary string to prefix the output value with. This string is supplied as-is, meaning it is not guaranteed to be URL-safe or base64 encoded. */ prefix?: pulumi.Input; } @@ -200,20 +190,15 @@ export interface RandomIdState { */ export interface RandomIdArgs { /** - * The number of random bytes to produce. The - * minimum value is 1, which produces eight bits of randomness. + * The number of random bytes to produce. The minimum value is 1, which produces eight bits of randomness. */ byteLength: pulumi.Input; /** - * Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. */ - keepers?: pulumi.Input<{[key: string]: any}>; + keepers?: pulumi.Input<{[key: string]: pulumi.Input}>; /** - * Arbitrary string to prefix the output value with. This - * string is supplied as-is, meaning it is not guaranteed to be URL-safe or - * base64 encoded. + * Arbitrary string to prefix the output value with. This string is supplied as-is, meaning it is not guaranteed to be URL-safe or base64 encoded. */ prefix?: pulumi.Input; } diff --git a/sdk/nodejs/randomInteger.ts b/sdk/nodejs/randomInteger.ts index 314a485fdd..9864152bc7 100644 --- a/sdk/nodejs/randomInteger.ts +++ b/sdk/nodejs/randomInteger.ts @@ -7,43 +7,38 @@ import * as utilities from "./utilities"; /** * The resource `random.RandomInteger` generates random values from a given range, described by the `min` and `max` attributes of a given resource. * - * This resource can be used in conjunction with resources that have - * the `createBeforeDestroy` lifecycle flag set, to avoid conflicts with - * unique names during the brief period where both the old and new resources - * exist concurrently. + * This resource can be used in conjunction with resources that have the `createBeforeDestroy` lifecycle flag set, to avoid conflicts with unique names during the brief period where both the old and new resources exist concurrently. * * ## Example Usage * - * The following example shows how to generate a random priority between 1 and 50000 for - * a `awsAlbListenerRule` resource: - * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * import * as random from "@pulumi/random"; * + * // The following example shows how to generate a random priority + * // between 1 and 50000 for a aws_alb_listener_rule resource: * const priority = new random.RandomInteger("priority", { + * min: 1, + * max: 50000, * keepers: { * listener_arn: _var.listener_arn, * }, - * max: 50000, - * min: 1, * }); * const main = new aws.alb.ListenerRule("main", { + * listenerArn: priority.keepers.apply(keepers => keepers?.listenerArn), + * priority: priority.result, * actions: [{ - * targetGroupArn: _var.target_group_arn, * type: "forward", + * targetGroupArn: _var.target_group_arn, * }], - * listenerArn: _var.listener_arn, - * priority: priority.result, * }); + * // ... (other aws_alb_listener_rule arguments) ... * ``` * - * The result of the above will set a random priority. - * * ## Import * - * Random integers can be imported using the `result`, `min`, and `max`, with an optional `seed`. This can be used to replace a config value with a value interpolated from the random provider without experiencing diffs. Example (values are separated by a `,`) + * Random integers can be imported using the result, min, and max, with an optional seed. This can be used to replace a config value with a value interpolated from the random provider without experiencing diffs. Example (values are separated by a ,) * * ```sh * $ pulumi import random:index/randomInteger:RandomInteger priority 15390,1,50000 @@ -78,11 +73,9 @@ export class RandomInteger extends pulumi.CustomResource { } /** - * Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. */ - public readonly keepers!: pulumi.Output<{[key: string]: any} | undefined>; + public readonly keepers!: pulumi.Output<{[key: string]: string} | undefined>; /** * The maximum inclusive value of the range. */ @@ -92,7 +85,7 @@ export class RandomInteger extends pulumi.CustomResource { */ public readonly min!: pulumi.Output; /** - * (int) The random Integer result. + * The random integer result. */ public /*out*/ readonly result!: pulumi.Output; /** @@ -142,11 +135,9 @@ export class RandomInteger extends pulumi.CustomResource { */ export interface RandomIntegerState { /** - * Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. */ - keepers?: pulumi.Input<{[key: string]: any}>; + keepers?: pulumi.Input<{[key: string]: pulumi.Input}>; /** * The maximum inclusive value of the range. */ @@ -156,7 +147,7 @@ export interface RandomIntegerState { */ min?: pulumi.Input; /** - * (int) The random Integer result. + * The random integer result. */ result?: pulumi.Input; /** @@ -170,11 +161,9 @@ export interface RandomIntegerState { */ export interface RandomIntegerArgs { /** - * Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. */ - keepers?: pulumi.Input<{[key: string]: any}>; + keepers?: pulumi.Input<{[key: string]: pulumi.Input}>; /** * The maximum inclusive value of the range. */ diff --git a/sdk/nodejs/randomPassword.ts b/sdk/nodejs/randomPassword.ts index a427836ea0..86a6f999fc 100644 --- a/sdk/nodejs/randomPassword.ts +++ b/sdk/nodejs/randomPassword.ts @@ -5,17 +5,6 @@ import * as pulumi from "@pulumi/pulumi"; import * as utilities from "./utilities"; /** - * > **Note:** Requires random provider version >= 2.2.0 - * - * Identical to random.RandomString with the exception that the - * result is treated as sensitive and, thus, _not_ displayed in console output. - * - * > **Note:** All attributes including the generated password will be stored in - * the raw state as plain-text. [Read more about sensitive data in - * state](https://www.terraform.io/docs/state/sensitive-data.html). - * - * This resource *does* use a cryptographic random number generator. - * * ## Example Usage * * ```typescript @@ -26,7 +15,7 @@ import * as utilities from "./utilities"; * const password = new random.RandomPassword("password", { * length: 16, * special: true, - * overrideSpecial: `_%@`, + * overrideSpecial: `!#$%&*()-_=+[]{}<>:?`, * }); * const example = new aws.rds.Instance("example", { * instanceClass: "db.t3.micro", @@ -39,11 +28,61 @@ import * as utilities from "./utilities"; * * ## Import * - * Random Password can be imported by specifying the value of the string + * ### Avoiding Replacement * * ```sh - * $ pulumi import random:index/randomPassword:RandomPassword password securepassword + * $ pulumi import random:index/randomPassword:RandomPassword If the resource were imported using `random_password.password securepassword`, * ``` + * + * replacement could be avoided by using1. Attribute values that match the imported ID and defaults: + * + * terraform + * + * resource "random_password" "password" { + * + * length = 14 + * + * lower + * + * = true + * + * } 2. Attribute values that match the imported ID and omit the attributes with defaults: + * + * terraform + * + * resource "random_password" "password" { + * + * length = 14 + * + * } 3. `ignore_changes` specifying the attributes to ignore: + * + * terraform + * + * resource "random_password" "password" { + * + * length = 16 + * + * lower + * + * = false + * + * lifecycle { + * + * ignore_changes = [ + * + * length, + * + * lower, + * + * ] + * + * } + * + * } + * + * **NOTE** `ignore_changes` is only required until the resource is recreated after import, + * + * after which it will use the configuration values specified. */ export class RandomPassword extends pulumi.CustomResource { /** @@ -74,42 +113,49 @@ export class RandomPassword extends pulumi.CustomResource { } /** - * Arbitrary map of values that, when changed, will trigger recreation of resource. See [the main provider - * documentation](../index.html) for more information. + * A bcrypt hash of the generated random string. */ - public readonly keepers!: pulumi.Output<{[key: string]: any} | undefined>; + public /*out*/ readonly bcryptHash!: pulumi.Output; /** - * The length of the string desired. + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + */ + public readonly keepers!: pulumi.Output<{[key: string]: string} | undefined>; + /** + * The length of the string desired. The minimum value for length is 1 and, length must also be >= (`minUpper` + `minLower` + `minNumeric` + `minSpecial`). */ public readonly length!: pulumi.Output; /** - * Include lowercase alphabet characters in the result. + * Include lowercase alphabet characters in the result. Default value is `true`. */ - public readonly lower!: pulumi.Output; + public readonly lower!: pulumi.Output; /** - * Minimum number of lowercase alphabet characters in the result. + * Minimum number of lowercase alphabet characters in the result. Default value is `0`. */ - public readonly minLower!: pulumi.Output; + public readonly minLower!: pulumi.Output; /** - * Minimum number of numeric characters in the result. + * Minimum number of numeric characters in the result. Default value is `0`. */ - public readonly minNumeric!: pulumi.Output; + public readonly minNumeric!: pulumi.Output; /** - * Minimum number of special characters in the result. + * Minimum number of special characters in the result. Default value is `0`. */ - public readonly minSpecial!: pulumi.Output; + public readonly minSpecial!: pulumi.Output; /** - * Minimum number of uppercase alphabet characters in the result. + * Minimum number of uppercase alphabet characters in the result. Default value is `0`. */ - public readonly minUpper!: pulumi.Output; + public readonly minUpper!: pulumi.Output; /** - * Include numeric characters in the result. + * Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. + * + * @deprecated **NOTE**: This is deprecated, use `numeric` instead. */ - public readonly number!: pulumi.Output; + public readonly number!: pulumi.Output; /** - * Supply your own list of special characters to use for string generation. This overrides the default character list in - * the special argument. The `special` argument must still be set to true for any overwritten characters to be used in - * generation. + * Include numeric characters in the result. Default value is `true`. + */ + public readonly numeric!: pulumi.Output; + /** + * Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. */ public readonly overrideSpecial!: pulumi.Output; /** @@ -117,13 +163,13 @@ export class RandomPassword extends pulumi.CustomResource { */ public /*out*/ readonly result!: pulumi.Output; /** - * Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?` + * Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. */ - public readonly special!: pulumi.Output; + public readonly special!: pulumi.Output; /** - * Include uppercase alphabet characters in the result. + * Include uppercase alphabet characters in the result. Default value is `true`. */ - public readonly upper!: pulumi.Output; + public readonly upper!: pulumi.Output; /** * Create a RandomPassword resource with the given unique name, arguments, and options. @@ -138,6 +184,7 @@ export class RandomPassword extends pulumi.CustomResource { opts = opts || {}; if (opts.id) { const state = argsOrState as RandomPasswordState | undefined; + resourceInputs["bcryptHash"] = state ? state.bcryptHash : undefined; resourceInputs["keepers"] = state ? state.keepers : undefined; resourceInputs["length"] = state ? state.length : undefined; resourceInputs["lower"] = state ? state.lower : undefined; @@ -146,6 +193,7 @@ export class RandomPassword extends pulumi.CustomResource { resourceInputs["minSpecial"] = state ? state.minSpecial : undefined; resourceInputs["minUpper"] = state ? state.minUpper : undefined; resourceInputs["number"] = state ? state.number : undefined; + resourceInputs["numeric"] = state ? state.numeric : undefined; resourceInputs["overrideSpecial"] = state ? state.overrideSpecial : undefined; resourceInputs["result"] = state ? state.result : undefined; resourceInputs["special"] = state ? state.special : undefined; @@ -163,13 +211,15 @@ export class RandomPassword extends pulumi.CustomResource { resourceInputs["minSpecial"] = args ? args.minSpecial : undefined; resourceInputs["minUpper"] = args ? args.minUpper : undefined; resourceInputs["number"] = args ? args.number : undefined; + resourceInputs["numeric"] = args ? args.numeric : undefined; resourceInputs["overrideSpecial"] = args ? args.overrideSpecial : undefined; resourceInputs["special"] = args ? args.special : undefined; resourceInputs["upper"] = args ? args.upper : undefined; + resourceInputs["bcryptHash"] = undefined /*out*/; resourceInputs["result"] = undefined /*out*/; } opts = pulumi.mergeOptions(utilities.resourceOptsDefaults(), opts); - const secretOpts = { additionalSecretOutputs: ["result"] }; + const secretOpts = { additionalSecretOutputs: ["bcryptHash", "result"] }; opts = pulumi.mergeOptions(opts, secretOpts); super(RandomPassword.__pulumiType, name, resourceInputs, opts); } @@ -180,42 +230,49 @@ export class RandomPassword extends pulumi.CustomResource { */ export interface RandomPasswordState { /** - * Arbitrary map of values that, when changed, will trigger recreation of resource. See [the main provider - * documentation](../index.html) for more information. + * A bcrypt hash of the generated random string. */ - keepers?: pulumi.Input<{[key: string]: any}>; + bcryptHash?: pulumi.Input; /** - * The length of the string desired. + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + */ + keepers?: pulumi.Input<{[key: string]: pulumi.Input}>; + /** + * The length of the string desired. The minimum value for length is 1 and, length must also be >= (`minUpper` + `minLower` + `minNumeric` + `minSpecial`). */ length?: pulumi.Input; /** - * Include lowercase alphabet characters in the result. + * Include lowercase alphabet characters in the result. Default value is `true`. */ lower?: pulumi.Input; /** - * Minimum number of lowercase alphabet characters in the result. + * Minimum number of lowercase alphabet characters in the result. Default value is `0`. */ minLower?: pulumi.Input; /** - * Minimum number of numeric characters in the result. + * Minimum number of numeric characters in the result. Default value is `0`. */ minNumeric?: pulumi.Input; /** - * Minimum number of special characters in the result. + * Minimum number of special characters in the result. Default value is `0`. */ minSpecial?: pulumi.Input; /** - * Minimum number of uppercase alphabet characters in the result. + * Minimum number of uppercase alphabet characters in the result. Default value is `0`. */ minUpper?: pulumi.Input; /** - * Include numeric characters in the result. + * Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. + * + * @deprecated **NOTE**: This is deprecated, use `numeric` instead. */ number?: pulumi.Input; /** - * Supply your own list of special characters to use for string generation. This overrides the default character list in - * the special argument. The `special` argument must still be set to true for any overwritten characters to be used in - * generation. + * Include numeric characters in the result. Default value is `true`. + */ + numeric?: pulumi.Input; + /** + * Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. */ overrideSpecial?: pulumi.Input; /** @@ -223,11 +280,11 @@ export interface RandomPasswordState { */ result?: pulumi.Input; /** - * Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?` + * Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. */ special?: pulumi.Input; /** - * Include uppercase alphabet characters in the result. + * Include uppercase alphabet characters in the result. Default value is `true`. */ upper?: pulumi.Input; } @@ -237,50 +294,53 @@ export interface RandomPasswordState { */ export interface RandomPasswordArgs { /** - * Arbitrary map of values that, when changed, will trigger recreation of resource. See [the main provider - * documentation](../index.html) for more information. + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. */ - keepers?: pulumi.Input<{[key: string]: any}>; + keepers?: pulumi.Input<{[key: string]: pulumi.Input}>; /** - * The length of the string desired. + * The length of the string desired. The minimum value for length is 1 and, length must also be >= (`minUpper` + `minLower` + `minNumeric` + `minSpecial`). */ length: pulumi.Input; /** - * Include lowercase alphabet characters in the result. + * Include lowercase alphabet characters in the result. Default value is `true`. */ lower?: pulumi.Input; /** - * Minimum number of lowercase alphabet characters in the result. + * Minimum number of lowercase alphabet characters in the result. Default value is `0`. */ minLower?: pulumi.Input; /** - * Minimum number of numeric characters in the result. + * Minimum number of numeric characters in the result. Default value is `0`. */ minNumeric?: pulumi.Input; /** - * Minimum number of special characters in the result. + * Minimum number of special characters in the result. Default value is `0`. */ minSpecial?: pulumi.Input; /** - * Minimum number of uppercase alphabet characters in the result. + * Minimum number of uppercase alphabet characters in the result. Default value is `0`. */ minUpper?: pulumi.Input; /** - * Include numeric characters in the result. + * Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. + * + * @deprecated **NOTE**: This is deprecated, use `numeric` instead. */ number?: pulumi.Input; /** - * Supply your own list of special characters to use for string generation. This overrides the default character list in - * the special argument. The `special` argument must still be set to true for any overwritten characters to be used in - * generation. + * Include numeric characters in the result. Default value is `true`. + */ + numeric?: pulumi.Input; + /** + * Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. */ overrideSpecial?: pulumi.Input; /** - * Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?` + * Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. */ special?: pulumi.Input; /** - * Include uppercase alphabet characters in the result. + * Include uppercase alphabet characters in the result. Default value is `true`. */ upper?: pulumi.Input; } diff --git a/sdk/nodejs/randomPet.ts b/sdk/nodejs/randomPet.ts index 0b6597b96f..1517004924 100644 --- a/sdk/nodejs/randomPet.ts +++ b/sdk/nodejs/randomPet.ts @@ -5,37 +5,31 @@ import * as pulumi from "@pulumi/pulumi"; import * as utilities from "./utilities"; /** - * The resource `random.RandomPet` generates random pet names that are intended to be - * used as unique identifiers for other resources. + * The resource `random.RandomPet` generates random pet names that are intended to be used as unique identifiers for other resources. * - * This resource can be used in conjunction with resources that have - * the `createBeforeDestroy` lifecycle flag set, to avoid conflicts with - * unique names during the brief period where both the old and new resources - * exist concurrently. + * This resource can be used in conjunction with resources that have the `createBeforeDestroy` lifecycle flag set, to avoid conflicts with unique names during the brief period where both the old and new resources exist concurrently. * * ## Example Usage * - * The following example shows how to generate a unique pet name for an AWS EC2 - * instance that changes each time a new AMI id is selected. - * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as aws from "@pulumi/aws"; * import * as random from "@pulumi/random"; * + * // The following example shows how to generate a unique pet name + * // for an AWS EC2 instance that changes each time a new AMI id is + * // selected. * const serverRandomPet = new random.RandomPet("serverRandomPet", {keepers: { * ami_id: _var.ami_id, * }}); * const serverInstance = new aws.ec2.Instance("serverInstance", { - * ami: serverRandomPet.keepers.apply(keepers => keepers?.amiId), * tags: { * Name: pulumi.interpolate`web-server-${serverRandomPet.id}`, * }, + * ami: serverRandomPet.keepers.apply(keepers => keepers?.amiId), * }); + * // ... (other aws_instance arguments) ... * ``` - * - * The result of the above will set the Name of the AWS Instance to - * `web-server-simple-snake`. */ export class RandomPet extends pulumi.CustomResource { /** @@ -66,23 +60,21 @@ export class RandomPet extends pulumi.CustomResource { } /** - * Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. */ - public readonly keepers!: pulumi.Output<{[key: string]: any} | undefined>; + public readonly keepers!: pulumi.Output<{[key: string]: string} | undefined>; /** - * The length (in words) of the pet name. + * The length (in words) of the pet name. Defaults to 2 */ - public readonly length!: pulumi.Output; + public readonly length!: pulumi.Output; /** * A string to prefix the name with. */ public readonly prefix!: pulumi.Output; /** - * The character to separate words in the pet name. + * The character to separate words in the pet name. Defaults to "-" */ - public readonly separator!: pulumi.Output; + public readonly separator!: pulumi.Output; /** * Create a RandomPet resource with the given unique name, arguments, and options. @@ -118,13 +110,11 @@ export class RandomPet extends pulumi.CustomResource { */ export interface RandomPetState { /** - * Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. */ - keepers?: pulumi.Input<{[key: string]: any}>; + keepers?: pulumi.Input<{[key: string]: pulumi.Input}>; /** - * The length (in words) of the pet name. + * The length (in words) of the pet name. Defaults to 2 */ length?: pulumi.Input; /** @@ -132,7 +122,7 @@ export interface RandomPetState { */ prefix?: pulumi.Input; /** - * The character to separate words in the pet name. + * The character to separate words in the pet name. Defaults to "-" */ separator?: pulumi.Input; } @@ -142,13 +132,11 @@ export interface RandomPetState { */ export interface RandomPetArgs { /** - * Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. */ - keepers?: pulumi.Input<{[key: string]: any}>; + keepers?: pulumi.Input<{[key: string]: pulumi.Input}>; /** - * The length (in words) of the pet name. + * The length (in words) of the pet name. Defaults to 2 */ length?: pulumi.Input; /** @@ -156,7 +144,7 @@ export interface RandomPetArgs { */ prefix?: pulumi.Input; /** - * The character to separate words in the pet name. + * The character to separate words in the pet name. Defaults to "-" */ separator?: pulumi.Input; } diff --git a/sdk/nodejs/randomShuffle.ts b/sdk/nodejs/randomShuffle.ts index 8d5fa1eebb..fe7bdb63af 100644 --- a/sdk/nodejs/randomShuffle.ts +++ b/sdk/nodejs/randomShuffle.ts @@ -5,8 +5,7 @@ import * as pulumi from "@pulumi/pulumi"; import * as utilities from "./utilities"; /** - * The resource `random.RandomShuffle` generates a random permutation of a list - * of strings given as an argument. + * The resource `random.RandomShuffle` generates a random permutation of a list of strings given as an argument. * * ## Example Usage * @@ -24,7 +23,8 @@ import * as utilities from "./utilities"; * ], * resultCount: 2, * }); - * const example = new aws.elb.LoadBalancer("example", {availabilityZones: az.results}); + * const example = new aws.elb.LoadBalancer("example", {availabilityZones: [az.results]}); + * // ... and other aws_elb arguments ... * ``` */ export class RandomShuffle extends pulumi.CustomResource { @@ -60,17 +60,11 @@ export class RandomShuffle extends pulumi.CustomResource { */ public readonly inputs!: pulumi.Output; /** - * Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. */ - public readonly keepers!: pulumi.Output<{[key: string]: any} | undefined>; + public readonly keepers!: pulumi.Output<{[key: string]: string} | undefined>; /** - * The number of results to return. Defaults to - * the number of items in the `input` list. If fewer items are requested, - * some elements will be excluded from the result. If more items are requested, - * items will be repeated in the result but not more frequently than the number - * of items in the input list. + * The number of results to return. Defaults to the number of items in the `input` list. If fewer items are requested, some elements will be excluded from the result. If more items are requested, items will be repeated in the result but not more frequently than the number of items in the input list. */ public readonly resultCount!: pulumi.Output; /** @@ -78,9 +72,7 @@ export class RandomShuffle extends pulumi.CustomResource { */ public /*out*/ readonly results!: pulumi.Output; /** - * Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the - * list. **Important:** Even with an identical seed, it is not guaranteed that the same permutation will be produced across - * different versions of Terraform. This argument causes the result to be *less volatile*, but not fixed for all time. + * Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the list. */ public readonly seed!: pulumi.Output; @@ -127,17 +119,11 @@ export interface RandomShuffleState { */ inputs?: pulumi.Input[]>; /** - * Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. */ - keepers?: pulumi.Input<{[key: string]: any}>; + keepers?: pulumi.Input<{[key: string]: pulumi.Input}>; /** - * The number of results to return. Defaults to - * the number of items in the `input` list. If fewer items are requested, - * some elements will be excluded from the result. If more items are requested, - * items will be repeated in the result but not more frequently than the number - * of items in the input list. + * The number of results to return. Defaults to the number of items in the `input` list. If fewer items are requested, some elements will be excluded from the result. If more items are requested, items will be repeated in the result but not more frequently than the number of items in the input list. */ resultCount?: pulumi.Input; /** @@ -145,9 +131,7 @@ export interface RandomShuffleState { */ results?: pulumi.Input[]>; /** - * Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the - * list. **Important:** Even with an identical seed, it is not guaranteed that the same permutation will be produced across - * different versions of Terraform. This argument causes the result to be *less volatile*, but not fixed for all time. + * Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the list. */ seed?: pulumi.Input; } @@ -161,23 +145,15 @@ export interface RandomShuffleArgs { */ inputs: pulumi.Input[]>; /** - * Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. */ - keepers?: pulumi.Input<{[key: string]: any}>; + keepers?: pulumi.Input<{[key: string]: pulumi.Input}>; /** - * The number of results to return. Defaults to - * the number of items in the `input` list. If fewer items are requested, - * some elements will be excluded from the result. If more items are requested, - * items will be repeated in the result but not more frequently than the number - * of items in the input list. + * The number of results to return. Defaults to the number of items in the `input` list. If fewer items are requested, some elements will be excluded from the result. If more items are requested, items will be repeated in the result but not more frequently than the number of items in the input list. */ resultCount?: pulumi.Input; /** - * Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the - * list. **Important:** Even with an identical seed, it is not guaranteed that the same permutation will be produced across - * different versions of Terraform. This argument causes the result to be *less volatile*, but not fixed for all time. + * Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the list. */ seed?: pulumi.Input; } diff --git a/sdk/nodejs/randomString.ts b/sdk/nodejs/randomString.ts index 7fa27d680e..54b953b91f 100644 --- a/sdk/nodejs/randomString.ts +++ b/sdk/nodejs/randomString.ts @@ -5,15 +5,11 @@ import * as pulumi from "@pulumi/pulumi"; import * as utilities from "./utilities"; /** - * The resource `random.RandomString` generates a random permutation of alphanumeric - * characters and optionally special characters. + * The resource `random.RandomString` generates a random permutation of alphanumeric characters and optionally special characters. * * This resource *does* use a cryptographic random number generator. * - * Historically this resource's intended usage has been ambiguous as the original example - * used it in a password. For backwards compatibility it will - * continue to exist. For unique ids please use random_id, for sensitive - * random values please use random_password. + * Historically this resource's intended usage has been ambiguous as the original example used it in a password. For backwards compatibility it will continue to exist. For unique ids please use random_id, for sensitive random values please use random_password. * * ## Example Usage * @@ -30,11 +26,61 @@ import * as utilities from "./utilities"; * * ## Import * - * Strings can be imported by just specifying the value of the string + * ### Avoiding Replacement * * ```sh - * $ pulumi import random:index/randomString:RandomString test test + * $ pulumi import random:index/randomString:RandomString If the resource were imported using `random_string.test test`, * ``` + * + * replacement can be avoided by using1. Attribute values that match the imported ID and defaults: + * + * terraform + * + * resource "random_string" "test" { + * + * length = 4 + * + * lower + * + * = true + * + * } 2. Attribute values that match the imported ID and omit the attributes with defaults: + * + * terraform + * + * resource "random_string" "test" { + * + * length = 4 + * + * } 3. `ignore_changes` specifying the attributes to ignore: + * + * terraform + * + * resource "random_string" "test" { + * + * length = 16 + * + * lower + * + * = false + * + * lifecycle { + * + * ignore_changes = [ + * + * length, + * + * lower, + * + * ] + * + * } + * + * } + * + * **NOTE** `ignore_changes` is only required until the resource is recreated after import, + * + * after which it will use the configuration values specified. */ export class RandomString extends pulumi.CustomResource { /** @@ -65,66 +111,59 @@ export class RandomString extends pulumi.CustomResource { } /** - * Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. */ - public readonly keepers!: pulumi.Output<{[key: string]: any} | undefined>; + public readonly keepers!: pulumi.Output<{[key: string]: string} | undefined>; /** - * The length of the string desired + * The length of the string desired. The minimum value for length is 1 and, length must also be >= (`minUpper` + `minLower` + `minNumeric` + `minSpecial`). */ public readonly length!: pulumi.Output; /** - * (default true) Include lowercase alphabet characters - * in random string. + * Include lowercase alphabet characters in the result. Default value is `true`. */ - public readonly lower!: pulumi.Output; + public readonly lower!: pulumi.Output; /** - * (default 0) Minimum number of lowercase alphabet - * characters in random string. + * Minimum number of lowercase alphabet characters in the result. Default value is `0`. */ - public readonly minLower!: pulumi.Output; + public readonly minLower!: pulumi.Output; /** - * (default 0) Minimum number of numeric characters - * in random string. + * Minimum number of numeric characters in the result. Default value is `0`. */ - public readonly minNumeric!: pulumi.Output; + public readonly minNumeric!: pulumi.Output; /** - * (default 0) Minimum number of special characters - * in random string. + * Minimum number of special characters in the result. Default value is `0`. */ - public readonly minSpecial!: pulumi.Output; + public readonly minSpecial!: pulumi.Output; /** - * (default 0) Minimum number of uppercase alphabet - * characters in random string. + * Minimum number of uppercase alphabet characters in the result. Default value is `0`. */ - public readonly minUpper!: pulumi.Output; + public readonly minUpper!: pulumi.Output; /** - * (default true) Include numeric characters in random - * string. + * Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. + * + * @deprecated **NOTE**: This is deprecated, use `numeric` instead. */ - public readonly number!: pulumi.Output; + public readonly number!: pulumi.Output; /** - * Supply your own list of special characters to - * use for string generation. This overrides the default character list in the special - * argument. The special argument must still be set to true for any overwritten - * characters to be used in generation. + * Include numeric characters in the result. Default value is `true`. + */ + public readonly numeric!: pulumi.Output; + /** + * Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. */ public readonly overrideSpecial!: pulumi.Output; /** - * Random string generated. + * The generated random string. */ public /*out*/ readonly result!: pulumi.Output; /** - * (default true) Include special characters in random - * string. These are `!@#$%&*()-_=+[]{}<>:?` + * Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. */ - public readonly special!: pulumi.Output; + public readonly special!: pulumi.Output; /** - * (default true) Include uppercase alphabet characters - * in random string. + * Include uppercase alphabet characters in the result. Default value is `true`. */ - public readonly upper!: pulumi.Output; + public readonly upper!: pulumi.Output; /** * Create a RandomString resource with the given unique name, arguments, and options. @@ -147,6 +186,7 @@ export class RandomString extends pulumi.CustomResource { resourceInputs["minSpecial"] = state ? state.minSpecial : undefined; resourceInputs["minUpper"] = state ? state.minUpper : undefined; resourceInputs["number"] = state ? state.number : undefined; + resourceInputs["numeric"] = state ? state.numeric : undefined; resourceInputs["overrideSpecial"] = state ? state.overrideSpecial : undefined; resourceInputs["result"] = state ? state.result : undefined; resourceInputs["special"] = state ? state.special : undefined; @@ -164,6 +204,7 @@ export class RandomString extends pulumi.CustomResource { resourceInputs["minSpecial"] = args ? args.minSpecial : undefined; resourceInputs["minUpper"] = args ? args.minUpper : undefined; resourceInputs["number"] = args ? args.number : undefined; + resourceInputs["numeric"] = args ? args.numeric : undefined; resourceInputs["overrideSpecial"] = args ? args.overrideSpecial : undefined; resourceInputs["special"] = args ? args.special : undefined; resourceInputs["upper"] = args ? args.upper : undefined; @@ -179,64 +220,57 @@ export class RandomString extends pulumi.CustomResource { */ export interface RandomStringState { /** - * Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. */ - keepers?: pulumi.Input<{[key: string]: any}>; + keepers?: pulumi.Input<{[key: string]: pulumi.Input}>; /** - * The length of the string desired + * The length of the string desired. The minimum value for length is 1 and, length must also be >= (`minUpper` + `minLower` + `minNumeric` + `minSpecial`). */ length?: pulumi.Input; /** - * (default true) Include lowercase alphabet characters - * in random string. + * Include lowercase alphabet characters in the result. Default value is `true`. */ lower?: pulumi.Input; /** - * (default 0) Minimum number of lowercase alphabet - * characters in random string. + * Minimum number of lowercase alphabet characters in the result. Default value is `0`. */ minLower?: pulumi.Input; /** - * (default 0) Minimum number of numeric characters - * in random string. + * Minimum number of numeric characters in the result. Default value is `0`. */ minNumeric?: pulumi.Input; /** - * (default 0) Minimum number of special characters - * in random string. + * Minimum number of special characters in the result. Default value is `0`. */ minSpecial?: pulumi.Input; /** - * (default 0) Minimum number of uppercase alphabet - * characters in random string. + * Minimum number of uppercase alphabet characters in the result. Default value is `0`. */ minUpper?: pulumi.Input; /** - * (default true) Include numeric characters in random - * string. + * Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. + * + * @deprecated **NOTE**: This is deprecated, use `numeric` instead. */ number?: pulumi.Input; /** - * Supply your own list of special characters to - * use for string generation. This overrides the default character list in the special - * argument. The special argument must still be set to true for any overwritten - * characters to be used in generation. + * Include numeric characters in the result. Default value is `true`. + */ + numeric?: pulumi.Input; + /** + * Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. */ overrideSpecial?: pulumi.Input; /** - * Random string generated. + * The generated random string. */ result?: pulumi.Input; /** - * (default true) Include special characters in random - * string. These are `!@#$%&*()-_=+[]{}<>:?` + * Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. */ special?: pulumi.Input; /** - * (default true) Include uppercase alphabet characters - * in random string. + * Include uppercase alphabet characters in the result. Default value is `true`. */ upper?: pulumi.Input; } @@ -246,60 +280,53 @@ export interface RandomStringState { */ export interface RandomStringArgs { /** - * Arbitrary map of values that, when changed, will - * trigger a new id to be generated. See - * the main provider documentation for more information. + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. */ - keepers?: pulumi.Input<{[key: string]: any}>; + keepers?: pulumi.Input<{[key: string]: pulumi.Input}>; /** - * The length of the string desired + * The length of the string desired. The minimum value for length is 1 and, length must also be >= (`minUpper` + `minLower` + `minNumeric` + `minSpecial`). */ length: pulumi.Input; /** - * (default true) Include lowercase alphabet characters - * in random string. + * Include lowercase alphabet characters in the result. Default value is `true`. */ lower?: pulumi.Input; /** - * (default 0) Minimum number of lowercase alphabet - * characters in random string. + * Minimum number of lowercase alphabet characters in the result. Default value is `0`. */ minLower?: pulumi.Input; /** - * (default 0) Minimum number of numeric characters - * in random string. + * Minimum number of numeric characters in the result. Default value is `0`. */ minNumeric?: pulumi.Input; /** - * (default 0) Minimum number of special characters - * in random string. + * Minimum number of special characters in the result. Default value is `0`. */ minSpecial?: pulumi.Input; /** - * (default 0) Minimum number of uppercase alphabet - * characters in random string. + * Minimum number of uppercase alphabet characters in the result. Default value is `0`. */ minUpper?: pulumi.Input; /** - * (default true) Include numeric characters in random - * string. + * Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. + * + * @deprecated **NOTE**: This is deprecated, use `numeric` instead. */ number?: pulumi.Input; /** - * Supply your own list of special characters to - * use for string generation. This overrides the default character list in the special - * argument. The special argument must still be set to true for any overwritten - * characters to be used in generation. + * Include numeric characters in the result. Default value is `true`. + */ + numeric?: pulumi.Input; + /** + * Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. */ overrideSpecial?: pulumi.Input; /** - * (default true) Include special characters in random - * string. These are `!@#$%&*()-_=+[]{}<>:?` + * Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. */ special?: pulumi.Input; /** - * (default true) Include uppercase alphabet characters - * in random string. + * Include uppercase alphabet characters in the result. Default value is `true`. */ upper?: pulumi.Input; } diff --git a/sdk/nodejs/randomUuid.ts b/sdk/nodejs/randomUuid.ts index e9f136ef50..4a3c7241fc 100644 --- a/sdk/nodejs/randomUuid.ts +++ b/sdk/nodejs/randomUuid.ts @@ -5,16 +5,12 @@ import * as pulumi from "@pulumi/pulumi"; import * as utilities from "./utilities"; /** - * The resource `random.RandomUuid` generates random uuid string that is intended to be - * used as unique identifiers for other resources. + * The resource `random.RandomUuid` generates random uuid string that is intended to be used as unique identifiers for other resources. * - * This resource uses the `hashicorp/go-uuid` to generate a UUID-formatted string - * for use with services needed a unique string identifier. + * This resource uses [hashicorp/go-uuid](https://github.com/hashicorp/go-uuid) to generate a UUID-formatted string for use with services needed a unique string identifier. * * ## Example Usage * - * The following example shows how to generate a unique name for an Azure Resource Group. - * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as azure from "@pulumi/azure"; @@ -26,7 +22,7 @@ import * as utilities from "./utilities"; * * ## Import * - * 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. Example + * 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. * * ```sh * $ pulumi import random:index/randomUuid:RandomUuid main aabbccdd-eeff-0011-2233-445566778899 @@ -61,11 +57,9 @@ export class RandomUuid extends pulumi.CustomResource { } /** - * Arbitrary map of values that, when changed, will - * trigger a new uuid to be generated. See - * the main provider documentation for more information. + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. */ - public readonly keepers!: pulumi.Output<{[key: string]: any} | undefined>; + public readonly keepers!: pulumi.Output<{[key: string]: string} | undefined>; /** * The generated uuid presented in string format. */ @@ -101,11 +95,9 @@ export class RandomUuid extends pulumi.CustomResource { */ export interface RandomUuidState { /** - * Arbitrary map of values that, when changed, will - * trigger a new uuid to be generated. See - * the main provider documentation for more information. + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. */ - keepers?: pulumi.Input<{[key: string]: any}>; + keepers?: pulumi.Input<{[key: string]: pulumi.Input}>; /** * The generated uuid presented in string format. */ @@ -117,9 +109,7 @@ export interface RandomUuidState { */ export interface RandomUuidArgs { /** - * Arbitrary map of values that, when changed, will - * trigger a new uuid to be generated. See - * the main provider documentation for more information. + * Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. */ - keepers?: pulumi.Input<{[key: string]: any}>; + keepers?: pulumi.Input<{[key: string]: pulumi.Input}>; } diff --git a/sdk/python/pulumi_random/random_id.py b/sdk/python/pulumi_random/random_id.py index df985f84fe..67b7b15c48 100644 --- a/sdk/python/pulumi_random/random_id.py +++ b/sdk/python/pulumi_random/random_id.py @@ -15,18 +15,13 @@ class RandomIdArgs: def __init__(__self__, *, byte_length: pulumi.Input[int], - keepers: Optional[pulumi.Input[Mapping[str, Any]]] = None, + keepers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, prefix: Optional[pulumi.Input[str]] = None): """ The set of arguments for constructing a RandomId resource. - :param pulumi.Input[int] byte_length: The number of random bytes to produce. The - minimum value is 1, which produces eight bits of randomness. - :param pulumi.Input[Mapping[str, Any]] keepers: Arbitrary map of values that, when changed, will - trigger a new id to be generated. See - the main provider documentation for more information. - :param pulumi.Input[str] prefix: Arbitrary string to prefix the output value with. This - string is supplied as-is, meaning it is not guaranteed to be URL-safe or - base64 encoded. + :param pulumi.Input[int] byte_length: The number of random bytes to produce. The minimum value is 1, which produces eight bits of randomness. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] keepers: Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + :param pulumi.Input[str] prefix: Arbitrary string to prefix the output value with. This string is supplied as-is, meaning it is not guaranteed to be URL-safe or base64 encoded. """ pulumi.set(__self__, "byte_length", byte_length) if keepers is not None: @@ -38,8 +33,7 @@ def __init__(__self__, *, @pulumi.getter(name="byteLength") def byte_length(self) -> pulumi.Input[int]: """ - The number of random bytes to produce. The - minimum value is 1, which produces eight bits of randomness. + The number of random bytes to produce. The minimum value is 1, which produces eight bits of randomness. """ return pulumi.get(self, "byte_length") @@ -49,25 +43,21 @@ def byte_length(self, value: pulumi.Input[int]): @property @pulumi.getter - def keepers(self) -> Optional[pulumi.Input[Mapping[str, Any]]]: + def keepers(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: """ - Arbitrary map of values that, when changed, will - trigger a new id to be generated. See - the main provider documentation for more information. + Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. """ return pulumi.get(self, "keepers") @keepers.setter - def keepers(self, value: Optional[pulumi.Input[Mapping[str, Any]]]): + def keepers(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]): pulumi.set(self, "keepers", value) @property @pulumi.getter def prefix(self) -> Optional[pulumi.Input[str]]: """ - Arbitrary string to prefix the output value with. This - string is supplied as-is, meaning it is not guaranteed to be URL-safe or - base64 encoded. + Arbitrary string to prefix the output value with. This string is supplied as-is, meaning it is not guaranteed to be URL-safe or base64 encoded. """ return pulumi.get(self, "prefix") @@ -84,22 +74,17 @@ def __init__(__self__, *, byte_length: Optional[pulumi.Input[int]] = None, dec: Optional[pulumi.Input[str]] = None, hex: Optional[pulumi.Input[str]] = None, - keepers: Optional[pulumi.Input[Mapping[str, Any]]] = None, + keepers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, prefix: Optional[pulumi.Input[str]] = None): """ Input properties used for looking up and filtering RandomId resources. :param pulumi.Input[str] b64_std: The generated id presented in base64 without additional transformations. :param pulumi.Input[str] b64_url: The generated id presented in base64, using the URL-friendly character set: case-sensitive letters, digits and the characters `_` and `-`. - :param pulumi.Input[int] byte_length: The number of random bytes to produce. The - minimum value is 1, which produces eight bits of randomness. + :param pulumi.Input[int] byte_length: The number of random bytes to produce. The minimum value is 1, which produces eight bits of randomness. :param pulumi.Input[str] dec: The generated id presented in non-padded decimal digits. :param pulumi.Input[str] hex: The generated id presented in padded hexadecimal digits. This result will always be twice as long as the requested byte length. - :param pulumi.Input[Mapping[str, Any]] keepers: Arbitrary map of values that, when changed, will - trigger a new id to be generated. See - the main provider documentation for more information. - :param pulumi.Input[str] prefix: Arbitrary string to prefix the output value with. This - string is supplied as-is, meaning it is not guaranteed to be URL-safe or - base64 encoded. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] keepers: Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + :param pulumi.Input[str] prefix: Arbitrary string to prefix the output value with. This string is supplied as-is, meaning it is not guaranteed to be URL-safe or base64 encoded. """ if b64_std is not None: pulumi.set(__self__, "b64_std", b64_std) @@ -144,8 +129,7 @@ def b64_url(self, value: Optional[pulumi.Input[str]]): @pulumi.getter(name="byteLength") def byte_length(self) -> Optional[pulumi.Input[int]]: """ - The number of random bytes to produce. The - minimum value is 1, which produces eight bits of randomness. + The number of random bytes to produce. The minimum value is 1, which produces eight bits of randomness. """ return pulumi.get(self, "byte_length") @@ -179,25 +163,21 @@ def hex(self, value: Optional[pulumi.Input[str]]): @property @pulumi.getter - def keepers(self) -> Optional[pulumi.Input[Mapping[str, Any]]]: + def keepers(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: """ - Arbitrary map of values that, when changed, will - trigger a new id to be generated. See - the main provider documentation for more information. + Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. """ return pulumi.get(self, "keepers") @keepers.setter - def keepers(self, value: Optional[pulumi.Input[Mapping[str, Any]]]): + def keepers(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]): pulumi.set(self, "keepers", value) @property @pulumi.getter def prefix(self) -> Optional[pulumi.Input[str]]: """ - Arbitrary string to prefix the output value with. This - string is supplied as-is, meaning it is not guaranteed to be URL-safe or - base64 encoded. + Arbitrary string to prefix the output value with. This string is supplied as-is, meaning it is not guaranteed to be URL-safe or base64 encoded. """ return pulumi.get(self, "prefix") @@ -212,7 +192,7 @@ def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, byte_length: Optional[pulumi.Input[int]] = None, - keepers: Optional[pulumi.Input[Mapping[str, Any]]] = None, + keepers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, prefix: Optional[pulumi.Input[str]] = None, __props__=None): """ @@ -231,13 +211,13 @@ def __init__(__self__, ## Import - Random Ids can be imported using the `b64_url` with an optional `prefix`. This can be used to replace a config value with a value interpolated from the random provider without experiencing diffs. Example with no prefix + Random IDs can be imported using the b64_url with an optional prefix. This can be used to replace a config value with a value interpolated from the random provider without experiencing diffs. Example with no prefix ```sh $ pulumi import random:index/randomId:RandomId server p-9hUg ``` - Example with prefix (prefix is separated by a `,`) + Example with prefix (prefix is separated by a ,) ```sh $ pulumi import random:index/randomId:RandomId server my-prefix-,p-9hUg @@ -245,14 +225,9 @@ def __init__(__self__, :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. - :param pulumi.Input[int] byte_length: The number of random bytes to produce. The - minimum value is 1, which produces eight bits of randomness. - :param pulumi.Input[Mapping[str, Any]] keepers: Arbitrary map of values that, when changed, will - trigger a new id to be generated. See - the main provider documentation for more information. - :param pulumi.Input[str] prefix: Arbitrary string to prefix the output value with. This - string is supplied as-is, meaning it is not guaranteed to be URL-safe or - base64 encoded. + :param pulumi.Input[int] byte_length: The number of random bytes to produce. The minimum value is 1, which produces eight bits of randomness. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] keepers: Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + :param pulumi.Input[str] prefix: Arbitrary string to prefix the output value with. This string is supplied as-is, meaning it is not guaranteed to be URL-safe or base64 encoded. """ ... @overload @@ -276,13 +251,13 @@ def __init__(__self__, ## Import - Random Ids can be imported using the `b64_url` with an optional `prefix`. This can be used to replace a config value with a value interpolated from the random provider without experiencing diffs. Example with no prefix + Random IDs can be imported using the b64_url with an optional prefix. This can be used to replace a config value with a value interpolated from the random provider without experiencing diffs. Example with no prefix ```sh $ pulumi import random:index/randomId:RandomId server p-9hUg ``` - Example with prefix (prefix is separated by a `,`) + Example with prefix (prefix is separated by a ,) ```sh $ pulumi import random:index/randomId:RandomId server my-prefix-,p-9hUg @@ -304,7 +279,7 @@ def _internal_init(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, byte_length: Optional[pulumi.Input[int]] = None, - keepers: Optional[pulumi.Input[Mapping[str, Any]]] = None, + keepers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, prefix: Optional[pulumi.Input[str]] = None, __props__=None): opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts) @@ -339,7 +314,7 @@ def get(resource_name: str, byte_length: Optional[pulumi.Input[int]] = None, dec: Optional[pulumi.Input[str]] = None, hex: Optional[pulumi.Input[str]] = None, - keepers: Optional[pulumi.Input[Mapping[str, Any]]] = None, + keepers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, prefix: Optional[pulumi.Input[str]] = None) -> 'RandomId': """ Get an existing RandomId resource's state with the given name, id, and optional extra @@ -350,16 +325,11 @@ def get(resource_name: str, :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] b64_std: The generated id presented in base64 without additional transformations. :param pulumi.Input[str] b64_url: The generated id presented in base64, using the URL-friendly character set: case-sensitive letters, digits and the characters `_` and `-`. - :param pulumi.Input[int] byte_length: The number of random bytes to produce. The - minimum value is 1, which produces eight bits of randomness. + :param pulumi.Input[int] byte_length: The number of random bytes to produce. The minimum value is 1, which produces eight bits of randomness. :param pulumi.Input[str] dec: The generated id presented in non-padded decimal digits. :param pulumi.Input[str] hex: The generated id presented in padded hexadecimal digits. This result will always be twice as long as the requested byte length. - :param pulumi.Input[Mapping[str, Any]] keepers: Arbitrary map of values that, when changed, will - trigger a new id to be generated. See - the main provider documentation for more information. - :param pulumi.Input[str] prefix: Arbitrary string to prefix the output value with. This - string is supplied as-is, meaning it is not guaranteed to be URL-safe or - base64 encoded. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] keepers: Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + :param pulumi.Input[str] prefix: Arbitrary string to prefix the output value with. This string is supplied as-is, meaning it is not guaranteed to be URL-safe or base64 encoded. """ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) @@ -394,8 +364,7 @@ def b64_url(self) -> pulumi.Output[str]: @pulumi.getter(name="byteLength") def byte_length(self) -> pulumi.Output[int]: """ - The number of random bytes to produce. The - minimum value is 1, which produces eight bits of randomness. + The number of random bytes to produce. The minimum value is 1, which produces eight bits of randomness. """ return pulumi.get(self, "byte_length") @@ -417,11 +386,9 @@ def hex(self) -> pulumi.Output[str]: @property @pulumi.getter - def keepers(self) -> pulumi.Output[Optional[Mapping[str, Any]]]: + def keepers(self) -> pulumi.Output[Optional[Mapping[str, str]]]: """ - Arbitrary map of values that, when changed, will - trigger a new id to be generated. See - the main provider documentation for more information. + Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. """ return pulumi.get(self, "keepers") @@ -429,9 +396,7 @@ def keepers(self) -> pulumi.Output[Optional[Mapping[str, Any]]]: @pulumi.getter def prefix(self) -> pulumi.Output[Optional[str]]: """ - Arbitrary string to prefix the output value with. This - string is supplied as-is, meaning it is not guaranteed to be URL-safe or - base64 encoded. + Arbitrary string to prefix the output value with. This string is supplied as-is, meaning it is not guaranteed to be URL-safe or base64 encoded. """ return pulumi.get(self, "prefix") diff --git a/sdk/python/pulumi_random/random_integer.py b/sdk/python/pulumi_random/random_integer.py index 852ced7667..3a7131293a 100644 --- a/sdk/python/pulumi_random/random_integer.py +++ b/sdk/python/pulumi_random/random_integer.py @@ -16,15 +16,13 @@ class RandomIntegerArgs: def __init__(__self__, *, max: pulumi.Input[int], min: pulumi.Input[int], - keepers: Optional[pulumi.Input[Mapping[str, Any]]] = None, + keepers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, seed: Optional[pulumi.Input[str]] = None): """ The set of arguments for constructing a RandomInteger resource. :param pulumi.Input[int] max: The maximum inclusive value of the range. :param pulumi.Input[int] min: The minimum inclusive value of the range. - :param pulumi.Input[Mapping[str, Any]] keepers: Arbitrary map of values that, when changed, will - trigger a new id to be generated. See - the main provider documentation for more information. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] keepers: Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. :param pulumi.Input[str] seed: A custom seed to always produce the same value. """ pulumi.set(__self__, "max", max) @@ -60,16 +58,14 @@ def min(self, value: pulumi.Input[int]): @property @pulumi.getter - def keepers(self) -> Optional[pulumi.Input[Mapping[str, Any]]]: + def keepers(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: """ - Arbitrary map of values that, when changed, will - trigger a new id to be generated. See - the main provider documentation for more information. + Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. """ return pulumi.get(self, "keepers") @keepers.setter - def keepers(self, value: Optional[pulumi.Input[Mapping[str, Any]]]): + def keepers(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]): pulumi.set(self, "keepers", value) @property @@ -88,19 +84,17 @@ def seed(self, value: Optional[pulumi.Input[str]]): @pulumi.input_type class _RandomIntegerState: def __init__(__self__, *, - keepers: Optional[pulumi.Input[Mapping[str, Any]]] = None, + keepers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, max: Optional[pulumi.Input[int]] = None, min: Optional[pulumi.Input[int]] = None, result: Optional[pulumi.Input[int]] = None, seed: Optional[pulumi.Input[str]] = None): """ Input properties used for looking up and filtering RandomInteger resources. - :param pulumi.Input[Mapping[str, Any]] keepers: Arbitrary map of values that, when changed, will - trigger a new id to be generated. See - the main provider documentation for more information. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] keepers: Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. :param pulumi.Input[int] max: The maximum inclusive value of the range. :param pulumi.Input[int] min: The minimum inclusive value of the range. - :param pulumi.Input[int] result: (int) The random Integer result. + :param pulumi.Input[int] result: The random integer result. :param pulumi.Input[str] seed: A custom seed to always produce the same value. """ if keepers is not None: @@ -116,16 +110,14 @@ def __init__(__self__, *, @property @pulumi.getter - def keepers(self) -> Optional[pulumi.Input[Mapping[str, Any]]]: + def keepers(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: """ - Arbitrary map of values that, when changed, will - trigger a new id to be generated. See - the main provider documentation for more information. + Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. """ return pulumi.get(self, "keepers") @keepers.setter - def keepers(self, value: Optional[pulumi.Input[Mapping[str, Any]]]): + def keepers(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]): pulumi.set(self, "keepers", value) @property @@ -156,7 +148,7 @@ def min(self, value: Optional[pulumi.Input[int]]): @pulumi.getter def result(self) -> Optional[pulumi.Input[int]]: """ - (int) The random Integer result. + The random integer result. """ return pulumi.get(self, "result") @@ -182,7 +174,7 @@ class RandomInteger(pulumi.CustomResource): def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, - keepers: Optional[pulumi.Input[Mapping[str, Any]]] = None, + keepers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, max: Optional[pulumi.Input[int]] = None, min: Optional[pulumi.Input[int]] = None, seed: Optional[pulumi.Input[str]] = None, @@ -190,41 +182,11 @@ def __init__(__self__, """ The resource `RandomInteger` generates random values from a given range, described by the `min` and `max` attributes of a given resource. - This resource can be used in conjunction with resources that have - the `create_before_destroy` lifecycle flag set, to avoid conflicts with - unique names during the brief period where both the old and new resources - exist concurrently. - - ## Example Usage - - The following example shows how to generate a random priority between 1 and 50000 for - a `aws_alb_listener_rule` resource: - - ```python - import pulumi - import pulumi_aws as aws - import pulumi_random as random - - priority = random.RandomInteger("priority", - keepers={ - "listener_arn": var["listener_arn"], - }, - max=50000, - min=1) - main = aws.alb.ListenerRule("main", - actions=[aws.alb.ListenerRuleActionArgs( - target_group_arn=var["target_group_arn"], - type="forward", - )], - listener_arn=var["listener_arn"], - priority=priority.result) - ``` - - The result of the above will set a random priority. + This resource can be used in conjunction with resources that have the `create_before_destroy` lifecycle flag set, to avoid conflicts with unique names during the brief period where both the old and new resources exist concurrently. ## Import - Random integers can be imported using the `result`, `min`, and `max`, with an optional `seed`. This can be used to replace a config value with a value interpolated from the random provider without experiencing diffs. Example (values are separated by a `,`) + Random integers can be imported using the result, min, and max, with an optional seed. This can be used to replace a config value with a value interpolated from the random provider without experiencing diffs. Example (values are separated by a ,) ```sh $ pulumi import random:index/randomInteger:RandomInteger priority 15390,1,50000 @@ -232,9 +194,7 @@ def __init__(__self__, :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. - :param pulumi.Input[Mapping[str, Any]] keepers: Arbitrary map of values that, when changed, will - trigger a new id to be generated. See - the main provider documentation for more information. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] keepers: Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. :param pulumi.Input[int] max: The maximum inclusive value of the range. :param pulumi.Input[int] min: The minimum inclusive value of the range. :param pulumi.Input[str] seed: A custom seed to always produce the same value. @@ -248,41 +208,11 @@ def __init__(__self__, """ The resource `RandomInteger` generates random values from a given range, described by the `min` and `max` attributes of a given resource. - This resource can be used in conjunction with resources that have - the `create_before_destroy` lifecycle flag set, to avoid conflicts with - unique names during the brief period where both the old and new resources - exist concurrently. - - ## Example Usage - - The following example shows how to generate a random priority between 1 and 50000 for - a `aws_alb_listener_rule` resource: - - ```python - import pulumi - import pulumi_aws as aws - import pulumi_random as random - - priority = random.RandomInteger("priority", - keepers={ - "listener_arn": var["listener_arn"], - }, - max=50000, - min=1) - main = aws.alb.ListenerRule("main", - actions=[aws.alb.ListenerRuleActionArgs( - target_group_arn=var["target_group_arn"], - type="forward", - )], - listener_arn=var["listener_arn"], - priority=priority.result) - ``` - - The result of the above will set a random priority. + This resource can be used in conjunction with resources that have the `create_before_destroy` lifecycle flag set, to avoid conflicts with unique names during the brief period where both the old and new resources exist concurrently. ## Import - Random integers can be imported using the `result`, `min`, and `max`, with an optional `seed`. This can be used to replace a config value with a value interpolated from the random provider without experiencing diffs. Example (values are separated by a `,`) + Random integers can be imported using the result, min, and max, with an optional seed. This can be used to replace a config value with a value interpolated from the random provider without experiencing diffs. Example (values are separated by a ,) ```sh $ pulumi import random:index/randomInteger:RandomInteger priority 15390,1,50000 @@ -303,7 +233,7 @@ def __init__(__self__, resource_name: str, *args, **kwargs): def _internal_init(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, - keepers: Optional[pulumi.Input[Mapping[str, Any]]] = None, + keepers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, max: Optional[pulumi.Input[int]] = None, min: Optional[pulumi.Input[int]] = None, seed: Optional[pulumi.Input[str]] = None, @@ -335,7 +265,7 @@ def _internal_init(__self__, def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None, - keepers: Optional[pulumi.Input[Mapping[str, Any]]] = None, + keepers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, max: Optional[pulumi.Input[int]] = None, min: Optional[pulumi.Input[int]] = None, result: Optional[pulumi.Input[int]] = None, @@ -347,12 +277,10 @@ def get(resource_name: str, :param str resource_name: The unique name of the resulting resource. :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. :param pulumi.ResourceOptions opts: Options for the resource. - :param pulumi.Input[Mapping[str, Any]] keepers: Arbitrary map of values that, when changed, will - trigger a new id to be generated. See - the main provider documentation for more information. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] keepers: Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. :param pulumi.Input[int] max: The maximum inclusive value of the range. :param pulumi.Input[int] min: The minimum inclusive value of the range. - :param pulumi.Input[int] result: (int) The random Integer result. + :param pulumi.Input[int] result: The random integer result. :param pulumi.Input[str] seed: A custom seed to always produce the same value. """ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) @@ -368,11 +296,9 @@ def get(resource_name: str, @property @pulumi.getter - def keepers(self) -> pulumi.Output[Optional[Mapping[str, Any]]]: + def keepers(self) -> pulumi.Output[Optional[Mapping[str, str]]]: """ - Arbitrary map of values that, when changed, will - trigger a new id to be generated. See - the main provider documentation for more information. + Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. """ return pulumi.get(self, "keepers") @@ -396,7 +322,7 @@ def min(self) -> pulumi.Output[int]: @pulumi.getter def result(self) -> pulumi.Output[int]: """ - (int) The random Integer result. + The random integer result. """ return pulumi.get(self, "result") diff --git a/sdk/python/pulumi_random/random_password.py b/sdk/python/pulumi_random/random_password.py index 070be0900c..032cd835d7 100644 --- a/sdk/python/pulumi_random/random_password.py +++ b/sdk/python/pulumi_random/random_password.py @@ -15,32 +15,31 @@ class RandomPasswordArgs: def __init__(__self__, *, length: pulumi.Input[int], - keepers: Optional[pulumi.Input[Mapping[str, Any]]] = None, + keepers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, lower: Optional[pulumi.Input[bool]] = None, min_lower: Optional[pulumi.Input[int]] = None, min_numeric: Optional[pulumi.Input[int]] = None, min_special: Optional[pulumi.Input[int]] = None, min_upper: Optional[pulumi.Input[int]] = None, number: Optional[pulumi.Input[bool]] = None, + numeric: Optional[pulumi.Input[bool]] = None, override_special: Optional[pulumi.Input[str]] = None, special: Optional[pulumi.Input[bool]] = None, upper: Optional[pulumi.Input[bool]] = None): """ The set of arguments for constructing a RandomPassword resource. - :param pulumi.Input[int] length: The length of the string desired. - :param pulumi.Input[Mapping[str, Any]] keepers: Arbitrary map of values that, when changed, will trigger recreation of resource. See [the main provider - documentation](../index.html) for more information. - :param pulumi.Input[bool] lower: Include lowercase alphabet characters in the result. - :param pulumi.Input[int] min_lower: Minimum number of lowercase alphabet characters in the result. - :param pulumi.Input[int] min_numeric: Minimum number of numeric characters in the result. - :param pulumi.Input[int] min_special: Minimum number of special characters in the result. - :param pulumi.Input[int] min_upper: Minimum number of uppercase alphabet characters in the result. - :param pulumi.Input[bool] number: Include numeric characters in the result. - :param pulumi.Input[str] override_special: Supply your own list of special characters to use for string generation. This overrides the default character list in - the special argument. The `special` argument must still be set to true for any overwritten characters to be used in - generation. - :param pulumi.Input[bool] special: Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?` - :param pulumi.Input[bool] upper: Include uppercase alphabet characters in the result. + :param pulumi.Input[int] length: The length of the string desired. The minimum value for length is 1 and, length must also be >= (`min_upper` + `min_lower` + `min_numeric` + `min_special`). + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] keepers: Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + :param pulumi.Input[bool] lower: Include lowercase alphabet characters in the result. Default value is `true`. + :param pulumi.Input[int] min_lower: Minimum number of lowercase alphabet characters in the result. Default value is `0`. + :param pulumi.Input[int] min_numeric: Minimum number of numeric characters in the result. Default value is `0`. + :param pulumi.Input[int] min_special: Minimum number of special characters in the result. Default value is `0`. + :param pulumi.Input[int] min_upper: Minimum number of uppercase alphabet characters in the result. Default value is `0`. + :param pulumi.Input[bool] number: Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. + :param pulumi.Input[bool] numeric: Include numeric characters in the result. Default value is `true`. + :param pulumi.Input[str] override_special: Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. + :param pulumi.Input[bool] special: Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. + :param pulumi.Input[bool] upper: Include uppercase alphabet characters in the result. Default value is `true`. """ pulumi.set(__self__, "length", length) if keepers is not None: @@ -55,8 +54,13 @@ def __init__(__self__, *, pulumi.set(__self__, "min_special", min_special) if min_upper is not None: pulumi.set(__self__, "min_upper", min_upper) + if number is not None: + warnings.warn("""**NOTE**: This is deprecated, use `numeric` instead.""", DeprecationWarning) + pulumi.log.warn("""number is deprecated: **NOTE**: This is deprecated, use `numeric` instead.""") if number is not None: pulumi.set(__self__, "number", number) + if numeric is not None: + pulumi.set(__self__, "numeric", numeric) if override_special is not None: pulumi.set(__self__, "override_special", override_special) if special is not None: @@ -68,7 +72,7 @@ def __init__(__self__, *, @pulumi.getter def length(self) -> pulumi.Input[int]: """ - The length of the string desired. + The length of the string desired. The minimum value for length is 1 and, length must also be >= (`min_upper` + `min_lower` + `min_numeric` + `min_special`). """ return pulumi.get(self, "length") @@ -78,22 +82,21 @@ def length(self, value: pulumi.Input[int]): @property @pulumi.getter - def keepers(self) -> Optional[pulumi.Input[Mapping[str, Any]]]: + def keepers(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: """ - Arbitrary map of values that, when changed, will trigger recreation of resource. See [the main provider - documentation](../index.html) for more information. + Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. """ return pulumi.get(self, "keepers") @keepers.setter - def keepers(self, value: Optional[pulumi.Input[Mapping[str, Any]]]): + def keepers(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]): pulumi.set(self, "keepers", value) @property @pulumi.getter def lower(self) -> Optional[pulumi.Input[bool]]: """ - Include lowercase alphabet characters in the result. + Include lowercase alphabet characters in the result. Default value is `true`. """ return pulumi.get(self, "lower") @@ -105,7 +108,7 @@ def lower(self, value: Optional[pulumi.Input[bool]]): @pulumi.getter(name="minLower") def min_lower(self) -> Optional[pulumi.Input[int]]: """ - Minimum number of lowercase alphabet characters in the result. + Minimum number of lowercase alphabet characters in the result. Default value is `0`. """ return pulumi.get(self, "min_lower") @@ -117,7 +120,7 @@ def min_lower(self, value: Optional[pulumi.Input[int]]): @pulumi.getter(name="minNumeric") def min_numeric(self) -> Optional[pulumi.Input[int]]: """ - Minimum number of numeric characters in the result. + Minimum number of numeric characters in the result. Default value is `0`. """ return pulumi.get(self, "min_numeric") @@ -129,7 +132,7 @@ def min_numeric(self, value: Optional[pulumi.Input[int]]): @pulumi.getter(name="minSpecial") def min_special(self) -> Optional[pulumi.Input[int]]: """ - Minimum number of special characters in the result. + Minimum number of special characters in the result. Default value is `0`. """ return pulumi.get(self, "min_special") @@ -141,7 +144,7 @@ def min_special(self, value: Optional[pulumi.Input[int]]): @pulumi.getter(name="minUpper") def min_upper(self) -> Optional[pulumi.Input[int]]: """ - Minimum number of uppercase alphabet characters in the result. + Minimum number of uppercase alphabet characters in the result. Default value is `0`. """ return pulumi.get(self, "min_upper") @@ -153,7 +156,7 @@ def min_upper(self, value: Optional[pulumi.Input[int]]): @pulumi.getter def number(self) -> Optional[pulumi.Input[bool]]: """ - Include numeric characters in the result. + Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. """ return pulumi.get(self, "number") @@ -161,13 +164,23 @@ def number(self) -> Optional[pulumi.Input[bool]]: def number(self, value: Optional[pulumi.Input[bool]]): pulumi.set(self, "number", value) + @property + @pulumi.getter + def numeric(self) -> Optional[pulumi.Input[bool]]: + """ + Include numeric characters in the result. Default value is `true`. + """ + return pulumi.get(self, "numeric") + + @numeric.setter + def numeric(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "numeric", value) + @property @pulumi.getter(name="overrideSpecial") def override_special(self) -> Optional[pulumi.Input[str]]: """ - Supply your own list of special characters to use for string generation. This overrides the default character list in - the special argument. The `special` argument must still be set to true for any overwritten characters to be used in - generation. + Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. """ return pulumi.get(self, "override_special") @@ -179,7 +192,7 @@ def override_special(self, value: Optional[pulumi.Input[str]]): @pulumi.getter def special(self) -> Optional[pulumi.Input[bool]]: """ - Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?` + Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. """ return pulumi.get(self, "special") @@ -191,7 +204,7 @@ def special(self, value: Optional[pulumi.Input[bool]]): @pulumi.getter def upper(self) -> Optional[pulumi.Input[bool]]: """ - Include uppercase alphabet characters in the result. + Include uppercase alphabet characters in the result. Default value is `true`. """ return pulumi.get(self, "upper") @@ -203,7 +216,8 @@ def upper(self, value: Optional[pulumi.Input[bool]]): @pulumi.input_type class _RandomPasswordState: def __init__(__self__, *, - keepers: Optional[pulumi.Input[Mapping[str, Any]]] = None, + bcrypt_hash: Optional[pulumi.Input[str]] = None, + keepers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, length: Optional[pulumi.Input[int]] = None, lower: Optional[pulumi.Input[bool]] = None, min_lower: Optional[pulumi.Input[int]] = None, @@ -211,28 +225,30 @@ def __init__(__self__, *, min_special: Optional[pulumi.Input[int]] = None, min_upper: Optional[pulumi.Input[int]] = None, number: Optional[pulumi.Input[bool]] = None, + numeric: Optional[pulumi.Input[bool]] = None, override_special: Optional[pulumi.Input[str]] = None, result: Optional[pulumi.Input[str]] = None, special: Optional[pulumi.Input[bool]] = None, upper: Optional[pulumi.Input[bool]] = None): """ Input properties used for looking up and filtering RandomPassword resources. - :param pulumi.Input[Mapping[str, Any]] keepers: Arbitrary map of values that, when changed, will trigger recreation of resource. See [the main provider - documentation](../index.html) for more information. - :param pulumi.Input[int] length: The length of the string desired. - :param pulumi.Input[bool] lower: Include lowercase alphabet characters in the result. - :param pulumi.Input[int] min_lower: Minimum number of lowercase alphabet characters in the result. - :param pulumi.Input[int] min_numeric: Minimum number of numeric characters in the result. - :param pulumi.Input[int] min_special: Minimum number of special characters in the result. - :param pulumi.Input[int] min_upper: Minimum number of uppercase alphabet characters in the result. - :param pulumi.Input[bool] number: Include numeric characters in the result. - :param pulumi.Input[str] override_special: Supply your own list of special characters to use for string generation. This overrides the default character list in - the special argument. The `special` argument must still be set to true for any overwritten characters to be used in - generation. + :param pulumi.Input[str] bcrypt_hash: A bcrypt hash of the generated random string. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] keepers: Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + :param pulumi.Input[int] length: The length of the string desired. The minimum value for length is 1 and, length must also be >= (`min_upper` + `min_lower` + `min_numeric` + `min_special`). + :param pulumi.Input[bool] lower: Include lowercase alphabet characters in the result. Default value is `true`. + :param pulumi.Input[int] min_lower: Minimum number of lowercase alphabet characters in the result. Default value is `0`. + :param pulumi.Input[int] min_numeric: Minimum number of numeric characters in the result. Default value is `0`. + :param pulumi.Input[int] min_special: Minimum number of special characters in the result. Default value is `0`. + :param pulumi.Input[int] min_upper: Minimum number of uppercase alphabet characters in the result. Default value is `0`. + :param pulumi.Input[bool] number: Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. + :param pulumi.Input[bool] numeric: Include numeric characters in the result. Default value is `true`. + :param pulumi.Input[str] override_special: Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. :param pulumi.Input[str] result: The generated random string. - :param pulumi.Input[bool] special: Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?` - :param pulumi.Input[bool] upper: Include uppercase alphabet characters in the result. + :param pulumi.Input[bool] special: Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. + :param pulumi.Input[bool] upper: Include uppercase alphabet characters in the result. Default value is `true`. """ + if bcrypt_hash is not None: + pulumi.set(__self__, "bcrypt_hash", bcrypt_hash) if keepers is not None: pulumi.set(__self__, "keepers", keepers) if length is not None: @@ -247,8 +263,13 @@ def __init__(__self__, *, pulumi.set(__self__, "min_special", min_special) if min_upper is not None: pulumi.set(__self__, "min_upper", min_upper) + if number is not None: + warnings.warn("""**NOTE**: This is deprecated, use `numeric` instead.""", DeprecationWarning) + pulumi.log.warn("""number is deprecated: **NOTE**: This is deprecated, use `numeric` instead.""") if number is not None: pulumi.set(__self__, "number", number) + if numeric is not None: + pulumi.set(__self__, "numeric", numeric) if override_special is not None: pulumi.set(__self__, "override_special", override_special) if result is not None: @@ -258,24 +279,35 @@ def __init__(__self__, *, if upper is not None: pulumi.set(__self__, "upper", upper) + @property + @pulumi.getter(name="bcryptHash") + def bcrypt_hash(self) -> Optional[pulumi.Input[str]]: + """ + A bcrypt hash of the generated random string. + """ + return pulumi.get(self, "bcrypt_hash") + + @bcrypt_hash.setter + def bcrypt_hash(self, value: Optional[pulumi.Input[str]]): + pulumi.set(self, "bcrypt_hash", value) + @property @pulumi.getter - def keepers(self) -> Optional[pulumi.Input[Mapping[str, Any]]]: + def keepers(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: """ - Arbitrary map of values that, when changed, will trigger recreation of resource. See [the main provider - documentation](../index.html) for more information. + Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. """ return pulumi.get(self, "keepers") @keepers.setter - def keepers(self, value: Optional[pulumi.Input[Mapping[str, Any]]]): + def keepers(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]): pulumi.set(self, "keepers", value) @property @pulumi.getter def length(self) -> Optional[pulumi.Input[int]]: """ - The length of the string desired. + The length of the string desired. The minimum value for length is 1 and, length must also be >= (`min_upper` + `min_lower` + `min_numeric` + `min_special`). """ return pulumi.get(self, "length") @@ -287,7 +319,7 @@ def length(self, value: Optional[pulumi.Input[int]]): @pulumi.getter def lower(self) -> Optional[pulumi.Input[bool]]: """ - Include lowercase alphabet characters in the result. + Include lowercase alphabet characters in the result. Default value is `true`. """ return pulumi.get(self, "lower") @@ -299,7 +331,7 @@ def lower(self, value: Optional[pulumi.Input[bool]]): @pulumi.getter(name="minLower") def min_lower(self) -> Optional[pulumi.Input[int]]: """ - Minimum number of lowercase alphabet characters in the result. + Minimum number of lowercase alphabet characters in the result. Default value is `0`. """ return pulumi.get(self, "min_lower") @@ -311,7 +343,7 @@ def min_lower(self, value: Optional[pulumi.Input[int]]): @pulumi.getter(name="minNumeric") def min_numeric(self) -> Optional[pulumi.Input[int]]: """ - Minimum number of numeric characters in the result. + Minimum number of numeric characters in the result. Default value is `0`. """ return pulumi.get(self, "min_numeric") @@ -323,7 +355,7 @@ def min_numeric(self, value: Optional[pulumi.Input[int]]): @pulumi.getter(name="minSpecial") def min_special(self) -> Optional[pulumi.Input[int]]: """ - Minimum number of special characters in the result. + Minimum number of special characters in the result. Default value is `0`. """ return pulumi.get(self, "min_special") @@ -335,7 +367,7 @@ def min_special(self, value: Optional[pulumi.Input[int]]): @pulumi.getter(name="minUpper") def min_upper(self) -> Optional[pulumi.Input[int]]: """ - Minimum number of uppercase alphabet characters in the result. + Minimum number of uppercase alphabet characters in the result. Default value is `0`. """ return pulumi.get(self, "min_upper") @@ -347,7 +379,7 @@ def min_upper(self, value: Optional[pulumi.Input[int]]): @pulumi.getter def number(self) -> Optional[pulumi.Input[bool]]: """ - Include numeric characters in the result. + Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. """ return pulumi.get(self, "number") @@ -355,13 +387,23 @@ def number(self) -> Optional[pulumi.Input[bool]]: def number(self, value: Optional[pulumi.Input[bool]]): pulumi.set(self, "number", value) + @property + @pulumi.getter + def numeric(self) -> Optional[pulumi.Input[bool]]: + """ + Include numeric characters in the result. Default value is `true`. + """ + return pulumi.get(self, "numeric") + + @numeric.setter + def numeric(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "numeric", value) + @property @pulumi.getter(name="overrideSpecial") def override_special(self) -> Optional[pulumi.Input[str]]: """ - Supply your own list of special characters to use for string generation. This overrides the default character list in - the special argument. The `special` argument must still be set to true for any overwritten characters to be used in - generation. + Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. """ return pulumi.get(self, "override_special") @@ -385,7 +427,7 @@ def result(self, value: Optional[pulumi.Input[str]]): @pulumi.getter def special(self) -> Optional[pulumi.Input[bool]]: """ - Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?` + Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. """ return pulumi.get(self, "special") @@ -397,7 +439,7 @@ def special(self, value: Optional[pulumi.Input[bool]]): @pulumi.getter def upper(self) -> Optional[pulumi.Input[bool]]: """ - Include uppercase alphabet characters in the result. + Include uppercase alphabet characters in the result. Default value is `true`. """ return pulumi.get(self, "upper") @@ -411,7 +453,7 @@ class RandomPassword(pulumi.CustomResource): def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, - keepers: Optional[pulumi.Input[Mapping[str, Any]]] = None, + keepers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, length: Optional[pulumi.Input[int]] = None, lower: Optional[pulumi.Input[bool]] = None, min_lower: Optional[pulumi.Input[int]] = None, @@ -419,22 +461,12 @@ def __init__(__self__, min_special: Optional[pulumi.Input[int]] = None, min_upper: Optional[pulumi.Input[int]] = None, number: Optional[pulumi.Input[bool]] = None, + numeric: Optional[pulumi.Input[bool]] = None, override_special: Optional[pulumi.Input[str]] = None, special: Optional[pulumi.Input[bool]] = None, upper: Optional[pulumi.Input[bool]] = None, __props__=None): """ - > **Note:** Requires random provider version >= 2.2.0 - - Identical to RandomString with the exception that the - result is treated as sensitive and, thus, _not_ displayed in console output. - - > **Note:** All attributes including the generated password will be stored in - the raw state as plain-text. [Read more about sensitive data in - state](https://www.terraform.io/docs/state/sensitive-data.html). - - This resource *does* use a cryptographic random number generator. - ## Example Usage ```python @@ -445,7 +477,7 @@ def __init__(__self__, password = random.RandomPassword("password", length=16, special=True, - override_special="_%@") + override_special="!#$%&*()-_=+[]{}<>:?") example = aws.rds.Instance("example", instance_class="db.t3.micro", allocated_storage=64, @@ -456,28 +488,76 @@ def __init__(__self__, ## Import - Random Password can be imported by specifying the value of the string + ### Avoiding Replacement ```sh - $ pulumi import random:index/randomPassword:RandomPassword password securepassword + $ pulumi import random:index/randomPassword:RandomPassword If the resource were imported using `random_password.password securepassword`, ``` + replacement could be avoided by using1. Attribute values that match the imported ID and defaults: + + terraform + + resource "random_password" "password" { + + length = 14 + + lower + + = true + + } 2. Attribute values that match the imported ID and omit the attributes with defaults: + + terraform + + resource "random_password" "password" { + + length = 14 + + } 3. `ignore_changes` specifying the attributes to ignore: + + terraform + + resource "random_password" "password" { + + length = 16 + + lower + + = false + + lifecycle { + + ignore_changes = [ + + length, + + lower, + + ] + + } + + } + + **NOTE** `ignore_changes` is only required until the resource is recreated after import, + + after which it will use the configuration values specified. + :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. - :param pulumi.Input[Mapping[str, Any]] keepers: Arbitrary map of values that, when changed, will trigger recreation of resource. See [the main provider - documentation](../index.html) for more information. - :param pulumi.Input[int] length: The length of the string desired. - :param pulumi.Input[bool] lower: Include lowercase alphabet characters in the result. - :param pulumi.Input[int] min_lower: Minimum number of lowercase alphabet characters in the result. - :param pulumi.Input[int] min_numeric: Minimum number of numeric characters in the result. - :param pulumi.Input[int] min_special: Minimum number of special characters in the result. - :param pulumi.Input[int] min_upper: Minimum number of uppercase alphabet characters in the result. - :param pulumi.Input[bool] number: Include numeric characters in the result. - :param pulumi.Input[str] override_special: Supply your own list of special characters to use for string generation. This overrides the default character list in - the special argument. The `special` argument must still be set to true for any overwritten characters to be used in - generation. - :param pulumi.Input[bool] special: Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?` - :param pulumi.Input[bool] upper: Include uppercase alphabet characters in the result. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] keepers: Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + :param pulumi.Input[int] length: The length of the string desired. The minimum value for length is 1 and, length must also be >= (`min_upper` + `min_lower` + `min_numeric` + `min_special`). + :param pulumi.Input[bool] lower: Include lowercase alphabet characters in the result. Default value is `true`. + :param pulumi.Input[int] min_lower: Minimum number of lowercase alphabet characters in the result. Default value is `0`. + :param pulumi.Input[int] min_numeric: Minimum number of numeric characters in the result. Default value is `0`. + :param pulumi.Input[int] min_special: Minimum number of special characters in the result. Default value is `0`. + :param pulumi.Input[int] min_upper: Minimum number of uppercase alphabet characters in the result. Default value is `0`. + :param pulumi.Input[bool] number: Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. + :param pulumi.Input[bool] numeric: Include numeric characters in the result. Default value is `true`. + :param pulumi.Input[str] override_special: Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. + :param pulumi.Input[bool] special: Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. + :param pulumi.Input[bool] upper: Include uppercase alphabet characters in the result. Default value is `true`. """ ... @overload @@ -486,17 +566,6 @@ def __init__(__self__, args: RandomPasswordArgs, opts: Optional[pulumi.ResourceOptions] = None): """ - > **Note:** Requires random provider version >= 2.2.0 - - Identical to RandomString with the exception that the - result is treated as sensitive and, thus, _not_ displayed in console output. - - > **Note:** All attributes including the generated password will be stored in - the raw state as plain-text. [Read more about sensitive data in - state](https://www.terraform.io/docs/state/sensitive-data.html). - - This resource *does* use a cryptographic random number generator. - ## Example Usage ```python @@ -507,7 +576,7 @@ def __init__(__self__, password = random.RandomPassword("password", length=16, special=True, - override_special="_%@") + override_special="!#$%&*()-_=+[]{}<>:?") example = aws.rds.Instance("example", instance_class="db.t3.micro", allocated_storage=64, @@ -518,12 +587,62 @@ def __init__(__self__, ## Import - Random Password can be imported by specifying the value of the string + ### Avoiding Replacement ```sh - $ pulumi import random:index/randomPassword:RandomPassword password securepassword + $ pulumi import random:index/randomPassword:RandomPassword If the resource were imported using `random_password.password securepassword`, ``` + replacement could be avoided by using1. Attribute values that match the imported ID and defaults: + + terraform + + resource "random_password" "password" { + + length = 14 + + lower + + = true + + } 2. Attribute values that match the imported ID and omit the attributes with defaults: + + terraform + + resource "random_password" "password" { + + length = 14 + + } 3. `ignore_changes` specifying the attributes to ignore: + + terraform + + resource "random_password" "password" { + + length = 16 + + lower + + = false + + lifecycle { + + ignore_changes = [ + + length, + + lower, + + ] + + } + + } + + **NOTE** `ignore_changes` is only required until the resource is recreated after import, + + after which it will use the configuration values specified. + :param str resource_name: The name of the resource. :param RandomPasswordArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource. @@ -539,7 +658,7 @@ def __init__(__self__, resource_name: str, *args, **kwargs): def _internal_init(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, - keepers: Optional[pulumi.Input[Mapping[str, Any]]] = None, + keepers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, length: Optional[pulumi.Input[int]] = None, lower: Optional[pulumi.Input[bool]] = None, min_lower: Optional[pulumi.Input[int]] = None, @@ -547,6 +666,7 @@ def _internal_init(__self__, min_special: Optional[pulumi.Input[int]] = None, min_upper: Optional[pulumi.Input[int]] = None, number: Optional[pulumi.Input[bool]] = None, + numeric: Optional[pulumi.Input[bool]] = None, override_special: Optional[pulumi.Input[str]] = None, special: Optional[pulumi.Input[bool]] = None, upper: Optional[pulumi.Input[bool]] = None, @@ -568,12 +688,17 @@ def _internal_init(__self__, __props__.__dict__["min_numeric"] = min_numeric __props__.__dict__["min_special"] = min_special __props__.__dict__["min_upper"] = min_upper + if number is not None and not opts.urn: + warnings.warn("""**NOTE**: This is deprecated, use `numeric` instead.""", DeprecationWarning) + pulumi.log.warn("""number is deprecated: **NOTE**: This is deprecated, use `numeric` instead.""") __props__.__dict__["number"] = number + __props__.__dict__["numeric"] = numeric __props__.__dict__["override_special"] = override_special __props__.__dict__["special"] = special __props__.__dict__["upper"] = upper + __props__.__dict__["bcrypt_hash"] = None __props__.__dict__["result"] = None - secret_opts = pulumi.ResourceOptions(additional_secret_outputs=["result"]) + secret_opts = pulumi.ResourceOptions(additional_secret_outputs=["bcryptHash", "result"]) opts = pulumi.ResourceOptions.merge(opts, secret_opts) super(RandomPassword, __self__).__init__( 'random:index/randomPassword:RandomPassword', @@ -585,7 +710,8 @@ def _internal_init(__self__, def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None, - keepers: Optional[pulumi.Input[Mapping[str, Any]]] = None, + bcrypt_hash: Optional[pulumi.Input[str]] = None, + keepers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, length: Optional[pulumi.Input[int]] = None, lower: Optional[pulumi.Input[bool]] = None, min_lower: Optional[pulumi.Input[int]] = None, @@ -593,6 +719,7 @@ def get(resource_name: str, min_special: Optional[pulumi.Input[int]] = None, min_upper: Optional[pulumi.Input[int]] = None, number: Optional[pulumi.Input[bool]] = None, + numeric: Optional[pulumi.Input[bool]] = None, override_special: Optional[pulumi.Input[str]] = None, result: Optional[pulumi.Input[str]] = None, special: Optional[pulumi.Input[bool]] = None, @@ -604,26 +731,26 @@ def get(resource_name: str, :param str resource_name: The unique name of the resulting resource. :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. :param pulumi.ResourceOptions opts: Options for the resource. - :param pulumi.Input[Mapping[str, Any]] keepers: Arbitrary map of values that, when changed, will trigger recreation of resource. See [the main provider - documentation](../index.html) for more information. - :param pulumi.Input[int] length: The length of the string desired. - :param pulumi.Input[bool] lower: Include lowercase alphabet characters in the result. - :param pulumi.Input[int] min_lower: Minimum number of lowercase alphabet characters in the result. - :param pulumi.Input[int] min_numeric: Minimum number of numeric characters in the result. - :param pulumi.Input[int] min_special: Minimum number of special characters in the result. - :param pulumi.Input[int] min_upper: Minimum number of uppercase alphabet characters in the result. - :param pulumi.Input[bool] number: Include numeric characters in the result. - :param pulumi.Input[str] override_special: Supply your own list of special characters to use for string generation. This overrides the default character list in - the special argument. The `special` argument must still be set to true for any overwritten characters to be used in - generation. + :param pulumi.Input[str] bcrypt_hash: A bcrypt hash of the generated random string. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] keepers: Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + :param pulumi.Input[int] length: The length of the string desired. The minimum value for length is 1 and, length must also be >= (`min_upper` + `min_lower` + `min_numeric` + `min_special`). + :param pulumi.Input[bool] lower: Include lowercase alphabet characters in the result. Default value is `true`. + :param pulumi.Input[int] min_lower: Minimum number of lowercase alphabet characters in the result. Default value is `0`. + :param pulumi.Input[int] min_numeric: Minimum number of numeric characters in the result. Default value is `0`. + :param pulumi.Input[int] min_special: Minimum number of special characters in the result. Default value is `0`. + :param pulumi.Input[int] min_upper: Minimum number of uppercase alphabet characters in the result. Default value is `0`. + :param pulumi.Input[bool] number: Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. + :param pulumi.Input[bool] numeric: Include numeric characters in the result. Default value is `true`. + :param pulumi.Input[str] override_special: Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. :param pulumi.Input[str] result: The generated random string. - :param pulumi.Input[bool] special: Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?` - :param pulumi.Input[bool] upper: Include uppercase alphabet characters in the result. + :param pulumi.Input[bool] special: Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. + :param pulumi.Input[bool] upper: Include uppercase alphabet characters in the result. Default value is `true`. """ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) __props__ = _RandomPasswordState.__new__(_RandomPasswordState) + __props__.__dict__["bcrypt_hash"] = bcrypt_hash __props__.__dict__["keepers"] = keepers __props__.__dict__["length"] = length __props__.__dict__["lower"] = lower @@ -632,18 +759,26 @@ def get(resource_name: str, __props__.__dict__["min_special"] = min_special __props__.__dict__["min_upper"] = min_upper __props__.__dict__["number"] = number + __props__.__dict__["numeric"] = numeric __props__.__dict__["override_special"] = override_special __props__.__dict__["result"] = result __props__.__dict__["special"] = special __props__.__dict__["upper"] = upper return RandomPassword(resource_name, opts=opts, __props__=__props__) + @property + @pulumi.getter(name="bcryptHash") + def bcrypt_hash(self) -> pulumi.Output[str]: + """ + A bcrypt hash of the generated random string. + """ + return pulumi.get(self, "bcrypt_hash") + @property @pulumi.getter - def keepers(self) -> pulumi.Output[Optional[Mapping[str, Any]]]: + def keepers(self) -> pulumi.Output[Optional[Mapping[str, str]]]: """ - Arbitrary map of values that, when changed, will trigger recreation of resource. See [the main provider - documentation](../index.html) for more information. + Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. """ return pulumi.get(self, "keepers") @@ -651,65 +786,71 @@ def keepers(self) -> pulumi.Output[Optional[Mapping[str, Any]]]: @pulumi.getter def length(self) -> pulumi.Output[int]: """ - The length of the string desired. + The length of the string desired. The minimum value for length is 1 and, length must also be >= (`min_upper` + `min_lower` + `min_numeric` + `min_special`). """ return pulumi.get(self, "length") @property @pulumi.getter - def lower(self) -> pulumi.Output[Optional[bool]]: + def lower(self) -> pulumi.Output[bool]: """ - Include lowercase alphabet characters in the result. + Include lowercase alphabet characters in the result. Default value is `true`. """ return pulumi.get(self, "lower") @property @pulumi.getter(name="minLower") - def min_lower(self) -> pulumi.Output[Optional[int]]: + def min_lower(self) -> pulumi.Output[int]: """ - Minimum number of lowercase alphabet characters in the result. + Minimum number of lowercase alphabet characters in the result. Default value is `0`. """ return pulumi.get(self, "min_lower") @property @pulumi.getter(name="minNumeric") - def min_numeric(self) -> pulumi.Output[Optional[int]]: + def min_numeric(self) -> pulumi.Output[int]: """ - Minimum number of numeric characters in the result. + Minimum number of numeric characters in the result. Default value is `0`. """ return pulumi.get(self, "min_numeric") @property @pulumi.getter(name="minSpecial") - def min_special(self) -> pulumi.Output[Optional[int]]: + def min_special(self) -> pulumi.Output[int]: """ - Minimum number of special characters in the result. + Minimum number of special characters in the result. Default value is `0`. """ return pulumi.get(self, "min_special") @property @pulumi.getter(name="minUpper") - def min_upper(self) -> pulumi.Output[Optional[int]]: + def min_upper(self) -> pulumi.Output[int]: """ - Minimum number of uppercase alphabet characters in the result. + Minimum number of uppercase alphabet characters in the result. Default value is `0`. """ return pulumi.get(self, "min_upper") @property @pulumi.getter - def number(self) -> pulumi.Output[Optional[bool]]: + def number(self) -> pulumi.Output[bool]: """ - Include numeric characters in the result. + Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. """ return pulumi.get(self, "number") + @property + @pulumi.getter + def numeric(self) -> pulumi.Output[bool]: + """ + Include numeric characters in the result. Default value is `true`. + """ + return pulumi.get(self, "numeric") + @property @pulumi.getter(name="overrideSpecial") def override_special(self) -> pulumi.Output[Optional[str]]: """ - Supply your own list of special characters to use for string generation. This overrides the default character list in - the special argument. The `special` argument must still be set to true for any overwritten characters to be used in - generation. + Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. """ return pulumi.get(self, "override_special") @@ -723,17 +864,17 @@ def result(self) -> pulumi.Output[str]: @property @pulumi.getter - def special(self) -> pulumi.Output[Optional[bool]]: + def special(self) -> pulumi.Output[bool]: """ - Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?` + Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. """ return pulumi.get(self, "special") @property @pulumi.getter - def upper(self) -> pulumi.Output[Optional[bool]]: + def upper(self) -> pulumi.Output[bool]: """ - Include uppercase alphabet characters in the result. + Include uppercase alphabet characters in the result. Default value is `true`. """ return pulumi.get(self, "upper") diff --git a/sdk/python/pulumi_random/random_pet.py b/sdk/python/pulumi_random/random_pet.py index 2606f9add3..dd7a7da8ae 100644 --- a/sdk/python/pulumi_random/random_pet.py +++ b/sdk/python/pulumi_random/random_pet.py @@ -14,18 +14,16 @@ @pulumi.input_type class RandomPetArgs: def __init__(__self__, *, - keepers: Optional[pulumi.Input[Mapping[str, Any]]] = None, + keepers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, length: Optional[pulumi.Input[int]] = None, prefix: Optional[pulumi.Input[str]] = None, separator: Optional[pulumi.Input[str]] = None): """ The set of arguments for constructing a RandomPet resource. - :param pulumi.Input[Mapping[str, Any]] keepers: Arbitrary map of values that, when changed, will - trigger a new id to be generated. See - the main provider documentation for more information. - :param pulumi.Input[int] length: The length (in words) of the pet name. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] keepers: Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + :param pulumi.Input[int] length: The length (in words) of the pet name. Defaults to 2 :param pulumi.Input[str] prefix: A string to prefix the name with. - :param pulumi.Input[str] separator: The character to separate words in the pet name. + :param pulumi.Input[str] separator: The character to separate words in the pet name. Defaults to "-" """ if keepers is not None: pulumi.set(__self__, "keepers", keepers) @@ -38,23 +36,21 @@ def __init__(__self__, *, @property @pulumi.getter - def keepers(self) -> Optional[pulumi.Input[Mapping[str, Any]]]: + def keepers(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: """ - Arbitrary map of values that, when changed, will - trigger a new id to be generated. See - the main provider documentation for more information. + Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. """ return pulumi.get(self, "keepers") @keepers.setter - def keepers(self, value: Optional[pulumi.Input[Mapping[str, Any]]]): + def keepers(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]): pulumi.set(self, "keepers", value) @property @pulumi.getter def length(self) -> Optional[pulumi.Input[int]]: """ - The length (in words) of the pet name. + The length (in words) of the pet name. Defaults to 2 """ return pulumi.get(self, "length") @@ -78,7 +74,7 @@ def prefix(self, value: Optional[pulumi.Input[str]]): @pulumi.getter def separator(self) -> Optional[pulumi.Input[str]]: """ - The character to separate words in the pet name. + The character to separate words in the pet name. Defaults to "-" """ return pulumi.get(self, "separator") @@ -90,18 +86,16 @@ def separator(self, value: Optional[pulumi.Input[str]]): @pulumi.input_type class _RandomPetState: def __init__(__self__, *, - keepers: Optional[pulumi.Input[Mapping[str, Any]]] = None, + keepers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, length: Optional[pulumi.Input[int]] = None, prefix: Optional[pulumi.Input[str]] = None, separator: Optional[pulumi.Input[str]] = None): """ Input properties used for looking up and filtering RandomPet resources. - :param pulumi.Input[Mapping[str, Any]] keepers: Arbitrary map of values that, when changed, will - trigger a new id to be generated. See - the main provider documentation for more information. - :param pulumi.Input[int] length: The length (in words) of the pet name. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] keepers: Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + :param pulumi.Input[int] length: The length (in words) of the pet name. Defaults to 2 :param pulumi.Input[str] prefix: A string to prefix the name with. - :param pulumi.Input[str] separator: The character to separate words in the pet name. + :param pulumi.Input[str] separator: The character to separate words in the pet name. Defaults to "-" """ if keepers is not None: pulumi.set(__self__, "keepers", keepers) @@ -114,23 +108,21 @@ def __init__(__self__, *, @property @pulumi.getter - def keepers(self) -> Optional[pulumi.Input[Mapping[str, Any]]]: + def keepers(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: """ - Arbitrary map of values that, when changed, will - trigger a new id to be generated. See - the main provider documentation for more information. + Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. """ return pulumi.get(self, "keepers") @keepers.setter - def keepers(self, value: Optional[pulumi.Input[Mapping[str, Any]]]): + def keepers(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]): pulumi.set(self, "keepers", value) @property @pulumi.getter def length(self) -> Optional[pulumi.Input[int]]: """ - The length (in words) of the pet name. + The length (in words) of the pet name. Defaults to 2 """ return pulumi.get(self, "length") @@ -154,7 +146,7 @@ def prefix(self, value: Optional[pulumi.Input[str]]): @pulumi.getter def separator(self) -> Optional[pulumi.Input[str]]: """ - The character to separate words in the pet name. + The character to separate words in the pet name. Defaults to "-" """ return pulumi.get(self, "separator") @@ -168,28 +160,22 @@ class RandomPet(pulumi.CustomResource): def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, - keepers: Optional[pulumi.Input[Mapping[str, Any]]] = None, + keepers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, length: Optional[pulumi.Input[int]] = None, prefix: Optional[pulumi.Input[str]] = None, separator: Optional[pulumi.Input[str]] = None, __props__=None): """ - The resource `RandomPet` generates random pet names that are intended to be - used as unique identifiers for other resources. + The resource `RandomPet` generates random pet names that are intended to be used as unique identifiers for other resources. - This resource can be used in conjunction with resources that have - the `create_before_destroy` lifecycle flag set, to avoid conflicts with - unique names during the brief period where both the old and new resources - exist concurrently. + This resource can be used in conjunction with resources that have the `create_before_destroy` lifecycle flag set, to avoid conflicts with unique names during the brief period where both the old and new resources exist concurrently. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. - :param pulumi.Input[Mapping[str, Any]] keepers: Arbitrary map of values that, when changed, will - trigger a new id to be generated. See - the main provider documentation for more information. - :param pulumi.Input[int] length: The length (in words) of the pet name. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] keepers: Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + :param pulumi.Input[int] length: The length (in words) of the pet name. Defaults to 2 :param pulumi.Input[str] prefix: A string to prefix the name with. - :param pulumi.Input[str] separator: The character to separate words in the pet name. + :param pulumi.Input[str] separator: The character to separate words in the pet name. Defaults to "-" """ ... @overload @@ -198,13 +184,9 @@ def __init__(__self__, args: Optional[RandomPetArgs] = None, opts: Optional[pulumi.ResourceOptions] = None): """ - The resource `RandomPet` generates random pet names that are intended to be - used as unique identifiers for other resources. + The resource `RandomPet` generates random pet names that are intended to be used as unique identifiers for other resources. - This resource can be used in conjunction with resources that have - the `create_before_destroy` lifecycle flag set, to avoid conflicts with - unique names during the brief period where both the old and new resources - exist concurrently. + This resource can be used in conjunction with resources that have the `create_before_destroy` lifecycle flag set, to avoid conflicts with unique names during the brief period where both the old and new resources exist concurrently. :param str resource_name: The name of the resource. :param RandomPetArgs args: The arguments to use to populate this resource's properties. @@ -221,7 +203,7 @@ def __init__(__self__, resource_name: str, *args, **kwargs): def _internal_init(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, - keepers: Optional[pulumi.Input[Mapping[str, Any]]] = None, + keepers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, length: Optional[pulumi.Input[int]] = None, prefix: Optional[pulumi.Input[str]] = None, separator: Optional[pulumi.Input[str]] = None, @@ -248,7 +230,7 @@ def _internal_init(__self__, def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None, - keepers: Optional[pulumi.Input[Mapping[str, Any]]] = None, + keepers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, length: Optional[pulumi.Input[int]] = None, prefix: Optional[pulumi.Input[str]] = None, separator: Optional[pulumi.Input[str]] = None) -> 'RandomPet': @@ -259,12 +241,10 @@ def get(resource_name: str, :param str resource_name: The unique name of the resulting resource. :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. :param pulumi.ResourceOptions opts: Options for the resource. - :param pulumi.Input[Mapping[str, Any]] keepers: Arbitrary map of values that, when changed, will - trigger a new id to be generated. See - the main provider documentation for more information. - :param pulumi.Input[int] length: The length (in words) of the pet name. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] keepers: Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + :param pulumi.Input[int] length: The length (in words) of the pet name. Defaults to 2 :param pulumi.Input[str] prefix: A string to prefix the name with. - :param pulumi.Input[str] separator: The character to separate words in the pet name. + :param pulumi.Input[str] separator: The character to separate words in the pet name. Defaults to "-" """ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) @@ -278,19 +258,17 @@ def get(resource_name: str, @property @pulumi.getter - def keepers(self) -> pulumi.Output[Optional[Mapping[str, Any]]]: + def keepers(self) -> pulumi.Output[Optional[Mapping[str, str]]]: """ - Arbitrary map of values that, when changed, will - trigger a new id to be generated. See - the main provider documentation for more information. + Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. """ return pulumi.get(self, "keepers") @property @pulumi.getter - def length(self) -> pulumi.Output[Optional[int]]: + def length(self) -> pulumi.Output[int]: """ - The length (in words) of the pet name. + The length (in words) of the pet name. Defaults to 2 """ return pulumi.get(self, "length") @@ -304,9 +282,9 @@ def prefix(self) -> pulumi.Output[Optional[str]]: @property @pulumi.getter - def separator(self) -> pulumi.Output[Optional[str]]: + def separator(self) -> pulumi.Output[str]: """ - The character to separate words in the pet name. + The character to separate words in the pet name. Defaults to "-" """ return pulumi.get(self, "separator") diff --git a/sdk/python/pulumi_random/random_shuffle.py b/sdk/python/pulumi_random/random_shuffle.py index 4d531ebbce..95dfed2d0c 100644 --- a/sdk/python/pulumi_random/random_shuffle.py +++ b/sdk/python/pulumi_random/random_shuffle.py @@ -15,23 +15,15 @@ class RandomShuffleArgs: def __init__(__self__, *, inputs: pulumi.Input[Sequence[pulumi.Input[str]]], - keepers: Optional[pulumi.Input[Mapping[str, Any]]] = None, + keepers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, result_count: Optional[pulumi.Input[int]] = None, seed: Optional[pulumi.Input[str]] = None): """ The set of arguments for constructing a RandomShuffle resource. :param pulumi.Input[Sequence[pulumi.Input[str]]] inputs: The list of strings to shuffle. - :param pulumi.Input[Mapping[str, Any]] keepers: Arbitrary map of values that, when changed, will - trigger a new id to be generated. See - the main provider documentation for more information. - :param pulumi.Input[int] result_count: The number of results to return. Defaults to - the number of items in the `input` list. If fewer items are requested, - some elements will be excluded from the result. If more items are requested, - items will be repeated in the result but not more frequently than the number - of items in the input list. - :param pulumi.Input[str] seed: Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the - list. **Important:** Even with an identical seed, it is not guaranteed that the same permutation will be produced across - different versions of Terraform. This argument causes the result to be *less volatile*, but not fixed for all time. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] keepers: Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + :param pulumi.Input[int] result_count: The number of results to return. Defaults to the number of items in the `input` list. If fewer items are requested, some elements will be excluded from the result. If more items are requested, items will be repeated in the result but not more frequently than the number of items in the input list. + :param pulumi.Input[str] seed: Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the list. """ pulumi.set(__self__, "inputs", inputs) if keepers is not None: @@ -55,27 +47,21 @@ def inputs(self, value: pulumi.Input[Sequence[pulumi.Input[str]]]): @property @pulumi.getter - def keepers(self) -> Optional[pulumi.Input[Mapping[str, Any]]]: + def keepers(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: """ - Arbitrary map of values that, when changed, will - trigger a new id to be generated. See - the main provider documentation for more information. + Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. """ return pulumi.get(self, "keepers") @keepers.setter - def keepers(self, value: Optional[pulumi.Input[Mapping[str, Any]]]): + def keepers(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]): pulumi.set(self, "keepers", value) @property @pulumi.getter(name="resultCount") def result_count(self) -> Optional[pulumi.Input[int]]: """ - The number of results to return. Defaults to - the number of items in the `input` list. If fewer items are requested, - some elements will be excluded from the result. If more items are requested, - items will be repeated in the result but not more frequently than the number - of items in the input list. + The number of results to return. Defaults to the number of items in the `input` list. If fewer items are requested, some elements will be excluded from the result. If more items are requested, items will be repeated in the result but not more frequently than the number of items in the input list. """ return pulumi.get(self, "result_count") @@ -87,9 +73,7 @@ def result_count(self, value: Optional[pulumi.Input[int]]): @pulumi.getter def seed(self) -> Optional[pulumi.Input[str]]: """ - Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the - list. **Important:** Even with an identical seed, it is not guaranteed that the same permutation will be produced across - different versions of Terraform. This argument causes the result to be *less volatile*, but not fixed for all time. + Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the list. """ return pulumi.get(self, "seed") @@ -102,25 +86,17 @@ def seed(self, value: Optional[pulumi.Input[str]]): class _RandomShuffleState: def __init__(__self__, *, inputs: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, - keepers: Optional[pulumi.Input[Mapping[str, Any]]] = None, + keepers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, result_count: Optional[pulumi.Input[int]] = None, results: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, seed: Optional[pulumi.Input[str]] = None): """ Input properties used for looking up and filtering RandomShuffle resources. :param pulumi.Input[Sequence[pulumi.Input[str]]] inputs: The list of strings to shuffle. - :param pulumi.Input[Mapping[str, Any]] keepers: Arbitrary map of values that, when changed, will - trigger a new id to be generated. See - the main provider documentation for more information. - :param pulumi.Input[int] result_count: The number of results to return. Defaults to - the number of items in the `input` list. If fewer items are requested, - some elements will be excluded from the result. If more items are requested, - items will be repeated in the result but not more frequently than the number - of items in the input list. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] keepers: Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + :param pulumi.Input[int] result_count: The number of results to return. Defaults to the number of items in the `input` list. If fewer items are requested, some elements will be excluded from the result. If more items are requested, items will be repeated in the result but not more frequently than the number of items in the input list. :param pulumi.Input[Sequence[pulumi.Input[str]]] results: Random permutation of the list of strings given in `input`. - :param pulumi.Input[str] seed: Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the - list. **Important:** Even with an identical seed, it is not guaranteed that the same permutation will be produced across - different versions of Terraform. This argument causes the result to be *less volatile*, but not fixed for all time. + :param pulumi.Input[str] seed: Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the list. """ if inputs is not None: pulumi.set(__self__, "inputs", inputs) @@ -147,27 +123,21 @@ def inputs(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): @property @pulumi.getter - def keepers(self) -> Optional[pulumi.Input[Mapping[str, Any]]]: + def keepers(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: """ - Arbitrary map of values that, when changed, will - trigger a new id to be generated. See - the main provider documentation for more information. + Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. """ return pulumi.get(self, "keepers") @keepers.setter - def keepers(self, value: Optional[pulumi.Input[Mapping[str, Any]]]): + def keepers(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]): pulumi.set(self, "keepers", value) @property @pulumi.getter(name="resultCount") def result_count(self) -> Optional[pulumi.Input[int]]: """ - The number of results to return. Defaults to - the number of items in the `input` list. If fewer items are requested, - some elements will be excluded from the result. If more items are requested, - items will be repeated in the result but not more frequently than the number - of items in the input list. + The number of results to return. Defaults to the number of items in the `input` list. If fewer items are requested, some elements will be excluded from the result. If more items are requested, items will be repeated in the result but not more frequently than the number of items in the input list. """ return pulumi.get(self, "result_count") @@ -191,9 +161,7 @@ def results(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]): @pulumi.getter def seed(self) -> Optional[pulumi.Input[str]]: """ - Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the - list. **Important:** Even with an identical seed, it is not guaranteed that the same permutation will be produced across - different versions of Terraform. This argument causes the result to be *less volatile*, but not fixed for all time. + Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the list. """ return pulumi.get(self, "seed") @@ -208,13 +176,12 @@ def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, inputs: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, - keepers: Optional[pulumi.Input[Mapping[str, Any]]] = None, + keepers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, result_count: Optional[pulumi.Input[int]] = None, seed: Optional[pulumi.Input[str]] = None, __props__=None): """ - The resource `RandomShuffle` generates a random permutation of a list - of strings given as an argument. + The resource `RandomShuffle` generates a random permutation of a list of strings given as an argument. ## Example Usage @@ -231,23 +198,16 @@ def __init__(__self__, "us-west-1e", ], result_count=2) - example = aws.elb.LoadBalancer("example", availability_zones=az.results) + example = aws.elb.LoadBalancer("example", availability_zones=[az.results]) + # ... and other aws_elb arguments ... ``` :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[Sequence[pulumi.Input[str]]] inputs: The list of strings to shuffle. - :param pulumi.Input[Mapping[str, Any]] keepers: Arbitrary map of values that, when changed, will - trigger a new id to be generated. See - the main provider documentation for more information. - :param pulumi.Input[int] result_count: The number of results to return. Defaults to - the number of items in the `input` list. If fewer items are requested, - some elements will be excluded from the result. If more items are requested, - items will be repeated in the result but not more frequently than the number - of items in the input list. - :param pulumi.Input[str] seed: Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the - list. **Important:** Even with an identical seed, it is not guaranteed that the same permutation will be produced across - different versions of Terraform. This argument causes the result to be *less volatile*, but not fixed for all time. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] keepers: Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + :param pulumi.Input[int] result_count: The number of results to return. Defaults to the number of items in the `input` list. If fewer items are requested, some elements will be excluded from the result. If more items are requested, items will be repeated in the result but not more frequently than the number of items in the input list. + :param pulumi.Input[str] seed: Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the list. """ ... @overload @@ -256,8 +216,7 @@ def __init__(__self__, args: RandomShuffleArgs, opts: Optional[pulumi.ResourceOptions] = None): """ - The resource `RandomShuffle` generates a random permutation of a list - of strings given as an argument. + The resource `RandomShuffle` generates a random permutation of a list of strings given as an argument. ## Example Usage @@ -274,7 +233,8 @@ def __init__(__self__, "us-west-1e", ], result_count=2) - example = aws.elb.LoadBalancer("example", availability_zones=az.results) + example = aws.elb.LoadBalancer("example", availability_zones=[az.results]) + # ... and other aws_elb arguments ... ``` :param str resource_name: The name of the resource. @@ -293,7 +253,7 @@ def _internal_init(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, inputs: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, - keepers: Optional[pulumi.Input[Mapping[str, Any]]] = None, + keepers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, result_count: Optional[pulumi.Input[int]] = None, seed: Optional[pulumi.Input[str]] = None, __props__=None): @@ -323,7 +283,7 @@ def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None, inputs: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, - keepers: Optional[pulumi.Input[Mapping[str, Any]]] = None, + keepers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, result_count: Optional[pulumi.Input[int]] = None, results: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None, seed: Optional[pulumi.Input[str]] = None) -> 'RandomShuffle': @@ -335,18 +295,10 @@ def get(resource_name: str, :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[Sequence[pulumi.Input[str]]] inputs: The list of strings to shuffle. - :param pulumi.Input[Mapping[str, Any]] keepers: Arbitrary map of values that, when changed, will - trigger a new id to be generated. See - the main provider documentation for more information. - :param pulumi.Input[int] result_count: The number of results to return. Defaults to - the number of items in the `input` list. If fewer items are requested, - some elements will be excluded from the result. If more items are requested, - items will be repeated in the result but not more frequently than the number - of items in the input list. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] keepers: Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + :param pulumi.Input[int] result_count: The number of results to return. Defaults to the number of items in the `input` list. If fewer items are requested, some elements will be excluded from the result. If more items are requested, items will be repeated in the result but not more frequently than the number of items in the input list. :param pulumi.Input[Sequence[pulumi.Input[str]]] results: Random permutation of the list of strings given in `input`. - :param pulumi.Input[str] seed: Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the - list. **Important:** Even with an identical seed, it is not guaranteed that the same permutation will be produced across - different versions of Terraform. This argument causes the result to be *less volatile*, but not fixed for all time. + :param pulumi.Input[str] seed: Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the list. """ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) @@ -369,11 +321,9 @@ def inputs(self) -> pulumi.Output[Sequence[str]]: @property @pulumi.getter - def keepers(self) -> pulumi.Output[Optional[Mapping[str, Any]]]: + def keepers(self) -> pulumi.Output[Optional[Mapping[str, str]]]: """ - Arbitrary map of values that, when changed, will - trigger a new id to be generated. See - the main provider documentation for more information. + Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. """ return pulumi.get(self, "keepers") @@ -381,11 +331,7 @@ def keepers(self) -> pulumi.Output[Optional[Mapping[str, Any]]]: @pulumi.getter(name="resultCount") def result_count(self) -> pulumi.Output[Optional[int]]: """ - The number of results to return. Defaults to - the number of items in the `input` list. If fewer items are requested, - some elements will be excluded from the result. If more items are requested, - items will be repeated in the result but not more frequently than the number - of items in the input list. + The number of results to return. Defaults to the number of items in the `input` list. If fewer items are requested, some elements will be excluded from the result. If more items are requested, items will be repeated in the result but not more frequently than the number of items in the input list. """ return pulumi.get(self, "result_count") @@ -401,9 +347,7 @@ def results(self) -> pulumi.Output[Sequence[str]]: @pulumi.getter def seed(self) -> pulumi.Output[Optional[str]]: """ - Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the - list. **Important:** Even with an identical seed, it is not guaranteed that the same permutation will be produced across - different versions of Terraform. This argument causes the result to be *less volatile*, but not fixed for all time. + Arbitrary string with which to seed the random number generator, in order to produce less-volatile permutations of the list. """ return pulumi.get(self, "seed") diff --git a/sdk/python/pulumi_random/random_string.py b/sdk/python/pulumi_random/random_string.py index 03e36eaf56..a15dc27978 100644 --- a/sdk/python/pulumi_random/random_string.py +++ b/sdk/python/pulumi_random/random_string.py @@ -15,42 +15,31 @@ class RandomStringArgs: def __init__(__self__, *, length: pulumi.Input[int], - keepers: Optional[pulumi.Input[Mapping[str, Any]]] = None, + keepers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, lower: Optional[pulumi.Input[bool]] = None, min_lower: Optional[pulumi.Input[int]] = None, min_numeric: Optional[pulumi.Input[int]] = None, min_special: Optional[pulumi.Input[int]] = None, min_upper: Optional[pulumi.Input[int]] = None, number: Optional[pulumi.Input[bool]] = None, + numeric: Optional[pulumi.Input[bool]] = None, override_special: Optional[pulumi.Input[str]] = None, special: Optional[pulumi.Input[bool]] = None, upper: Optional[pulumi.Input[bool]] = None): """ The set of arguments for constructing a RandomString resource. - :param pulumi.Input[int] length: The length of the string desired - :param pulumi.Input[Mapping[str, Any]] keepers: Arbitrary map of values that, when changed, will - trigger a new id to be generated. See - the main provider documentation for more information. - :param pulumi.Input[bool] lower: (default true) Include lowercase alphabet characters - in random string. - :param pulumi.Input[int] min_lower: (default 0) Minimum number of lowercase alphabet - characters in random string. - :param pulumi.Input[int] min_numeric: (default 0) Minimum number of numeric characters - in random string. - :param pulumi.Input[int] min_special: (default 0) Minimum number of special characters - in random string. - :param pulumi.Input[int] min_upper: (default 0) Minimum number of uppercase alphabet - characters in random string. - :param pulumi.Input[bool] number: (default true) Include numeric characters in random - string. - :param pulumi.Input[str] override_special: Supply your own list of special characters to - use for string generation. This overrides the default character list in the special - argument. The special argument must still be set to true for any overwritten - characters to be used in generation. - :param pulumi.Input[bool] special: (default true) Include special characters in random - string. These are `!@#$%&*()-_=+[]{}<>:?` - :param pulumi.Input[bool] upper: (default true) Include uppercase alphabet characters - in random string. + :param pulumi.Input[int] length: The length of the string desired. The minimum value for length is 1 and, length must also be >= (`min_upper` + `min_lower` + `min_numeric` + `min_special`). + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] keepers: Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + :param pulumi.Input[bool] lower: Include lowercase alphabet characters in the result. Default value is `true`. + :param pulumi.Input[int] min_lower: Minimum number of lowercase alphabet characters in the result. Default value is `0`. + :param pulumi.Input[int] min_numeric: Minimum number of numeric characters in the result. Default value is `0`. + :param pulumi.Input[int] min_special: Minimum number of special characters in the result. Default value is `0`. + :param pulumi.Input[int] min_upper: Minimum number of uppercase alphabet characters in the result. Default value is `0`. + :param pulumi.Input[bool] number: Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. + :param pulumi.Input[bool] numeric: Include numeric characters in the result. Default value is `true`. + :param pulumi.Input[str] override_special: Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. + :param pulumi.Input[bool] special: Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. + :param pulumi.Input[bool] upper: Include uppercase alphabet characters in the result. Default value is `true`. """ pulumi.set(__self__, "length", length) if keepers is not None: @@ -65,8 +54,13 @@ def __init__(__self__, *, pulumi.set(__self__, "min_special", min_special) if min_upper is not None: pulumi.set(__self__, "min_upper", min_upper) + if number is not None: + warnings.warn("""**NOTE**: This is deprecated, use `numeric` instead.""", DeprecationWarning) + pulumi.log.warn("""number is deprecated: **NOTE**: This is deprecated, use `numeric` instead.""") if number is not None: pulumi.set(__self__, "number", number) + if numeric is not None: + pulumi.set(__self__, "numeric", numeric) if override_special is not None: pulumi.set(__self__, "override_special", override_special) if special is not None: @@ -78,7 +72,7 @@ def __init__(__self__, *, @pulumi.getter def length(self) -> pulumi.Input[int]: """ - The length of the string desired + The length of the string desired. The minimum value for length is 1 and, length must also be >= (`min_upper` + `min_lower` + `min_numeric` + `min_special`). """ return pulumi.get(self, "length") @@ -88,24 +82,21 @@ def length(self, value: pulumi.Input[int]): @property @pulumi.getter - def keepers(self) -> Optional[pulumi.Input[Mapping[str, Any]]]: + def keepers(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: """ - Arbitrary map of values that, when changed, will - trigger a new id to be generated. See - the main provider documentation for more information. + Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. """ return pulumi.get(self, "keepers") @keepers.setter - def keepers(self, value: Optional[pulumi.Input[Mapping[str, Any]]]): + def keepers(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]): pulumi.set(self, "keepers", value) @property @pulumi.getter def lower(self) -> Optional[pulumi.Input[bool]]: """ - (default true) Include lowercase alphabet characters - in random string. + Include lowercase alphabet characters in the result. Default value is `true`. """ return pulumi.get(self, "lower") @@ -117,8 +108,7 @@ def lower(self, value: Optional[pulumi.Input[bool]]): @pulumi.getter(name="minLower") def min_lower(self) -> Optional[pulumi.Input[int]]: """ - (default 0) Minimum number of lowercase alphabet - characters in random string. + Minimum number of lowercase alphabet characters in the result. Default value is `0`. """ return pulumi.get(self, "min_lower") @@ -130,8 +120,7 @@ def min_lower(self, value: Optional[pulumi.Input[int]]): @pulumi.getter(name="minNumeric") def min_numeric(self) -> Optional[pulumi.Input[int]]: """ - (default 0) Minimum number of numeric characters - in random string. + Minimum number of numeric characters in the result. Default value is `0`. """ return pulumi.get(self, "min_numeric") @@ -143,8 +132,7 @@ def min_numeric(self, value: Optional[pulumi.Input[int]]): @pulumi.getter(name="minSpecial") def min_special(self) -> Optional[pulumi.Input[int]]: """ - (default 0) Minimum number of special characters - in random string. + Minimum number of special characters in the result. Default value is `0`. """ return pulumi.get(self, "min_special") @@ -156,8 +144,7 @@ def min_special(self, value: Optional[pulumi.Input[int]]): @pulumi.getter(name="minUpper") def min_upper(self) -> Optional[pulumi.Input[int]]: """ - (default 0) Minimum number of uppercase alphabet - characters in random string. + Minimum number of uppercase alphabet characters in the result. Default value is `0`. """ return pulumi.get(self, "min_upper") @@ -169,8 +156,7 @@ def min_upper(self, value: Optional[pulumi.Input[int]]): @pulumi.getter def number(self) -> Optional[pulumi.Input[bool]]: """ - (default true) Include numeric characters in random - string. + Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. """ return pulumi.get(self, "number") @@ -178,14 +164,23 @@ def number(self) -> Optional[pulumi.Input[bool]]: def number(self, value: Optional[pulumi.Input[bool]]): pulumi.set(self, "number", value) + @property + @pulumi.getter + def numeric(self) -> Optional[pulumi.Input[bool]]: + """ + Include numeric characters in the result. Default value is `true`. + """ + return pulumi.get(self, "numeric") + + @numeric.setter + def numeric(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "numeric", value) + @property @pulumi.getter(name="overrideSpecial") def override_special(self) -> Optional[pulumi.Input[str]]: """ - Supply your own list of special characters to - use for string generation. This overrides the default character list in the special - argument. The special argument must still be set to true for any overwritten - characters to be used in generation. + Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. """ return pulumi.get(self, "override_special") @@ -197,8 +192,7 @@ def override_special(self, value: Optional[pulumi.Input[str]]): @pulumi.getter def special(self) -> Optional[pulumi.Input[bool]]: """ - (default true) Include special characters in random - string. These are `!@#$%&*()-_=+[]{}<>:?` + Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. """ return pulumi.get(self, "special") @@ -210,8 +204,7 @@ def special(self, value: Optional[pulumi.Input[bool]]): @pulumi.getter def upper(self) -> Optional[pulumi.Input[bool]]: """ - (default true) Include uppercase alphabet characters - in random string. + Include uppercase alphabet characters in the result. Default value is `true`. """ return pulumi.get(self, "upper") @@ -223,7 +216,7 @@ def upper(self, value: Optional[pulumi.Input[bool]]): @pulumi.input_type class _RandomStringState: def __init__(__self__, *, - keepers: Optional[pulumi.Input[Mapping[str, Any]]] = None, + keepers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, length: Optional[pulumi.Input[int]] = None, lower: Optional[pulumi.Input[bool]] = None, min_lower: Optional[pulumi.Input[int]] = None, @@ -231,37 +224,26 @@ def __init__(__self__, *, min_special: Optional[pulumi.Input[int]] = None, min_upper: Optional[pulumi.Input[int]] = None, number: Optional[pulumi.Input[bool]] = None, + numeric: Optional[pulumi.Input[bool]] = None, override_special: Optional[pulumi.Input[str]] = None, result: Optional[pulumi.Input[str]] = None, special: Optional[pulumi.Input[bool]] = None, upper: Optional[pulumi.Input[bool]] = None): """ Input properties used for looking up and filtering RandomString resources. - :param pulumi.Input[Mapping[str, Any]] keepers: Arbitrary map of values that, when changed, will - trigger a new id to be generated. See - the main provider documentation for more information. - :param pulumi.Input[int] length: The length of the string desired - :param pulumi.Input[bool] lower: (default true) Include lowercase alphabet characters - in random string. - :param pulumi.Input[int] min_lower: (default 0) Minimum number of lowercase alphabet - characters in random string. - :param pulumi.Input[int] min_numeric: (default 0) Minimum number of numeric characters - in random string. - :param pulumi.Input[int] min_special: (default 0) Minimum number of special characters - in random string. - :param pulumi.Input[int] min_upper: (default 0) Minimum number of uppercase alphabet - characters in random string. - :param pulumi.Input[bool] number: (default true) Include numeric characters in random - string. - :param pulumi.Input[str] override_special: Supply your own list of special characters to - use for string generation. This overrides the default character list in the special - argument. The special argument must still be set to true for any overwritten - characters to be used in generation. - :param pulumi.Input[str] result: Random string generated. - :param pulumi.Input[bool] special: (default true) Include special characters in random - string. These are `!@#$%&*()-_=+[]{}<>:?` - :param pulumi.Input[bool] upper: (default true) Include uppercase alphabet characters - in random string. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] keepers: Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + :param pulumi.Input[int] length: The length of the string desired. The minimum value for length is 1 and, length must also be >= (`min_upper` + `min_lower` + `min_numeric` + `min_special`). + :param pulumi.Input[bool] lower: Include lowercase alphabet characters in the result. Default value is `true`. + :param pulumi.Input[int] min_lower: Minimum number of lowercase alphabet characters in the result. Default value is `0`. + :param pulumi.Input[int] min_numeric: Minimum number of numeric characters in the result. Default value is `0`. + :param pulumi.Input[int] min_special: Minimum number of special characters in the result. Default value is `0`. + :param pulumi.Input[int] min_upper: Minimum number of uppercase alphabet characters in the result. Default value is `0`. + :param pulumi.Input[bool] number: Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. + :param pulumi.Input[bool] numeric: Include numeric characters in the result. Default value is `true`. + :param pulumi.Input[str] override_special: Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. + :param pulumi.Input[str] result: The generated random string. + :param pulumi.Input[bool] special: Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. + :param pulumi.Input[bool] upper: Include uppercase alphabet characters in the result. Default value is `true`. """ if keepers is not None: pulumi.set(__self__, "keepers", keepers) @@ -277,8 +259,13 @@ def __init__(__self__, *, pulumi.set(__self__, "min_special", min_special) if min_upper is not None: pulumi.set(__self__, "min_upper", min_upper) + if number is not None: + warnings.warn("""**NOTE**: This is deprecated, use `numeric` instead.""", DeprecationWarning) + pulumi.log.warn("""number is deprecated: **NOTE**: This is deprecated, use `numeric` instead.""") if number is not None: pulumi.set(__self__, "number", number) + if numeric is not None: + pulumi.set(__self__, "numeric", numeric) if override_special is not None: pulumi.set(__self__, "override_special", override_special) if result is not None: @@ -290,23 +277,21 @@ def __init__(__self__, *, @property @pulumi.getter - def keepers(self) -> Optional[pulumi.Input[Mapping[str, Any]]]: + def keepers(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: """ - Arbitrary map of values that, when changed, will - trigger a new id to be generated. See - the main provider documentation for more information. + Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. """ return pulumi.get(self, "keepers") @keepers.setter - def keepers(self, value: Optional[pulumi.Input[Mapping[str, Any]]]): + def keepers(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]): pulumi.set(self, "keepers", value) @property @pulumi.getter def length(self) -> Optional[pulumi.Input[int]]: """ - The length of the string desired + The length of the string desired. The minimum value for length is 1 and, length must also be >= (`min_upper` + `min_lower` + `min_numeric` + `min_special`). """ return pulumi.get(self, "length") @@ -318,8 +303,7 @@ def length(self, value: Optional[pulumi.Input[int]]): @pulumi.getter def lower(self) -> Optional[pulumi.Input[bool]]: """ - (default true) Include lowercase alphabet characters - in random string. + Include lowercase alphabet characters in the result. Default value is `true`. """ return pulumi.get(self, "lower") @@ -331,8 +315,7 @@ def lower(self, value: Optional[pulumi.Input[bool]]): @pulumi.getter(name="minLower") def min_lower(self) -> Optional[pulumi.Input[int]]: """ - (default 0) Minimum number of lowercase alphabet - characters in random string. + Minimum number of lowercase alphabet characters in the result. Default value is `0`. """ return pulumi.get(self, "min_lower") @@ -344,8 +327,7 @@ def min_lower(self, value: Optional[pulumi.Input[int]]): @pulumi.getter(name="minNumeric") def min_numeric(self) -> Optional[pulumi.Input[int]]: """ - (default 0) Minimum number of numeric characters - in random string. + Minimum number of numeric characters in the result. Default value is `0`. """ return pulumi.get(self, "min_numeric") @@ -357,8 +339,7 @@ def min_numeric(self, value: Optional[pulumi.Input[int]]): @pulumi.getter(name="minSpecial") def min_special(self) -> Optional[pulumi.Input[int]]: """ - (default 0) Minimum number of special characters - in random string. + Minimum number of special characters in the result. Default value is `0`. """ return pulumi.get(self, "min_special") @@ -370,8 +351,7 @@ def min_special(self, value: Optional[pulumi.Input[int]]): @pulumi.getter(name="minUpper") def min_upper(self) -> Optional[pulumi.Input[int]]: """ - (default 0) Minimum number of uppercase alphabet - characters in random string. + Minimum number of uppercase alphabet characters in the result. Default value is `0`. """ return pulumi.get(self, "min_upper") @@ -383,8 +363,7 @@ def min_upper(self, value: Optional[pulumi.Input[int]]): @pulumi.getter def number(self) -> Optional[pulumi.Input[bool]]: """ - (default true) Include numeric characters in random - string. + Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. """ return pulumi.get(self, "number") @@ -392,14 +371,23 @@ def number(self) -> Optional[pulumi.Input[bool]]: def number(self, value: Optional[pulumi.Input[bool]]): pulumi.set(self, "number", value) + @property + @pulumi.getter + def numeric(self) -> Optional[pulumi.Input[bool]]: + """ + Include numeric characters in the result. Default value is `true`. + """ + return pulumi.get(self, "numeric") + + @numeric.setter + def numeric(self, value: Optional[pulumi.Input[bool]]): + pulumi.set(self, "numeric", value) + @property @pulumi.getter(name="overrideSpecial") def override_special(self) -> Optional[pulumi.Input[str]]: """ - Supply your own list of special characters to - use for string generation. This overrides the default character list in the special - argument. The special argument must still be set to true for any overwritten - characters to be used in generation. + Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. """ return pulumi.get(self, "override_special") @@ -411,7 +399,7 @@ def override_special(self, value: Optional[pulumi.Input[str]]): @pulumi.getter def result(self) -> Optional[pulumi.Input[str]]: """ - Random string generated. + The generated random string. """ return pulumi.get(self, "result") @@ -423,8 +411,7 @@ def result(self, value: Optional[pulumi.Input[str]]): @pulumi.getter def special(self) -> Optional[pulumi.Input[bool]]: """ - (default true) Include special characters in random - string. These are `!@#$%&*()-_=+[]{}<>:?` + Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. """ return pulumi.get(self, "special") @@ -436,8 +423,7 @@ def special(self, value: Optional[pulumi.Input[bool]]): @pulumi.getter def upper(self) -> Optional[pulumi.Input[bool]]: """ - (default true) Include uppercase alphabet characters - in random string. + Include uppercase alphabet characters in the result. Default value is `true`. """ return pulumi.get(self, "upper") @@ -451,7 +437,7 @@ class RandomString(pulumi.CustomResource): def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, - keepers: Optional[pulumi.Input[Mapping[str, Any]]] = None, + keepers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, length: Optional[pulumi.Input[int]] = None, lower: Optional[pulumi.Input[bool]] = None, min_lower: Optional[pulumi.Input[int]] = None, @@ -459,20 +445,17 @@ def __init__(__self__, min_special: Optional[pulumi.Input[int]] = None, min_upper: Optional[pulumi.Input[int]] = None, number: Optional[pulumi.Input[bool]] = None, + numeric: Optional[pulumi.Input[bool]] = None, override_special: Optional[pulumi.Input[str]] = None, special: Optional[pulumi.Input[bool]] = None, upper: Optional[pulumi.Input[bool]] = None, __props__=None): """ - The resource `RandomString` generates a random permutation of alphanumeric - characters and optionally special characters. + The resource `RandomString` generates a random permutation of alphanumeric characters and optionally special characters. This resource *does* use a cryptographic random number generator. - Historically this resource's intended usage has been ambiguous as the original example - used it in a password. For backwards compatibility it will - continue to exist. For unique ids please use random_id, for sensitive - random values please use random_password. + Historically this resource's intended usage has been ambiguous as the original example used it in a password. For backwards compatibility it will continue to exist. For unique ids please use random_id, for sensitive random values please use random_password. ## Example Usage @@ -488,38 +471,76 @@ def __init__(__self__, ## Import - Strings can be imported by just specifying the value of the string + ### Avoiding Replacement ```sh - $ pulumi import random:index/randomString:RandomString test test + $ pulumi import random:index/randomString:RandomString If the resource were imported using `random_string.test test`, ``` + replacement can be avoided by using1. Attribute values that match the imported ID and defaults: + + terraform + + resource "random_string" "test" { + + length = 4 + + lower + + = true + + } 2. Attribute values that match the imported ID and omit the attributes with defaults: + + terraform + + resource "random_string" "test" { + + length = 4 + + } 3. `ignore_changes` specifying the attributes to ignore: + + terraform + + resource "random_string" "test" { + + length = 16 + + lower + + = false + + lifecycle { + + ignore_changes = [ + + length, + + lower, + + ] + + } + + } + + **NOTE** `ignore_changes` is only required until the resource is recreated after import, + + after which it will use the configuration values specified. + :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. - :param pulumi.Input[Mapping[str, Any]] keepers: Arbitrary map of values that, when changed, will - trigger a new id to be generated. See - the main provider documentation for more information. - :param pulumi.Input[int] length: The length of the string desired - :param pulumi.Input[bool] lower: (default true) Include lowercase alphabet characters - in random string. - :param pulumi.Input[int] min_lower: (default 0) Minimum number of lowercase alphabet - characters in random string. - :param pulumi.Input[int] min_numeric: (default 0) Minimum number of numeric characters - in random string. - :param pulumi.Input[int] min_special: (default 0) Minimum number of special characters - in random string. - :param pulumi.Input[int] min_upper: (default 0) Minimum number of uppercase alphabet - characters in random string. - :param pulumi.Input[bool] number: (default true) Include numeric characters in random - string. - :param pulumi.Input[str] override_special: Supply your own list of special characters to - use for string generation. This overrides the default character list in the special - argument. The special argument must still be set to true for any overwritten - characters to be used in generation. - :param pulumi.Input[bool] special: (default true) Include special characters in random - string. These are `!@#$%&*()-_=+[]{}<>:?` - :param pulumi.Input[bool] upper: (default true) Include uppercase alphabet characters - in random string. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] keepers: Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + :param pulumi.Input[int] length: The length of the string desired. The minimum value for length is 1 and, length must also be >= (`min_upper` + `min_lower` + `min_numeric` + `min_special`). + :param pulumi.Input[bool] lower: Include lowercase alphabet characters in the result. Default value is `true`. + :param pulumi.Input[int] min_lower: Minimum number of lowercase alphabet characters in the result. Default value is `0`. + :param pulumi.Input[int] min_numeric: Minimum number of numeric characters in the result. Default value is `0`. + :param pulumi.Input[int] min_special: Minimum number of special characters in the result. Default value is `0`. + :param pulumi.Input[int] min_upper: Minimum number of uppercase alphabet characters in the result. Default value is `0`. + :param pulumi.Input[bool] number: Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. + :param pulumi.Input[bool] numeric: Include numeric characters in the result. Default value is `true`. + :param pulumi.Input[str] override_special: Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. + :param pulumi.Input[bool] special: Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. + :param pulumi.Input[bool] upper: Include uppercase alphabet characters in the result. Default value is `true`. """ ... @overload @@ -528,15 +549,11 @@ def __init__(__self__, args: RandomStringArgs, opts: Optional[pulumi.ResourceOptions] = None): """ - The resource `RandomString` generates a random permutation of alphanumeric - characters and optionally special characters. + The resource `RandomString` generates a random permutation of alphanumeric characters and optionally special characters. This resource *does* use a cryptographic random number generator. - Historically this resource's intended usage has been ambiguous as the original example - used it in a password. For backwards compatibility it will - continue to exist. For unique ids please use random_id, for sensitive - random values please use random_password. + Historically this resource's intended usage has been ambiguous as the original example used it in a password. For backwards compatibility it will continue to exist. For unique ids please use random_id, for sensitive random values please use random_password. ## Example Usage @@ -552,12 +569,62 @@ def __init__(__self__, ## Import - Strings can be imported by just specifying the value of the string + ### Avoiding Replacement ```sh - $ pulumi import random:index/randomString:RandomString test test + $ pulumi import random:index/randomString:RandomString If the resource were imported using `random_string.test test`, ``` + replacement can be avoided by using1. Attribute values that match the imported ID and defaults: + + terraform + + resource "random_string" "test" { + + length = 4 + + lower + + = true + + } 2. Attribute values that match the imported ID and omit the attributes with defaults: + + terraform + + resource "random_string" "test" { + + length = 4 + + } 3. `ignore_changes` specifying the attributes to ignore: + + terraform + + resource "random_string" "test" { + + length = 16 + + lower + + = false + + lifecycle { + + ignore_changes = [ + + length, + + lower, + + ] + + } + + } + + **NOTE** `ignore_changes` is only required until the resource is recreated after import, + + after which it will use the configuration values specified. + :param str resource_name: The name of the resource. :param RandomStringArgs args: The arguments to use to populate this resource's properties. :param pulumi.ResourceOptions opts: Options for the resource. @@ -573,7 +640,7 @@ def __init__(__self__, resource_name: str, *args, **kwargs): def _internal_init(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, - keepers: Optional[pulumi.Input[Mapping[str, Any]]] = None, + keepers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, length: Optional[pulumi.Input[int]] = None, lower: Optional[pulumi.Input[bool]] = None, min_lower: Optional[pulumi.Input[int]] = None, @@ -581,6 +648,7 @@ def _internal_init(__self__, min_special: Optional[pulumi.Input[int]] = None, min_upper: Optional[pulumi.Input[int]] = None, number: Optional[pulumi.Input[bool]] = None, + numeric: Optional[pulumi.Input[bool]] = None, override_special: Optional[pulumi.Input[str]] = None, special: Optional[pulumi.Input[bool]] = None, upper: Optional[pulumi.Input[bool]] = None, @@ -602,7 +670,11 @@ def _internal_init(__self__, __props__.__dict__["min_numeric"] = min_numeric __props__.__dict__["min_special"] = min_special __props__.__dict__["min_upper"] = min_upper + if number is not None and not opts.urn: + warnings.warn("""**NOTE**: This is deprecated, use `numeric` instead.""", DeprecationWarning) + pulumi.log.warn("""number is deprecated: **NOTE**: This is deprecated, use `numeric` instead.""") __props__.__dict__["number"] = number + __props__.__dict__["numeric"] = numeric __props__.__dict__["override_special"] = override_special __props__.__dict__["special"] = special __props__.__dict__["upper"] = upper @@ -617,7 +689,7 @@ def _internal_init(__self__, def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None, - keepers: Optional[pulumi.Input[Mapping[str, Any]]] = None, + keepers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, length: Optional[pulumi.Input[int]] = None, lower: Optional[pulumi.Input[bool]] = None, min_lower: Optional[pulumi.Input[int]] = None, @@ -625,6 +697,7 @@ def get(resource_name: str, min_special: Optional[pulumi.Input[int]] = None, min_upper: Optional[pulumi.Input[int]] = None, number: Optional[pulumi.Input[bool]] = None, + numeric: Optional[pulumi.Input[bool]] = None, override_special: Optional[pulumi.Input[str]] = None, result: Optional[pulumi.Input[str]] = None, special: Optional[pulumi.Input[bool]] = None, @@ -636,31 +709,19 @@ def get(resource_name: str, :param str resource_name: The unique name of the resulting resource. :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. :param pulumi.ResourceOptions opts: Options for the resource. - :param pulumi.Input[Mapping[str, Any]] keepers: Arbitrary map of values that, when changed, will - trigger a new id to be generated. See - the main provider documentation for more information. - :param pulumi.Input[int] length: The length of the string desired - :param pulumi.Input[bool] lower: (default true) Include lowercase alphabet characters - in random string. - :param pulumi.Input[int] min_lower: (default 0) Minimum number of lowercase alphabet - characters in random string. - :param pulumi.Input[int] min_numeric: (default 0) Minimum number of numeric characters - in random string. - :param pulumi.Input[int] min_special: (default 0) Minimum number of special characters - in random string. - :param pulumi.Input[int] min_upper: (default 0) Minimum number of uppercase alphabet - characters in random string. - :param pulumi.Input[bool] number: (default true) Include numeric characters in random - string. - :param pulumi.Input[str] override_special: Supply your own list of special characters to - use for string generation. This overrides the default character list in the special - argument. The special argument must still be set to true for any overwritten - characters to be used in generation. - :param pulumi.Input[str] result: Random string generated. - :param pulumi.Input[bool] special: (default true) Include special characters in random - string. These are `!@#$%&*()-_=+[]{}<>:?` - :param pulumi.Input[bool] upper: (default true) Include uppercase alphabet characters - in random string. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] keepers: Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. + :param pulumi.Input[int] length: The length of the string desired. The minimum value for length is 1 and, length must also be >= (`min_upper` + `min_lower` + `min_numeric` + `min_special`). + :param pulumi.Input[bool] lower: Include lowercase alphabet characters in the result. Default value is `true`. + :param pulumi.Input[int] min_lower: Minimum number of lowercase alphabet characters in the result. Default value is `0`. + :param pulumi.Input[int] min_numeric: Minimum number of numeric characters in the result. Default value is `0`. + :param pulumi.Input[int] min_special: Minimum number of special characters in the result. Default value is `0`. + :param pulumi.Input[int] min_upper: Minimum number of uppercase alphabet characters in the result. Default value is `0`. + :param pulumi.Input[bool] number: Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. + :param pulumi.Input[bool] numeric: Include numeric characters in the result. Default value is `true`. + :param pulumi.Input[str] override_special: Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. + :param pulumi.Input[str] result: The generated random string. + :param pulumi.Input[bool] special: Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. + :param pulumi.Input[bool] upper: Include uppercase alphabet characters in the result. Default value is `true`. """ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) @@ -674,6 +735,7 @@ def get(resource_name: str, __props__.__dict__["min_special"] = min_special __props__.__dict__["min_upper"] = min_upper __props__.__dict__["number"] = number + __props__.__dict__["numeric"] = numeric __props__.__dict__["override_special"] = override_special __props__.__dict__["result"] = result __props__.__dict__["special"] = special @@ -682,11 +744,9 @@ def get(resource_name: str, @property @pulumi.getter - def keepers(self) -> pulumi.Output[Optional[Mapping[str, Any]]]: + def keepers(self) -> pulumi.Output[Optional[Mapping[str, str]]]: """ - Arbitrary map of values that, when changed, will - trigger a new id to be generated. See - the main provider documentation for more information. + Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. """ return pulumi.get(self, "keepers") @@ -694,72 +754,71 @@ def keepers(self) -> pulumi.Output[Optional[Mapping[str, Any]]]: @pulumi.getter def length(self) -> pulumi.Output[int]: """ - The length of the string desired + The length of the string desired. The minimum value for length is 1 and, length must also be >= (`min_upper` + `min_lower` + `min_numeric` + `min_special`). """ return pulumi.get(self, "length") @property @pulumi.getter - def lower(self) -> pulumi.Output[Optional[bool]]: + def lower(self) -> pulumi.Output[bool]: """ - (default true) Include lowercase alphabet characters - in random string. + Include lowercase alphabet characters in the result. Default value is `true`. """ return pulumi.get(self, "lower") @property @pulumi.getter(name="minLower") - def min_lower(self) -> pulumi.Output[Optional[int]]: + def min_lower(self) -> pulumi.Output[int]: """ - (default 0) Minimum number of lowercase alphabet - characters in random string. + Minimum number of lowercase alphabet characters in the result. Default value is `0`. """ return pulumi.get(self, "min_lower") @property @pulumi.getter(name="minNumeric") - def min_numeric(self) -> pulumi.Output[Optional[int]]: + def min_numeric(self) -> pulumi.Output[int]: """ - (default 0) Minimum number of numeric characters - in random string. + Minimum number of numeric characters in the result. Default value is `0`. """ return pulumi.get(self, "min_numeric") @property @pulumi.getter(name="minSpecial") - def min_special(self) -> pulumi.Output[Optional[int]]: + def min_special(self) -> pulumi.Output[int]: """ - (default 0) Minimum number of special characters - in random string. + Minimum number of special characters in the result. Default value is `0`. """ return pulumi.get(self, "min_special") @property @pulumi.getter(name="minUpper") - def min_upper(self) -> pulumi.Output[Optional[int]]: + def min_upper(self) -> pulumi.Output[int]: """ - (default 0) Minimum number of uppercase alphabet - characters in random string. + Minimum number of uppercase alphabet characters in the result. Default value is `0`. """ return pulumi.get(self, "min_upper") @property @pulumi.getter - def number(self) -> pulumi.Output[Optional[bool]]: + def number(self) -> pulumi.Output[bool]: """ - (default true) Include numeric characters in random - string. + Include numeric characters in the result. Default value is `true`. **NOTE**: This is deprecated, use `numeric` instead. """ return pulumi.get(self, "number") + @property + @pulumi.getter + def numeric(self) -> pulumi.Output[bool]: + """ + Include numeric characters in the result. Default value is `true`. + """ + return pulumi.get(self, "numeric") + @property @pulumi.getter(name="overrideSpecial") def override_special(self) -> pulumi.Output[Optional[str]]: """ - Supply your own list of special characters to - use for string generation. This overrides the default character list in the special - argument. The special argument must still be set to true for any overwritten - characters to be used in generation. + Supply your own list of special characters to use for string generation. This overrides the default character list in the special argument. The `special` argument must still be set to true for any overwritten characters to be used in generation. """ return pulumi.get(self, "override_special") @@ -767,25 +826,23 @@ def override_special(self) -> pulumi.Output[Optional[str]]: @pulumi.getter def result(self) -> pulumi.Output[str]: """ - Random string generated. + The generated random string. """ return pulumi.get(self, "result") @property @pulumi.getter - def special(self) -> pulumi.Output[Optional[bool]]: + def special(self) -> pulumi.Output[bool]: """ - (default true) Include special characters in random - string. These are `!@#$%&*()-_=+[]{}<>:?` + Include special characters in the result. These are `!@#$%&*()-_=+[]{}<>:?`. Default value is `true`. """ return pulumi.get(self, "special") @property @pulumi.getter - def upper(self) -> pulumi.Output[Optional[bool]]: + def upper(self) -> pulumi.Output[bool]: """ - (default true) Include uppercase alphabet characters - in random string. + Include uppercase alphabet characters in the result. Default value is `true`. """ return pulumi.get(self, "upper") diff --git a/sdk/python/pulumi_random/random_uuid.py b/sdk/python/pulumi_random/random_uuid.py index 00cc841cb2..334fbea486 100644 --- a/sdk/python/pulumi_random/random_uuid.py +++ b/sdk/python/pulumi_random/random_uuid.py @@ -14,41 +14,35 @@ @pulumi.input_type class RandomUuidArgs: def __init__(__self__, *, - keepers: Optional[pulumi.Input[Mapping[str, Any]]] = None): + keepers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None): """ The set of arguments for constructing a RandomUuid resource. - :param pulumi.Input[Mapping[str, Any]] keepers: Arbitrary map of values that, when changed, will - trigger a new uuid to be generated. See - the main provider documentation for more information. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] keepers: Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. """ if keepers is not None: pulumi.set(__self__, "keepers", keepers) @property @pulumi.getter - def keepers(self) -> Optional[pulumi.Input[Mapping[str, Any]]]: + def keepers(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: """ - Arbitrary map of values that, when changed, will - trigger a new uuid to be generated. See - the main provider documentation for more information. + Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. """ return pulumi.get(self, "keepers") @keepers.setter - def keepers(self, value: Optional[pulumi.Input[Mapping[str, Any]]]): + def keepers(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]): pulumi.set(self, "keepers", value) @pulumi.input_type class _RandomUuidState: def __init__(__self__, *, - keepers: Optional[pulumi.Input[Mapping[str, Any]]] = None, + keepers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, result: Optional[pulumi.Input[str]] = None): """ Input properties used for looking up and filtering RandomUuid resources. - :param pulumi.Input[Mapping[str, Any]] keepers: Arbitrary map of values that, when changed, will - trigger a new uuid to be generated. See - the main provider documentation for more information. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] keepers: Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. :param pulumi.Input[str] result: The generated uuid presented in string format. """ if keepers is not None: @@ -58,16 +52,14 @@ def __init__(__self__, *, @property @pulumi.getter - def keepers(self) -> Optional[pulumi.Input[Mapping[str, Any]]]: + def keepers(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]: """ - Arbitrary map of values that, when changed, will - trigger a new uuid to be generated. See - the main provider documentation for more information. + Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. """ return pulumi.get(self, "keepers") @keepers.setter - def keepers(self, value: Optional[pulumi.Input[Mapping[str, Any]]]): + def keepers(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]): pulumi.set(self, "keepers", value) @property @@ -88,19 +80,15 @@ class RandomUuid(pulumi.CustomResource): def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, - keepers: Optional[pulumi.Input[Mapping[str, Any]]] = None, + keepers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, __props__=None): """ - The resource `RandomUuid` generates random uuid string that is intended to be - used as unique identifiers for other resources. + The resource `RandomUuid` generates random uuid string that is intended to be used as unique identifiers for other resources. - This resource uses the `hashicorp/go-uuid` to generate a UUID-formatted string - for use with services needed a unique string identifier. + This resource uses [hashicorp/go-uuid](https://github.com/hashicorp/go-uuid) to generate a UUID-formatted string for use with services needed a unique string identifier. ## Example Usage - The following example shows how to generate a unique name for an Azure Resource Group. - ```python import pulumi import pulumi_azure as azure @@ -112,7 +100,7 @@ def __init__(__self__, ## Import - 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. Example + 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. ```sh $ pulumi import random:index/randomUuid:RandomUuid main aabbccdd-eeff-0011-2233-445566778899 @@ -120,9 +108,7 @@ def __init__(__self__, :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. - :param pulumi.Input[Mapping[str, Any]] keepers: Arbitrary map of values that, when changed, will - trigger a new uuid to be generated. See - the main provider documentation for more information. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] keepers: Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. """ ... @overload @@ -131,16 +117,12 @@ def __init__(__self__, args: Optional[RandomUuidArgs] = None, opts: Optional[pulumi.ResourceOptions] = None): """ - The resource `RandomUuid` generates random uuid string that is intended to be - used as unique identifiers for other resources. + The resource `RandomUuid` generates random uuid string that is intended to be used as unique identifiers for other resources. - This resource uses the `hashicorp/go-uuid` to generate a UUID-formatted string - for use with services needed a unique string identifier. + This resource uses [hashicorp/go-uuid](https://github.com/hashicorp/go-uuid) to generate a UUID-formatted string for use with services needed a unique string identifier. ## Example Usage - The following example shows how to generate a unique name for an Azure Resource Group. - ```python import pulumi import pulumi_azure as azure @@ -152,7 +134,7 @@ def __init__(__self__, ## Import - 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. Example + 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. ```sh $ pulumi import random:index/randomUuid:RandomUuid main aabbccdd-eeff-0011-2233-445566778899 @@ -173,7 +155,7 @@ def __init__(__self__, resource_name: str, *args, **kwargs): def _internal_init(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions] = None, - keepers: Optional[pulumi.Input[Mapping[str, Any]]] = None, + keepers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, __props__=None): opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts) if not isinstance(opts, pulumi.ResourceOptions): @@ -195,7 +177,7 @@ def _internal_init(__self__, def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions] = None, - keepers: Optional[pulumi.Input[Mapping[str, Any]]] = None, + keepers: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None, result: Optional[pulumi.Input[str]] = None) -> 'RandomUuid': """ Get an existing RandomUuid resource's state with the given name, id, and optional extra @@ -204,9 +186,7 @@ def get(resource_name: str, :param str resource_name: The unique name of the resulting resource. :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. :param pulumi.ResourceOptions opts: Options for the resource. - :param pulumi.Input[Mapping[str, Any]] keepers: Arbitrary map of values that, when changed, will - trigger a new uuid to be generated. See - the main provider documentation for more information. + :param pulumi.Input[Mapping[str, pulumi.Input[str]]] keepers: Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. :param pulumi.Input[str] result: The generated uuid presented in string format. """ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id)) @@ -219,11 +199,9 @@ def get(resource_name: str, @property @pulumi.getter - def keepers(self) -> pulumi.Output[Optional[Mapping[str, Any]]]: + def keepers(self) -> pulumi.Output[Optional[Mapping[str, str]]]: """ - Arbitrary map of values that, when changed, will - trigger a new uuid to be generated. See - the main provider documentation for more information. + Arbitrary map of values that, when changed, will trigger recreation of resource. See the main provider documentation for more information. """ return pulumi.get(self, "keepers")