• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Twingate / terraform-provider-twingate / 24429598120

15 Apr 2026 12:17AM UTC coverage: 86.97% (+0.09%) from 86.883%
24429598120

push

github

web-flow
Fix resource alias (#862)

103 of 116 new or added lines in 8 files covered. (88.79%)

12141 of 13960 relevant lines covered (86.97%)

2.31 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

79.17
/twingate/internal/customplanmodifier/stringplanmodifier_usenullstringwhenvalueomitted.go
1
package customplanmodifier
2

3
import (
4
        "context"
5

6
        "github.com/hashicorp/terraform-plugin-framework/resource/schema/planmodifier"
7
        "github.com/hashicorp/terraform-plugin-framework/types"
8
)
9

10
func UseNullStringWhenValueOmitted() planmodifier.String {
3✔
11
        return useNullStringWhenValueOmitted{}
3✔
12
}
3✔
13

14
type useNullStringWhenValueOmitted struct{}
15

16
func (m useNullStringWhenValueOmitted) Description(_ context.Context) string {
2✔
17
        return ""
2✔
18
}
2✔
19

NEW
20
func (m useNullStringWhenValueOmitted) MarkdownDescription(_ context.Context) string {
×
NEW
21
        return ""
×
NEW
22
}
×
23

24
func (m useNullStringWhenValueOmitted) PlanModifyString(ctx context.Context, req planmodifier.StringRequest, resp *planmodifier.StringResponse) {
2✔
25
        if req.StateValue.IsNull() && req.ConfigValue.IsNull() {
4✔
26
                resp.PlanValue = types.StringNull()
2✔
27

2✔
28
                return
2✔
29
        }
2✔
30

31
        // Do nothing if there is no state value.
32
        if req.StateValue.IsNull() {
4✔
33
                return
2✔
34
        }
2✔
35

36
        // Do nothing if there is an unknown configuration value, otherwise interpolation gets messed up.
37
        if req.ConfigValue.IsUnknown() {
2✔
NEW
38
                return
×
NEW
39
        }
×
40

41
        if req.ConfigValue.IsNull() && !req.PlanValue.IsNull() {
4✔
42
                resp.PlanValue = types.StringNull()
2✔
43
        }
2✔
44
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc