Remove no-op Updates from resource schemas

This commit is contained in:
Radek Simko 2015-09-19 22:37:14 +01:00 committed by Radek Simko
parent 641b701830
commit 9cbcb9a438
8 changed files with 1 additions and 33 deletions

View File

@ -19,7 +19,6 @@ func resourceArtifact() *schema.Resource {
return &schema.Resource{
Create: resourceArtifactRead,
Read: resourceArtifactRead,
Update: resourceArtifactRead,
Delete: resourceArtifactDelete,
Schema: map[string]*schema.Schema{

View File

@ -15,8 +15,6 @@ func resourceAwsAppCookieStickinessPolicy() *schema.Resource {
// There is no concept of "updating" an App Stickiness policy in
// the AWS API.
Create: resourceAwsAppCookieStickinessPolicyCreate,
Update: resourceAwsAppCookieStickinessPolicyCreate,
Read: resourceAwsAppCookieStickinessPolicyRead,
Delete: resourceAwsAppCookieStickinessPolicyDelete,

View File

@ -15,8 +15,6 @@ func resourceAwsLBCookieStickinessPolicy() *schema.Resource {
// There is no concept of "updating" an LB Stickiness policy in
// the AWS API.
Create: resourceAwsLBCookieStickinessPolicyCreate,
Update: resourceAwsLBCookieStickinessPolicyCreate,
Read: resourceAwsLBCookieStickinessPolicyRead,
Delete: resourceAwsLBCookieStickinessPolicyDelete,

View File

@ -16,7 +16,6 @@ func resourceAwsS3BucketObject() *schema.Resource {
return &schema.Resource{
Create: resourceAwsS3BucketObjectPut,
Read: resourceAwsS3BucketObjectRead,
Update: resourceAwsS3BucketObjectPut,
Delete: resourceAwsS3BucketObjectDelete,
Schema: map[string]*schema.Schema{

View File

@ -17,8 +17,6 @@ func resourceAwsVpnConnectionRoute() *schema.Resource {
// You can't update a route. You can just delete one and make
// a new one.
Create: resourceAwsVpnConnectionRouteCreate,
Update: resourceAwsVpnConnectionRouteCreate,
Read: resourceAwsVpnConnectionRouteRead,
Delete: resourceAwsVpnConnectionRouteDelete,

View File

@ -13,7 +13,6 @@ func resourceAzureStorageBlob() *schema.Resource {
return &schema.Resource{
Create: resourceAzureStorageBlobCreate,
Read: resourceAzureStorageBlobRead,
Update: resourceAzureStorageBlobUpdate,
Exists: resourceAzureStorageBlobExists,
Delete: resourceAzureStorageBlobDelete,
@ -122,17 +121,6 @@ func resourceAzureStorageBlobRead(d *schema.ResourceData, meta interface{}) erro
return nil
}
// resourceAzureStorageBlobUpdate does all the necessary API calls to
// update a blob on Azure.
func resourceAzureStorageBlobUpdate(d *schema.ResourceData, meta interface{}) error {
// NOTE: although empty as most parameters have ForceNew set; this is
// still required in case of changes to the storage_service_key
// run the ExistsFunc beforehand to ensure the resource's existence nonetheless:
_, err := resourceAzureStorageBlobExists(d, meta)
return err
}
// resourceAzureStorageBlobExists does all the necessary API calls to
// check for the existence of the blob on Azure.
func resourceAzureStorageBlobExists(d *schema.ResourceData, meta interface{}) (bool, error) {

View File

@ -1,8 +1,8 @@
package google
import (
"os"
"fmt"
"os"
"github.com/hashicorp/terraform/helper/schema"
@ -13,7 +13,6 @@ func resourceStorageBucketObject() *schema.Resource {
return &schema.Resource{
Create: resourceStorageBucketObjectCreate,
Read: resourceStorageBucketObjectRead,
Update: resourceStorageBucketObjectUpdate,
Delete: resourceStorageBucketObjectDelete,
Schema: map[string]*schema.Schema{
@ -107,12 +106,6 @@ func resourceStorageBucketObjectRead(d *schema.ResourceData, meta interface{}) e
return nil
}
func resourceStorageBucketObjectUpdate(d *schema.ResourceData, meta interface{}) error {
// The Cloud storage API doesn't support updating object data contents,
// only metadata. So once we implement metadata we'll have work to do here
return nil
}
func resourceStorageBucketObjectDelete(d *schema.ResourceData, meta interface{}) error {
config := meta.(*Config)

View File

@ -16,7 +16,6 @@ func resource() *schema.Resource {
return &schema.Resource{
Create: resourceCreate,
Read: resourceRead,
Update: resourceUpdate,
Delete: resourceDelete,
Schema: map[string]*schema.Schema{},
@ -32,10 +31,6 @@ func resourceRead(d *schema.ResourceData, meta interface{}) error {
return nil
}
func resourceUpdate(d *schema.ResourceData, meta interface{}) error {
return nil
}
func resourceDelete(d *schema.ResourceData, meta interface{}) error {
d.SetId("")
return nil