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

Scalr / terraform-provider-scalr / 19468430585

18 Nov 2025 01:47PM UTC coverage: 61.522% (-2.8%) from 64.37%
19468430585

push

github

web-flow
Merge pull request #476 from Scalr/SCALRCORE-36442

SCALRCORE-36442 Provider > Crash when importing system IAM role

169 of 339 new or added lines in 10 files covered. (49.85%)

330 existing lines in 13 files now uncovered.

8925 of 14507 relevant lines covered (61.52%)

247.16 hits per line

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

0.0
/internal/framework/planmodifiers/stringmodifier/use_state_or_null_for_unknown.go
1
package stringmodifier
2

3
import (
4
        "context"
5

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

UNCOV
9
func UseStateOrNullForUnknown() planmodifier.String {
×
UNCOV
10
        return useStateOrNullForUnknownModifier{}
×
UNCOV
11
}
×
12

13
type useStateOrNullForUnknownModifier struct{}
14

UNCOV
15
func (m useStateOrNullForUnknownModifier) Description(_ context.Context) string {
×
UNCOV
16
        return "Use state value if planned value is unknown, even if it is null."
×
UNCOV
17
}
×
18

19
func (m useStateOrNullForUnknownModifier) MarkdownDescription(ctx context.Context) string {
×
20
        return m.Description(ctx)
×
21
}
×
22

UNCOV
23
func (m useStateOrNullForUnknownModifier) PlanModifyString(_ context.Context, req planmodifier.StringRequest, resp *planmodifier.StringResponse) {
×
UNCOV
24
        // Do nothing on resource creation.
×
UNCOV
25
        if req.State.Raw.IsNull() {
×
UNCOV
26
                return
×
UNCOV
27
        }
×
28

29
        // Do nothing if there is a known planned value.
UNCOV
30
        if !req.PlanValue.IsUnknown() {
×
UNCOV
31
                return
×
UNCOV
32
        }
×
33

34
        // Do nothing if there is an unknown configuration value.
UNCOV
35
        if req.ConfigValue.IsUnknown() {
×
36
                return
×
37
        }
×
38

UNCOV
39
        resp.PlanValue = req.StateValue
×
40
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc