If I just want to group a bunch of related resourc...
# general
i
If I just want to group a bunch of related resources together within a stack, so they show up thusly in the resource hierarchy, is it best practice to form them into a component? Or is there a simpler way of doing that?
l
ComponentResource is the way to do that. It's pretty easy, you can configure a minimal one in just 5 or 6 lines.
The Pulumi / JFrog webinar earlier shows a really simple one.
m
Is there a recording, or artifacts available from that webinar?
i
perfect will check that out 🙂
Just found that trying to re-parent a bucket policy/access block onto the associated bucket really doesn’t go well with the default concurrency; tries to re-create the policy while deleting the old one or something
b
@important-appointment-55126 you can use aliases to reparent things wiht out destorying them
i
ah nice tip thanks - i’m playing around in a lab account atm so it’s interesting to see what works and what doesn’t while setting up/tearing down is cheap
been a very educational day or so 🙂
created myself a
ResourceGroup
component i can just use for ad-hoc bundling of resources; very simple as you say
b
nice to hear 🙂
l
@millions-furniture-75402 Looks like it hasn't been published yet, but it was only 4 hours ago so it's probably coming soon.
Here's the registration link, maybe this will turn into a download page when it's available? https://www.pulumi.com/webinars/sharing-and-reusing-infrastructure/
i
don’t see a way to get the current stack resource in Go.. that blog post showed the typescript version with
Copy code
pulumi.rootStackResource
but not finding the Go equivalent..
ctx.Stack()
returns a string name rather than a resource with the stack itself being an unpublished property
which is odd as the docs for Alias actual refer to
context.GetStack()
which isn’t a thing that exists https://pkg.go.dev/github.com/pulumi/pulumi/sdk/go/pulumi?tab=doc#Alias
and specifying an explicit
ParentURN
to the alias with the stack’s URN still seems to want the resource to be deleted and recreated