Skip to content

Commit

Permalink
SourceUri is no longer returned from the API
Browse files Browse the repository at this point in the history
  • Loading branch information
tombuildsstuff committed Jan 24, 2018
1 parent d46a134 commit 39a3172
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 16 deletions.
14 changes: 8 additions & 6 deletions azurerm/import_arm_snapshot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ func TestAccAzureRMSnapshot_import(t *testing.T) {
Config: config,
},
{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"source_uri"},
},
},
})
Expand All @@ -44,9 +45,10 @@ func TestAccAzureRMSnapshot_importEncryption(t *testing.T) {
Config: config,
},
{
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
ResourceName: resourceName,
ImportState: true,
ImportStateVerify: true,
ImportStateVerifyIgnore: []string{"source_uri"},
},
},
})
Expand Down
11 changes: 1 addition & 10 deletions azurerm/resource_arm_snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,12 @@ func resourceArmSnapshot() *schema.Resource {
"source_uri": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ForceNew: true,
},

"source_resource_id": {
Type: schema.TypeString,
Optional: true,
Computed: true,
ForceNew: true,
},

Expand Down Expand Up @@ -173,14 +172,6 @@ func resourceArmSnapshotRead(d *schema.ResourceData, meta interface{}) error {
if data := props.CreationData; data != nil {
d.Set("create_option", string(data.CreateOption))

if uri := data.SourceURI; uri != nil {
d.Set("source_uri", uri)
}

if resourceId := data.SourceResourceID; resourceId != nil {
d.Set("source_resource_id", resourceId)
}

if accountId := data.StorageAccountID; accountId != nil {
d.Set("storage_account_id", accountId)
}
Expand Down

0 comments on commit 39a3172

Please sign in to comment.