Skip to content

Commit

Permalink
Merge branch '10-unable-to-unset-client' into 'main'
Browse files Browse the repository at this point in the history
Resolve "Client and interval flags do not revert to default when unset"

Closes #10

See merge request pub/jmon/jmon-terraform-provider!16
  • Loading branch information
MatthewJohn committed Aug 26, 2023
2 parents b7475c9 + 6c2e092 commit 5bdf541
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
TEST?=$$(go list ./... | grep -v 'vendor')
HOSTNAME=github.com
HOSTNAME=registry.terraform.io
NAMESPACE=dockstudios
NAME=jmon
BINARY=terraform-provider-${NAME}
Expand Down
11 changes: 5 additions & 6 deletions jmon/resource_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func resourceCheck() *schema.Resource {
Type: schema.TypeString,
Optional: true,
ForceNew: true,
Computed: true,
Default: "default",
},
"steps": &schema.Schema{
Type: schema.TypeString,
Expand All @@ -60,22 +60,22 @@ func resourceCheck() *schema.Resource {
"interval": &schema.Schema{
Type: schema.TypeInt,
Optional: true,
Computed: true,
Default: 0,
},
"timeout": &schema.Schema{
Type: schema.TypeInt,
Optional: true,
Computed: true,
Default: 0,
},
"client": &schema.Schema{
Type: schema.TypeString,
Optional: true,
Computed: true,
Default: nil,
},
"enable": &schema.Schema{
Type: schema.TypeBool,
Optional: true,
Computed: true,
Default: true,
},
"attributes": &schema.Schema{
Type: schema.TypeMap,
Expand Down Expand Up @@ -287,7 +287,6 @@ func resourceCheckRead(ctx context.Context, d *schema.ResourceData, m interface{
ymlErr := yaml.Unmarshal([]byte(d.Get("steps").(string)), &currentSteps)
if ymlErr == nil {
if reflect.DeepEqual(currentSteps, check.Steps) {
log.Printf("!!!!!!!!!!!!!!!!!!!!!!!!!! STEPS ARE EQUALS")
updateSteps = false
}
}
Expand Down

0 comments on commit 5bdf541

Please sign in to comment.