This message was deleted.
# google-cloud
s
This message was deleted.
s
Google Native is pre-release. We recommend you stick to Google Classic unless you have compelling reason to use the native provider.
g
got it. is firebase available now? getting below output...but docs says it has
HostingVersion
class. trying to implement this
AttributeError: module 'pulumi_gcp.firebase' has no attribute 'HostingVersion'
error: an unhandled error occurred: python inline source runtime error: module 'pulumi_gcp.firebase' has no attribute 'HostingVersion' Traceback (most recent call last): File "/home/xaimpl/.local/lib/python3.10/site-packages/pulumi/automation/_server.py", line 81, in Run loop.run_until_complete(run_in_stack(self.program)) File "/home/xaimpl/anaconda3/envs/iacp/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete return future.result() File "/home/xaimpl/.local/lib/python3.10/site-packages/pulumi/runtime/stack.py", line 136, in run_in_stack await run_pulumi_func(lambda: Stack(func)) File "/home/xaimpl/.local/lib/python3.10/site-packages/pulumi/runtime/stack.py", line 49, in run_pulumi_func func() File "/home/xaimpl/.local/lib/python3.10/site-packages/pulumi/runtime/stack.py", line 136, in <lambda> await run_pulumi_func(lambda: Stack(func)) File "/home/xaimpl/.local/lib/python3.10/site-packages/pulumi/runtime/stack.py", line 159, in init func() File "/home/xaimpl/work/iacp/GCP/e2e_auto/24firebase.py", line 367, in pulumi_program basic_web_app, basic_web_app_config = fb_webapp() File "/home/xaimpl/work/iacp/GCP/e2e_auto/24firebase.py", line 276, in fb_webapp default_hosting_version = gcp.firebase.HostingVersion("defaultHostingVersion",
AttributeError: module 'pulumi_gcp.firebase' has no attribute 'HostingVersion'
s
Any chance you are not using the latest version of the provider? Not to user-blame, but it's almost certainly something on your end. I'd be shocked if a resource in the registry was not actually in the provider since they come from the same source (the Pulumi provider schema).
g
using the latest version of gcp plugin gcp resource 6.52.0 136 MB 1 week ago 1 hour ago anything else I should look into? how can I use/install beta, if applicable? # opts=pulumi.ResourceOptions(provider=google_beta)
s
There is no google beta. The Pulumi GCP Classic provider is actually based on the TF google-beta provider.
Before you post an issue in GH (next step), can you give me he minimal code to reproduce the issue? I'll try to eyeball it if I can.
g
sure, here it is default_hosting_site = gcp.firebase.HostingSite( "defaultHostingSite", project=GCP_project_ID, site_id="site-with-channel-1234", # opts=pulumi.ResourceOptions(provider=google_beta) ) default_hosting_version = gcp.firebase.HostingVersion( "defaultHostingVersion", site_id=default_hosting_site.site_id, config=gcp.firebase.HostingVersionConfigArgs( redirects=[gcp.firebase.HostingVersionConfigRedirectArgs( glob="/google/**", status_code=302, location="https://www.google.com", )], ), # opts=pulumi.ResourceOptions(provider=google_beta) )
s
Let me run the example in the registry and see.
g
BTW, I'm able to create other firebase resources inculding hostingsite but not hostingversion and hostingrelease
s
Yeah, checking now.
g
thanks much!!!
s
Ok, this code previews, which I think proves it's something particular to your code. (It would not preview if the resource did not exist.)
Copy code
default_hosting_site = gcp.firebase.HostingSite("defaultHostingSite",
                                                project="my-project-name",
                                                site_id="site-id",
                                                )
default_hosting_version = gcp.firebase.HostingVersion("defaultHostingVersion",
                                                      site_id=default_hosting_site.site_id,
                                                      config=gcp.firebase.HostingVersionConfigArgs(
                                                          redirects=[gcp.firebase.HostingVersionConfigRedirectArgs(
                                                              glob="/google/**",
                                                              status_code=302,
                                                              location="<https://www.google.com>",
                                                          )],
                                                      ),
                                                      )
default_hosting_release = gcp.firebase.HostingRelease("defaultHostingRelease",
                                                      site_id=default_hosting_site.site_id,
                                                      version_name=default_hosting_version.name,
                                                      message="Redirect to Google",
                                                      )
This is just the example code from the HostingVersion registry page with the bad providers stripped out.
g
just copied it as-is and changed the project and site-id but still the same output
s
What does
pip list
give you? Any chance you're not in the venv you think you are?
g
I'm in the correct env and created other stacks successfully including a stack with firebase resources. Created the github issue https://github.com/pulumi/pulumi/issues/12573 Pulumi About CLI Version 3.60.1 Go Version go1.20.2 Go Compiler gc Host OS ubuntu Version 22.04 Arch x86_64 Backend Name pulumi.com URL https://app.pulumi.com/mlops User mlops Organizations mlops
b
@gifted-room-26715 do you mind unchecking the also send to channel box if you send more messages? it makes this thread a bit difficult to follow
1
🙏 1
g
pip list output (iacp) xaimpl@ma:~/work/iacp$ pip list | grep pulumi pulumi 3.55.0 pulumi-aws 5.19.0 pulumi-docker 3.6.1 pulumi-gcp 6.49.0 pulumi-github 5.4.0 pulumi-google-native 0.28.0 pulumi-kafka 3.4.0 pulumi-kubernetes 3.24.0 pulumi-postgresql 3.6.0 pulumi-random 4.11.2
resolved by upgrading pulumi-gcp package
woohoo 1
🙌 1