@@ -46,6 +46,12 @@ func resourceComputeGlobalAddress() *schema.Resource {
46
46
Required : true ,
47
47
ForceNew : true ,
48
48
},
49
+ "address" : {
50
+ Type : schema .TypeString ,
51
+ Computed : true ,
52
+ Optional : true ,
53
+ ForceNew : true ,
54
+ },
49
55
"address_type" : {
50
56
Type : schema .TypeString ,
51
57
Optional : true ,
@@ -66,10 +72,6 @@ func resourceComputeGlobalAddress() *schema.Resource {
66
72
ValidateFunc : validation .StringInSlice ([]string {"IPV4" , "IPV6" , "" }, false ),
67
73
DiffSuppressFunc : emptyOrDefaultStringSuppress ("IPV4" ),
68
74
},
69
- "address" : {
70
- Type : schema .TypeString ,
71
- Computed : true ,
72
- },
73
75
"creation_timestamp" : {
74
76
Type : schema .TypeString ,
75
77
Computed : true ,
@@ -92,6 +94,12 @@ func resourceComputeGlobalAddressCreate(d *schema.ResourceData, meta interface{}
92
94
config := meta .(* Config )
93
95
94
96
obj := make (map [string ]interface {})
97
+ addressProp , err := expandComputeGlobalAddressAddress (d .Get ("address" ), d , config )
98
+ if err != nil {
99
+ return err
100
+ } else if v , ok := d .GetOkExists ("address" ); ! isEmptyValue (reflect .ValueOf (addressProp )) && (ok || ! reflect .DeepEqual (v , addressProp )) {
101
+ obj ["address" ] = addressProp
102
+ }
95
103
descriptionProp , err := expandComputeGlobalAddressDescription (d .Get ("description" ), d , config )
96
104
if err != nil {
97
105
return err
@@ -281,6 +289,10 @@ func flattenComputeGlobalAddressAddressType(v interface{}, d *schema.ResourceDat
281
289
return v
282
290
}
283
291
292
+ func expandComputeGlobalAddressAddress (v interface {}, d * schema.ResourceData , config * Config ) (interface {}, error ) {
293
+ return v , nil
294
+ }
295
+
284
296
func expandComputeGlobalAddressDescription (v interface {}, d * schema.ResourceData , config * Config ) (interface {}, error ) {
285
297
return v , nil
286
298
}
0 commit comments