swift-lunch-74411
07/07/2020, 2:41 PMswift-lunch-74411
07/07/2020, 3:00 PMbland-lamp-16797
07/09/2020, 3:10 PMclever-plumber-29709
07/09/2020, 8:13 PMastonishing-quill-88807
07/10/2020, 5:06 PMastonishing-quill-88807
07/10/2020, 5:06 PMcold-minister-39214
07/10/2020, 5:10 PMDiagnostics:
...
digitalocean:index:DnsRecord (a):
error: Preview failed: refreshing urn:pulumi:devjs::do-pulumi-node::digitalocean:index/dnsRecord:DnsRecord::a: domain is invalid because cannot be an empty string
I've confirmed that the ids used for import_ are correct with the digital ocean API. If I comment out the DnsRecord, I can import the domain with no problems. Any insight would be appreciated.billowy-laptop-45963
07/10/2020, 5:16 PMreturn pulumi.Output.all(bucket.bucket, obj.key).apply(
lambda args: f"<https://s3.amazonaws.com/{args[0]}/{args[1]}>"
)
mypy states:
Argument 1 to "all" of "Output" has incompatible type "Output[str]"; expected "Union[<nothing>, Awaitable[<nothing>], Output[<nothing>]]"
Argument 2 to "all" of "Output" has incompatible type "Output[str]"; expected "Union[<nothing>, Awaitable[<nothing>], Output[<nothing>]]"
Anyone see this before?stocky-lion-56153
07/11/2020, 12:42 PM__main__.py
please?
I have this pulumi.yaml
name: cli
main: infra/
runtime:
name: python
options:
virtualenv: ../venv
description: Flexiclock CLI
And these files
tree infra/
infra/
├── __init__.py
├── __main__.py
└── s3.py
stocky-lion-56153
07/11/2020, 12:43 PMfrom . import s3
in __main___.py
I get an error
ImportError: attempted relative import with no known parent package
salmon-gold-74709
07/13/2020, 7:41 AMquick-cricket-80200
07/13/2020, 10:26 PMlog_group = aws.cloudwatch.LogGroup("/ecs/log-group")
json = json.dumps([
{
"name": "app",
"image": "image",
"portMappings": [{
"containerPort": 8080,
"hostPort": 8080,
"protocol": "tcp"
}],
"logConfiguration": {
"logDriver": "awslogs",
"options": {
"awslogs-group": log_group.name,
"awslogs-region": "us-east-1",
"awslogs-stream-prefix": "ecs"
}
}
}
]
)
I am getting
TypeError: Object of type Output is not JSON serializable
sparse-state-34229
07/13/2020, 10:39 PMOutput.apply
gray-jewelry-3360
07/20/2020, 8:07 PMbetter-actor-92669
07/24/2020, 8:31 AMpulumi-postgresql
module that should have been fixed already. Can someone from Pulumi Team take a look please?
pulumi==2.7.1
pulumi-gcp==3.15.0
pulumi-kubernetes==2.4.0
pulumi-postgresql==2.2.2
pulumi-random==2.2.0
https://github.com/pulumi/pulumi-postgresql/issues/60brave-oyster-92747
07/24/2020, 3:58 PMbetter-actor-92669
07/27/2020, 2:30 PMpulumi new
if I already have it?
https://www.pulumi.com/docs/reference/cli/pulumi_new/
-g, --generate-only Generate the project only; do not create a stack, save config, or install dependencies
I need to create a stack, save config, I just need not to create the venv automaticallybright-policeman-55860
08/01/2020, 1:24 AMbright-policeman-55860
08/01/2020, 1:29 AMsubprocess.run(pulumi.Output.concat("whoami"))
bright-policeman-55860
08/02/2020, 12:43 PMdamp-elephant-82829
08/05/2020, 3:24 PMproud-queen-14294
08/06/2020, 6:18 PMdirectoryservice.Directory
If I copy and paste the python example here
I've made MINOR adjustments, but the issue still remains.
I get the following error:
Diagnostics:
aws:directoryservice:Directory (main):
error: InvalidParameterException: Invalid directory name. The directory name must be between 2 and 64 characters, and can only contain alphanumeric characters, periods (.). or minus signs (-). Also, the directory name must begin and end with an alphanumeric character. : RequestId: 362da74b-62dc-4116-8785-e65cbacb52c3
{
RespMetadata: {
StatusCode: 400,
RequestID: "362da74b-62dc-4116-8785-e65cbacb52c3"
},
Message_: "Invalid directory name. The directory name must be between 2 and 64 characters, and can only contain alphanumeric characters, periods (.). or minus signs (-). Also, the directory name must begin and end with an alphanumeric character. : RequestId: 362da74b-62dc-4116-8785-e65cbacb52c3",
RequestId: "362da74b-62dc-4116-8785-e65cbacb52c3"
}
pulumi:pulumi:Stack (training_workspaces-dev):
error: update failed
I've tried overwriting the name to avoid the generated hex code being added by using the name
parameter of Directory
, but it just gives the same error.
I find it odd that this is happening with example code from the docs.
Any ideas? Full code added as snippetwitty-ice-69000
08/08/2020, 2:10 PMpulumi --cwd <some dir>
is supposed to work.
I wanted to do something like this:
project root
|_ __main__.py
|_ bootstrap
|_ __main__.py
|_ core_deployment.py
|_ __init__.py
The bootstrap package has it's own __main__
file to establish the basic user, group and role for deployments and a privileged user must initially run pulumi --cwd bootstrap up
. Then for all other deployments, provided bootstrap doesn't need to change, then "regular" users can run pulumi up
and because the root __main__
always includes the bootstrap deployment, the state for the stack is always aligned and works just fine provided the regular user doesn't need to destroy the bootstrap state, and then a privileged user is needed again.
BUT using --cwd
results in the root __main__
being called regardless (the bootstrap __main__
is ignored). Even using cd bootstrap; pulumi up
still results in root __main__
being called.
What am I missing here?enough-ambulance-2841
08/10/2020, 4:00 PMaws.iam.get_policy_document
where I use the S3 bucket ARN in the policy, but it's simply not working (I think Pulumi doesn't know the dependency graph here). What is the best practice here? The docs lack examples that fit my use case ... My example: https://github.com/iserko/pulumi-test/blob/master/__main__.py#L33-L50proud-queen-14294
08/11/2020, 11:26 PMaws:workspaces:Workspace example creating error: workspace creation failed: The specified user could not be found in the directory.
when I specify the user_name
parameter, because the user doesn't exist, but I find no parameters in the directory or workspace interfaces that allow user creation.
EDIT: It appears it's part of the EC2 instance, very confused. The Workspaces GUI allows you to add users but I want to do that programatically
EDIT 2: Nevermind it seems it's a limitation of the AWS API, which seems silly in my opinion.. https://stackoverflow.com/questions/56995571/create-a-user-on-aws-workspaces-with-apiincalculable-dream-27508
08/12/2020, 6:22 PMuser_data
as follows:
#cloud-config
fqdn: host.name.goes.here
which is simple enough... But I want to create multiple machines, and I have considerably more in user_data
. So far I'm defining PROVISION
which holds the string with a bunch of data, with the intention of using it in mine
INSTANCES = {
i: openstack.compute.Instance(f'instance-{i + 1}.test.instance',
flavor_name="1C-1G-20G",
image_name="Debian-Buster-amd64",
key_pair="my_key",
networks=[{
'name': 'test-net',
'accessNetwork': 'true'
}],
user_data=PROVISION,
security_groups=SECGROUPS_TEST)
for i in range(INSTANCE_COUNT)
}
Any suggestions how I can set / inject / template in PROVISION
passed here fqdn: instance-{i + 1}.test.instance
?incalculable-dream-27508
08/12/2020, 6:36 PMnutritious-shampoo-16116
08/13/2020, 10:49 AMwitty-ice-69000
08/13/2020, 2:53 PMinstance_assume_role_policy = iam.get_policy_document(
opts=pulumi.ResourceOptions(depends_on=[user], provider=provider),
statements=[
{
"actions": ["sts:AssumeRole"],
"effect": "Allow",
"principals": [
{"identifiers": [user.arn.apply(lambda arn: arn)], "type": "AWS"}
],
},
],
)
witty-ice-69000
08/13/2020, 2:53 PMerror: Program failed with an unhandled exception:
error: Traceback (most recent call last):
File "/usr/local/bin/pulumi-language-python-exec", line 85, in <module>
loop.run_until_complete(coro)
File "/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File ".venv/lib/python3.8/site-packages/pulumi/runtime/stack.py", line 83, in run_in_stack
await run_pulumi_func(lambda: Stack(func))
File ".venv/lib/python3.8/site-packages/pulumi/runtime/stack.py", line 51, in run_pulumi_func
await RPC_MANAGER.rpcs.pop()
File ".venv/lib/python3.8/site-packages/pulumi/runtime/stack.py", line 35, in run_pulumi_func
func()
File ".venv/lib/python3.8/site-packages/pulumi/runtime/stack.py", line 83, in <lambda>
await run_pulumi_func(lambda: Stack(func))
File ".venv/lib/python3.8/site-packages/pulumi/runtime/stack.py", line 106, in __init__
func()
File "/usr/local/bin/pulumi-language-python-exec", line 84, in <lambda>
coro = pulumi.runtime.run_in_stack(lambda: runpy.run_path(args.PROGRAM, run_name='__main__'))
File "/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 282, in run_path
return _run_code(code, mod_globals, init_globals,
File "/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "./__main__.py", line 41, in <module>
main()
File "./__main__.py", line 37, in main
create_stack_deployment_iam(this_provider, "production", permission_boundaries)
File "/asi/aws/infrastructure.py", line 62, in create_stack_deployment_iam
instance_assume_role_policy = iam.get_policy_document(
File ".venv/lib/python3.8/site-packages/pulumi_aws/iam/get_policy_document.py", line 317, in get_policy_document
__ret__ = pulumi.runtime.invoke('aws:iam/getPolicyDocument:getPolicyDocument', __args__, opts=opts).value
File ".venv/lib/python3.8/site-packages/pulumi/runtime/invoke.py", line 127, in invoke
return InvokeResult(_sync_await(asyncio.ensure_future(do_rpc())))
File ".venv/lib/python3.8/site-packages/pulumi/runtime/sync_await.py", line 95, in _sync_await
return fut.result()
File ".venv/lib/python3.8/site-packages/pulumi/runtime/invoke.py", line 124, in do_rpc
raise exn
File ".venv/lib/python3.8/site-packages/pulumi/runtime/rpc_manager.py", line 67, in rpc_wrapper
result = await rpc
File ".venv/lib/python3.8/site-packages/pulumi/runtime/invoke.py", line 108, in do_invoke
resp = await asyncio.get_event_loop().run_in_executor(None, do_invoke)
File "/usr/local/Cellar/python@3.8/3.8.5/Frameworks/Python.framework/Versions/3.8/lib/python3.8/concurrent/futures/thread.py", line 57, in run
result = self.fn(*self.args, **self.kwargs)
File ".venv/lib/python3.8/site-packages/pulumi/runtime/invoke.py", line 106, in do_invoke
raise Exception(details)
Exception: invocation of aws:iam/getPolicyDocument:getPolicyDocument returned an error: grpc: error while marshaling: proto: repeated field Values has nil element
error: an unhandled error occurred: Program exited with non-zero exit code: 1
The snippet of my code that it's referencing is this: