provider/consul: cleanup

This commit is contained in:
Armon Dadgar 2014-07-26 20:21:48 -04:00
parent efa3e1f25f
commit dc0de63a72
1 changed files with 7 additions and 9 deletions

View File

@ -26,6 +26,12 @@ func resource_consul_keys_validation() *config.Validator {
}, },
} }
} }
func resource_consul_keys_update(
s *terraform.ResourceState,
d *terraform.ResourceDiff,
meta interface{}) (*terraform.ResourceState, error) {
return resource_consul_keys_create(s, d, meta)
}
func resource_consul_keys_create( func resource_consul_keys_create(
s *terraform.ResourceState, s *terraform.ResourceState,
@ -64,7 +70,7 @@ func resource_consul_keys_create(
return rs, err return rs, err
} }
if valueRaw, shouldSet := sub["value"]; shouldSet { if valueRaw, ok := sub["value"]; ok {
value, ok := valueRaw.(string) value, ok := valueRaw.(string)
if !ok { if !ok {
return rs, fmt.Errorf("Failed to get value for key '%s'", key) return rs, fmt.Errorf("Failed to get value for key '%s'", key)
@ -125,14 +131,6 @@ func resource_consul_keys_destroy(
return nil return nil
} }
func resource_consul_keys_update(
s *terraform.ResourceState,
d *terraform.ResourceDiff,
meta interface{}) (*terraform.ResourceState, error) {
panic("cannot update")
return s, nil
}
func resource_consul_keys_diff( func resource_consul_keys_diff(
s *terraform.ResourceState, s *terraform.ResourceState,
c *terraform.ResourceConfig, c *terraform.ResourceConfig,