diff --git a/docs/_index.md b/docs/_index.md index 745fc29cc..76b2e1a74 100644 --- a/docs/_index.md +++ b/docs/_index.md @@ -62,11 +62,11 @@ const server = new random.RandomId("server", { }, byteLength: 8, }); -const serverInstance = new aws.ec2.Instance("server", { +const serverInstance = new aws.ec2/instance.Instance("server", { tags: { - Name: pulumi.interpolate`web-server ${server.hex}`, + Name: `web-server ${server.hex}`, }, - ami: server.keepers.apply(keepers => keepers?.amiId), + ami: server.keepers?.amiId, }); ``` {{% /choosable %}} @@ -81,11 +81,11 @@ server = random.RandomId("server", "ami_id": ami_id, }, byte_length=8) -server_instance = aws.ec2.Instance("server", +server_instance = aws.ec2.instance.Instance("server", tags={ - "Name": server.hex.apply(lambda hex: f"web-server {hex}"), + Name: fweb-server {server.hex}, }, - ami=server.keepers["amiId"]) + ami=server.keepers.ami_id) ``` {{% /choosable %}} {{% choosable language csharp %}} @@ -107,13 +107,13 @@ return await Deployment.RunAsync(() => ByteLength = 8, }); - var serverInstance = new Aws.Ec2.Instance("server", new() + var serverInstance = new Aws.Ec2.Instance.Instance("server", new() { Tags = { - { "Name", server.Hex.Apply(hex => $"web-server {hex}") }, + { "Name", $"web-server {server.Hex}" }, }, - Ami = server.Keepers.Apply(keepers => keepers?.AmiId), + Ami = server.Keepers?.AmiId, }); }); @@ -127,7 +127,7 @@ package main import ( "fmt" - "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" + "github.com/pulumi/pulumi-aws/sdk/go/aws/ec2" "github.com/pulumi/pulumi-random/sdk/v4/go/random" "github.com/pulumi/pulumi/sdk/v3/go/pulumi" ) @@ -143,15 +143,11 @@ func main() { if err != nil { return err } - _, err = ec2.NewInstance(ctx, "server", &ec2.InstanceArgs{ - Tags: pulumi.StringMap{ - "Name": server.Hex.ApplyT(func(hex string) (string, error) { - return fmt.Sprintf("web-server %v", hex), nil - }).(pulumi.StringOutput), + _, err = ec2 / instance.NewInstance(ctx, "server", &ec2/instance.InstanceArgs{ + Tags: map[string]interface{}{ + "Name": pulumi.Sprintf("web-server %v", server.Hex), }, - Ami: pulumi.String(server.Keepers.ApplyT(func(keepers map[string]string) (*string, error) { - return &keepers.AmiId, nil - }).(pulumi.StringPtrOutput)), + Ami: server.Keepers.AmiId, }) if err != nil { return err @@ -209,8 +205,8 @@ public class App { .build()); var serverInstance = new Instance("serverInstance", InstanceArgs.builder() - .tags(Map.of("Name", server.hex().applyValue(hex -> String.format("web-server %s", hex)))) - .ami(server.keepers().applyValue(keepers -> keepers.amiId())) + .tags(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference)) + .ami(server.keepers().amiId()) .build()); } diff --git a/sdk/dotnet/RandomId.cs b/sdk/dotnet/RandomId.cs index fd438287e..b06524d21 100644 --- a/sdk/dotnet/RandomId.cs +++ b/sdk/dotnet/RandomId.cs @@ -47,13 +47,13 @@ namespace Pulumi.Random /// ByteLength = 8, /// }); /// - /// var serverInstance = new Aws.Ec2.Instance("server", new() + /// var serverInstance = new Aws.Ec2.Instance.Instance("server", new() /// { /// Tags = /// { - /// { "Name", server.Hex.Apply(hex => $"web-server {hex}") }, + /// { "Name", $"web-server {server.Hex}" }, /// }, - /// Ami = server.Keepers.Apply(keepers => keepers?.AmiId), + /// Ami = server.Keepers?.AmiId, /// }); /// /// }); diff --git a/sdk/dotnet/RandomInteger.cs b/sdk/dotnet/RandomInteger.cs index 3768a55aa..936a2d7ed 100644 --- a/sdk/dotnet/RandomInteger.cs +++ b/sdk/dotnet/RandomInteger.cs @@ -37,16 +37,16 @@ namespace Pulumi.Random /// }, /// }); /// - /// var main = new Aws.Alb.ListenerRule("main", new() + /// var main = new Aws.Alb.ListenerRule.ListenerRule("main", new() /// { - /// ListenerArn = priority.Keepers.Apply(keepers => keepers?.ListenerArn), + /// ListenerArn = priority.Keepers?.ListenerArn, /// Priority = priority.Result, /// Actions = new[] /// { - /// new Aws.Alb.Inputs.ListenerRuleActionArgs + /// /// { - /// Type = "forward", - /// TargetGroupArn = targetGroupArn, + /// { "type", "forward" }, + /// { "targetGroupArn", targetGroupArn }, /// }, /// }, /// }); diff --git a/sdk/dotnet/RandomPassword.cs b/sdk/dotnet/RandomPassword.cs index 153986f28..ce23bbc71 100644 --- a/sdk/dotnet/RandomPassword.cs +++ b/sdk/dotnet/RandomPassword.cs @@ -28,9 +28,9 @@ namespace Pulumi.Random /// OverrideSpecial = "!#$%&*()-_=+[]{}<>:?", /// }); /// - /// var example = new Aws.Rds.Instance("example", new() + /// var example = new Aws.Rds.Instance.Instance("example", new() /// { - /// InstanceClass = Aws.Rds.InstanceType.T3_Micro, + /// InstanceClass = "db.t3.micro", /// AllocatedStorage = 64, /// Engine = "mysql", /// Username = "someone", diff --git a/sdk/dotnet/RandomPet.cs b/sdk/dotnet/RandomPet.cs index 5dc4cbd30..cb74792fa 100644 --- a/sdk/dotnet/RandomPet.cs +++ b/sdk/dotnet/RandomPet.cs @@ -36,13 +36,13 @@ namespace Pulumi.Random /// }, /// }); /// - /// var serverInstance = new Aws.Ec2.Instance("server", new() + /// var serverInstance = new Aws.Ec2.Instance.Instance("server", new() /// { /// Tags = /// { - /// { "Name", server.Id.Apply(id => $"web-server-{id}") }, + /// { "Name", $"web-server-{server.Id}" }, /// }, - /// Ami = server.Keepers.Apply(keepers => keepers?.AmiId), + /// Ami = server.Keepers?.AmiId, /// }); /// /// }); diff --git a/sdk/dotnet/RandomShuffle.cs b/sdk/dotnet/RandomShuffle.cs index 76e5e4a28..19cbc709e 100644 --- a/sdk/dotnet/RandomShuffle.cs +++ b/sdk/dotnet/RandomShuffle.cs @@ -35,7 +35,7 @@ namespace Pulumi.Random /// ResultCount = 2, /// }); /// - /// var example = new Aws.Elb.LoadBalancer("example", new() + /// var example = new Aws.Elb.LoadBalancer.LoadBalancer("example", new() /// { /// AvailabilityZones = az.Results, /// }); diff --git a/sdk/go/random/randomId.go b/sdk/go/random/randomId.go index 0f8f114aa..ddff679a9 100644 --- a/sdk/go/random/randomId.go +++ b/sdk/go/random/randomId.go @@ -36,7 +36,7 @@ import ( // // "fmt" // -// "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" +// "github.com/pulumi/pulumi-aws/sdk/go/aws/ec2" // "github.com/pulumi/pulumi-random/sdk/v4/go/random" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // @@ -55,15 +55,11 @@ import ( // if err != nil { // return err // } -// _, err = ec2.NewInstance(ctx, "server", &ec2.InstanceArgs{ -// Tags: pulumi.StringMap{ -// "Name": server.Hex.ApplyT(func(hex string) (string, error) { -// return fmt.Sprintf("web-server %v", hex), nil -// }).(pulumi.StringOutput), +// _, err = ec2 / instance.NewInstance(ctx, "server", &ec2/instance.InstanceArgs{ +// Tags: map[string]interface{}{ +// "Name": pulumi.Sprintf("web-server %v", server.Hex), // }, -// Ami: pulumi.String(server.Keepers.ApplyT(func(keepers map[string]string) (*string, error) { -// return &keepers.AmiId, nil -// }).(pulumi.StringPtrOutput)), +// Ami: server.Keepers.AmiId, // }) // if err != nil { // return err diff --git a/sdk/go/random/randomInteger.go b/sdk/go/random/randomInteger.go index 88f8aa40a..1ef07f203 100644 --- a/sdk/go/random/randomInteger.go +++ b/sdk/go/random/randomInteger.go @@ -23,7 +23,7 @@ import ( // // import ( // -// "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/alb" +// "github.com/pulumi/pulumi-aws/sdk/go/aws/alb" // "github.com/pulumi/pulumi-random/sdk/v4/go/random" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // @@ -43,15 +43,13 @@ import ( // if err != nil { // return err // } -// _, err = alb.NewListenerRule(ctx, "main", &alb.ListenerRuleArgs{ -// ListenerArn: pulumi.String(priority.Keepers.ApplyT(func(keepers map[string]string) (*string, error) { -// return &keepers.ListenerArn, nil -// }).(pulumi.StringPtrOutput)), -// Priority: priority.Result, -// Actions: alb.ListenerRuleActionArray{ -// &alb.ListenerRuleActionArgs{ -// Type: pulumi.String("forward"), -// TargetGroupArn: pulumi.Any(targetGroupArn), +// _, err = alb / listenerRule.NewListenerRule(ctx, "main", &alb/listenerRule.ListenerRuleArgs{ +// ListenerArn: priority.Keepers.ListenerArn, +// Priority: priority.Result, +// Actions: []map[string]interface{}{ +// map[string]interface{}{ +// "type": "forward", +// "targetGroupArn": targetGroupArn, // }, // }, // }) diff --git a/sdk/go/random/randomPassword.go b/sdk/go/random/randomPassword.go index 7cf90a0c7..fc2d8a888 100644 --- a/sdk/go/random/randomPassword.go +++ b/sdk/go/random/randomPassword.go @@ -19,7 +19,7 @@ import ( // // import ( // -// "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/rds" +// "github.com/pulumi/pulumi-aws/sdk/go/aws/rds" // "github.com/pulumi/pulumi-random/sdk/v4/go/random" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // @@ -35,11 +35,11 @@ import ( // if err != nil { // return err // } -// _, err = rds.NewInstance(ctx, "example", &rds.InstanceArgs{ -// InstanceClass: pulumi.String(rds.InstanceType_T3_Micro), -// AllocatedStorage: pulumi.Int(64), -// Engine: pulumi.String("mysql"), -// Username: pulumi.String("someone"), +// _, err = rds / instance.NewInstance(ctx, "example", &rds/instance.InstanceArgs{ +// InstanceClass: "db.t3.micro", +// AllocatedStorage: 64, +// Engine: "mysql", +// Username: "someone", // Password: password.Result, // }) // if err != nil { diff --git a/sdk/go/random/randomPet.go b/sdk/go/random/randomPet.go index d49709010..1949de073 100644 --- a/sdk/go/random/randomPet.go +++ b/sdk/go/random/randomPet.go @@ -24,7 +24,7 @@ import ( // // "fmt" // -// "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ec2" +// "github.com/pulumi/pulumi-aws/sdk/go/aws/ec2" // "github.com/pulumi/pulumi-random/sdk/v4/go/random" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // @@ -43,15 +43,11 @@ import ( // if err != nil { // return err // } -// _, err = ec2.NewInstance(ctx, "server", &ec2.InstanceArgs{ -// Tags: pulumi.StringMap{ -// "Name": server.ID().ApplyT(func(id string) (string, error) { -// return fmt.Sprintf("web-server-%v", id), nil -// }).(pulumi.StringOutput), +// _, err = ec2 / instance.NewInstance(ctx, "server", &ec2/instance.InstanceArgs{ +// Tags: map[string]interface{}{ +// "Name": pulumi.Sprintf("web-server-%v", server.ID()), // }, -// Ami: pulumi.String(server.Keepers.ApplyT(func(keepers map[string]string) (*string, error) { -// return &keepers.AmiId, nil -// }).(pulumi.StringPtrOutput)), +// Ami: server.Keepers.AmiId, // }) // if err != nil { // return err diff --git a/sdk/go/random/randomShuffle.go b/sdk/go/random/randomShuffle.go index 4b2defef7..d01bf2273 100644 --- a/sdk/go/random/randomShuffle.go +++ b/sdk/go/random/randomShuffle.go @@ -21,7 +21,7 @@ import ( // // import ( // -// "github.com/pulumi/pulumi-aws/sdk/v6/go/aws/elb" +// "github.com/pulumi/pulumi-aws/sdk/go/aws/elb" // "github.com/pulumi/pulumi-random/sdk/v4/go/random" // "github.com/pulumi/pulumi/sdk/v3/go/pulumi" // @@ -41,7 +41,7 @@ import ( // if err != nil { // return err // } -// _, err = elb.NewLoadBalancer(ctx, "example", &elb.LoadBalancerArgs{ +// _, err = elb / loadBalancer.NewLoadBalancer(ctx, "example", &elb/loadBalancer.LoadBalancerArgs{ // AvailabilityZones: az.Results, // }) // if err != nil { diff --git a/sdk/java/build.gradle b/sdk/java/build.gradle index a20c07447..79abd76eb 100644 --- a/sdk/java/build.gradle +++ b/sdk/java/build.gradle @@ -44,7 +44,7 @@ repositories { dependencies { implementation("com.google.code.findbugs:jsr305:3.0.2") implementation("com.google.code.gson:gson:2.8.9") - implementation("com.pulumi:pulumi:0.16.1") + implementation("com.pulumi:pulumi:0.17.0") } task sourcesJar(type: Jar) { 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 5e5f13eab..b4a0651b9 100644 --- a/sdk/java/src/main/java/com/pulumi/random/RandomId.java +++ b/sdk/java/src/main/java/com/pulumi/random/RandomId.java @@ -67,8 +67,8 @@ * .build()); * * var serverInstance = new Instance("serverInstance", InstanceArgs.builder() - * .tags(Map.of("Name", server.hex().applyValue(hex -> String.format("web-server %s", hex)))) - * .ami(server.keepers().applyValue(keepers -> keepers.amiId())) + * .tags(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference)) + * .ami(server.keepers().amiId()) * .build()); * * } 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 e989b4b7d..36e0c7de5 100644 --- a/sdk/java/src/main/java/com/pulumi/random/RandomInteger.java +++ b/sdk/java/src/main/java/com/pulumi/random/RandomInteger.java @@ -35,7 +35,6 @@ * import com.pulumi.random.RandomIntegerArgs; * import com.pulumi.aws.alb.ListenerRule; * import com.pulumi.aws.alb.ListenerRuleArgs; - * import com.pulumi.aws.alb.inputs.ListenerRuleActionArgs; * import java.util.List; * import java.util.ArrayList; * import java.util.Map; @@ -58,12 +57,9 @@ * .build()); * * var main = new ListenerRule("main", ListenerRuleArgs.builder() - * .listenerArn(priority.keepers().applyValue(keepers -> keepers.listenerArn())) + * .listenerArn(priority.keepers().listenerArn()) * .priority(priority.result()) - * .actions(ListenerRuleActionArgs.builder() - * .type("forward") - * .targetGroupArn(targetGroupArn) - * .build()) + * .actions(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference)) * .build()); * * } 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 2e36d4ae5..9f0406c41 100644 --- a/sdk/java/src/main/java/com/pulumi/random/RandomPet.java +++ b/sdk/java/src/main/java/com/pulumi/random/RandomPet.java @@ -56,8 +56,8 @@ * .build()); * * var serverInstance = new Instance("serverInstance", InstanceArgs.builder() - * .tags(Map.of("Name", server.id().applyValue(id -> String.format("web-server-%s", id)))) - * .ami(server.keepers().applyValue(keepers -> keepers.amiId())) + * .tags(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference)) + * .ami(server.keepers().amiId()) * .build()); * * } diff --git a/sdk/nodejs/randomId.ts b/sdk/nodejs/randomId.ts index 1bbeece6e..745cf05e6 100644 --- a/sdk/nodejs/randomId.ts +++ b/sdk/nodejs/randomId.ts @@ -35,11 +35,11 @@ import * as utilities from "./utilities"; * }, * byteLength: 8, * }); - * const serverInstance = new aws.ec2.Instance("server", { + * const serverInstance = new aws.ec2/instance.Instance("server", { * tags: { - * Name: pulumi.interpolate`web-server ${server.hex}`, + * Name: `web-server ${server.hex}`, * }, - * ami: server.keepers.apply(keepers => keepers?.amiId), + * ami: server.keepers?.amiId, * }); * ``` * diff --git a/sdk/nodejs/randomInteger.ts b/sdk/nodejs/randomInteger.ts index 71cc1c2cc..9e9608973 100644 --- a/sdk/nodejs/randomInteger.ts +++ b/sdk/nodejs/randomInteger.ts @@ -25,8 +25,8 @@ import * as utilities from "./utilities"; * listener_arn: listenerArn, * }, * }); - * const main = new aws.alb.ListenerRule("main", { - * listenerArn: priority.keepers.apply(keepers => keepers?.listenerArn), + * const main = new aws.alb/listenerRule.ListenerRule("main", { + * listenerArn: priority.keepers?.listenerArn, * priority: priority.result, * actions: [{ * type: "forward", diff --git a/sdk/nodejs/randomPassword.ts b/sdk/nodejs/randomPassword.ts index 3afbcacf0..d95066a31 100644 --- a/sdk/nodejs/randomPassword.ts +++ b/sdk/nodejs/randomPassword.ts @@ -17,8 +17,8 @@ import * as utilities from "./utilities"; * special: true, * overrideSpecial: "!#$%&*()-_=+[]{}<>:?", * }); - * const example = new aws.rds.Instance("example", { - * instanceClass: aws.rds.InstanceType.T3_Micro, + * const example = new aws.rds/instance.Instance("example", { + * instanceClass: "db.t3.micro", * allocatedStorage: 64, * engine: "mysql", * username: "someone", diff --git a/sdk/nodejs/randomPet.ts b/sdk/nodejs/randomPet.ts index 221f3ed72..3ab72525f 100644 --- a/sdk/nodejs/randomPet.ts +++ b/sdk/nodejs/randomPet.ts @@ -22,11 +22,11 @@ import * as utilities from "./utilities"; * const server = new random.RandomPet("server", {keepers: { * ami_id: amiId, * }}); - * const serverInstance = new aws.ec2.Instance("server", { + * const serverInstance = new aws.ec2/instance.Instance("server", { * tags: { - * Name: pulumi.interpolate`web-server-${server.id}`, + * Name: `web-server-${server.id}`, * }, - * ami: server.keepers.apply(keepers => keepers?.amiId), + * ami: server.keepers?.amiId, * }); * ``` */ diff --git a/sdk/nodejs/randomShuffle.ts b/sdk/nodejs/randomShuffle.ts index e93b0fb52..be2590c51 100644 --- a/sdk/nodejs/randomShuffle.ts +++ b/sdk/nodejs/randomShuffle.ts @@ -23,7 +23,7 @@ import * as utilities from "./utilities"; * ], * resultCount: 2, * }); - * const example = new aws.elb.LoadBalancer("example", {availabilityZones: az.results}); + * const example = new aws.elb/loadBalancer.LoadBalancer("example", {availabilityZones: az.results}); * ``` */ export class RandomShuffle extends pulumi.CustomResource { diff --git a/sdk/python/pulumi_random/random_id.py b/sdk/python/pulumi_random/random_id.py index fb37a7a64..8fee706f0 100644 --- a/sdk/python/pulumi_random/random_id.py +++ b/sdk/python/pulumi_random/random_id.py @@ -230,11 +230,11 @@ def __init__(__self__, "ami_id": ami_id, }, byte_length=8) - server_instance = aws.ec2.Instance("server", + server_instance = aws.ec2.instance.Instance("server", tags={ - "Name": server.hex.apply(lambda hex: f"web-server {hex}"), + Name: fweb-server {server.hex}, }, - ami=server.keepers["amiId"]) + ami=server.keepers.ami_id) ``` ## Import @@ -299,11 +299,11 @@ def __init__(__self__, "ami_id": ami_id, }, byte_length=8) - server_instance = aws.ec2.Instance("server", + server_instance = aws.ec2.instance.Instance("server", tags={ - "Name": server.hex.apply(lambda hex: f"web-server {hex}"), + Name: fweb-server {server.hex}, }, - ami=server.keepers["amiId"]) + ami=server.keepers.ami_id) ``` ## Import diff --git a/sdk/python/pulumi_random/random_integer.py b/sdk/python/pulumi_random/random_integer.py index b95455ef0..e60c7fedc 100644 --- a/sdk/python/pulumi_random/random_integer.py +++ b/sdk/python/pulumi_random/random_integer.py @@ -204,12 +204,12 @@ def __init__(__self__, keepers={ "listener_arn": listener_arn, }) - main = aws.alb.ListenerRule("main", - listener_arn=priority.keepers["listenerArn"], + main = aws.alb.listener_rule.ListenerRule("main", + listener_arn=priority.keepers.listener_arn, priority=priority.result, actions=[{ - "type": "forward", - "target_group_arn": target_group_arn, + type: forward, + targetGroupArn: target_group_arn, }]) ``` @@ -260,12 +260,12 @@ def __init__(__self__, keepers={ "listener_arn": listener_arn, }) - main = aws.alb.ListenerRule("main", - listener_arn=priority.keepers["listenerArn"], + main = aws.alb.listener_rule.ListenerRule("main", + listener_arn=priority.keepers.listener_arn, priority=priority.result, actions=[{ - "type": "forward", - "target_group_arn": target_group_arn, + type: forward, + targetGroupArn: target_group_arn, }]) ``` diff --git a/sdk/python/pulumi_random/random_password.py b/sdk/python/pulumi_random/random_password.py index 2bda72b6f..6e36b5aab 100644 --- a/sdk/python/pulumi_random/random_password.py +++ b/sdk/python/pulumi_random/random_password.py @@ -485,11 +485,11 @@ def __init__(__self__, length=16, special=True, override_special="!#$%&*()-_=+[]{}<>:?") - example = aws.rds.Instance("example", - instance_class=aws.rds.InstanceType.T3_MICRO, + example = aws.rds.instance.Instance("example", + instance_class=db.t3.micro, allocated_storage=64, - engine="mysql", - username="someone", + engine=mysql, + username=someone, password=password.result) ``` @@ -530,11 +530,11 @@ def __init__(__self__, length=16, special=True, override_special="!#$%&*()-_=+[]{}<>:?") - example = aws.rds.Instance("example", - instance_class=aws.rds.InstanceType.T3_MICRO, + example = aws.rds.instance.Instance("example", + instance_class=db.t3.micro, allocated_storage=64, - engine="mysql", - username="someone", + engine=mysql, + username=someone, password=password.result) ``` diff --git a/sdk/python/pulumi_random/random_pet.py b/sdk/python/pulumi_random/random_pet.py index ef09998b5..bb410c7e6 100644 --- a/sdk/python/pulumi_random/random_pet.py +++ b/sdk/python/pulumi_random/random_pet.py @@ -188,11 +188,11 @@ def __init__(__self__, server = random.RandomPet("server", keepers={ "ami_id": ami_id, }) - server_instance = aws.ec2.Instance("server", + server_instance = aws.ec2.instance.Instance("server", tags={ - "Name": server.id.apply(lambda id: f"web-server-{id}"), + Name: fweb-server-{server.id}, }, - ami=server.keepers["amiId"]) + ami=server.keepers.ami_id) ``` :param str resource_name: The name of the resource. @@ -226,11 +226,11 @@ def __init__(__self__, server = random.RandomPet("server", keepers={ "ami_id": ami_id, }) - server_instance = aws.ec2.Instance("server", + server_instance = aws.ec2.instance.Instance("server", tags={ - "Name": server.id.apply(lambda id: f"web-server-{id}"), + Name: fweb-server-{server.id}, }, - ami=server.keepers["amiId"]) + ami=server.keepers.ami_id) ``` :param str resource_name: The name of the resource. diff --git a/sdk/python/pulumi_random/random_shuffle.py b/sdk/python/pulumi_random/random_shuffle.py index 298636160..fcc01f07b 100644 --- a/sdk/python/pulumi_random/random_shuffle.py +++ b/sdk/python/pulumi_random/random_shuffle.py @@ -205,7 +205,7 @@ def __init__(__self__, "us-west-1e", ], result_count=2) - example = aws.elb.LoadBalancer("example", availability_zones=az.results) + example = aws.elb.load_balancer.LoadBalancer("example", availability_zones=az.results) ``` :param str resource_name: The name of the resource. @@ -239,7 +239,7 @@ def __init__(__self__, "us-west-1e", ], result_count=2) - example = aws.elb.LoadBalancer("example", availability_zones=az.results) + example = aws.elb.load_balancer.LoadBalancer("example", availability_zones=az.results) ``` :param str resource_name: The name of the resource.