Skip to content

Commit 9cbcb9a

Browse files
radeksimkoRadek Simko
authored andcommitted
Remove no-op Updates from resource schemas
1 parent 641b701 commit 9cbcb9a

8 files changed

Lines changed: 1 addition & 33 deletions

builtin/providers/atlas/resource_artifact.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ func resourceArtifact() *schema.Resource {
1919
return &schema.Resource{
2020
Create: resourceArtifactRead,
2121
Read: resourceArtifactRead,
22-
Update: resourceArtifactRead,
2322
Delete: resourceArtifactDelete,
2423

2524
Schema: map[string]*schema.Schema{

builtin/providers/aws/resource_aws_app_cookie_stickiness_policy.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ func resourceAwsAppCookieStickinessPolicy() *schema.Resource {
1515
// There is no concept of "updating" an App Stickiness policy in
1616
// the AWS API.
1717
Create: resourceAwsAppCookieStickinessPolicyCreate,
18-
Update: resourceAwsAppCookieStickinessPolicyCreate,
19-
2018
Read: resourceAwsAppCookieStickinessPolicyRead,
2119
Delete: resourceAwsAppCookieStickinessPolicyDelete,
2220

builtin/providers/aws/resource_aws_lb_cookie_stickiness_policy.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ func resourceAwsLBCookieStickinessPolicy() *schema.Resource {
1515
// There is no concept of "updating" an LB Stickiness policy in
1616
// the AWS API.
1717
Create: resourceAwsLBCookieStickinessPolicyCreate,
18-
Update: resourceAwsLBCookieStickinessPolicyCreate,
19-
2018
Read: resourceAwsLBCookieStickinessPolicyRead,
2119
Delete: resourceAwsLBCookieStickinessPolicyDelete,
2220

builtin/providers/aws/resource_aws_s3_bucket_object.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ func resourceAwsS3BucketObject() *schema.Resource {
1616
return &schema.Resource{
1717
Create: resourceAwsS3BucketObjectPut,
1818
Read: resourceAwsS3BucketObjectRead,
19-
Update: resourceAwsS3BucketObjectPut,
2019
Delete: resourceAwsS3BucketObjectDelete,
2120

2221
Schema: map[string]*schema.Schema{

builtin/providers/aws/resource_vpn_connection_route.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ func resourceAwsVpnConnectionRoute() *schema.Resource {
1717
// You can't update a route. You can just delete one and make
1818
// a new one.
1919
Create: resourceAwsVpnConnectionRouteCreate,
20-
Update: resourceAwsVpnConnectionRouteCreate,
21-
2220
Read: resourceAwsVpnConnectionRouteRead,
2321
Delete: resourceAwsVpnConnectionRouteDelete,
2422

builtin/providers/azure/resource_azure_storage_blob.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ func resourceAzureStorageBlob() *schema.Resource {
1313
return &schema.Resource{
1414
Create: resourceAzureStorageBlobCreate,
1515
Read: resourceAzureStorageBlobRead,
16-
Update: resourceAzureStorageBlobUpdate,
1716
Exists: resourceAzureStorageBlobExists,
1817
Delete: resourceAzureStorageBlobDelete,
1918

@@ -122,17 +121,6 @@ func resourceAzureStorageBlobRead(d *schema.ResourceData, meta interface{}) erro
122121
return nil
123122
}
124123

125-
// resourceAzureStorageBlobUpdate does all the necessary API calls to
126-
// update a blob on Azure.
127-
func resourceAzureStorageBlobUpdate(d *schema.ResourceData, meta interface{}) error {
128-
// NOTE: although empty as most parameters have ForceNew set; this is
129-
// still required in case of changes to the storage_service_key
130-
131-
// run the ExistsFunc beforehand to ensure the resource's existence nonetheless:
132-
_, err := resourceAzureStorageBlobExists(d, meta)
133-
return err
134-
}
135-
136124
// resourceAzureStorageBlobExists does all the necessary API calls to
137125
// check for the existence of the blob on Azure.
138126
func resourceAzureStorageBlobExists(d *schema.ResourceData, meta interface{}) (bool, error) {

builtin/providers/google/resource_storage_bucket_object.go

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package google
22

33
import (
4-
"os"
54
"fmt"
5+
"os"
66

77
"github.com/hashicorp/terraform/helper/schema"
88

@@ -13,7 +13,6 @@ func resourceStorageBucketObject() *schema.Resource {
1313
return &schema.Resource{
1414
Create: resourceStorageBucketObjectCreate,
1515
Read: resourceStorageBucketObjectRead,
16-
Update: resourceStorageBucketObjectUpdate,
1716
Delete: resourceStorageBucketObjectDelete,
1817

1918
Schema: map[string]*schema.Schema{
@@ -107,12 +106,6 @@ func resourceStorageBucketObjectRead(d *schema.ResourceData, meta interface{}) e
107106
return nil
108107
}
109108

110-
func resourceStorageBucketObjectUpdate(d *schema.ResourceData, meta interface{}) error {
111-
// The Cloud storage API doesn't support updating object data contents,
112-
// only metadata. So once we implement metadata we'll have work to do here
113-
return nil
114-
}
115-
116109
func resourceStorageBucketObjectDelete(d *schema.ResourceData, meta interface{}) error {
117110
config := meta.(*Config)
118111

builtin/providers/null/resource.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ func resource() *schema.Resource {
1616
return &schema.Resource{
1717
Create: resourceCreate,
1818
Read: resourceRead,
19-
Update: resourceUpdate,
2019
Delete: resourceDelete,
2120

2221
Schema: map[string]*schema.Schema{},
@@ -32,10 +31,6 @@ func resourceRead(d *schema.ResourceData, meta interface{}) error {
3231
return nil
3332
}
3433

35-
func resourceUpdate(d *schema.ResourceData, meta interface{}) error {
36-
return nil
37-
}
38-
3934
func resourceDelete(d *schema.ResourceData, meta interface{}) error {
4035
d.SetId("")
4136
return nil

0 commit comments

Comments
 (0)