@@ -98,6 +98,8 @@ pub struct DataPlane {
98
98
99
99
#[ serde( default , skip_serializing_if = "Option::is_none" ) ]
100
100
pub aws_assume_role : Option < AWSAssumeRole > ,
101
+ #[ serde( default , skip_serializing_if = "Option::is_none" ) ]
102
+ pub azure_byoc : Option < AzureBYOC > ,
101
103
pub builds_root : url:: Url ,
102
104
pub builds_kms_keys : Vec < String > ,
103
105
pub control_plane_api : url:: Url ,
@@ -115,6 +117,12 @@ pub struct AWSAssumeRole {
115
117
pub external_id : String ,
116
118
}
117
119
120
+ #[ derive( Clone , Debug , PartialEq , Eq , serde:: Serialize , serde:: Deserialize ) ]
121
+ pub struct AzureBYOC {
122
+ pub tenant_id : String ,
123
+ pub subscription_id : String ,
124
+ }
125
+
118
126
#[ derive( Clone , Debug , PartialEq , Eq , serde:: Serialize , serde:: Deserialize ) ]
119
127
#[ serde( untagged) ]
120
128
pub enum PrivateLink {
@@ -492,17 +500,25 @@ mod test {
492
500
service_name: "service" . to_string( ) ,
493
501
} ) ,
494
502
) ;
503
+
504
+ let azure_parsed = serde_json:: from_value :: < DataPlane > (
505
+ fixtures. get ( "azure_private_link" ) . unwrap ( ) . clone ( ) ,
506
+ )
507
+ . unwrap ( ) ;
495
508
assert_eq ! (
496
- serde_json:: from_value:: <DataPlane >(
497
- fixtures. get( "azure_private_link" ) . unwrap( ) . clone( )
498
- )
499
- . unwrap( )
500
- . private_links[ 0 ] ,
509
+ azure_parsed. private_links[ 0 ] ,
501
510
PrivateLink :: Azure ( AzurePrivateLink {
502
511
location: "eastus" . to_string( ) ,
503
512
service_name: "service" . to_string( ) ,
504
513
} ) ,
505
514
) ;
515
+ assert_eq ! (
516
+ azure_parsed. azure_byoc,
517
+ Some ( AzureBYOC {
518
+ subscription_id: "12345678" . to_string( ) ,
519
+ tenant_id: "910111213" . to_string( ) ,
520
+ } ) ,
521
+ ) ;
506
522
}
507
523
508
524
#[ test]
0 commit comments