Skip to content

Commit e03965d

Browse files
committed
ignore field in import
1 parent 23d6031 commit e03965d

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

internal/serviceapi/pushbasedlogexportapi/resource_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ func basicTestCase(tb testing.TB) *resource.TestCase {
5656
ImportState: true,
5757
ImportStateVerify: true,
5858
ImportStateVerifyIdentifierAttribute: "group_id",
59+
ImportStateVerifyIgnore: []string{"delete_on_create_timeout"},
5960
},
6061
},
6162
}

internal/serviceapi/searchdeploymentapi/resource_test.go

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,12 @@ func TestAccSearchDeploymentAPI_basic(t *testing.T) {
3131
newSearchNodeTestStep(resourceID, orgID, projectName, clusterName, "S20_HIGHCPU_NVME", 3),
3232
newSearchNodeTestStep(resourceID, orgID, projectName, clusterName, "S30_HIGHCPU_NVME", 4),
3333
{
34-
Config: configBasic(orgID, projectName, clusterName, "S30_HIGHCPU_NVME", 4),
35-
ResourceName: resourceID,
36-
ImportStateIdFunc: importStateIDFunc(resourceID),
37-
ImportState: true,
38-
ImportStateVerify: true,
34+
Config: configBasic(orgID, projectName, clusterName, "S30_HIGHCPU_NVME", 4),
35+
ResourceName: resourceID,
36+
ImportStateIdFunc: importStateIDFunc(resourceID),
37+
ImportState: true,
38+
ImportStateVerify: true,
39+
ImportStateVerifyIgnore: []string{"delete_on_create_timeout"},
3940
},
4041
},
4142
})

internal/serviceapi/streamprocessorapi/resource_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func TestAccStreamProcessorAPI_basic(t *testing.T) {
6161
ImportStateIdFunc: importStateIDFunc(resourceName),
6262
ImportState: true,
6363
ImportStateVerify: true,
64-
ImportStateVerifyIgnore: []string{"stats"},
64+
ImportStateVerifyIgnore: []string{"stats", "delete_on_create_timeout"},
6565
ImportStateVerifyIdentifierAttribute: "name", // id is not used because _id is returned in Atlas which is not a legal name for a Terraform attribute.
6666
},
6767
{

tools/codegen/gofilegen/codetemplate/resource-file.go.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ func readAPICallParams(model *TFModel) *config.APICallParams {
200200
}
201201
}
202202

203-
{{- with .APIOperations.Delete}}
203+
{{with .APIOperations.Delete}}
204204
func deleteAPICallParams(model *TFModel) *config.APICallParams {
205205
pathParams := map[string]string{ {{range .PathParams }}
206206
"{{ .CamelCaseName }}": model.{{ .PascalCaseName }}.ValueString(),
@@ -213,4 +213,4 @@ func deleteAPICallParams(model *TFModel) *config.APICallParams {
213213
Method: "{{ .HTTPMethod }}",
214214
}
215215
}
216-
{{- end}}
216+
{{end}}

0 commit comments

Comments
 (0)