...

Source file src/github.com/GoogleCloudPlatform/k8s-config-connector/pkg/test/resourcefixture/contexts/sql_context.go

Documentation: github.com/GoogleCloudPlatform/k8s-config-connector/pkg/test/resourcefixture/contexts

     1  // Copyright 2022 Google LLC
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //      http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  
    15  package contexts
    16  
    17  func init() {
    18  	resourceContextMap["mysqlinstance"] = ResourceContext{
    19  		// SQL instances names are reserved for 1 week after use: https://cloud.google.com/sql/docs/mysql/delete-instance
    20  		SkipDriftDetection: true,
    21  		ResourceKind:       "SQLInstance",
    22  	}
    23  
    24  	resourceContextMap["sqlserverinstance"] = ResourceContext{
    25  		// SQL instances names are reserved for 1 week after use: https://cloud.google.com/sql/docs/mysql/delete-instance
    26  		SkipDriftDetection: true,
    27  		ResourceKind:       "SQLInstance",
    28  	}
    29  
    30  	resourceContextMap["sqldatabase"] = ResourceContext{
    31  		ResourceKind: "SQLDatabase",
    32  	}
    33  
    34  	resourceContextMap["sqlsslcert"] = ResourceContext{
    35  		ResourceKind: "SQLSSLCert",
    36  		SkipUpdate:   true,
    37  	}
    38  
    39  	resourceContextMap["sqluser"] = ResourceContext{
    40  		ResourceKind: "SQLUser",
    41  		// Skip update test, as the only field that is updatable is "password", which we
    42  		// can't verify on the underlying API due to it not being passed back in a GET.
    43  		SkipUpdate: true,
    44  	}
    45  }
    46  

View as plain text