Skip to content

Commit d6fc468

Browse files
lint - replace deprecated ImportStatePassthrough with ImportStatePassthroughContext
1 parent 4d1c3d7 commit d6fc468

20 files changed

+26
-63
lines changed

codefresh/data_step_types.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,11 @@ func dataSourceStepTypesRead(d *schema.ResourceData, meta interface{}) error {
7373

7474
}
7575

76-
func mapDataSetTypesToResource(stepTypesVersions cfclient.StepTypesVersions, d *schema.ResourceData) error {
77-
err := d.Set("name", stepTypesVersions.Name)
78-
if err != nil {
79-
return err
80-
}
81-
err = d.Set("version", flattenVersions(stepTypesVersions.Name, stepTypesVersions.Versions))
82-
return err
83-
}
76+
// func mapDataSetTypesToResource(stepTypesVersions cfclient.StepTypesVersions, d *schema.ResourceData) error {
77+
// err := d.Set("name", stepTypesVersions.Name)
78+
// if err != nil {
79+
// return err
80+
// }
81+
// err = d.Set("version", flattenVersions(stepTypesVersions.Name, stepTypesVersions.Versions))
82+
// return err
83+
// }

codefresh/resource_abac_rules.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ func resourceGitopsAbacRule() *schema.Resource {
2121
Update: resourceGitopsAbacRuleUpdate,
2222
Delete: resourceGitopsAbacRuleDelete,
2323
Importer: &schema.ResourceImporter{
24-
State: schema.ImportStatePassthrough,
24+
StateContext: schema.ImportStatePassthroughContext,
2525
},
2626
Schema: map[string]*schema.Schema{
2727
"id": {

codefresh/resource_account.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ func resourceAccount() *schema.Resource {
1515
Update: resourceAccountUpdate,
1616
Delete: resourceAccountDelete,
1717
Importer: &schema.ResourceImporter{
18-
State: schema.ImportStatePassthrough,
18+
StateContext: schema.ImportStatePassthroughContext,
1919
},
2020
Schema: map[string]*schema.Schema{
2121
"name": {

codefresh/resource_account_admins.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func resourceAccountAdmins() *schema.Resource {
1616
Update: resourceAccountAdminsUpdate,
1717
Delete: resourceAccountAdminsDelete,
1818
Importer: &schema.ResourceImporter{
19-
State: schema.ImportStatePassthrough,
19+
StateContext: schema.ImportStatePassthroughContext,
2020
},
2121
Schema: map[string]*schema.Schema{
2222
"account_id": {

codefresh/resource_account_gitops_settings.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func resourceAccountGitopsSettings() *schema.Resource {
1818
Create: resourceAccountGitopsSettingsUpdate,
1919
Update: resourceAccountGitopsSettingsUpdate,
2020
Importer: &schema.ResourceImporter{
21-
State: schema.ImportStatePassthrough,
21+
StateContext: schema.ImportStatePassthroughContext,
2222
},
2323
// Delete not implemenented as gitops settings cannot be removed, only updated
2424
Delete: resourceAccountGitopsSettingsDelete,

codefresh/resource_account_idp.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ func resourceAccountIdp() *schema.Resource {
2121
Update: resourceAccountIDPUpdate,
2222
Delete: resourceAccountIDPDelete,
2323
Importer: &schema.ResourceImporter{
24-
State: schema.ImportStatePassthrough,
24+
StateContext: schema.ImportStatePassthroughContext,
2525
},
2626
CustomizeDiff: customdiff.All(
2727
// Recreate idp if the type has changed - we cannot simply do ForceNew on client_type as it is computed

codefresh/resource_account_user_association.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func resourceAccountUserAssociation() *schema.Resource {
1919
Update: resourceAccountUserAssociationUpdate,
2020
Delete: resourceAccountUserAssociationDelete,
2121
Importer: &schema.ResourceImporter{
22-
State: schema.ImportStatePassthrough,
22+
StateContext: schema.ImportStatePassthroughContext,
2323
},
2424
Schema: map[string]*schema.Schema{
2525
"email": {

codefresh/resource_api_key.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func resourceApiKey() *schema.Resource {
2222
Update: resourceApiKeyUpdate,
2323
Delete: resourceApiKeyDelete,
2424
Importer: &schema.ResourceImporter{
25-
State: schema.ImportStatePassthrough,
25+
StateContext: schema.ImportStatePassthroughContext,
2626
},
2727
Schema: map[string]*schema.Schema{
2828
"name": {

codefresh/resource_context.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func resourceContext() *schema.Resource {
4848
Update: resourceContextUpdate,
4949
Delete: resourceContextDelete,
5050
Importer: &schema.ResourceImporter{
51-
State: schema.ImportStatePassthrough,
51+
StateContext: schema.ImportStatePassthroughContext,
5252
},
5353
Schema: map[string]*schema.Schema{
5454
"name": {

codefresh/resource_idp.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ func resourceIdp() *schema.Resource {
2222
Update: resourceIDPUpdate,
2323
Delete: resourceIDPDelete,
2424
Importer: &schema.ResourceImporter{
25-
State: schema.ImportStatePassthrough,
25+
StateContext: schema.ImportStatePassthroughContext,
2626
},
2727
CustomizeDiff: customdiff.All(
2828
// Recreate idp if the type has changed - we cannot simply do ForceNew on client_type as it is computed

0 commit comments

Comments
 (0)