a lot of refactoring and fixes

This commit is contained in:
kjubybot
2022-07-21 13:38:52 +03:00
parent abd1a439eb
commit fae22aa484
36 changed files with 43 additions and 493 deletions

View File

@@ -274,17 +274,6 @@ func resourceK8sDelete(ctx context.Context, d *schema.ResourceData, m interface{
return nil
}
func resourceK8sExists(ctx context.Context, d *schema.ResourceData, m interface{}) (bool, error) {
log.Debugf("resourceK8sExists: called with id %s, rg %d", d.Id(), d.Get("rg_id").(int))
k8s, err := utilityK8sCheckPresence(ctx, d, m)
if k8s == nil {
return false, err
}
return true, nil
}
func resourceK8sSchemaMake() map[string]*schema.Schema {
return map[string]*schema.Schema{
"name": {

View File

@@ -169,20 +169,6 @@ func resourceK8sWgDelete(ctx context.Context, d *schema.ResourceData, m interfac
return nil
}
func resourceK8sWgExists(ctx context.Context, d *schema.ResourceData, m interface{}) (bool, error) {
log.Debugf("resourceK8sWgExists: called with k8s id %d", d.Get("k8s_id").(int))
wg, err := utilityK8sWgCheckPresence(ctx, d, m)
if wg == nil {
if err != nil {
return false, err
}
return false, nil
}
return true, nil
}
func resourceK8sWgSchemaMake() map[string]*schema.Schema {
return map[string]*schema.Schema{
"k8s_id": {