able-honey-93860
12/26/2021, 4:36 PMdeleteBeforeReplace
? Can't get it to work but I'm basing it off the AWS examples so maybe need a different syntax?ancient-cricket-42076
12/27/2021, 5:48 PMModuleNotFoundError: No module named 'pulumi_aws'
But browsing the packages of the enviroment it seems to be in order (I make sure it's the default env when trying to deploy, I have tried recreating the env and installing the packages again as well)rhythmic-lamp-79430
12/31/2021, 4:37 PMhallowed-animal-47023
01/02/2022, 6:56 PMpython3.9/site-packages/grpc/_cython/cygrpc.cpython-39-darwin.so, 0x0002): symbol not found in flat namespace '_CFRelease'
great-sunset-355
01/03/2022, 12:22 PMPulumi.dev.yaml
contains a variable debug: true
I pass this to ECS Task container definition and get an error
Error decoding JSON: json: cannot unmarshal bool into Go struct field KeyValuePair.Environment.Value of type string. Examine values at 'TaskDefinition.ContainerDefinitions'.
This is the code:
import json
import pulumi
def json_output(element) -> pulumi.Output:
"""Dump python object to JSON string as pulumi.Output."""
return pulumi.Output.from_input(element).apply(json.dumps)
container_definition = {
"name": self._config.container_name,
"image": self._config.image_name,
"portMappings": [{"containerPort": self._config.application_port, "protocol": "tcp"}],
"environment": [
{"name": k, "value": v} for k, v in self._config.env_vars.items()
],
"linuxParameters": {"initProcessEnabled": True},
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": self._config.log_group_name,
"awslogs-region": self._config.aws_classic_provider.region,
"awslogs-stream-prefix": self._config.log_stream_prefix or "ecs",
},
},
}
self.task_definition = classic_ecs.TaskDefinition(
f"{self._config.name}-td",
args=classic_ecs.TaskDefinitionArgs(
family=f"{self._config.name}",
cpu=self._config.task_cpu,
memory=self._config.task_memory,
network_mode="awsvpc",
requires_compatibilities=["FARGATE"],
execution_role_arn=self.task_exec_role.arn,
task_role_arn=self.task_role.arn,
container_definitions=json_output([container_definition]),
tags=self._config.tags,
)
)
enough-leather-70274
01/06/2022, 2:24 AMbusy-branch-95201
01/11/2022, 6:15 PMacoustic-window-73051
01/11/2022, 7:40 PMauth = aws.ec2clientvpn.AuthorizationRule(auth_name,
args=auth_args,
opts=pulumi.ResourceOptions(
parent=self._artifacts['endpoint'],
custom_timeouts=pulumi.CustomTimeouts(create='20m'),
),
)victorious-exabyte-70545
01/13/2022, 9:33 PMAttributeError: 'GetVirtualMachineScaleSetResult' object has no attribute 'urn'
victorious-exabyte-70545
01/13/2022, 9:33 PMvictorious-exabyte-70545
01/13/2022, 9:36 PM# 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])
)
victorious-exabyte-70545
01/13/2022, 9:37 PMvictorious-exabyte-70545
01/13/2022, 9:37 PMcrooked-postman-72907
01/14/2022, 9:09 AMacoustic-continent-29968
01/18/2022, 8:16 AM[]
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 servicegorgeous-minister-41131
01/20/2022, 1:02 AMpulumi.Config
system into the unittest mocking framework?gorgeous-minister-41131
01/20/2022, 2:04 AMFile "/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…fast-arm-63150
01/20/2022, 7:20 AMTraceback (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
lively-author-18255
01/21/2022, 10:41 PMModuleNotFoundError: 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!acoustic-continent-29968
01/23/2022, 6:39 AMpulumi 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 effectivelyfew-alarm-62671
01/24/2022, 3:39 AMup
, destroy
or preview
during execution? Can’t sort this out and was wandering how to use lambda_.get_invocation
to differ what to do in each caseglamorous-forest-5773
01/27/2022, 9:20 AMpulumi.input_type
decorator to define internal datatypes.
I'm trying to use Pydantic + pulumi.input_type decorator to create schemas with validation + the ability to resolve nested Output attributes. But it looks like, the decorator is tampering the attributes which results in some weird behavior for pydantic models.gorgeous-minister-41131
02/02/2022, 1:49 AMcolor="always"
to actually print out color when using the print() method for on_output…. is there some trick to it?brainy-window-77332
02/02/2022, 10:21 AMOutput.all(net_interface.id).apply(lambda l: f"{l[0]}")
works fine when used on the right hand side of a parameter assignment in the instance creation but not in a function that is called as the right hand side of the content parameter when creating the bucket object.gorgeous-minister-41131
02/04/2022, 12:22 AMcrooked-pillow-11944
02/06/2022, 9:47 PMprehistoric-beach-79855
02/09/2022, 8:16 PMhallowed-animal-47023
02/10/2022, 12:53 PMhallowed-animal-47023
02/10/2022, 12:55 PMhallowed-animal-47023
02/10/2022, 12:55 PM