diff --git a/pkg/oci/client/config.go b/pkg/oci/client/config.go index 55906e4..3f4fbb9 100644 --- a/pkg/oci/client/config.go +++ b/pkg/oci/client/config.go @@ -165,9 +165,6 @@ func validateAuthConfig(c *Config, fldPath *field.Path) field.ErrorList { errList := field.ErrorList{} if c.UseInstancePrincipals { - if c.Auth.Region != "" { - errList = append(errList, field.Forbidden(fldPath.Child("region"), "cannot be used when useInstancePrincipals is enabled")) - } if c.Auth.TenancyOCID != "" { errList = append(errList, field.Forbidden(fldPath.Child("tenancy"), "cannot be used when useInstancePrincipals is enabled")) } diff --git a/pkg/oci/client/config_test.go b/pkg/oci/client/config_test.go index 88272a5..9766c18 100644 --- a/pkg/oci/client/config_test.go +++ b/pkg/oci/client/config_test.go @@ -273,7 +273,6 @@ func TestValidateConfig(t *testing.T) { }, }, errs: field.ErrorList{ - &field.Error{Type: field.ErrorTypeForbidden, Field: "auth.region", Detail: "cannot be used when useInstancePrincipals is enabled", BadValue: ""}, &field.Error{Type: field.ErrorTypeForbidden, Field: "auth.tenancy", Detail: "cannot be used when useInstancePrincipals is enabled", BadValue: ""}, &field.Error{Type: field.ErrorTypeForbidden, Field: "auth.user", Detail: "cannot be used when useInstancePrincipals is enabled", BadValue: ""}, &field.Error{Type: field.ErrorTypeForbidden, Field: "auth.key", Detail: "cannot be used when useInstancePrincipals is enabled", BadValue: ""},