sparse-intern-71089
07/25/2023, 9:21 PMcool-dress-96114
07/25/2023, 9:21 PMprovider, err := random.NewProvider(ctx, "rand", &random.ProviderArgs{})
if err != nil {
return err
}
a, err := random.NewRandomInteger(ctx, "a", &random.RandomIntegerArgs{
Max: <http://pulumi.Int|pulumi.Int>(10000),
Min: <http://pulumi.Int|pulumi.Int>(1),
Seed: pulumi.Sprintf("%s", time.Now().String()),
}, pulumi.Provider(provider))
if err != nil {
return err
}
b, err := random.NewRandomInteger(ctx, "b", &random.RandomIntegerArgs{
Max: <http://pulumi.Int|pulumi.Int>(10000),
Min: <http://pulumi.Int|pulumi.Int>(1),
Seed: pulumi.Sprintf("%s", time.Now().String(), a.Result),
}, pulumi.Provider(provider))
if err != nil {
return err
}
_, err = random.NewRandomInteger(ctx, "c", &random.RandomIntegerArgs{
Max: <http://pulumi.Int|pulumi.Int>(10000),
Min: <http://pulumi.Int|pulumi.Int>(1),
Seed: pulumi.Sprintf("%s%d", time.Now().String(), b.Result),
}, pulumi.Provider(provider))
if err != nil {
return err
}
_, err = random.NewRandomInteger(ctx, "d", &random.RandomIntegerArgs{
Max: <http://pulumi.Int|pulumi.Int>(10000),
Min: <http://pulumi.Int|pulumi.Int>(1),
Seed: pulumi.Sprintf("%s", time.Now().String()),
}, pulumi.Provider(provider))
if err != nil {
return err
}
Note that with the Seed
parameter changing for all 3 resources, this is simulating all 3 resources of changes queued up and waiting to be deployed. Trying to figure out how to delay deploying a
Edit: Updated with a provider, same issue still manifests.cool-dress-96114
07/25/2023, 9:21 PM» pulumi up -t 'urn:pulumi:scratch::pragma::random:index/randomInteger:RandomInteger::b'
Previewing update (scratch):
Type Name Plan Info
pulumi:pulumi:Stack pragma-scratch
+- └─ random:index:RandomInteger b replace [diff: ~seed]
cool-dress-96114
07/25/2023, 9:22 PM» pulumi up -t 'urn:pulumi:scratch::pragma::random:index/randomInteger:RandomInteger::b' --target-dependents
Previewing update (scratch):
Type Name Plan Info
pulumi:pulumi:Stack pragma-scratch
+- ├─ random:index:RandomInteger a replace [diff: ~seed]
+- ├─ random:index:RandomInteger b replace [diff: ~seed]
+- └─ random:index:RandomInteger c replace [diff: ~seed]
cool-dress-96114
07/25/2023, 11:02 PMd
) it still shows up as one to change with the --target-dependents
flag
» pulumi up -t 'urn:pulumi:scratch::pragma::random:index/randomInteger:RandomInteger::b' --target-dependents
Previewing update (scratch):
Type Name Plan Info
pulumi:pulumi:Stack pragma-scratch
+- ├─ random:index:RandomInteger a replace [diff: ~seed]
+ ├─ random:index:RandomInteger d create
+- ├─ random:index:RandomInteger b replace [diff: ~seed]
+- └─ random:index:RandomInteger c replace [diff: ~seed]
echoing-dinner-19531
07/26/2023, 12:16 PMcool-dress-96114
07/26/2023, 2:11 PMcool-dress-96114
07/26/2023, 3:22 PMctx.RegisterComponentResource
call and a provider map, then passing that down as a parent to all subresources
pulumi.ProviderMap(map[string]pulumi.ProviderResource{
"aws": awsProvider,
"buildkite": buildkiteProvider,
"github": githubProvider,
"auth0": auth0Provider,
}
Is this change going to fix what I think is a similar issue for things with non-defaulted providers?cool-dress-96114
07/26/2023, 3:24 PMcool-dress-96114
07/26/2023, 3:33 PMechoing-dinner-19531
07/26/2023, 3:40 PMcool-dress-96114
07/26/2023, 4:06 PMechoing-dinner-19531
07/26/2023, 4:07 PMcool-dress-96114
07/26/2023, 5:13 PM