Skip to content

Commit

Permalink
Don't recreate loadbalancer_rule resources
Browse files Browse the repository at this point in the history
No longer need to recreate the resource when changing the member_ids,
private_port, public_port or protocol options.

Signed-off-by: Stephen Hoekstra <[email protected]>
  • Loading branch information
shoekstra committed Feb 25, 2019
1 parent 57b98e3 commit f13f048
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/) and this p
## Unreleased

- Add option to configure provider using `COSMIC_CONFIG` and `COSMIC_PROFILE` environment variables
- Changing `cosmic_loadbalancer_rule`'s `member_ids`, `private_port`, `public_port` or `protocol` options no longer recreates the resource
- Changing `cosmic_network`'s `ip_exclusion_list` option no longer recreates the resource
- Changing `cosmic_vpc`'s `vpc_offering` option no longer recreates the resource
- Removed `cosmic_egress_firewall` and `cosmic_firewall` resources; no longer implemented by the Cosmic API
Expand Down
4 changes: 0 additions & 4 deletions cosmic/resource_cosmic_loadbalancer_rule.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,17 @@ func resourceCosmicLoadBalancerRule() *schema.Resource {
"private_port": &schema.Schema{
Type: schema.TypeInt,
Required: true,
ForceNew: true,
},

"public_port": &schema.Schema{
Type: schema.TypeInt,
Required: true,
ForceNew: true,
},

"protocol": &schema.Schema{
Type: schema.TypeString,
Optional: true,
Computed: true,
ForceNew: true,
ValidateFunc: func(val interface{}, key string) (warns []string, errs []error) {
v := val.(string)
switch v {
Expand All @@ -80,7 +77,6 @@ func resourceCosmicLoadBalancerRule() *schema.Resource {
"member_ids": &schema.Schema{
Type: schema.TypeList,
Required: true,
ForceNew: true,
Elem: &schema.Schema{Type: schema.TypeString},
},

Expand Down

0 comments on commit f13f048

Please sign in to comment.