https://pulumi.com logo
Docs
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
  • g

    gorgeous-egg-16927

    02/08/2019, 8:43 PM
    https://github.com/pulumi/pulumi-kubernetes/issues/416
  • l

    little-river-49422

    02/08/2019, 8:44 PM
    not sure you can detect cluster was deleted, i mean, how you would do that
  • g

    gorgeous-egg-16927

    02/08/2019, 8:45 PM
    yeah, i'm not sure. i think the cross-stack dependency detection is more compelling anyway
  • g

    gorgeous-egg-16927

    02/08/2019, 8:46 PM
    we could possibly have a fallback option to force-delete if you (manually) confirm that the cluster is gone
  • c

    creamy-potato-29402

    02/08/2019, 8:47 PM
    if a user deletes the provider we should delete the resources
  • c

    creamy-potato-29402

    02/08/2019, 8:47 PM
    otherwise there’s not a lot we can do
  • c

    creamy-potato-29402

    02/08/2019, 8:48 PM
    pulumi refresh
    can also be smarter.
  • c

    creamy-potato-29402

    02/08/2019, 8:48 PM
    if we see that a provider is deleted, we can safely assume those resources don’t exist.
  • l

    little-river-49422

    02/08/2019, 8:48 PM
    oh,
    pulumi refresh
    is kinda frustrating. i dont think it really helps. at least it didnt help me. or I dont understand how it works
  • l

    little-river-49422

    02/08/2019, 8:49 PM
    i think it helped when I delete azure storage account outside of pulumi, but with this situation it certainly didnt
  • g

    gorgeous-egg-16927

    02/08/2019, 8:50 PM
    refresh is supposed to reconcile the pulumi checkpoint of your stack with the various cloud APIs in case things were updated out-of-band
  • g

    gorgeous-egg-16927

    02/08/2019, 8:51 PM
    problem here was that the APIs weren't accessible since the cluster was gone
  • l

    little-river-49422

    02/08/2019, 9:44 PM
    ok folks, any eta on the k8s provider thing. I suppose you confirm this is a funky behaviour, i can work around for now
  • l

    little-river-49422

    02/09/2019, 9:54 AM
    another question, how do I create custom resources? not custom resource definitions in kubernetes
    c
    i
    • 3
    • 30
  • b

    bland-lamp-97030

    02/09/2019, 11:22 PM
    I've got an issue with trying to get availability zone names from a script that isn't itself within an async def
  • b

    bland-lamp-97030

    02/09/2019, 11:22 PM
    https://gist.github.com/jarshwah/bea3005fe13ba0376327406a9a452991
  • b

    bland-lamp-97030

    02/09/2019, 11:22 PM
    subnet = ec2.Subnet(
            subnet_name,
            vpc_id=vpc.id,
            availability_zone=pulumi_aws.get_availability_zones().names[num],
            cidr_block=subnet_ranges[num],
            map_public_ip_on_launch=True,
            tags={"Name": subnet_name, **default_tags},
        )
  • b

    bland-lamp-97030

    02/09/2019, 11:23 PM
    the problem is that
    get_availability_zones
    is defined as an async def, but I haven't got the ability to await it from a standard "run everything in main" script
  • b

    bland-lamp-97030

    02/09/2019, 11:23 PM
    so, is there a way to get availability zone names without having to define the entire program within a coroutine/async function?
  • b

    bland-lamp-97030

    02/09/2019, 11:24 PM
    I was loosely following https://github.com/pulumi/pulumi-awsx/blob/master/python/pulumi_aws_infra/util.py but I'm not sure it's as current as it needs to be
  • l

    little-river-49422

    02/10/2019, 7:15 AM
    i think you need to do something like this:
    async def get_aks_credentials():
        result = await get_kubernetes_cluster(name=gen_name('aks'),
                                              resource_group_name=gen_name('rg')
                                              )
        return result.kube_config_raw
    
    k8s = Provider("app_provider", kubeconfig=get_aks_credentials())
    at least this is working for me
  • l

    little-river-49422

    02/11/2019, 9:25 AM
    hey folks, 1.22 tf provider for azure is out, can you update pulumi? i really need signalr stuff)
    w
    • 2
    • 1
  • s

    stocky-spoon-28903

    02/11/2019, 3:59 PM
    Hey @little-river-49422, yup
  • s

    stocky-spoon-28903

    02/11/2019, 4:00 PM
    It’s slightly more involved than previous updates as upstream switched how it handles dependencies, so it needs a bit more testing from our end, but it will be up for review today.
    😛artypus: 1
  • l

    little-river-49422

    02/11/2019, 9:41 PM
    hey, can you ping back the result? @stocky-spoon-28903
  • s

    stocky-spoon-28903

    02/11/2019, 9:46 PM
    @little-river-49422 There’s a PR out now!
  • s

    stocky-spoon-28903

    02/11/2019, 9:47 PM
    There is some kind of CI issue I need to fix still though
  • s

    stocky-spoon-28903

    02/11/2019, 9:48 PM
    I see the issue. There’ll be a new version out shortly @little-river-49422
  • s

    stocky-spoon-28903

    02/11/2019, 9:54 PM
    I just kicked off CI again, pending green I’ll merge and release.
  • b

    bland-lamp-97030

    02/11/2019, 10:32 PM
    Just wondering if anyone has any pointers for providing the availability zone to
    aws_pulumi.ec2.Subnet
    ?
    pulumi.get_availability_zones()
    is an async function, but my pulumi program is just free code within the
    __main__.py
    file
Powered by Linen
Title
b

bland-lamp-97030

02/11/2019, 10:32 PM
Just wondering if anyone has any pointers for providing the availability zone to
aws_pulumi.ec2.Subnet
?
pulumi.get_availability_zones()
is an async function, but my pulumi program is just free code within the
__main__.py
file
View count: 1