Skip to content

Commit

Permalink
use state for unknown for name
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronblevy committed Dec 22, 2023
1 parent 06b8c24 commit 300584f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/provider/provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ type Config struct {
func (c *Config) String(t *testing.T) string {
c.setDefaults()
b := &strings.Builder{}
b.WriteString("\n \n")
b.WriteString("\n\n")
write := func(format string, a ...any) {
_, err := fmt.Fprintf(b, format, a...)
require.NoError(t, err)
Expand Down
3 changes: 3 additions & 0 deletions internal/provider/service_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ The change has been taken into account but must still be propagated. You can run
Optional: true,
// If the name attribute is absent, the provider will generate a default.
Computed: true,
PlanModifiers: []planmodifier.String{
stringplanmodifier.UseStateForUnknown(),
},
},
"milli_cpu": schema.Int64Attribute{
MarkdownDescription: "Milli CPU",
Expand Down
2 changes: 1 addition & 1 deletion internal/provider/service_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func TestServiceResource_Read_Replica(t *testing.T) {
resource.TestCheckResourceAttr("timescale_service.read_replica", "memory_gb", "4"),
),
},
// Add VPCd
// Add VPC
{
Config: func() string {
c := replicaConfig
Expand Down

0 comments on commit 300584f

Please sign in to comment.