mirror of
https://github.com/letic/terraform-provider-google.git
synced 2024-07-05 17:52:38 +00:00
Allowing GlobalAddress.address to be settable (#2618)
<!-- This change is generated by MagicModules. --> /cc @chrisst
This commit is contained in:
parent
0e27ae79e3
commit
7a3f96ad28
|
@ -46,6 +46,12 @@ func resourceComputeGlobalAddress() *schema.Resource {
|
||||||
Required: true,
|
Required: true,
|
||||||
ForceNew: true,
|
ForceNew: true,
|
||||||
},
|
},
|
||||||
|
"address": {
|
||||||
|
Type: schema.TypeString,
|
||||||
|
Computed: true,
|
||||||
|
Optional: true,
|
||||||
|
ForceNew: true,
|
||||||
|
},
|
||||||
"address_type": {
|
"address_type": {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Optional: true,
|
Optional: true,
|
||||||
|
@ -66,10 +72,6 @@ func resourceComputeGlobalAddress() *schema.Resource {
|
||||||
ValidateFunc: validation.StringInSlice([]string{"IPV4", "IPV6", ""}, false),
|
ValidateFunc: validation.StringInSlice([]string{"IPV4", "IPV6", ""}, false),
|
||||||
DiffSuppressFunc: emptyOrDefaultStringSuppress("IPV4"),
|
DiffSuppressFunc: emptyOrDefaultStringSuppress("IPV4"),
|
||||||
},
|
},
|
||||||
"address": {
|
|
||||||
Type: schema.TypeString,
|
|
||||||
Computed: true,
|
|
||||||
},
|
|
||||||
"creation_timestamp": {
|
"creation_timestamp": {
|
||||||
Type: schema.TypeString,
|
Type: schema.TypeString,
|
||||||
Computed: true,
|
Computed: true,
|
||||||
|
@ -92,6 +94,12 @@ func resourceComputeGlobalAddressCreate(d *schema.ResourceData, meta interface{}
|
||||||
config := meta.(*Config)
|
config := meta.(*Config)
|
||||||
|
|
||||||
obj := make(map[string]interface{})
|
obj := make(map[string]interface{})
|
||||||
|
addressProp, err := expandComputeGlobalAddressAddress(d.Get("address"), d, config)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
} else if v, ok := d.GetOkExists("address"); !isEmptyValue(reflect.ValueOf(addressProp)) && (ok || !reflect.DeepEqual(v, addressProp)) {
|
||||||
|
obj["address"] = addressProp
|
||||||
|
}
|
||||||
descriptionProp, err := expandComputeGlobalAddressDescription(d.Get("description"), d, config)
|
descriptionProp, err := expandComputeGlobalAddressDescription(d.Get("description"), d, config)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -281,6 +289,10 @@ func flattenComputeGlobalAddressAddressType(v interface{}, d *schema.ResourceDat
|
||||||
return v
|
return v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func expandComputeGlobalAddressAddress(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) {
|
||||||
|
return v, nil
|
||||||
|
}
|
||||||
|
|
||||||
func expandComputeGlobalAddressDescription(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) {
|
func expandComputeGlobalAddressDescription(v interface{}, d *schema.ResourceData, config *Config) (interface{}, error) {
|
||||||
return v, nil
|
return v, nil
|
||||||
}
|
}
|
||||||
|
|
|
@ -64,6 +64,10 @@ The following arguments are supported:
|
||||||
- - -
|
- - -
|
||||||
|
|
||||||
|
|
||||||
|
* `address` -
|
||||||
|
(Optional)
|
||||||
|
The static external IP address represented by this resource.
|
||||||
|
|
||||||
* `description` -
|
* `description` -
|
||||||
(Optional)
|
(Optional)
|
||||||
An optional description of this resource.
|
An optional description of this resource.
|
||||||
|
@ -88,9 +92,6 @@ The following arguments are supported:
|
||||||
In addition to the arguments listed above, the following computed attributes are exported:
|
In addition to the arguments listed above, the following computed attributes are exported:
|
||||||
|
|
||||||
|
|
||||||
* `address` -
|
|
||||||
The static external IP address represented by this resource.
|
|
||||||
|
|
||||||
* `creation_timestamp` -
|
* `creation_timestamp` -
|
||||||
Creation timestamp in RFC3339 text format.
|
Creation timestamp in RFC3339 text format.
|
||||||
* `self_link` - The URI of the created resource.
|
* `self_link` - The URI of the created resource.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user