acoustic-continent-29968
04/07/2022, 9:51 AMPeeringAttachment
the returned output is only the ID of the request
, when you create a peering, essentially two parameters are created, one in the source account + region, and another in the target account + region. When you run the approval
you need the ID of the target
.
I've tried pulling it with get_peering_attachment in the target account and filtering by the Transit Gateway (target and source IDs) and it can only accept a single
result, anything other than one result will fail the execution.
I've tried working around this with boto3
to use describe_transit_gateway_attachment, but I'm having problems with consistency (the values returned from Output) are malformed and it says "<Object at 0x12341234>" instead of the value.
Would really appreciate any leads on how to proceed,
have a great day!great-queen-39697
04/07/2022, 3:42 PMPeeringAttachment
, what are you returning? Pulumi returns inputs as outputs, as well, so you can return PeeringAttachment.peerTransitGatewayID
as an example. Perhaps you need to return one of the transit gateway IDs like that, instead?acoustic-continent-29968
04/24/2022, 8:12 AMPeeringAttachment
it returns the ID of the request, but I need the ID of the approver
, the barrier here is that the approver might be on another account.
When I tried to get it using the get_peering_attachment
, it wouldn't let me filter it using multiple search criteria, and when you receive anything other than one result it fails completely, even if nothing matched.TransitGatewayID
it is knowing the TransitGatewayAttachmentID
in the target accountgreat-queen-39697
04/29/2022, 12:35 AMPeeringAttachment
as the peer_transit_gateway_id
. That's an input, which you can also return as an output since Pulumi maps inputs to outputs, as well. Unless I'm misunderstanding what you're trying to do?
When it comes to the boto3 workaround you mentioned, that object you're getting is because you're likely trying to use the output directly. Outputs behave a lot like promises because they aren't known until provisioning is complete. Depending on the language you're using, you call different methods to transform that object into something you can use. One of our engineers wrote a great blog post explaining how outputs work in Pulumi in case that helps explain it.acoustic-continent-29968
05/02/2022, 2:58 PMget_method
is unable to retrieve something that is not a single object.
get_peering_attachment -> len(result) == 0 -> error: no matches found
get_peering_attachment -> len(result) > 1 -> error: multiple results found, add filters, narrow the search
get_peering_attachment -> len(result) == 1 -> success
Same with get_subnet