bitter-oil-46081
08/01/2019, 8:39 PMOne way is i use python subprocess to fire these commands , i was looking if pumuli provides these functions as library i can importWe do not support this today, It is something we'd like to look into in a few months: https://github.com/pulumi/pulumi/issues/2287
bitter-oil-46081
08/01/2019, 8:39 PMbrief-apartment-69928
08/01/2019, 10:32 PMbrief-apartment-69928
08/01/2019, 10:35 PMdef get_project(self):
return gcp.organizations.get_project(project_id=self.project_name)
brief-apartment-69928
08/01/2019, 10:35 PMDiagnostics:
pulumi:pulumi:Stack (project-factory-prod):
<coroutine object get_project at 0x7f761ffaf448>
./__main__.py:61: RuntimeWarning: coroutine 'get_project' was never awaited
a.prj_create()
RuntimeWarning: Enable tracemalloc to get the object allocation traceback
high-translator-22614
08/06/2019, 4:59 PMget*()
functions after upgrading, burried in the changelog is "Make pulumi.runtime.invoke
synchronous.", which is Pulumi coredev speak for "data sources now block and return actual values"microscopic-florist-22719
08/06/2019, 5:54 PMnote that we are doing this in a non-breaking way so that data sources can be used either synchronously or asynchronously.
microscopic-florist-22719
08/06/2019, 5:54 PMhigh-translator-22614
08/06/2019, 5:54 PMwhite-jewelry-95626
08/07/2019, 9:12 AMwhite-jewelry-95626
08/07/2019, 9:12 AMwhite-jewelry-95626
08/07/2019, 9:12 AMwhite-jewelry-95626
08/07/2019, 9:13 AMhigh-translator-22614
08/07/2019, 2:04 PMwhite-jewelry-95626
08/07/2019, 2:17 PMwhite-jewelry-95626
08/07/2019, 2:17 PMstraight-doctor-43078
08/19/2019, 12:50 PM# Resource group
resource_group = core.ResourceGroup(...)
Thank you in advance!straight-doctor-43078
08/19/2019, 2:24 PMimport pulumi
from pulumi import ResourceOptions
from pulumi_azure import core
# Resource group
resource_group = core.ResourceGroup("rg", name="Existing-RG", location="West US", opts=ResourceOptions(import_="/subscriptions/foo123-456-789-012/resourceGroups/Existing-RG"))
May I ask still somebody more experienced to check it and tell me, I am not doing it wrong? Thank youhigh-translator-22614
08/19/2019, 3:02 PMhigh-translator-22614
08/19/2019, 3:03 PMnew Resource(name, args, opts)
becomes Python's Resource(name, **args, opts=ResourceOptions(**opts))
straight-doctor-43078
08/19/2019, 3:41 PMhigh-translator-22614
08/19/2019, 3:42 PMhigh-translator-22614
08/19/2019, 8:22 PMhigh-translator-22614
08/19/2019, 8:23 PMhigh-translator-22614
08/23/2019, 3:18 PMhigh-translator-22614
08/23/2019, 3:20 PMhigh-translator-22614
08/23/2019, 3:20 PMlittle-river-49422
09/06/2019, 5:06 PMlittle-river-49422
09/06/2019, 5:18 PMcolossal-room-15708
09/08/2019, 4:52 AMcolossal-room-15708
09/08/2019, 4:52 AMhigh-translator-22614
09/09/2019, 5:11 PMpulumi_docker
does not exist for Python yetcolossal-room-15708
09/09/2019, 8:46 PMwhite-balloon-205
09/09/2019, 10:21 PMdocker.Image
component to be a native component so that it can more easily fit into deployment lifecycle (a few of the issues in that repro are blocked on doing this before we can address them properly). Doing so would also make this available in Python.
But this library is also just some convenience wrappers - you can do the same yourself if you want for targeted use cases - or port some/all of the existing library there to Python. So definitely these same scenarios are possible in Python as well - and we hope to have the exact same libraries also available in the future.colossal-room-15708
09/09/2019, 10:42 PMwhite-balloon-205
09/09/2019, 10:51 PMdocker.Image
it is done inside a resource, but you don’t really have to. You could just have a function which invokes docker build
and conditionally docker push
only when not in preview.colossal-room-15708
09/09/2019, 10:55 PM