Skip to content

Commit

Permalink
Removing the updates from the create
Browse files Browse the repository at this point in the history
  • Loading branch information
tombuildsstuff committed Sep 19, 2017
1 parent 976e2b4 commit 978c976
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions azurerm/resource_arm_app_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,6 @@ func resourceArmAppServiceCreate(d *schema.ResourceData, meta interface{}) error
tags := d.Get("tags").(map[string]interface{})

siteConfig := expandAppServiceSiteConfig(d)
appSettings := expandAppServiceAppSettings(d)

siteEnvelope := web.Site{
Location: &location,
Expand Down Expand Up @@ -268,24 +267,6 @@ func resourceArmAppServiceCreate(d *schema.ResourceData, meta interface{}) error
return err
}

settings := web.StringDictionary{
Properties: appSettings,
}
_, err = client.UpdateApplicationSettings(resGroup, name, settings)
if err != nil {
return fmt.Errorf("Error updating Application Settings for App Service %q: %+v", name, err)
}

connectionStrings := expandAppServiceConnectionStrings(d)
properties := web.ConnectionStringDictionary{
Properties: connectionStrings,
}

_, err = client.UpdateConnectionStrings(resGroup, name, properties)
if err != nil {
return fmt.Errorf("Error updating Connection Strings for App Service %q: %+v", name, err)
}

read, err := client.Get(resGroup, name)
if err != nil {
return err
Expand Down Expand Up @@ -365,7 +346,7 @@ func resourceArmAppServiceRead(d *schema.ResourceData, meta interface{}) error {
resp, err := client.Get(resGroup, name)
if err != nil {
if utils.ResponseWasNotFound(resp.Response) {
// TODO: debug logging
log.Printf("[DEBUG] App Service %q (resource group %q) was not found - removing from state", name, resGroup)
d.SetId("")
return nil
}
Expand Down

0 comments on commit 978c976

Please sign in to comment.