• v

    victorious-exabyte-70545

    8 months ago
    Hi guys, I am getting this error with pulumi:
    AttributeError: 'GetVirtualMachineScaleSetResult' object has no attribute 'urn'
    v
    1 replies
    Copy to Clipboard
  • v

    victorious-exabyte-70545

    8 months ago
    # Pod access to elasticsearch scaleset
    es_vm_scaleset = azure.compute.get_virtual_machine_scale_set(
        resource_group_name=f"{environment}-elasticsearch",
        name=f"{environment}-elasticsearch-scaleset")
    
    azure.authorization.Assignment(
        "PodESScalesetReaderAssignment",
        scope=es_vm_scaleset.id,
        role_definition_name="Reader",
        principal_id=pod_assigned_identity.principal_id,
        opts=ResourceOptions(depends_on=[es_vm_scaleset, pod_assigned_identity])
    )
    v
    b
    7 replies
    Copy to Clipboard
  • v

    victorious-exabyte-70545

    8 months ago
    does pulumi save the result of get_* as a resource in the stack?
    v
    1 replies
    Copy to Clipboard
  • c

    crooked-postman-72907

    8 months ago
    Hey all. Can anyone help me with translating terraform/HCL script into python?
    c
    p
    +1
    17 replies
    Copy to Clipboard
  • a

    acoustic-continent-29968

    8 months ago
    Hi, I have two questions, and would appreciate any help I can get! 🙂 1. I was wondering if there's a way to read config and enable falsy values instead of None, given that when you read a list the flasy value would be
    []
    or with a dict
    {}
    . Or if there's a smart way to convert pulumi config to a dictionary, without iterating over the keys and decyphering the bag name, because we have infinite number of lines that look like:
    name = config.require('name')
    vpc_id = config.require('vpc_id')
    tags = config.require('tags')
    (obviously this can be done with dict comprehension but not what I'm looking for):
    values = ['name', 'vpc_id', 'tags']
    my_dict = { value: config.require(value) for value in values }
    I'm looking for a more generic approach, what happens if a new parameter is introduced? 2. I'm looking to create layers of configuration in which I can explicitly say that a specific config should be appended or overriden. e.g: tags should be appended, configuration layer 1: physical site configuration layer 2: environment configuration layer 3: micro service
    a
    p
    12 replies
    Copy to Clipboard
  • g

    gorgeous-minister-41131

    8 months ago
    Is there a way to patch in the
    pulumi.Config
    system into the unittest mocking framework?
    g
    n
    4 replies
    Copy to Clipboard
  • g

    gorgeous-minister-41131

    8 months ago
    Another related test/mocking q, since I think I found the workaround for the config.. I’m trying to create a resource, and when I run the test suite, it fails, but it works if I preview…
    File "/Users/tfarvour/.local/share/virtualenvs/pulumi-Miy8VggM/lib/python3.9/site-packages/pulumi_aws/iam/get_policy_document.py", line 414, in get_policy_document
        id=__ret__.id,
    AttributeError: 'NoneType' object has no attribute 'id'
    TL;DR: anyone have any guidance other than https://www.pulumi.com/blog/unit-test-infrastructure/ this for mocking the getter methods? I’m beginning to think that is the root of the issue here…
    g
    2 replies
    Copy to Clipboard
  • f

    fast-arm-63150

    8 months ago
    Would anyone know why this simple command for the python automation api fails?
    Traceback (most recent call last):
    File "main.py", line 115, in <module>
    pulumi.automation.create_stack('test-x')
    File "/home/user/x-ops/pulumi/.venv/lib/python3.8/site-packages/pulumi/automation/_local_workspace.py", line 366, in create_stack
    raise ValueError(f"unexpected args: {' '.join(args)}")
    ValueError: unexpected args: stack_name project_name program work_dir opts
    f
    m
    7 replies
    Copy to Clipboard
  • l

    lively-author-18255

    8 months ago
    Hi, I am trying to use pulumi/actions but it complains about
    ModuleNotFoundError: No module named 'pulumi'
    I am trying to use pipenv and I see it should be supported. What is the proper way to set up pipenv? Any examples? Thanks!
    l
    g
    8 replies
    Copy to Clipboard
  • a

    acoustic-continent-29968

    8 months ago
    Hi there, I am programmatically selecting an ALB to create an ALB rule on. The ALB is selected by tags (using the group tag api), which is fine. If no ALB is available (meaning no rule space left), it'll create the ALB and then create the rule. I have a problem with that, since the next time I'll do
    pulumi up
    effectively the stack will choose the existing ALB which was previously created will not be created since it's available and this will delete the ALB since the stack is missing the "new" ALB so-to-speak. I thought about working around this by either detaching the ALB using pulumi export then looking for the URN and removing it and then using pulumi import to edit the stack. Thought I'll pick your brain to work around this more effectively
    a
    g
    3 replies
    Copy to Clipboard