victorious-exabyte-70545
12/22/2021, 3:47 PMgreat-sunset-355
12/24/2021, 12:32 PMtransformed: Input[U] = func(value)
TypeError: sequence item 6: expected str instance, NoneType found
error: an unhandled error occurred: Program exited with non-zero exit code: 1
victorious-exabyte-70545
12/24/2021, 6:15 PMvictorious-exabyte-70545
12/24/2021, 6:16 PMvictorious-exabyte-70545
12/24/2021, 6:20 PMif args.token == "azure:core/getSubscription:getSubscription":
return {
"id": "00000000-0000-0000-0000-000000000000",
"display_name": "subscription",
"tenant_id": "11111111-1111-1111-1111-111111111111"
}
victorious-exabyte-70545
12/24/2021, 6:22 PMvictorious-exabyte-70545
12/24/2021, 6:22 PMazure:core/getSubscription:getSubscription
here is id of my sub
00000000-0000-0000-0000-000000000000
here is tenant id of my sub
None
here is displayname of my sub
None
victorious-exabyte-70545
12/24/2021, 6:23 PMvictorious-exabyte-70545
12/24/2021, 6:23 PMvictorious-exabyte-70545
12/24/2021, 6:25 PMsubscription = azure.core.get_subscription()
print("here is id of my sub")
print(subscription.id)
print("here is tenant id of my sub")
print(subscription.tenant_id)
print("here is displayname of my sub")
print(subscription.display_name)
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 effectivelyacoustic-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 effectivelygreat-queen-39697
01/24/2022, 8:35 PMget_service_quota()
function instead and examine the value
results: https://www.pulumi.com/registry/packages/aws/api-docs/servicequotas/getservicequota/#value_pythonacoustic-continent-29968
01/31/2022, 9:16 AM