https://pulumi.com logo
Join the conversationJoin Slack
Channels
announcements
automation-api
aws
azure
blog-posts
built-with-pulumi
cloudengineering
cloudengineering-support
content-share
contribex
contribute
docs
dotnet
finops
general
getting-started
gitlab
golang
google-cloud
hackathon-03-19-2020
hacktoberfest
install
java
jobs
kubernetes
learn-pulumi-events
linen
localstack
multi-language-hackathon
office-hours
oracle-cloud-infrastructure
plugin-framework
pulumi-cdk
pulumi-crosscode
pulumi-deployments
pulumi-kubernetes-operator
pulumi-service
pulumiverse
python
registry
status
testingtesting123
testingtesting321
typescript
welcome
workshops
yaml
Powered by Linen
python
  • l

    little-river-49422

    02/16/2019, 12:15 PM
    hey folks, created* a PR, i hope it makes sense
  • l

    little-river-49422

    02/16/2019, 12:25 PM
    i intend to write up a simple python\kubernetes example for the docs and also push these examples to examples repo?
  • c

    creamy-potato-29402

    02/16/2019, 7:07 PM
    sweet!
  • l

    little-river-49422

    02/16/2019, 7:27 PM
    hey folks, any ideas how to use servicelist in kubernetes python package?
  • l

    little-river-49422

    02/16/2019, 7:28 PM
    only reasonable reference I've found is: https://github.com/pulumi/pulumi-kubernetes/blob/master/tests/integration/get/step1/index.ts#L23
  • l

    little-river-49422

    02/16/2019, 7:29 PM
    class pulumi_kubernetes.core.v1.ServiceList(__name__, __opts__=None, items=None, metadata=None)¶
    ServiceList holds a list of services.
  • l

    little-river-49422

    02/16/2019, 7:30 PM
    its like next level docs, what do I infer from this? 🙂
    c
    • 2
    • 27
  • l

    little-river-49422

    02/16/2019, 7:53 PM
    Plan apply failed: failed to discover namespace info for /v1, Kind=ServiceList
  • l

    little-river-49422

    02/16/2019, 7:53 PM
    I have namespace defined at provider level and also doing this:
    service_list = ServiceList(
            'list_k8s_services',
            items=[],
            metadata={
                "namespace": "kube-system"
            },    __opts__=ResourceOptions(provider=custom_provider)
        )
  • p

    proud-artist-4864

    02/17/2019, 1:31 PM
    message has been deleted
    a
    • 2
    • 4
  • l

    little-river-49422

    02/17/2019, 2:24 PM
    hey, this is what is working for me for azure stuff:
    👍 1
  • l

    little-river-49422

    02/17/2019, 2:24 PM
    https://pulumi-community.slack.com/archives/CDE799L1M/p1549782928179700
  • l

    little-river-49422

    02/17/2019, 2:25 PM
    i suppose you need to do roughly the same, define a async function and call your
    get
    inside of it with
    await
    p
    • 2
    • 2
  • l

    little-river-49422

    02/17/2019, 7:20 PM
    hey folks, i'm trying to understand how to use depends on without passing in the resource variable
  • l

    little-river-49422

    02/17/2019, 7:22 PM
    can I use resource urn or something? that I can construct easily without passing in resource variable throughout the configuration. the thing is, I've got "proxy" functions I'm calling, I could, use one more input parameter to pass to the proxy functions, but I'd like to avoid that, ideally
  • l

    little-river-49422

    02/17/2019, 7:33 PM
    I think I foundsomething: https://github.com/pulumi/pulumi/blob/9eba0d3b378d5685e4312046cfb2a53542c5b70f/sdk/python/lib/pulumi/resource.py#L36 so I cant really pass anything except resource list?
  • w

    white-balloon-205

    02/17/2019, 9:48 PM
    Yes - in both Python and JavaScript the
    dependsOn
    resourceoption expects an array of resource objects. What's the scenario where you want/need to pass something else?
  • l

    little-river-49422

    02/18/2019, 7:24 AM
    well, i know the urn i will get with the resource upfront, right? something like provider-type-name? so I dont really need to give it an object, because object I need to pass around
  • p

    proud-artist-4864

    02/18/2019, 7:57 AM
    heh, I think I’m bumping into stuff as I explore 🙂 I’m trying to set up a peering connection between our management VPC (which is created and managed outside of pulumi/terraform) and a VPC that is part of a stack. All of the resource creation classes (eg ec2.Vpc, ec2.Instance etc) take an options that include the possibility of an alternate provider. But the query functions (eg get_vpc) do not.
  • p

    proud-artist-4864

    02/18/2019, 8:02 AM
    Basically, all of the query function, which are the equivalent of data sources in terraform, need to take opts in the same way as the resource classes.
  • p

    proud-artist-4864

    02/18/2019, 8:08 AM
    I’ve created an issue in github, https://github.com/pulumi/pulumi-aws/issues/466 not sure if that’s the right place 😄
    i
    • 2
    • 5
  • l

    little-river-49422

    02/18/2019, 8:54 PM
    hey folks, any feedback on my PR's?
  • i

    incalculable-sundown-82514

    02/18/2019, 8:55 PM
    Hey, it’s a holiday today and not many people are working - we’ll get on it tomorrow
  • l

    little-river-49422

    02/18/2019, 8:55 PM
    oh, ok. sorry 😉
  • l

    little-river-49422

    02/20/2019, 8:18 PM
    hey folks, i've fixed most of the comments except for one that doesnt make a lot of sense to me ^) there's one more pending pr 🙂
  • p

    proud-artist-4864

    02/21/2019, 10:31 AM
    I hit an interesting issue today. I was setting up routing tables and subnets and needed to associate each subnet to its appropriate routing table. The issue was having to create a unique name for each association, even though there was no reason to assign the association to a variable for later use. So what I wanted was something like a resource name of “{}-{}“.format(route_table.id, subnet.id) but they are, of course, Outputs. The resource name has to be a string when the object is initialized, so can’t use Outputs. But the inidividual resource names for the route table and the subnet are already in place and aren’t (or maybe shouldn’t be) Outputs. Is there a way to expose runtime attributes of an object that aren’t dependent on resolution during processing, like the resource name?
  • l

    little-river-49422

    02/21/2019, 10:36 AM
    i think you need to use apply
  • l

    little-river-49422

    02/21/2019, 10:37 AM
    redis_connstr = redis.apply(
            lambda redis: "{}.<http://redis.cache.windows.net:6380,password={},ssl=True,abortConnect=False%22.format(|redis.cache.windows.net:6380,password={},ssl=True,abortConnect=False".format(>
                BRANCH, redis)
        )
    where redis is a output of a resource
  • l

    little-river-49422

    02/21/2019, 10:42 AM
    but, you decide the resource name, i'm just using a prefix + suffix (equals to resource type) everywhere
  • p

    proud-artist-4864

    02/21/2019, 12:40 PM
    yes but the resource name has to be unique across all resources.
Powered by Linen
Title
p

proud-artist-4864

02/21/2019, 12:40 PM
yes but the resource name has to be unique across all resources.
View count: 1