average-plastic-1653
09/15/2023, 2:31 PMstocky-restaurant-98004
09/15/2023, 2:36 PMpulumi import
in an empty project, get the generated code, and then delete the state file (without deleting the resources, of course!)
2. Ask Pulumi AI: https://www.pulumi.com/aiaverage-plastic-1653
09/15/2023, 3:48 PMstocky-restaurant-98004
09/15/2023, 5:27 PMaverage-plastic-1653
09/15/2023, 5:37 PMpulumi import gcp:compute/networkPeering:NetworkPeering mypeer ir-dryrun/default/aiven-jmtest-01
Took me quite a bit of time to work out the resource namingstocky-restaurant-98004
09/15/2023, 5:41 PMaverage-plastic-1653
09/15/2023, 5:42 PMstocky-restaurant-98004
09/15/2023, 5:43 PMaverage-plastic-1653
09/15/2023, 5:43 PMstocky-restaurant-98004
09/15/2023, 5:43 PMaverage-plastic-1653
09/15/2023, 5:44 PMstocky-restaurant-98004
09/15/2023, 5:44 PMaverage-plastic-1653
09/15/2023, 5:45 PMstocky-restaurant-98004
09/15/2023, 5:46 PMaverage-plastic-1653
09/15/2023, 5:46 PM+ mypeer.network : "<https://www.googleapis.com/compute/v1/projects/ir-dryrun/global/networks/default>"
+ mypeer.peer_network: "<https://www.googleapis.com/compute/beta/projects/aiven-prod-idcn/global/networks/aivenprod-a173e186-36b5-4ab7-969a-3455394a19e2>"
stocky-restaurant-98004
09/15/2023, 5:46 PMaverage-plastic-1653
09/15/2023, 5:48 PMstocky-restaurant-98004
09/15/2023, 5:48 PMaverage-plastic-1653
09/15/2023, 5:49 PMstocky-restaurant-98004
09/15/2023, 5:51 PMOutput[str]
, the pulumi
Python SDK has helper methods to do this. Alternatively, you can use apply
, e.g.:
def get_url_good_part(full_url: str):
# do stuff
some_regular_string = resource.some_str_output.apply(get_url_good_part)
apply(lambda some_str: )
if you can fit it on one line.average-plastic-1653
09/15/2023, 5:59 PM