incalculable-dream-27508
06/01/2020, 5:36 PMsparse-state-34229
06/01/2020, 5:56 PMopenstack.networking.Network.get()
or somethingincalculable-dream-27508
06/01/2020, 6:14 PMmy_net = openstack.networking.Network.get('my_net_name', 'uuid_from_openstack')
and then
instance = openstack.compute.Instance("name", networks=[my_net])
(shortened) complains about
Instance resource 'name' has a problem: network.0: expected object, got string
incalculable-dream-27508
06/01/2020, 6:15 PMinstance = openstack.compute.Instance("name", networks=[openstack.networking.Network.get('my_net_name', 'uuid_from_openstack')])
sparse-state-34229
06/01/2020, 6:18 PMsparse-state-34229
06/01/2020, 6:18 PMsparse-state-34229
06/01/2020, 6:19 PMincalculable-dream-27508
06/01/2020, 6:22 PMincalculable-dream-27508
06/01/2020, 6:23 PMincalculable-dream-27508
06/01/2020, 6:25 PMsparse-state-34229
06/01/2020, 6:58 PMchilly-hairdresser-56259
06/02/2020, 4:03 PMui_image.image_name
it returns a pulumi.Output.output object
, which is expected however I need to insert the value as a string so I can create the container_definition. My question is how are you going about this? I thought the following would work, however it fails still. Maybe its plain as day and I just been staring at it too long. Error returns Container.image contains invalid characters.
many-pencil-56466
06/03/2020, 11:11 PMgcloud builds submit --tag <http://gcr.io/${GCP_PROJECT}/${APP}|gcr.io/${GCP_PROJECT}/${APP}> --project=${GCP_PROJECT}
many-pencil-56466
06/03/2020, 11:11 PMdef Image(app="pasteit",location="asia-northeast1", project="leadmrktr"):
img = gcp.cloudbuild.Trigger(
"pasteit-http",
build={
"step": [{"name":"pasteit","dir": ".."}]
},
project=project,
trigger_template={
"dir": "..",
"tag_name": "<http://gcr.io/{}/{}|gcr.io/{}/{}>".format(project,app)
})
return img
chilly-hairdresser-56259
06/04/2020, 9:53 PMvpctrunking, container insights
nutritious-shampoo-16116
06/09/2020, 2:17 PMOutput.all
accept only up to 5 args?shy-football-10348
06/10/2020, 12:18 AMapply
all
and concat
functions, but couldn't get the Pulumi object to convert to a string. The documentation is mainly focused on multiple values or list values and doesn't have a section for a single string variable as far as I can tell. Additionally, I looked at each Python example found here (https://github.com/pulumi/examples) and couldn't find any that implemented this use case, and could I find any third-party blogs that do either.
For reference, I am trying to access the repository_url
string that is output from the ecr.Repository
function.
ecr = aws.ecr.Repository(
"jupyterhub",
name="jupyterhub",
image_scanning_configuration={
"scanOnPush": True,
},
image_tag_mutability="MUTABLE"
)
Has anyone done this in the past and can assist? Thank you all!shy-football-10348
06/10/2020, 12:23 AMurl = ecr.repository_url
or url = ecr['repository_url']
shy-football-10348
06/10/2020, 12:24 AMstrong-plastic-28250
06/10/2020, 3:50 PMincalculable-dream-27508
06/11/2020, 2:05 PMincalculable-dream-27508
06/11/2020, 4:21 PMmy_net = openstack.networking.Network("Network-Name-As-Seen-In-Openstack", admin_state_up="true", name="Network-Name-As-Seen-In-Openstack", opts=pulumi.ResourceOptions(import_='network-uuid-from-openstack'))
define a security group sec_git
with some rules, and then
instance = openstack.compute.Instance("my_test.example.internal", flavor_name="some_flavor", image_name="image_name", key_pair="my_key", security_groups=[sec_git], networks=[my_net])
and when I do pulumi preview
it complains about
error: openstack:compute/instance:Instance reousrce 'my_test.example.internal' has a problem: network.0: expected object, got string
incalculable-dream-27508
06/11/2020, 4:22 PMnetworks=[my_net.id]
which I saw in examples how you add security rules to a security group, but that doesn't change the error messageincalculable-dream-27508
06/11/2020, 4:30 PMchilly-hairdresser-56259
06/11/2020, 7:04 PMOutput.all().apply()
and just apply()
and I am unable to convert the output to string. I am attempting to create an AppAutoscaling Target which requires the resources Id structure of service/ECS Cluster Name/ECS Service Name
, however I am unable to correctly convert it. Even so I would expect if I just try to print the output manipulation I should see the actual value. Example print(service[0].name.apply(lambda vals: f"""{vals}"""))
returns <pulumi.output.Output object at 0x7fcc88389b50>
I would expect the actual ECSService Name. I created a wrapper function which output multiple returns thus the index 0
. Another thing I tested was service[0].Output.all(service[0].name).apply(lambda vals: f"""{vals}""")
which still results with ``<pulumi.output.Output object at 0x7fcc88389b50>`sparse-state-34229
06/11/2020, 7:04 PMOutput.all()
returns a list of listssparse-state-34229
06/11/2020, 7:05 PMsparse-state-34229
06/11/2020, 7:05 PMsparse-state-34229
06/11/2020, 7:06 PMsparse-state-34229
06/11/2020, 7:06 PMOutput.all()
. TIL!sparse-state-34229
06/11/2020, 7:06 PMOutput.all()
. TIL!