Skip to content

Commit e04b5ac

Browse files
committed
More use cases
check missing attr and arguments, ForceNew, enum
1 parent ac91b2d commit e04b5ac

File tree

4 files changed

+17
-2
lines changed

4 files changed

+17
-2
lines changed

internal/services/recoveryservices/backup_policy_vm_workload_resource.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,6 @@ func (r BackupProtectionPolicyVMWorkloadResource) Arguments() map[string]*plugin
405405
ForceNew: true,
406406
ValidateFunc: validation.StringInSlice([]string{
407407
string(protectionpolicies.WorkloadTypeSQLDataBase),
408-
string(protectionpolicies.WorkloadTypeSAPHanaDatabase),
409408
}, false),
410409
},
411410
}

internal/services/resource/resource_group_resource.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ func resourceResourceGroup() *pluginsdk.Resource {
5656
Optional: true,
5757
ValidateFunc: validation.StringIsNotEmpty,
5858
},
59+
60+
"test_missing_arguments_in_untyped_resource": {
61+
Type: pluginsdk.TypeString,
62+
Optional: true,
63+
},
5964
},
6065
}
6166
}

internal/services/resource/resource_group_template_deployment_resource.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ func resourceGroupTemplateDeploymentResource() *pluginsdk.Resource {
5757
"deployment_mode": {
5858
Type: pluginsdk.TypeString,
5959
Required: true,
60+
ForceNew: true,
6061
ValidateFunc: validation.StringInSlice([]string{
6162
string(resources.DeploymentModeComplete),
6263
string(resources.DeploymentModeIncremental),

internal/services/resource/resource_provider_registration_resource.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,21 @@ func (r ResourceProviderRegistrationResource) Arguments() map[string]*pluginsdk.
7676
},
7777
},
7878
},
79+
80+
"test_missing_arguments_in_typed_resource": {
81+
Type: pluginsdk.TypeString,
82+
Required: true,
83+
},
7984
}
8085
}
8186

8287
func (r ResourceProviderRegistrationResource) Attributes() map[string]*pluginsdk.Schema {
83-
return map[string]*pluginsdk.Schema{}
88+
return map[string]*pluginsdk.Schema{
89+
"test_missing_attr_in_typed_resource": {
90+
Type: pluginsdk.TypeString,
91+
Required: true,
92+
},
93+
}
8494
}
8595

8696
func (r ResourceProviderRegistrationResource) ModelObject() interface{} {

0 commit comments

Comments
 (0)