expose new azure config parameters in aiven_vpc_peering_connection resource
@@ -56,6 +56,22 @@ var aivenVPCPeeringConnectionSchema = map[string]*schema.Schema{
Description: "Cloud provider identifier for the peering connection if available",
Type: schema.TypeString,
},
+
+ "peer_azure_app_id": {
+ Computed: true,
+ Description: "Azure app registration id in UUID4 form that is allowed to create a peering to the peer vnet",
+ Type: schema.TypeString,
+ },
+ "peer_azure_tenant_id": {
+ Computed: true,
+ Description: "Azure tenant id in UUID4 form",
+ Type: schema.TypeString,
+ },
+ "peer_resource_group": {
+ Computed: true,
+ Description: "Azure resource group name of the peered VPC",
+ Type: schema.TypeString,
+ },
}
func resourceVPCPeeringConnection() *schema.Resource {
@@ -129,7 +145,7 @@ func resourceVPCPeeringConnectionCreate(d *schema.ResourceData, m interface{}) e
d.SetId(buildResourceID(projectName, vpcID, pc.PeerCloudAccount, pc.PeerVPC))
}
- return copyVPCPeeringConnectionPropertiesFromAPIResponseToTerraform(d, pc, projectName, vpcID)
+ return resourceVPCPeeringConnectionRead(d, m)
}
func parsePeeringVPCId(resourceID string) (string, string, string, string, *string) {
@@ -226,6 +242,15 @@ func copyVPCPeeringConnectionPropertiesFromAPIResponseToTerraform(
if err := d.Set("state_info", peeringConnection.StateInfo); err != nil {
return err
}
+ if err := d.Set("peer_azure_app_id", peeringConnection.PeerAzureAppId); err != nil {
+ return err
+ }
+ if err := d.Set("peer_azure_tenant_id", peeringConnection.PeerAzureTenantId); err != nil {
+ return err
+ }
+ if err := d.Set("peer_resource_group", peeringConnection.PeerResourceGroup); err != nil {
+ return err
+ }
return nil
}
