@@ -83,6 +83,28 @@ func resourceCloudProjectNetworkPrivate() *schema.Resource {
83
83
},
84
84
},
85
85
},
86
+ "regions_attributes" : {
87
+ Type : schema .TypeSet ,
88
+ Computed : true ,
89
+ Elem : & schema.Resource {
90
+ Schema : map [string ]* schema.Schema {
91
+ "status" : {
92
+ Type : schema .TypeString ,
93
+ Required : true ,
94
+ },
95
+
96
+ "region" : {
97
+ Type : schema .TypeString ,
98
+ Computed : true ,
99
+ },
100
+
101
+ "openstackid" : {
102
+ Type : schema .TypeString ,
103
+ Computed : true ,
104
+ },
105
+ },
106
+ },
107
+ },
86
108
"status" : {
87
109
Type : schema .TypeString ,
88
110
Computed : true ,
@@ -162,15 +184,19 @@ func resourceCloudProjectNetworkPrivateRead(d *schema.ResourceData, meta interfa
162
184
d .Set ("vlan_id" , r .Vlanid )
163
185
164
186
regions_status := make ([]map [string ]interface {}, 0 )
187
+ regions_attributes := make ([]map [string ]interface {}, 0 )
165
188
regions := make ([]string , 0 )
166
189
167
190
for i := range r .Regions {
168
191
region := make (map [string ]interface {})
169
192
region ["region" ] = r .Regions [i ].Region
170
193
region ["status" ] = r .Regions [i ].Status
194
+ region ["openstackid" ] = r .Regions [i ].OpenStackId
195
+ regions_attributes = append (regions_attributes , region )
171
196
regions_status = append (regions_status , region )
172
197
regions = append (regions , fmt .Sprintf (r .Regions [i ].Region ))
173
198
}
199
+ d .Set ("regions_attributes" , regions_attributes )
174
200
d .Set ("regions_status" , regions_status )
175
201
d .Set ("regions" , regions )
176
202
0 commit comments