-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide pulumiResourceName
and pulumiProject
, pulumiOrganization
, pulumiStack
#295
Comments
Hi! We don't really have val redisNamespace = Namespace(s"redis-cluster-namespace-$name")
redisNamespace.urn.map(_.resourceName): Output[String] I think we can add some extension syntaxes for all resources to just have this and that wouldn't be a breaking change. Adding a field to each generated resource to hold on to the logical name would be a breaking change but maybe we should make it. Do you feel that getting that name in |
Everything works great even without adding anything. Thanks!
It's perfectly fine! (And will only get better with #291...) Thank you!! |
I am having lots of fun! Thank you!!
Thanks! |
On this specific issue:
|
2. Paweł has provided docs for that today but I stopped him because I would
prefer that we document the extensions once we make this change.
1. Fun fact is - we have started with a prototype created by @prolativ in
which *everything* was able to be lifted via refinements and macro-driven
Selectable Output monad. Given the need for refinement types support in IDE
to support this feature we've went with simpler and well supported design
based on code-generated extensions. Now I personally think that said
prototype is the way to go in ergonomy of all monadic interfaces but it's
not yet ready for prime time for sure (compilation times would probably
explode as well).
About how far we *should* go with lifting of resource properties that are
in the urn - I think there's no reason to define:
```scala
extension (outputOfRes: Output[Resource])
def pulumiResourceName: Output[String] =
outputOfRes.flatMap(_.urn).map(_.resourceName)
```
The only issue I have with adding more of the props this way is that
there's a slight possibility of conflicts (but probably not if we prefix
those accessors with "pulumi"!). Going via
`outputResource.urn.resourceName` feels a bit esoteric for me - user has to
know about URNs and while they are quite basic and important concept I
don't feel they are as in-the-face as resources and outputs. I'd prefer
`outputResource.pulumiResourceName` personally as in other sdks.
Tell me what you think!
|
Hope to see it some day!
My IDE (Idea) does not let me click through to the definitions of the extension method like
I completely agree, I personally do not need access to the other components of the urn ;) |
|
Is there any benefit in conversations over question issues? I mean, beside
separation of questions and bug reports? I'm OK with that but for issues I
get emails and can just respond in Gmail. Dunno what the flow with convos
would be. I have a gh app, maybe it's fine.
…On Wed 15. Nov 2023 at 09:41, Paweł Prażak ***@***.***> wrote:
I'm glad you're having fun with Besom, please let us know if any other
issue comes to mind :)
I am having lots of fun! Thank you!!
1. I need things like
OrganizationsFunctions.getOrganization(GetOrganizationArgs) (GCP), but
I see that they are in the next release. Thanks! When is the next release
planned?
2. What are the plans for tracking changes to the providers? I am
using org.virtuslab:besom-gcp_3:6.66.0-core.0.1.0, and while 0.1.0 *is*
the latest released version of Besom, 6.66.0 is *not* the latest
released version of GCP ;)
3. Is GitHub Issues the way to contact you with questions or will
there be something more conversational (GitHub Discussions? Something else?)
Thanks!
1. yes, top-level functions have codegen part done (the provider SDK
code generation), we're working on the core part of the plumbing from the
function all the way down to gRPC call to the Pulumi engine
2. the long term plan would be to automate the releases, so we
re-release providers daily if new version is detected- thats the goal,
right now we prioritize feature parity with upstream and stabilization, but
there is a semi-automatic script for the release, so every time we release,
we release the providers with the newest versions; as to the mentioned GCP,
I've tested the 7.0.0 and it builds
3. Personally I'm happy answering GH question issues, but we should
probably enable GH discussions, @lbialy <https://github.com/lbialy>
WDYT?
—
Reply to this email directly, view it on GitHub
<#295 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACBVNUSH6EDN5TWISSC2J23YER54LAVCNFSM6AAAAAA7KCXPMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJSGAZDGMRVHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
com.pulumi.resources.Resource.pulumiResourceName
?
I agree, In spirit of that, we'd also need |
Can you make an issue for that and mark for 0.2.0? All of these small
things are 10m tasks I just need to find time to go through in one go.
…On Wed 15. Nov 2023 at 10:30, Paweł Prażak ***@***.***> wrote:
Now I personally think that said
prototype is the way to go in ergonomy of all monadic interfaces but it's
not yet ready for prime time for sure (compilation times would probably
explode as well).
Hope to see it some day!
Given the need for refinement types support in IDE
to support this feature we've went with simpler and well supported design
based on code-generated extensions.
My IDE (Idea) does not let me click through to the definitions of the
extension method like urn...
Going via
outputResource.urn.resourceName feels a bit esoteric for me - user has to
know about URNs and while they are quite basic and important concept I
don't feel they are as in-the-face as resources and outputs. I'd prefer
outputResource.pulumiResourceName personally as in other sdks.
I completely agree, outputResource.pulumiResourceName is better than
outputResource.urn.resourceName.
I personally do not need access to the other components of the urn ;)
I agree, outputResource.pulumiResourceName is more discoverable, and the
prefix avoids collisions.
In spirit of that, we'd also need pulumiProject, pulumiOrganization,
pulumiStack, as they are exposed in every SDK and tend to be useful in my
experience.
—
Reply to this email directly, view it on GitHub
<#295 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACBVNUWYIS46BBODX7ZV5WLYESDR5AVCNFSM6AAAAAA7KCXPMGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJSGA4TINBVGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
com.pulumi.resources.Resource.pulumiResourceName
?pulumiResourceName
and pulumiProject
, pulumiOrganization
, pulumiStack
If you guys do not mind getting questions in a form of issues, I am fine with that; no need to bother complicating the setup with discussions. |
In Pulumi, name given to a resource at construction time can be recovered by calling
pulumiResourceName
method on thecom.pulumi.resources.Resource
. What is the Besom way of doing this?Thanks!
The text was updated successfully, but these errors were encountered: