white-balloon-205
08/28/2020, 5:51 PMsteep-alligator-79173
08/28/2020, 7:43 PMrepo_id = gitlab_repo.id.apply(lambda repo_id: repo_id)
steep-alligator-79173
08/28/2020, 7:44 PM<pulumi.output.Output object at 0x10acc5a00>
steep-alligator-79173
08/28/2020, 7:44 PMsteep-alligator-79173
08/28/2020, 7:44 PMsteep-alligator-79173
08/28/2020, 7:44 PMsteep-alligator-79173
08/28/2020, 7:44 PMsteep-alligator-79173
08/28/2020, 7:44 PMgreen-school-95910
08/28/2020, 7:44 PMsteep-alligator-79173
08/28/2020, 7:45 PMsteep-alligator-79173
08/28/2020, 7:45 PMgreen-school-95910
08/28/2020, 7:45 PMgilab_repo.id.apply(function_that_receives_the_id)
steep-alligator-79173
08/28/2020, 7:45 PMgitlab_repo = pulumi_gitlab.Project(
f"{repo}",
name=repo,
namespace_id=qtx_arc_group.id
)
steep-alligator-79173
08/28/2020, 7:45 PMsteep-alligator-79173
08/28/2020, 7:45 PMgreen-school-95910
08/28/2020, 7:46 PMsteep-alligator-79173
08/28/2020, 7:49 PMrepo_id = gitlab_repo.id.apply(lambda repo_id: f"dupa+{repo_id}")
pulumi.export("DUPA", repo_id)
steep-alligator-79173
08/28/2020, 7:49 PMOutputs:
+ DUPA: "dupa+20804159"
steep-alligator-79173
08/28/2020, 7:49 PMsteep-alligator-79173
08/28/2020, 7:50 PMIsolated the logic that need the id and pass it to the apply, as I showed above
steep-alligator-79173
08/28/2020, 7:50 PMsteep-alligator-79173
08/28/2020, 7:51 PMsteep-alligator-79173
08/28/2020, 7:51 PMgreen-school-95910
08/28/2020, 8:05 PMgreen-school-95910
08/28/2020, 8:10 PMrepo_id = gitlab_repo.id.apply(lambda repo_id: f"dupa+{repo_id}")
repo_id
here is an Output
object representing a value that, during the deployment, will be available and equal to the result of the lambda function
The pulumi.export("DUPA", repo_id)
don't export anything. It adds to the plan that after the deployment the values that was made available on that Output should be exported.green-school-95910
08/28/2020, 8:11 PMsteep-alligator-79173
08/28/2020, 8:19 PMrepo_id = gitlab_repo.id.apply(lambda repo_id:
print(f"<https://gitlab.com/api/v4/projects/{repo_id}/environments>")
)
steep-alligator-79173
08/28/2020, 8:20 PMsteep-alligator-79173
08/28/2020, 8:20 PMsteep-alligator-79173
08/28/2020, 8:21 PMrepo_id = gitlab_repo.id.apply(lambda repo_id:
print(f"<https://gitlab.com/api/v4/projects/{repo_id}/environments>")
requests.get("<https://gitlab.com>")
)
steep-alligator-79173
08/28/2020, 8:21 PMrepo_id = gitlab_repo.id.apply(lambda repo_id:
print(f"<https://gitlab.com/api/v4/projects/{repo_id}/environments>")
requests.get("<https://gitlab.com>")
)