Skip to content

Commit

Permalink
Add "inbound_services" to google_app_engine_standard_app_version
Browse files Browse the repository at this point in the history
  • Loading branch information
pmarschik committed May 15, 2020
1 parent 2e8f4be commit 4ae86d1
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions google/resource_app_engine_standard_app_version.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,14 @@ All URLs that begin with this prefix are handled by this handler, using the port
},
},
},
"inbound_services": {
Type: schema.TypeList,
Optional: true,
Description: `Before an application can receive email or XMPP messages, the application must be configured to enable the service.`,
Elem: &schema.Schema{
Type: schema.TypeString,
},
},
"instance_class": {
Type: schema.TypeString,
Computed: true,
Expand Down Expand Up @@ -476,6 +484,12 @@ func resourceAppEngineStandardAppVersionCreate(d *schema.ResourceData, meta inte
} else if v, ok := d.GetOkExists("entrypoint"); !isEmptyValue(reflect.ValueOf(entrypointProp)) && (ok || !reflect.DeepEqual(v, entrypointProp)) {
obj["entrypoint"] = entrypointProp
}
inboundServicesProp, err := expandAppEngineFlexibleAppVersionInboundServices(d.Get("inbound_services"), d, config)
if err != nil {
return err
} else if v, ok := d.GetOkExists("inbound_services"); !isEmptyValue(reflect.ValueOf(inboundServicesProp)) && (ok || !reflect.DeepEqual(v, inboundServicesProp)) {
obj["inboundServices"] = inboundServicesProp
}
instanceClassProp, err := expandAppEngineStandardAppVersionInstanceClass(d.Get("instance_class"), d, config)
if err != nil {
return err
Expand Down Expand Up @@ -591,6 +605,9 @@ func resourceAppEngineStandardAppVersionRead(d *schema.ResourceData, meta interf
if err := d.Set("libraries", flattenAppEngineStandardAppVersionLibraries(res["libraries"], d, config)); err != nil {
return fmt.Errorf("Error reading StandardAppVersion: %s", err)
}
if err := d.Set("inbound_services", flattenAppEngineFlexibleAppVersionInboundServices(res["inboundServices"], d, config)); err != nil {
return fmt.Errorf("Error reading StandardAppVersion: %s", err)
}
if err := d.Set("instance_class", flattenAppEngineStandardAppVersionInstanceClass(res["instanceClass"], d, config)); err != nil {
return fmt.Errorf("Error reading StandardAppVersion: %s", err)
}
Expand Down Expand Up @@ -670,6 +687,12 @@ func resourceAppEngineStandardAppVersionUpdate(d *schema.ResourceData, meta inte
} else if v, ok := d.GetOkExists("entrypoint"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, entrypointProp)) {
obj["entrypoint"] = entrypointProp
}
inboundServicesProp, err := expandAppEngineFlexibleAppVersionInboundServices(d.Get("inbound_services"), d, config)
if err != nil {
return err
} else if v, ok := d.GetOkExists("inbound_services"); !isEmptyValue(reflect.ValueOf(v)) && (ok || !reflect.DeepEqual(v, inboundServicesProp)) {
obj["inboundServices"] = inboundServicesProp
}
instanceClassProp, err := expandAppEngineStandardAppVersionInstanceClass(d.Get("instance_class"), d, config)
if err != nil {
return err
Expand Down

0 comments on commit 4ae86d1

Please sign in to comment.