diff --git a/apis/authorization/v1alpha1/zz_generated_terraformed.go b/apis/authorization/v1alpha1/zz_generated_terraformed.go index 101e7ec..58f8e78 100755 --- a/apis/authorization/v1alpha1/zz_generated_terraformed.go +++ b/apis/authorization/v1alpha1/zz_generated_terraformed.go @@ -11,6 +11,7 @@ Copyright 2022 Upbound Inc. package v1alpha1 import ( + "dario.cat/mergo" "github.com/pkg/errors" "github.com/crossplane/upjet/pkg/resource" @@ -83,6 +84,36 @@ func (tr *RoleAssignment) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this RoleAssignment +func (tr *RoleAssignment) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this RoleAssignment using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *RoleAssignment) LateInitialize(attrs []byte) (bool, error) { diff --git a/apis/authorization/v1alpha1/zz_roleassignment_types.go b/apis/authorization/v1alpha1/zz_roleassignment_types.go index a361532..79fee8b 100755 --- a/apis/authorization/v1alpha1/zz_roleassignment_types.go +++ b/apis/authorization/v1alpha1/zz_roleassignment_types.go @@ -15,127 +15,136 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type RoleAssignmentInitParameters struct { - // The condition that limits the resources that the role can be assigned to. Changing this forces a new resource to be created. - Condition *string `json:"condition,omitempty" tf:"condition,omitempty"` - // The version of the condition. Possible values are 1.0 or 2.0. Changing this forces a new resource to be created. - ConditionVersion *string `json:"conditionVersion,omitempty" tf:"condition_version,omitempty"` +// The condition that limits the resources that the role can be assigned to. Changing this forces a new resource to be created. +Condition *string `json:"condition,omitempty" tf:"condition,omitempty"` + +// The version of the condition. Possible values are 1.0 or 2.0. Changing this forces a new resource to be created. +ConditionVersion *string `json:"conditionVersion,omitempty" tf:"condition_version,omitempty"` - // The delegated Azure Resource Id which contains a Managed Identity. Changing this forces a new resource to be created. - DelegatedManagedIdentityResourceID *string `json:"delegatedManagedIdentityResourceId,omitempty" tf:"delegated_managed_identity_resource_id,omitempty"` +// The delegated Azure Resource Id which contains a Managed Identity. Changing this forces a new resource to be created. +DelegatedManagedIdentityResourceID *string `json:"delegatedManagedIdentityResourceId,omitempty" tf:"delegated_managed_identity_resource_id,omitempty"` - // The description for this Role Assignment. Changing this forces a new resource to be created. - Description *string `json:"description,omitempty" tf:"description,omitempty"` +// The description for this Role Assignment. Changing this forces a new resource to be created. +Description *string `json:"description,omitempty" tf:"description,omitempty"` - // A unique UUID/GUID for this Role Assignment - one will be generated if not specified. Changing this forces a new resource to be created. - Name *string `json:"name,omitempty" tf:"name,omitempty"` +// A unique UUID/GUID for this Role Assignment - one will be generated if not specified. Changing this forces a new resource to be created. +Name *string `json:"name,omitempty" tf:"name,omitempty"` - // The ID of the Principal (User, Group or Service Principal) to assign the Role Definition to. Changing this forces a new resource to be created. - PrincipalID *string `json:"principalId,omitempty" tf:"principal_id,omitempty"` +// The ID of the Principal (User, Group or Service Principal) to assign the Role Definition to. Changing this forces a new resource to be created. +PrincipalID *string `json:"principalId,omitempty" tf:"principal_id,omitempty"` - // The Scoped-ID of the Role Definition. Changing this forces a new resource to be created. Conflicts with role_definition_name. - RoleDefinitionID *string `json:"roleDefinitionId,omitempty" tf:"role_definition_id,omitempty"` +// The Scoped-ID of the Role Definition. Changing this forces a new resource to be created. Conflicts with role_definition_name. +RoleDefinitionID *string `json:"roleDefinitionId,omitempty" tf:"role_definition_id,omitempty"` - // The name of a built-in Role. Changing this forces a new resource to be created. Conflicts with role_definition_id. - RoleDefinitionName *string `json:"roleDefinitionName,omitempty" tf:"role_definition_name,omitempty"` +// The name of a built-in Role. Changing this forces a new resource to be created. Conflicts with role_definition_id. +RoleDefinitionName *string `json:"roleDefinitionName,omitempty" tf:"role_definition_name,omitempty"` - // The scope at which the Role Assignment applies to, such as /subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333, /subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup, or /subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM, or /providers/Microsoft.Management/managementGroups/myMG. Changing this forces a new resource to be created. - Scope *string `json:"scope,omitempty" tf:"scope,omitempty"` +// The scope at which the Role Assignment applies to, such as /subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333, /subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup, or /subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM, or /providers/Microsoft.Management/managementGroups/myMG. Changing this forces a new resource to be created. +Scope *string `json:"scope,omitempty" tf:"scope,omitempty"` - // If the principal_id is a newly provisioned Service Principal set this value to true to skip the Azure Active Directory check which may fail due to replication lag. This argument is only valid if the principal_id is a Service Principal identity. Defaults to false. - SkipServicePrincipalAadCheck *bool `json:"skipServicePrincipalAadCheck,omitempty" tf:"skip_service_principal_aad_check,omitempty"` +// If the principal_id is a newly provisioned Service Principal set this value to true to skip the Azure Active Directory check which may fail due to replication lag. This argument is only valid if the principal_id is a Service Principal identity. Defaults to false. +SkipServicePrincipalAadCheck *bool `json:"skipServicePrincipalAadCheck,omitempty" tf:"skip_service_principal_aad_check,omitempty"` } + type RoleAssignmentObservation struct { - // The condition that limits the resources that the role can be assigned to. Changing this forces a new resource to be created. - Condition *string `json:"condition,omitempty" tf:"condition,omitempty"` - // The version of the condition. Possible values are 1.0 or 2.0. Changing this forces a new resource to be created. - ConditionVersion *string `json:"conditionVersion,omitempty" tf:"condition_version,omitempty"` +// The condition that limits the resources that the role can be assigned to. Changing this forces a new resource to be created. +Condition *string `json:"condition,omitempty" tf:"condition,omitempty"` + +// The version of the condition. Possible values are 1.0 or 2.0. Changing this forces a new resource to be created. +ConditionVersion *string `json:"conditionVersion,omitempty" tf:"condition_version,omitempty"` - // The delegated Azure Resource Id which contains a Managed Identity. Changing this forces a new resource to be created. - DelegatedManagedIdentityResourceID *string `json:"delegatedManagedIdentityResourceId,omitempty" tf:"delegated_managed_identity_resource_id,omitempty"` +// The delegated Azure Resource Id which contains a Managed Identity. Changing this forces a new resource to be created. +DelegatedManagedIdentityResourceID *string `json:"delegatedManagedIdentityResourceId,omitempty" tf:"delegated_managed_identity_resource_id,omitempty"` - // The description for this Role Assignment. Changing this forces a new resource to be created. - Description *string `json:"description,omitempty" tf:"description,omitempty"` +// The description for this Role Assignment. Changing this forces a new resource to be created. +Description *string `json:"description,omitempty" tf:"description,omitempty"` - // The Role Assignment ID. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// The Role Assignment ID. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // A unique UUID/GUID for this Role Assignment - one will be generated if not specified. Changing this forces a new resource to be created. - Name *string `json:"name,omitempty" tf:"name,omitempty"` +// A unique UUID/GUID for this Role Assignment - one will be generated if not specified. Changing this forces a new resource to be created. +Name *string `json:"name,omitempty" tf:"name,omitempty"` - // The ID of the Principal (User, Group or Service Principal) to assign the Role Definition to. Changing this forces a new resource to be created. - PrincipalID *string `json:"principalId,omitempty" tf:"principal_id,omitempty"` +// The ID of the Principal (User, Group or Service Principal) to assign the Role Definition to. Changing this forces a new resource to be created. +PrincipalID *string `json:"principalId,omitempty" tf:"principal_id,omitempty"` - // The type of the principal_id, e.g. User, Group, Service Principal, Application, etc. - PrincipalType *string `json:"principalType,omitempty" tf:"principal_type,omitempty"` +// The type of the principal_id, e.g. User, Group, Service Principal, Application, etc. +PrincipalType *string `json:"principalType,omitempty" tf:"principal_type,omitempty"` - // The Scoped-ID of the Role Definition. Changing this forces a new resource to be created. Conflicts with role_definition_name. - RoleDefinitionID *string `json:"roleDefinitionId,omitempty" tf:"role_definition_id,omitempty"` +// The Scoped-ID of the Role Definition. Changing this forces a new resource to be created. Conflicts with role_definition_name. +RoleDefinitionID *string `json:"roleDefinitionId,omitempty" tf:"role_definition_id,omitempty"` - // The name of a built-in Role. Changing this forces a new resource to be created. Conflicts with role_definition_id. - RoleDefinitionName *string `json:"roleDefinitionName,omitempty" tf:"role_definition_name,omitempty"` +// The name of a built-in Role. Changing this forces a new resource to be created. Conflicts with role_definition_id. +RoleDefinitionName *string `json:"roleDefinitionName,omitempty" tf:"role_definition_name,omitempty"` - // The scope at which the Role Assignment applies to, such as /subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333, /subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup, or /subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM, or /providers/Microsoft.Management/managementGroups/myMG. Changing this forces a new resource to be created. - Scope *string `json:"scope,omitempty" tf:"scope,omitempty"` +// The scope at which the Role Assignment applies to, such as /subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333, /subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup, or /subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM, or /providers/Microsoft.Management/managementGroups/myMG. Changing this forces a new resource to be created. +Scope *string `json:"scope,omitempty" tf:"scope,omitempty"` - // If the principal_id is a newly provisioned Service Principal set this value to true to skip the Azure Active Directory check which may fail due to replication lag. This argument is only valid if the principal_id is a Service Principal identity. Defaults to false. - SkipServicePrincipalAadCheck *bool `json:"skipServicePrincipalAadCheck,omitempty" tf:"skip_service_principal_aad_check,omitempty"` +// If the principal_id is a newly provisioned Service Principal set this value to true to skip the Azure Active Directory check which may fail due to replication lag. This argument is only valid if the principal_id is a Service Principal identity. Defaults to false. +SkipServicePrincipalAadCheck *bool `json:"skipServicePrincipalAadCheck,omitempty" tf:"skip_service_principal_aad_check,omitempty"` } + type RoleAssignmentParameters struct { - // The condition that limits the resources that the role can be assigned to. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Condition *string `json:"condition,omitempty" tf:"condition,omitempty"` - // The version of the condition. Possible values are 1.0 or 2.0. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - ConditionVersion *string `json:"conditionVersion,omitempty" tf:"condition_version,omitempty"` +// The condition that limits the resources that the role can be assigned to. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Condition *string `json:"condition,omitempty" tf:"condition,omitempty"` + +// The version of the condition. Possible values are 1.0 or 2.0. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +ConditionVersion *string `json:"conditionVersion,omitempty" tf:"condition_version,omitempty"` - // The delegated Azure Resource Id which contains a Managed Identity. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - DelegatedManagedIdentityResourceID *string `json:"delegatedManagedIdentityResourceId,omitempty" tf:"delegated_managed_identity_resource_id,omitempty"` +// The delegated Azure Resource Id which contains a Managed Identity. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +DelegatedManagedIdentityResourceID *string `json:"delegatedManagedIdentityResourceId,omitempty" tf:"delegated_managed_identity_resource_id,omitempty"` - // The description for this Role Assignment. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Description *string `json:"description,omitempty" tf:"description,omitempty"` +// The description for this Role Assignment. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Description *string `json:"description,omitempty" tf:"description,omitempty"` - // A unique UUID/GUID for this Role Assignment - one will be generated if not specified. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Name *string `json:"name,omitempty" tf:"name,omitempty"` +// A unique UUID/GUID for this Role Assignment - one will be generated if not specified. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Name *string `json:"name,omitempty" tf:"name,omitempty"` - // The ID of the Principal (User, Group or Service Principal) to assign the Role Definition to. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - PrincipalID *string `json:"principalId,omitempty" tf:"principal_id,omitempty"` +// The ID of the Principal (User, Group or Service Principal) to assign the Role Definition to. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +PrincipalID *string `json:"principalId,omitempty" tf:"principal_id,omitempty"` - // The Scoped-ID of the Role Definition. Changing this forces a new resource to be created. Conflicts with role_definition_name. - // +kubebuilder:validation:Optional - RoleDefinitionID *string `json:"roleDefinitionId,omitempty" tf:"role_definition_id,omitempty"` +// The Scoped-ID of the Role Definition. Changing this forces a new resource to be created. Conflicts with role_definition_name. +// +kubebuilder:validation:Optional +RoleDefinitionID *string `json:"roleDefinitionId,omitempty" tf:"role_definition_id,omitempty"` - // The name of a built-in Role. Changing this forces a new resource to be created. Conflicts with role_definition_id. - // +kubebuilder:validation:Optional - RoleDefinitionName *string `json:"roleDefinitionName,omitempty" tf:"role_definition_name,omitempty"` +// The name of a built-in Role. Changing this forces a new resource to be created. Conflicts with role_definition_id. +// +kubebuilder:validation:Optional +RoleDefinitionName *string `json:"roleDefinitionName,omitempty" tf:"role_definition_name,omitempty"` - // The scope at which the Role Assignment applies to, such as /subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333, /subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup, or /subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM, or /providers/Microsoft.Management/managementGroups/myMG. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Scope *string `json:"scope,omitempty" tf:"scope,omitempty"` +// The scope at which the Role Assignment applies to, such as /subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333, /subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup, or /subscriptions/0b1f6471-1bf0-4dda-aec3-111122223333/resourceGroups/myGroup/providers/Microsoft.Compute/virtualMachines/myVM, or /providers/Microsoft.Management/managementGroups/myMG. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Scope *string `json:"scope,omitempty" tf:"scope,omitempty"` - // If the principal_id is a newly provisioned Service Principal set this value to true to skip the Azure Active Directory check which may fail due to replication lag. This argument is only valid if the principal_id is a Service Principal identity. Defaults to false. - // +kubebuilder:validation:Optional - SkipServicePrincipalAadCheck *bool `json:"skipServicePrincipalAadCheck,omitempty" tf:"skip_service_principal_aad_check,omitempty"` +// If the principal_id is a newly provisioned Service Principal set this value to true to skip the Azure Active Directory check which may fail due to replication lag. This argument is only valid if the principal_id is a Service Principal identity. Defaults to false. +// +kubebuilder:validation:Optional +SkipServicePrincipalAadCheck *bool `json:"skipServicePrincipalAadCheck,omitempty" tf:"skip_service_principal_aad_check,omitempty"` } // RoleAssignmentSpec defines the desired state of RoleAssignment type RoleAssignmentSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider RoleAssignmentParameters `json:"forProvider"` + ForProvider RoleAssignmentParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -146,13 +155,13 @@ type RoleAssignmentSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider RoleAssignmentInitParameters `json:"initProvider,omitempty"` + InitProvider RoleAssignmentInitParameters `json:"initProvider,omitempty"` } // RoleAssignmentStatus defines the observed state of RoleAssignment. type RoleAssignmentStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider RoleAssignmentObservation `json:"atProvider,omitempty"` + AtProvider RoleAssignmentObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -167,10 +176,10 @@ type RoleAssignmentStatus struct { type RoleAssignment struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.principalId) || (has(self.initProvider) && has(self.initProvider.principalId))",message="spec.forProvider.principalId is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.scope) || (has(self.initProvider) && has(self.initProvider.scope))",message="spec.forProvider.scope is a required parameter" - Spec RoleAssignmentSpec `json:"spec"` - Status RoleAssignmentStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.principalId) || (has(self.initProvider) && has(self.initProvider.principalId))",message="spec.forProvider.principalId is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.scope) || (has(self.initProvider) && has(self.initProvider.scope))",message="spec.forProvider.scope is a required parameter" + Spec RoleAssignmentSpec `json:"spec"` + Status RoleAssignmentStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/azure/v1alpha1/zz_generated_terraformed.go b/apis/azure/v1alpha1/zz_generated_terraformed.go index 87e6d13..73cbe1a 100755 --- a/apis/azure/v1alpha1/zz_generated_terraformed.go +++ b/apis/azure/v1alpha1/zz_generated_terraformed.go @@ -11,6 +11,7 @@ Copyright 2022 Upbound Inc. package v1alpha1 import ( + "dario.cat/mergo" "github.com/pkg/errors" "github.com/crossplane/upjet/pkg/resource" @@ -83,6 +84,36 @@ func (tr *ResourceGroup) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this ResourceGroup +func (tr *ResourceGroup) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this ResourceGroup using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *ResourceGroup) LateInitialize(attrs []byte) (bool, error) { @@ -167,6 +198,36 @@ func (tr *ProviderRegistration) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this ProviderRegistration +func (tr *ProviderRegistration) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this ProviderRegistration using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *ProviderRegistration) LateInitialize(attrs []byte) (bool, error) { @@ -251,6 +312,36 @@ func (tr *Subscription) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this Subscription +func (tr *Subscription) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Subscription using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Subscription) LateInitialize(attrs []byte) (bool, error) { diff --git a/apis/azure/v1alpha1/zz_providerregistration_types.go b/apis/azure/v1alpha1/zz_providerregistration_types.go index 62d8aff..d9f1428 100755 --- a/apis/azure/v1alpha1/zz_providerregistration_types.go +++ b/apis/azure/v1alpha1/zz_providerregistration_types.go @@ -15,72 +15,87 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type FeatureInitParameters struct { - // Specifies the name of the feature to register. - Name *string `json:"name,omitempty" tf:"name,omitempty"` - // Should this feature be Registered or Unregistered? - Registered *bool `json:"registered,omitempty" tf:"registered,omitempty"` +// Specifies the name of the feature to register. +Name *string `json:"name,omitempty" tf:"name,omitempty"` + +// Should this feature be Registered or Unregistered? +Registered *bool `json:"registered,omitempty" tf:"registered,omitempty"` } + type FeatureObservation struct { - // Specifies the name of the feature to register. - Name *string `json:"name,omitempty" tf:"name,omitempty"` - // Should this feature be Registered or Unregistered? - Registered *bool `json:"registered,omitempty" tf:"registered,omitempty"` +// Specifies the name of the feature to register. +Name *string `json:"name,omitempty" tf:"name,omitempty"` + +// Should this feature be Registered or Unregistered? +Registered *bool `json:"registered,omitempty" tf:"registered,omitempty"` } + type FeatureParameters struct { - // Specifies the name of the feature to register. - // +kubebuilder:validation:Optional - Name *string `json:"name" tf:"name,omitempty"` - // Should this feature be Registered or Unregistered? - // +kubebuilder:validation:Optional - Registered *bool `json:"registered" tf:"registered,omitempty"` +// Specifies the name of the feature to register. +// +kubebuilder:validation:Optional +Name *string `json:"name" tf:"name,omitempty"` + +// Should this feature be Registered or Unregistered? +// +kubebuilder:validation:Optional +Registered *bool `json:"registered" tf:"registered,omitempty"` } + type ProviderRegistrationInitParameters struct { - // A list of feature blocks as defined below. - Feature []FeatureInitParameters `json:"feature,omitempty" tf:"feature,omitempty"` - // The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created. - Name *string `json:"name,omitempty" tf:"name,omitempty"` +// A list of feature blocks as defined below. +Feature []FeatureInitParameters `json:"feature,omitempty" tf:"feature,omitempty"` + +// The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created. +Name *string `json:"name,omitempty" tf:"name,omitempty"` } + type ProviderRegistrationObservation struct { - // A list of feature blocks as defined below. - Feature []FeatureObservation `json:"feature,omitempty" tf:"feature,omitempty"` - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// A list of feature blocks as defined below. +Feature []FeatureObservation `json:"feature,omitempty" tf:"feature,omitempty"` - // The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created. - Name *string `json:"name,omitempty" tf:"name,omitempty"` +ID *string `json:"id,omitempty" tf:"id,omitempty"` + +// The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created. +Name *string `json:"name,omitempty" tf:"name,omitempty"` } + type ProviderRegistrationParameters struct { - // A list of feature blocks as defined below. - // +kubebuilder:validation:Optional - Feature []FeatureParameters `json:"feature,omitempty" tf:"feature,omitempty"` - // The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Name *string `json:"name,omitempty" tf:"name,omitempty"` +// A list of feature blocks as defined below. +// +kubebuilder:validation:Optional +Feature []FeatureParameters `json:"feature,omitempty" tf:"feature,omitempty"` + +// The namespace of the Resource Provider which should be registered. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Name *string `json:"name,omitempty" tf:"name,omitempty"` } // ProviderRegistrationSpec defines the desired state of ProviderRegistration type ProviderRegistrationSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider ProviderRegistrationParameters `json:"forProvider"` + ForProvider ProviderRegistrationParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -91,13 +106,13 @@ type ProviderRegistrationSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider ProviderRegistrationInitParameters `json:"initProvider,omitempty"` + InitProvider ProviderRegistrationInitParameters `json:"initProvider,omitempty"` } // ProviderRegistrationStatus defines the observed state of ProviderRegistration. type ProviderRegistrationStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider ProviderRegistrationObservation `json:"atProvider,omitempty"` + AtProvider ProviderRegistrationObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -112,9 +127,9 @@ type ProviderRegistrationStatus struct { type ProviderRegistration struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.name) || (has(self.initProvider) && has(self.initProvider.name))",message="spec.forProvider.name is a required parameter" - Spec ProviderRegistrationSpec `json:"spec"` - Status ProviderRegistrationStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.name) || (has(self.initProvider) && has(self.initProvider.name))",message="spec.forProvider.name is a required parameter" + Spec ProviderRegistrationSpec `json:"spec"` + Status ProviderRegistrationStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/azure/v1alpha1/zz_resourcegroup_types.go b/apis/azure/v1alpha1/zz_resourcegroup_types.go index e095341..3d650c1 100755 --- a/apis/azure/v1alpha1/zz_resourcegroup_types.go +++ b/apis/azure/v1alpha1/zz_resourcegroup_types.go @@ -15,44 +15,53 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type ResourceGroupInitParameters struct { - // The Azure Region where the Resource Group should exist. Changing this forces a new Resource Group to be created. - Location *string `json:"location,omitempty" tf:"location,omitempty"` - // A mapping of tags which should be assigned to the Resource Group. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// The Azure Region where the Resource Group should exist. Changing this forces a new Resource Group to be created. +Location *string `json:"location,omitempty" tf:"location,omitempty"` + +// A mapping of tags which should be assigned to the Resource Group. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` } + type ResourceGroupObservation struct { - // The ID of the Resource Group. - ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The Azure Region where the Resource Group should exist. Changing this forces a new Resource Group to be created. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// The ID of the Resource Group. +ID *string `json:"id,omitempty" tf:"id,omitempty"` + +// The Azure Region where the Resource Group should exist. Changing this forces a new Resource Group to be created. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // A mapping of tags which should be assigned to the Resource Group. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A mapping of tags which should be assigned to the Resource Group. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` } + type ResourceGroupParameters struct { - // The Azure Region where the Resource Group should exist. Changing this forces a new Resource Group to be created. - // +kubebuilder:validation:Optional - Location *string `json:"location,omitempty" tf:"location,omitempty"` - // A mapping of tags which should be assigned to the Resource Group. - // +kubebuilder:validation:Optional - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// The Azure Region where the Resource Group should exist. Changing this forces a new Resource Group to be created. +// +kubebuilder:validation:Optional +Location *string `json:"location,omitempty" tf:"location,omitempty"` + +// A mapping of tags which should be assigned to the Resource Group. +// +kubebuilder:validation:Optional +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` } // ResourceGroupSpec defines the desired state of ResourceGroup type ResourceGroupSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider ResourceGroupParameters `json:"forProvider"` + ForProvider ResourceGroupParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -63,13 +72,13 @@ type ResourceGroupSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider ResourceGroupInitParameters `json:"initProvider,omitempty"` + InitProvider ResourceGroupInitParameters `json:"initProvider,omitempty"` } // ResourceGroupStatus defines the observed state of ResourceGroup. type ResourceGroupStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider ResourceGroupObservation `json:"atProvider,omitempty"` + AtProvider ResourceGroupObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -84,9 +93,9 @@ type ResourceGroupStatus struct { type ResourceGroup struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" - Spec ResourceGroupSpec `json:"spec"` - Status ResourceGroupStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" + Spec ResourceGroupSpec `json:"spec"` + Status ResourceGroupStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/azure/v1alpha1/zz_subscription_types.go b/apis/azure/v1alpha1/zz_subscription_types.go index 80b3ba0..2e434a5 100755 --- a/apis/azure/v1alpha1/zz_subscription_types.go +++ b/apis/azure/v1alpha1/zz_subscription_types.go @@ -15,87 +15,96 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type SubscriptionInitParameters struct { - // The Azure Billing Scope ID. Can be a Microsoft Customer Account Billing Scope ID, a Microsoft Partner Account Billing Scope ID or an Enrollment Billing Scope ID. - BillingScopeID *string `json:"billingScopeId,omitempty" tf:"billing_scope_id,omitempty"` - // The ID of the Subscription. Changing this forces a new Subscription to be created. - // The GUID of the Subscription. - SubscriptionID *string `json:"subscriptionId,omitempty" tf:"subscription_id,omitempty"` +// The Azure Billing Scope ID. Can be a Microsoft Customer Account Billing Scope ID, a Microsoft Partner Account Billing Scope ID or an Enrollment Billing Scope ID. +BillingScopeID *string `json:"billingScopeId,omitempty" tf:"billing_scope_id,omitempty"` + +// The ID of the Subscription. Changing this forces a new Subscription to be created. +// The GUID of the Subscription. +SubscriptionID *string `json:"subscriptionId,omitempty" tf:"subscription_id,omitempty"` - // The Name of the Subscription. This is the Display Name in the portal. - // The Display Name for the Subscription. - SubscriptionName *string `json:"subscriptionName,omitempty" tf:"subscription_name,omitempty"` +// The Name of the Subscription. This is the Display Name in the portal. +// The Display Name for the Subscription. +SubscriptionName *string `json:"subscriptionName,omitempty" tf:"subscription_name,omitempty"` - // A mapping of tags to assign to the Subscription. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A mapping of tags to assign to the Subscription. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - // The workload type of the Subscription. Possible values are Production (default) and DevTest. Changing this forces a new Subscription to be created. - // The workload type for the Subscription. Possible values are `Production` (default) and `DevTest`. - Workload *string `json:"workload,omitempty" tf:"workload,omitempty"` +// The workload type of the Subscription. Possible values are Production (default) and DevTest. Changing this forces a new Subscription to be created. +// The workload type for the Subscription. Possible values are `Production` (default) and `DevTest`. +Workload *string `json:"workload,omitempty" tf:"workload,omitempty"` } + type SubscriptionObservation struct { - // The Azure Billing Scope ID. Can be a Microsoft Customer Account Billing Scope ID, a Microsoft Partner Account Billing Scope ID or an Enrollment Billing Scope ID. - BillingScopeID *string `json:"billingScopeId,omitempty" tf:"billing_scope_id,omitempty"` - // The Resource ID of the Alias. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// The Azure Billing Scope ID. Can be a Microsoft Customer Account Billing Scope ID, a Microsoft Partner Account Billing Scope ID or an Enrollment Billing Scope ID. +BillingScopeID *string `json:"billingScopeId,omitempty" tf:"billing_scope_id,omitempty"` + +// The Resource ID of the Alias. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The ID of the Subscription. Changing this forces a new Subscription to be created. - // The GUID of the Subscription. - SubscriptionID *string `json:"subscriptionId,omitempty" tf:"subscription_id,omitempty"` +// The ID of the Subscription. Changing this forces a new Subscription to be created. +// The GUID of the Subscription. +SubscriptionID *string `json:"subscriptionId,omitempty" tf:"subscription_id,omitempty"` - // The Name of the Subscription. This is the Display Name in the portal. - // The Display Name for the Subscription. - SubscriptionName *string `json:"subscriptionName,omitempty" tf:"subscription_name,omitempty"` +// The Name of the Subscription. This is the Display Name in the portal. +// The Display Name for the Subscription. +SubscriptionName *string `json:"subscriptionName,omitempty" tf:"subscription_name,omitempty"` - // A mapping of tags to assign to the Subscription. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A mapping of tags to assign to the Subscription. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - // The ID of the Tenant to which the subscription belongs. - // The Tenant ID to which the subscription belongs - TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` +// The ID of the Tenant to which the subscription belongs. +// The Tenant ID to which the subscription belongs +TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` - // The workload type of the Subscription. Possible values are Production (default) and DevTest. Changing this forces a new Subscription to be created. - // The workload type for the Subscription. Possible values are `Production` (default) and `DevTest`. - Workload *string `json:"workload,omitempty" tf:"workload,omitempty"` +// The workload type of the Subscription. Possible values are Production (default) and DevTest. Changing this forces a new Subscription to be created. +// The workload type for the Subscription. Possible values are `Production` (default) and `DevTest`. +Workload *string `json:"workload,omitempty" tf:"workload,omitempty"` } + type SubscriptionParameters struct { - // The Azure Billing Scope ID. Can be a Microsoft Customer Account Billing Scope ID, a Microsoft Partner Account Billing Scope ID or an Enrollment Billing Scope ID. - // +kubebuilder:validation:Optional - BillingScopeID *string `json:"billingScopeId,omitempty" tf:"billing_scope_id,omitempty"` - // The ID of the Subscription. Changing this forces a new Subscription to be created. - // The GUID of the Subscription. - // +kubebuilder:validation:Optional - SubscriptionID *string `json:"subscriptionId,omitempty" tf:"subscription_id,omitempty"` +// The Azure Billing Scope ID. Can be a Microsoft Customer Account Billing Scope ID, a Microsoft Partner Account Billing Scope ID or an Enrollment Billing Scope ID. +// +kubebuilder:validation:Optional +BillingScopeID *string `json:"billingScopeId,omitempty" tf:"billing_scope_id,omitempty"` + +// The ID of the Subscription. Changing this forces a new Subscription to be created. +// The GUID of the Subscription. +// +kubebuilder:validation:Optional +SubscriptionID *string `json:"subscriptionId,omitempty" tf:"subscription_id,omitempty"` - // The Name of the Subscription. This is the Display Name in the portal. - // The Display Name for the Subscription. - // +kubebuilder:validation:Optional - SubscriptionName *string `json:"subscriptionName,omitempty" tf:"subscription_name,omitempty"` +// The Name of the Subscription. This is the Display Name in the portal. +// The Display Name for the Subscription. +// +kubebuilder:validation:Optional +SubscriptionName *string `json:"subscriptionName,omitempty" tf:"subscription_name,omitempty"` - // A mapping of tags to assign to the Subscription. - // +kubebuilder:validation:Optional - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A mapping of tags to assign to the Subscription. +// +kubebuilder:validation:Optional +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - // The workload type of the Subscription. Possible values are Production (default) and DevTest. Changing this forces a new Subscription to be created. - // The workload type for the Subscription. Possible values are `Production` (default) and `DevTest`. - // +kubebuilder:validation:Optional - Workload *string `json:"workload,omitempty" tf:"workload,omitempty"` +// The workload type of the Subscription. Possible values are Production (default) and DevTest. Changing this forces a new Subscription to be created. +// The workload type for the Subscription. Possible values are `Production` (default) and `DevTest`. +// +kubebuilder:validation:Optional +Workload *string `json:"workload,omitempty" tf:"workload,omitempty"` } // SubscriptionSpec defines the desired state of Subscription type SubscriptionSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider SubscriptionParameters `json:"forProvider"` + ForProvider SubscriptionParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -106,13 +115,13 @@ type SubscriptionSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider SubscriptionInitParameters `json:"initProvider,omitempty"` + InitProvider SubscriptionInitParameters `json:"initProvider,omitempty"` } // SubscriptionStatus defines the observed state of Subscription. type SubscriptionStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider SubscriptionObservation `json:"atProvider,omitempty"` + AtProvider SubscriptionObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -127,9 +136,9 @@ type SubscriptionStatus struct { type Subscription struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.subscriptionName) || (has(self.initProvider) && has(self.initProvider.subscriptionName))",message="spec.forProvider.subscriptionName is a required parameter" - Spec SubscriptionSpec `json:"spec"` - Status SubscriptionStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.subscriptionName) || (has(self.initProvider) && has(self.initProvider.subscriptionName))",message="spec.forProvider.subscriptionName is a required parameter" + Spec SubscriptionSpec `json:"spec"` + Status SubscriptionStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/cache/v1alpha1/zz_generated_terraformed.go b/apis/cache/v1alpha1/zz_generated_terraformed.go index 5db9635..6e1fbda 100755 --- a/apis/cache/v1alpha1/zz_generated_terraformed.go +++ b/apis/cache/v1alpha1/zz_generated_terraformed.go @@ -11,6 +11,7 @@ Copyright 2022 Upbound Inc. package v1alpha1 import ( + "dario.cat/mergo" "github.com/pkg/errors" "github.com/crossplane/upjet/pkg/resource" @@ -83,6 +84,36 @@ func (tr *RedisCache) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this RedisCache +func (tr *RedisCache) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this RedisCache using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *RedisCache) LateInitialize(attrs []byte) (bool, error) { @@ -167,6 +198,36 @@ func (tr *RedisEnterpriseCluster) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this RedisEnterpriseCluster +func (tr *RedisEnterpriseCluster) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this RedisEnterpriseCluster using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *RedisEnterpriseCluster) LateInitialize(attrs []byte) (bool, error) { @@ -251,6 +312,36 @@ func (tr *RedisEnterpriseDatabase) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this RedisEnterpriseDatabase +func (tr *RedisEnterpriseDatabase) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this RedisEnterpriseDatabase using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *RedisEnterpriseDatabase) LateInitialize(attrs []byte) (bool, error) { @@ -335,6 +426,36 @@ func (tr *RedisFirewallRule) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this RedisFirewallRule +func (tr *RedisFirewallRule) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this RedisFirewallRule using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *RedisFirewallRule) LateInitialize(attrs []byte) (bool, error) { @@ -419,6 +540,36 @@ func (tr *RedisLinkedServer) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this RedisLinkedServer +func (tr *RedisLinkedServer) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this RedisLinkedServer using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *RedisLinkedServer) LateInitialize(attrs []byte) (bool, error) { diff --git a/apis/cache/v1alpha1/zz_rediscache_types.go b/apis/cache/v1alpha1/zz_rediscache_types.go index b8a102f..6492b99 100755 --- a/apis/cache/v1alpha1/zz_rediscache_types.go +++ b/apis/cache/v1alpha1/zz_rediscache_types.go @@ -15,444 +15,471 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type IdentityInitParameters struct { - // A list of User Assigned Managed Identity IDs to be assigned to this Redis Cluster. - IdentityIds []*string `json:"identityIds,omitempty" tf:"identity_ids,omitempty"` - // Specifies the type of Managed Service Identity that should be configured on this Redis Cluster. Possible values are SystemAssigned, UserAssigned, SystemAssigned, UserAssigned (to enable both). - Type *string `json:"type,omitempty" tf:"type,omitempty"` +// A list of User Assigned Managed Identity IDs to be assigned to this Redis Cluster. +IdentityIds []*string `json:"identityIds,omitempty" tf:"identity_ids,omitempty"` + +// Specifies the type of Managed Service Identity that should be configured on this Redis Cluster. Possible values are SystemAssigned, UserAssigned, SystemAssigned, UserAssigned (to enable both). +Type *string `json:"type,omitempty" tf:"type,omitempty"` } + type IdentityObservation struct { - // A list of User Assigned Managed Identity IDs to be assigned to this Redis Cluster. - IdentityIds []*string `json:"identityIds,omitempty" tf:"identity_ids,omitempty"` - // The Route ID. - PrincipalID *string `json:"principalId,omitempty" tf:"principal_id,omitempty"` +// A list of User Assigned Managed Identity IDs to be assigned to this Redis Cluster. +IdentityIds []*string `json:"identityIds,omitempty" tf:"identity_ids,omitempty"` + +// The Route ID. +PrincipalID *string `json:"principalId,omitempty" tf:"principal_id,omitempty"` - // The Route ID. - TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` +// The Route ID. +TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` - // Specifies the type of Managed Service Identity that should be configured on this Redis Cluster. Possible values are SystemAssigned, UserAssigned, SystemAssigned, UserAssigned (to enable both). - Type *string `json:"type,omitempty" tf:"type,omitempty"` +// Specifies the type of Managed Service Identity that should be configured on this Redis Cluster. Possible values are SystemAssigned, UserAssigned, SystemAssigned, UserAssigned (to enable both). +Type *string `json:"type,omitempty" tf:"type,omitempty"` } + type IdentityParameters struct { - // A list of User Assigned Managed Identity IDs to be assigned to this Redis Cluster. - // +kubebuilder:validation:Optional - IdentityIds []*string `json:"identityIds,omitempty" tf:"identity_ids,omitempty"` - // Specifies the type of Managed Service Identity that should be configured on this Redis Cluster. Possible values are SystemAssigned, UserAssigned, SystemAssigned, UserAssigned (to enable both). - // +kubebuilder:validation:Optional - Type *string `json:"type" tf:"type,omitempty"` +// A list of User Assigned Managed Identity IDs to be assigned to this Redis Cluster. +// +kubebuilder:validation:Optional +IdentityIds []*string `json:"identityIds,omitempty" tf:"identity_ids,omitempty"` + +// Specifies the type of Managed Service Identity that should be configured on this Redis Cluster. Possible values are SystemAssigned, UserAssigned, SystemAssigned, UserAssigned (to enable both). +// +kubebuilder:validation:Optional +Type *string `json:"type" tf:"type,omitempty"` } + type PatchScheduleInitParameters struct { - // the Weekday name - possible values include Monday, Tuesday, Wednesday etc. - DayOfWeek *string `json:"dayOfWeek,omitempty" tf:"day_of_week,omitempty"` - // The ISO 8601 timespan which specifies the amount of time the Redis Cache can be updated. Defaults to PT5H. - MaintenanceWindow *string `json:"maintenanceWindow,omitempty" tf:"maintenance_window,omitempty"` +// the Weekday name - possible values include Monday, Tuesday, Wednesday etc. +DayOfWeek *string `json:"dayOfWeek,omitempty" tf:"day_of_week,omitempty"` + +// The ISO 8601 timespan which specifies the amount of time the Redis Cache can be updated. Defaults to PT5H. +MaintenanceWindow *string `json:"maintenanceWindow,omitempty" tf:"maintenance_window,omitempty"` - // the Start Hour for maintenance in UTC - possible values range from 0 - 23. - StartHourUtc *float64 `json:"startHourUtc,omitempty" tf:"start_hour_utc,omitempty"` +// the Start Hour for maintenance in UTC - possible values range from 0 - 23. +StartHourUtc *float64 `json:"startHourUtc,omitempty" tf:"start_hour_utc,omitempty"` } + type PatchScheduleObservation struct { - // the Weekday name - possible values include Monday, Tuesday, Wednesday etc. - DayOfWeek *string `json:"dayOfWeek,omitempty" tf:"day_of_week,omitempty"` - // The ISO 8601 timespan which specifies the amount of time the Redis Cache can be updated. Defaults to PT5H. - MaintenanceWindow *string `json:"maintenanceWindow,omitempty" tf:"maintenance_window,omitempty"` +// the Weekday name - possible values include Monday, Tuesday, Wednesday etc. +DayOfWeek *string `json:"dayOfWeek,omitempty" tf:"day_of_week,omitempty"` + +// The ISO 8601 timespan which specifies the amount of time the Redis Cache can be updated. Defaults to PT5H. +MaintenanceWindow *string `json:"maintenanceWindow,omitempty" tf:"maintenance_window,omitempty"` - // the Start Hour for maintenance in UTC - possible values range from 0 - 23. - StartHourUtc *float64 `json:"startHourUtc,omitempty" tf:"start_hour_utc,omitempty"` +// the Start Hour for maintenance in UTC - possible values range from 0 - 23. +StartHourUtc *float64 `json:"startHourUtc,omitempty" tf:"start_hour_utc,omitempty"` } + type PatchScheduleParameters struct { - // the Weekday name - possible values include Monday, Tuesday, Wednesday etc. - // +kubebuilder:validation:Optional - DayOfWeek *string `json:"dayOfWeek" tf:"day_of_week,omitempty"` - // The ISO 8601 timespan which specifies the amount of time the Redis Cache can be updated. Defaults to PT5H. - // +kubebuilder:validation:Optional - MaintenanceWindow *string `json:"maintenanceWindow,omitempty" tf:"maintenance_window,omitempty"` +// the Weekday name - possible values include Monday, Tuesday, Wednesday etc. +// +kubebuilder:validation:Optional +DayOfWeek *string `json:"dayOfWeek" tf:"day_of_week,omitempty"` - // the Start Hour for maintenance in UTC - possible values range from 0 - 23. - // +kubebuilder:validation:Optional - StartHourUtc *float64 `json:"startHourUtc,omitempty" tf:"start_hour_utc,omitempty"` +// The ISO 8601 timespan which specifies the amount of time the Redis Cache can be updated. Defaults to PT5H. +// +kubebuilder:validation:Optional +MaintenanceWindow *string `json:"maintenanceWindow,omitempty" tf:"maintenance_window,omitempty"` + +// the Start Hour for maintenance in UTC - possible values range from 0 - 23. +// +kubebuilder:validation:Optional +StartHourUtc *float64 `json:"startHourUtc,omitempty" tf:"start_hour_utc,omitempty"` } + type RedisCacheInitParameters struct { - // The size of the Redis cache to deploy. Valid values for a SKU family of C (Basic/Standard) are 0, 1, 2, 3, 4, 5, 6, and for P (Premium) family are 1, 2, 3, 4, 5. - Capacity *float64 `json:"capacity,omitempty" tf:"capacity,omitempty"` - // Enable the non-SSL port (6379) - disabled by default. - EnableNonSSLPort *bool `json:"enableNonSslPort,omitempty" tf:"enable_non_ssl_port,omitempty"` +// The size of the Redis cache to deploy. Valid values for a SKU family of C (Basic/Standard) are 0, 1, 2, 3, 4, 5, 6, and for P (Premium) family are 1, 2, 3, 4, 5. +Capacity *float64 `json:"capacity,omitempty" tf:"capacity,omitempty"` - // The SKU family/pricing group to use. Valid values are C (for Basic/Standard SKU family) and P (for Premium) - Family *string `json:"family,omitempty" tf:"family,omitempty"` +// Enable the non-SSL port (6379) - disabled by default. +EnableNonSSLPort *bool `json:"enableNonSslPort,omitempty" tf:"enable_non_ssl_port,omitempty"` - // An identity block as defined below. - Identity []IdentityInitParameters `json:"identity,omitempty" tf:"identity,omitempty"` +// The SKU family/pricing group to use. Valid values are C (for Basic/Standard SKU family) and P (for Premium) +Family *string `json:"family,omitempty" tf:"family,omitempty"` - // The location of the resource group. Changing this forces a new resource to be created. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// An identity block as defined below. +Identity []IdentityInitParameters `json:"identity,omitempty" tf:"identity,omitempty"` - // The minimum TLS version. Possible values are 1.0, 1.1 and 1.2. Defaults to 1.0. - MinimumTLSVersion *string `json:"minimumTlsVersion,omitempty" tf:"minimum_tls_version,omitempty"` +// The location of the resource group. Changing this forces a new resource to be created. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // A list of patch_schedule blocks as defined below. - PatchSchedule []PatchScheduleInitParameters `json:"patchSchedule,omitempty" tf:"patch_schedule,omitempty"` +// The minimum TLS version. Possible values are 1.0, 1.1 and 1.2. Defaults to 1.0. +MinimumTLSVersion *string `json:"minimumTlsVersion,omitempty" tf:"minimum_tls_version,omitempty"` - // The Static IP Address to assign to the Redis Cache when hosted inside the Virtual Network. This argument implies the use of subnet_id. Changing this forces a new resource to be created. - PrivateStaticIPAddress *string `json:"privateStaticIpAddress,omitempty" tf:"private_static_ip_address,omitempty"` +// A list of patch_schedule blocks as defined below. +PatchSchedule []PatchScheduleInitParameters `json:"patchSchedule,omitempty" tf:"patch_schedule,omitempty"` - // Whether or not public network access is allowed for this Redis Cache. true means this resource could be accessed by both public and private endpoint. false means only private endpoint access is allowed. Defaults to true. - PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` +// The Static IP Address to assign to the Redis Cache when hosted inside the Virtual Network. This argument implies the use of subnet_id. Changing this forces a new resource to be created. +PrivateStaticIPAddress *string `json:"privateStaticIpAddress,omitempty" tf:"private_static_ip_address,omitempty"` - // A redis_configuration as defined below - with some limitations by SKU - defaults/details are shown below. - RedisConfiguration []RedisConfigurationInitParameters `json:"redisConfiguration,omitempty" tf:"redis_configuration,omitempty"` +// Whether or not public network access is allowed for this Redis Cache. true means this resource could be accessed by both public and private endpoint. false means only private endpoint access is allowed. Defaults to true. +PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` - // Redis version. Only major version needed. Valid values: 4, 6. - RedisVersion *string `json:"redisVersion,omitempty" tf:"redis_version,omitempty"` +// A redis_configuration as defined below - with some limitations by SKU - defaults/details are shown below. +RedisConfiguration []RedisConfigurationInitParameters `json:"redisConfiguration,omitempty" tf:"redis_configuration,omitempty"` - // Amount of replicas to create per master for this Redis Cache. - ReplicasPerMaster *float64 `json:"replicasPerMaster,omitempty" tf:"replicas_per_master,omitempty"` +// Redis version. Only major version needed. Valid values: 4, 6. +RedisVersion *string `json:"redisVersion,omitempty" tf:"redis_version,omitempty"` - // Amount of replicas to create per primary for this Redis Cache. If both replicas_per_primary and replicas_per_master are set, they need to be equal. - ReplicasPerPrimary *float64 `json:"replicasPerPrimary,omitempty" tf:"replicas_per_primary,omitempty"` +// Amount of replicas to create per master for this Redis Cache. +ReplicasPerMaster *float64 `json:"replicasPerMaster,omitempty" tf:"replicas_per_master,omitempty"` - // Only available when using the Premium SKU The number of Shards to create on the Redis Cluster. - ShardCount *float64 `json:"shardCount,omitempty" tf:"shard_count,omitempty"` +// Amount of replicas to create per primary for this Redis Cache. If both replicas_per_primary and replicas_per_master are set, they need to be equal. +ReplicasPerPrimary *float64 `json:"replicasPerPrimary,omitempty" tf:"replicas_per_primary,omitempty"` - // The SKU of Redis to use. Possible values are Basic, Standard and Premium. - SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` +// Only available when using the Premium SKU The number of Shards to create on the Redis Cluster. +ShardCount *float64 `json:"shardCount,omitempty" tf:"shard_count,omitempty"` - // A mapping of tags to assign to the resource. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// The SKU of Redis to use. Possible values are Basic, Standard and Premium. +SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` - // A mapping of tenant settings to assign to the resource. - TenantSettings map[string]*string `json:"tenantSettings,omitempty" tf:"tenant_settings,omitempty"` +// A mapping of tags to assign to the resource. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - // Specifies a list of Availability Zones in which this Redis Cache should be located. Changing this forces a new Redis Cache to be created. - Zones []*string `json:"zones,omitempty" tf:"zones,omitempty"` +// A mapping of tenant settings to assign to the resource. +TenantSettings map[string]*string `json:"tenantSettings,omitempty" tf:"tenant_settings,omitempty"` + +// Specifies a list of Availability Zones in which this Redis Cache should be located. Changing this forces a new Redis Cache to be created. +Zones []*string `json:"zones,omitempty" tf:"zones,omitempty"` } + type RedisCacheObservation struct { - // The size of the Redis cache to deploy. Valid values for a SKU family of C (Basic/Standard) are 0, 1, 2, 3, 4, 5, 6, and for P (Premium) family are 1, 2, 3, 4, 5. - Capacity *float64 `json:"capacity,omitempty" tf:"capacity,omitempty"` - // Enable the non-SSL port (6379) - disabled by default. - EnableNonSSLPort *bool `json:"enableNonSslPort,omitempty" tf:"enable_non_ssl_port,omitempty"` +// The size of the Redis cache to deploy. Valid values for a SKU family of C (Basic/Standard) are 0, 1, 2, 3, 4, 5, 6, and for P (Premium) family are 1, 2, 3, 4, 5. +Capacity *float64 `json:"capacity,omitempty" tf:"capacity,omitempty"` - // The SKU family/pricing group to use. Valid values are C (for Basic/Standard SKU family) and P (for Premium) - Family *string `json:"family,omitempty" tf:"family,omitempty"` +// Enable the non-SSL port (6379) - disabled by default. +EnableNonSSLPort *bool `json:"enableNonSslPort,omitempty" tf:"enable_non_ssl_port,omitempty"` - // The Hostname of the Redis Instance - Hostname *string `json:"hostname,omitempty" tf:"hostname,omitempty"` +// The SKU family/pricing group to use. Valid values are C (for Basic/Standard SKU family) and P (for Premium) +Family *string `json:"family,omitempty" tf:"family,omitempty"` - // The Route ID. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// The Hostname of the Redis Instance +Hostname *string `json:"hostname,omitempty" tf:"hostname,omitempty"` - // An identity block as defined below. - Identity []IdentityObservation `json:"identity,omitempty" tf:"identity,omitempty"` +// The Route ID. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The location of the resource group. Changing this forces a new resource to be created. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// An identity block as defined below. +Identity []IdentityObservation `json:"identity,omitempty" tf:"identity,omitempty"` - // The minimum TLS version. Possible values are 1.0, 1.1 and 1.2. Defaults to 1.0. - MinimumTLSVersion *string `json:"minimumTlsVersion,omitempty" tf:"minimum_tls_version,omitempty"` +// The location of the resource group. Changing this forces a new resource to be created. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // A list of patch_schedule blocks as defined below. - PatchSchedule []PatchScheduleObservation `json:"patchSchedule,omitempty" tf:"patch_schedule,omitempty"` +// The minimum TLS version. Possible values are 1.0, 1.1 and 1.2. Defaults to 1.0. +MinimumTLSVersion *string `json:"minimumTlsVersion,omitempty" tf:"minimum_tls_version,omitempty"` - // The non-SSL Port of the Redis Instance - Port *float64 `json:"port,omitempty" tf:"port,omitempty"` +// A list of patch_schedule blocks as defined below. +PatchSchedule []PatchScheduleObservation `json:"patchSchedule,omitempty" tf:"patch_schedule,omitempty"` - // The Static IP Address to assign to the Redis Cache when hosted inside the Virtual Network. This argument implies the use of subnet_id. Changing this forces a new resource to be created. - PrivateStaticIPAddress *string `json:"privateStaticIpAddress,omitempty" tf:"private_static_ip_address,omitempty"` +// The non-SSL Port of the Redis Instance +Port *float64 `json:"port,omitempty" tf:"port,omitempty"` - // Whether or not public network access is allowed for this Redis Cache. true means this resource could be accessed by both public and private endpoint. false means only private endpoint access is allowed. Defaults to true. - PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` +// The Static IP Address to assign to the Redis Cache when hosted inside the Virtual Network. This argument implies the use of subnet_id. Changing this forces a new resource to be created. +PrivateStaticIPAddress *string `json:"privateStaticIpAddress,omitempty" tf:"private_static_ip_address,omitempty"` - // A redis_configuration as defined below - with some limitations by SKU - defaults/details are shown below. - RedisConfiguration []RedisConfigurationObservation `json:"redisConfiguration,omitempty" tf:"redis_configuration,omitempty"` +// Whether or not public network access is allowed for this Redis Cache. true means this resource could be accessed by both public and private endpoint. false means only private endpoint access is allowed. Defaults to true. +PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` - // Redis version. Only major version needed. Valid values: 4, 6. - RedisVersion *string `json:"redisVersion,omitempty" tf:"redis_version,omitempty"` +// A redis_configuration as defined below - with some limitations by SKU - defaults/details are shown below. +RedisConfiguration []RedisConfigurationObservation `json:"redisConfiguration,omitempty" tf:"redis_configuration,omitempty"` - // Amount of replicas to create per master for this Redis Cache. - ReplicasPerMaster *float64 `json:"replicasPerMaster,omitempty" tf:"replicas_per_master,omitempty"` +// Redis version. Only major version needed. Valid values: 4, 6. +RedisVersion *string `json:"redisVersion,omitempty" tf:"redis_version,omitempty"` - // Amount of replicas to create per primary for this Redis Cache. If both replicas_per_primary and replicas_per_master are set, they need to be equal. - ReplicasPerPrimary *float64 `json:"replicasPerPrimary,omitempty" tf:"replicas_per_primary,omitempty"` +// Amount of replicas to create per master for this Redis Cache. +ReplicasPerMaster *float64 `json:"replicasPerMaster,omitempty" tf:"replicas_per_master,omitempty"` - // The name of the resource group in which to create the Redis instance. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// Amount of replicas to create per primary for this Redis Cache. If both replicas_per_primary and replicas_per_master are set, they need to be equal. +ReplicasPerPrimary *float64 `json:"replicasPerPrimary,omitempty" tf:"replicas_per_primary,omitempty"` - // The SSL Port of the Redis Instance - SSLPort *float64 `json:"sslPort,omitempty" tf:"ssl_port,omitempty"` +// The name of the resource group in which to create the Redis instance. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Only available when using the Premium SKU The number of Shards to create on the Redis Cluster. - ShardCount *float64 `json:"shardCount,omitempty" tf:"shard_count,omitempty"` +// The SSL Port of the Redis Instance +SSLPort *float64 `json:"sslPort,omitempty" tf:"ssl_port,omitempty"` - // The SKU of Redis to use. Possible values are Basic, Standard and Premium. - SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` +// Only available when using the Premium SKU The number of Shards to create on the Redis Cluster. +ShardCount *float64 `json:"shardCount,omitempty" tf:"shard_count,omitempty"` - // Only available when using the Premium SKU The ID of the Subnet within which the Redis Cache should be deployed. This Subnet must only contain Azure Cache for Redis instances without any other type of resources. Changing this forces a new resource to be created. - SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"` +// The SKU of Redis to use. Possible values are Basic, Standard and Premium. +SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` - // A mapping of tags to assign to the resource. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// Only available when using the Premium SKU The ID of the Subnet within which the Redis Cache should be deployed. This Subnet must only contain Azure Cache for Redis instances without any other type of resources. Changing this forces a new resource to be created. +SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"` - // A mapping of tenant settings to assign to the resource. - TenantSettings map[string]*string `json:"tenantSettings,omitempty" tf:"tenant_settings,omitempty"` +// A mapping of tags to assign to the resource. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - // Specifies a list of Availability Zones in which this Redis Cache should be located. Changing this forces a new Redis Cache to be created. - Zones []*string `json:"zones,omitempty" tf:"zones,omitempty"` +// A mapping of tenant settings to assign to the resource. +TenantSettings map[string]*string `json:"tenantSettings,omitempty" tf:"tenant_settings,omitempty"` + +// Specifies a list of Availability Zones in which this Redis Cache should be located. Changing this forces a new Redis Cache to be created. +Zones []*string `json:"zones,omitempty" tf:"zones,omitempty"` } + type RedisCacheParameters struct { - // The size of the Redis cache to deploy. Valid values for a SKU family of C (Basic/Standard) are 0, 1, 2, 3, 4, 5, 6, and for P (Premium) family are 1, 2, 3, 4, 5. - // +kubebuilder:validation:Optional - Capacity *float64 `json:"capacity,omitempty" tf:"capacity,omitempty"` - // Enable the non-SSL port (6379) - disabled by default. - // +kubebuilder:validation:Optional - EnableNonSSLPort *bool `json:"enableNonSslPort,omitempty" tf:"enable_non_ssl_port,omitempty"` +// The size of the Redis cache to deploy. Valid values for a SKU family of C (Basic/Standard) are 0, 1, 2, 3, 4, 5, 6, and for P (Premium) family are 1, 2, 3, 4, 5. +// +kubebuilder:validation:Optional +Capacity *float64 `json:"capacity,omitempty" tf:"capacity,omitempty"` + +// Enable the non-SSL port (6379) - disabled by default. +// +kubebuilder:validation:Optional +EnableNonSSLPort *bool `json:"enableNonSslPort,omitempty" tf:"enable_non_ssl_port,omitempty"` - // The SKU family/pricing group to use. Valid values are C (for Basic/Standard SKU family) and P (for Premium) - // +kubebuilder:validation:Optional - Family *string `json:"family,omitempty" tf:"family,omitempty"` +// The SKU family/pricing group to use. Valid values are C (for Basic/Standard SKU family) and P (for Premium) +// +kubebuilder:validation:Optional +Family *string `json:"family,omitempty" tf:"family,omitempty"` - // An identity block as defined below. - // +kubebuilder:validation:Optional - Identity []IdentityParameters `json:"identity,omitempty" tf:"identity,omitempty"` +// An identity block as defined below. +// +kubebuilder:validation:Optional +Identity []IdentityParameters `json:"identity,omitempty" tf:"identity,omitempty"` - // The location of the resource group. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// The location of the resource group. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // The minimum TLS version. Possible values are 1.0, 1.1 and 1.2. Defaults to 1.0. - // +kubebuilder:validation:Optional - MinimumTLSVersion *string `json:"minimumTlsVersion,omitempty" tf:"minimum_tls_version,omitempty"` +// The minimum TLS version. Possible values are 1.0, 1.1 and 1.2. Defaults to 1.0. +// +kubebuilder:validation:Optional +MinimumTLSVersion *string `json:"minimumTlsVersion,omitempty" tf:"minimum_tls_version,omitempty"` - // A list of patch_schedule blocks as defined below. - // +kubebuilder:validation:Optional - PatchSchedule []PatchScheduleParameters `json:"patchSchedule,omitempty" tf:"patch_schedule,omitempty"` +// A list of patch_schedule blocks as defined below. +// +kubebuilder:validation:Optional +PatchSchedule []PatchScheduleParameters `json:"patchSchedule,omitempty" tf:"patch_schedule,omitempty"` - // The Static IP Address to assign to the Redis Cache when hosted inside the Virtual Network. This argument implies the use of subnet_id. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - PrivateStaticIPAddress *string `json:"privateStaticIpAddress,omitempty" tf:"private_static_ip_address,omitempty"` +// The Static IP Address to assign to the Redis Cache when hosted inside the Virtual Network. This argument implies the use of subnet_id. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +PrivateStaticIPAddress *string `json:"privateStaticIpAddress,omitempty" tf:"private_static_ip_address,omitempty"` - // Whether or not public network access is allowed for this Redis Cache. true means this resource could be accessed by both public and private endpoint. false means only private endpoint access is allowed. Defaults to true. - // +kubebuilder:validation:Optional - PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` +// Whether or not public network access is allowed for this Redis Cache. true means this resource could be accessed by both public and private endpoint. false means only private endpoint access is allowed. Defaults to true. +// +kubebuilder:validation:Optional +PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` - // A redis_configuration as defined below - with some limitations by SKU - defaults/details are shown below. - // +kubebuilder:validation:Optional - RedisConfiguration []RedisConfigurationParameters `json:"redisConfiguration,omitempty" tf:"redis_configuration,omitempty"` +// A redis_configuration as defined below - with some limitations by SKU - defaults/details are shown below. +// +kubebuilder:validation:Optional +RedisConfiguration []RedisConfigurationParameters `json:"redisConfiguration,omitempty" tf:"redis_configuration,omitempty"` - // Redis version. Only major version needed. Valid values: 4, 6. - // +kubebuilder:validation:Optional - RedisVersion *string `json:"redisVersion,omitempty" tf:"redis_version,omitempty"` +// Redis version. Only major version needed. Valid values: 4, 6. +// +kubebuilder:validation:Optional +RedisVersion *string `json:"redisVersion,omitempty" tf:"redis_version,omitempty"` - // Amount of replicas to create per master for this Redis Cache. - // +kubebuilder:validation:Optional - ReplicasPerMaster *float64 `json:"replicasPerMaster,omitempty" tf:"replicas_per_master,omitempty"` +// Amount of replicas to create per master for this Redis Cache. +// +kubebuilder:validation:Optional +ReplicasPerMaster *float64 `json:"replicasPerMaster,omitempty" tf:"replicas_per_master,omitempty"` - // Amount of replicas to create per primary for this Redis Cache. If both replicas_per_primary and replicas_per_master are set, they need to be equal. - // +kubebuilder:validation:Optional - ReplicasPerPrimary *float64 `json:"replicasPerPrimary,omitempty" tf:"replicas_per_primary,omitempty"` +// Amount of replicas to create per primary for this Redis Cache. If both replicas_per_primary and replicas_per_master are set, they need to be equal. +// +kubebuilder:validation:Optional +ReplicasPerPrimary *float64 `json:"replicasPerPrimary,omitempty" tf:"replicas_per_primary,omitempty"` - // The name of the resource group in which to create the Redis instance. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group in which to create the Redis instance. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - // Only available when using the Premium SKU The number of Shards to create on the Redis Cluster. - // +kubebuilder:validation:Optional - ShardCount *float64 `json:"shardCount,omitempty" tf:"shard_count,omitempty"` +// Only available when using the Premium SKU The number of Shards to create on the Redis Cluster. +// +kubebuilder:validation:Optional +ShardCount *float64 `json:"shardCount,omitempty" tf:"shard_count,omitempty"` - // The SKU of Redis to use. Possible values are Basic, Standard and Premium. - // +kubebuilder:validation:Optional - SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` +// The SKU of Redis to use. Possible values are Basic, Standard and Premium. +// +kubebuilder:validation:Optional +SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` - // Only available when using the Premium SKU The ID of the Subnet within which the Redis Cache should be deployed. This Subnet must only contain Azure Cache for Redis instances without any other type of resources. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/network/v1alpha1.Subnet - // +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() - // +kubebuilder:validation:Optional - SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"` +// Only available when using the Premium SKU The ID of the Subnet within which the Redis Cache should be deployed. This Subnet must only contain Azure Cache for Redis instances without any other type of resources. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/network/v1alpha1.Subnet +// +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() +// +kubebuilder:validation:Optional +SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"` - // Reference to a Subnet in network to populate subnetId. - // +kubebuilder:validation:Optional - SubnetIDRef *v1.Reference `json:"subnetIdRef,omitempty" tf:"-"` +// Reference to a Subnet in network to populate subnetId. +// +kubebuilder:validation:Optional +SubnetIDRef *v1.Reference `json:"subnetIdRef,omitempty" tf:"-"` - // Selector for a Subnet in network to populate subnetId. - // +kubebuilder:validation:Optional - SubnetIDSelector *v1.Selector `json:"subnetIdSelector,omitempty" tf:"-"` +// Selector for a Subnet in network to populate subnetId. +// +kubebuilder:validation:Optional +SubnetIDSelector *v1.Selector `json:"subnetIdSelector,omitempty" tf:"-"` - // A mapping of tags to assign to the resource. - // +kubebuilder:validation:Optional - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A mapping of tags to assign to the resource. +// +kubebuilder:validation:Optional +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - // A mapping of tenant settings to assign to the resource. - // +kubebuilder:validation:Optional - TenantSettings map[string]*string `json:"tenantSettings,omitempty" tf:"tenant_settings,omitempty"` +// A mapping of tenant settings to assign to the resource. +// +kubebuilder:validation:Optional +TenantSettings map[string]*string `json:"tenantSettings,omitempty" tf:"tenant_settings,omitempty"` - // Specifies a list of Availability Zones in which this Redis Cache should be located. Changing this forces a new Redis Cache to be created. - // +kubebuilder:validation:Optional - Zones []*string `json:"zones,omitempty" tf:"zones,omitempty"` +// Specifies a list of Availability Zones in which this Redis Cache should be located. Changing this forces a new Redis Cache to be created. +// +kubebuilder:validation:Optional +Zones []*string `json:"zones,omitempty" tf:"zones,omitempty"` } + type RedisConfigurationInitParameters struct { - // Enable or disable AOF persistence for this Redis Cache. Defaults to false. - AofBackupEnabled *bool `json:"aofBackupEnabled,omitempty" tf:"aof_backup_enabled,omitempty"` - // If set to false, the Redis instance will be accessible without authentication. Defaults to true. - EnableAuthentication *bool `json:"enableAuthentication,omitempty" tf:"enable_authentication,omitempty"` +// Enable or disable AOF persistence for this Redis Cache. Defaults to false. +AofBackupEnabled *bool `json:"aofBackupEnabled,omitempty" tf:"aof_backup_enabled,omitempty"` + +// If set to false, the Redis instance will be accessible without authentication. Defaults to true. +EnableAuthentication *bool `json:"enableAuthentication,omitempty" tf:"enable_authentication,omitempty"` - // Value in megabytes reserved to accommodate for memory fragmentation. Defaults are shown below. - MaxfragmentationmemoryReserved *float64 `json:"maxfragmentationmemoryReserved,omitempty" tf:"maxfragmentationmemory_reserved,omitempty"` +// Value in megabytes reserved to accommodate for memory fragmentation. Defaults are shown below. +MaxfragmentationmemoryReserved *float64 `json:"maxfragmentationmemoryReserved,omitempty" tf:"maxfragmentationmemory_reserved,omitempty"` - // The max-memory delta for this Redis instance. Defaults are shown below. - MaxmemoryDelta *float64 `json:"maxmemoryDelta,omitempty" tf:"maxmemory_delta,omitempty"` +// The max-memory delta for this Redis instance. Defaults are shown below. +MaxmemoryDelta *float64 `json:"maxmemoryDelta,omitempty" tf:"maxmemory_delta,omitempty"` - // How Redis will select what to remove when maxmemory is reached. Defaults are shown below. Defaults to volatile-lru. - MaxmemoryPolicy *string `json:"maxmemoryPolicy,omitempty" tf:"maxmemory_policy,omitempty"` +// How Redis will select what to remove when maxmemory is reached. Defaults are shown below. Defaults to volatile-lru. +MaxmemoryPolicy *string `json:"maxmemoryPolicy,omitempty" tf:"maxmemory_policy,omitempty"` - // Value in megabytes reserved for non-cache usage e.g. failover. Defaults are shown below. - MaxmemoryReserved *float64 `json:"maxmemoryReserved,omitempty" tf:"maxmemory_reserved,omitempty"` +// Value in megabytes reserved for non-cache usage e.g. failover. Defaults are shown below. +MaxmemoryReserved *float64 `json:"maxmemoryReserved,omitempty" tf:"maxmemory_reserved,omitempty"` - // Keyspace notifications allows clients to subscribe to Pub/Sub channels in order to receive events affecting the Redis data set in some way. Reference - NotifyKeyspaceEvents *string `json:"notifyKeyspaceEvents,omitempty" tf:"notify_keyspace_events,omitempty"` +// Keyspace notifications allows clients to subscribe to Pub/Sub channels in order to receive events affecting the Redis data set in some way. Reference +NotifyKeyspaceEvents *string `json:"notifyKeyspaceEvents,omitempty" tf:"notify_keyspace_events,omitempty"` - // Is Backup Enabled? Only supported on Premium SKUs. Defaults to false. - RdbBackupEnabled *bool `json:"rdbBackupEnabled,omitempty" tf:"rdb_backup_enabled,omitempty"` +// Is Backup Enabled? Only supported on Premium SKUs. Defaults to false. +RdbBackupEnabled *bool `json:"rdbBackupEnabled,omitempty" tf:"rdb_backup_enabled,omitempty"` - // The Backup Frequency in Minutes. Only supported on Premium SKUs. Possible values are: 15, 30, 60, 360, 720 and 1440. - RdbBackupFrequency *float64 `json:"rdbBackupFrequency,omitempty" tf:"rdb_backup_frequency,omitempty"` +// The Backup Frequency in Minutes. Only supported on Premium SKUs. Possible values are: 15, 30, 60, 360, 720 and 1440. +RdbBackupFrequency *float64 `json:"rdbBackupFrequency,omitempty" tf:"rdb_backup_frequency,omitempty"` - // The maximum number of snapshots to create as a backup. Only supported for Premium SKUs. - RdbBackupMaxSnapshotCount *float64 `json:"rdbBackupMaxSnapshotCount,omitempty" tf:"rdb_backup_max_snapshot_count,omitempty"` +// The maximum number of snapshots to create as a backup. Only supported for Premium SKUs. +RdbBackupMaxSnapshotCount *float64 `json:"rdbBackupMaxSnapshotCount,omitempty" tf:"rdb_backup_max_snapshot_count,omitempty"` } + type RedisConfigurationObservation struct { - // Enable or disable AOF persistence for this Redis Cache. Defaults to false. - AofBackupEnabled *bool `json:"aofBackupEnabled,omitempty" tf:"aof_backup_enabled,omitempty"` - // If set to false, the Redis instance will be accessible without authentication. Defaults to true. - EnableAuthentication *bool `json:"enableAuthentication,omitempty" tf:"enable_authentication,omitempty"` +// Enable or disable AOF persistence for this Redis Cache. Defaults to false. +AofBackupEnabled *bool `json:"aofBackupEnabled,omitempty" tf:"aof_backup_enabled,omitempty"` - // Returns the max number of connected clients at the same time. - Maxclients *float64 `json:"maxclients,omitempty" tf:"maxclients,omitempty"` +// If set to false, the Redis instance will be accessible without authentication. Defaults to true. +EnableAuthentication *bool `json:"enableAuthentication,omitempty" tf:"enable_authentication,omitempty"` - // Value in megabytes reserved to accommodate for memory fragmentation. Defaults are shown below. - MaxfragmentationmemoryReserved *float64 `json:"maxfragmentationmemoryReserved,omitempty" tf:"maxfragmentationmemory_reserved,omitempty"` +// Returns the max number of connected clients at the same time. +Maxclients *float64 `json:"maxclients,omitempty" tf:"maxclients,omitempty"` - // The max-memory delta for this Redis instance. Defaults are shown below. - MaxmemoryDelta *float64 `json:"maxmemoryDelta,omitempty" tf:"maxmemory_delta,omitempty"` +// Value in megabytes reserved to accommodate for memory fragmentation. Defaults are shown below. +MaxfragmentationmemoryReserved *float64 `json:"maxfragmentationmemoryReserved,omitempty" tf:"maxfragmentationmemory_reserved,omitempty"` - // How Redis will select what to remove when maxmemory is reached. Defaults are shown below. Defaults to volatile-lru. - MaxmemoryPolicy *string `json:"maxmemoryPolicy,omitempty" tf:"maxmemory_policy,omitempty"` +// The max-memory delta for this Redis instance. Defaults are shown below. +MaxmemoryDelta *float64 `json:"maxmemoryDelta,omitempty" tf:"maxmemory_delta,omitempty"` - // Value in megabytes reserved for non-cache usage e.g. failover. Defaults are shown below. - MaxmemoryReserved *float64 `json:"maxmemoryReserved,omitempty" tf:"maxmemory_reserved,omitempty"` +// How Redis will select what to remove when maxmemory is reached. Defaults are shown below. Defaults to volatile-lru. +MaxmemoryPolicy *string `json:"maxmemoryPolicy,omitempty" tf:"maxmemory_policy,omitempty"` - // Keyspace notifications allows clients to subscribe to Pub/Sub channels in order to receive events affecting the Redis data set in some way. Reference - NotifyKeyspaceEvents *string `json:"notifyKeyspaceEvents,omitempty" tf:"notify_keyspace_events,omitempty"` +// Value in megabytes reserved for non-cache usage e.g. failover. Defaults are shown below. +MaxmemoryReserved *float64 `json:"maxmemoryReserved,omitempty" tf:"maxmemory_reserved,omitempty"` - // Is Backup Enabled? Only supported on Premium SKUs. Defaults to false. - RdbBackupEnabled *bool `json:"rdbBackupEnabled,omitempty" tf:"rdb_backup_enabled,omitempty"` +// Keyspace notifications allows clients to subscribe to Pub/Sub channels in order to receive events affecting the Redis data set in some way. Reference +NotifyKeyspaceEvents *string `json:"notifyKeyspaceEvents,omitempty" tf:"notify_keyspace_events,omitempty"` - // The Backup Frequency in Minutes. Only supported on Premium SKUs. Possible values are: 15, 30, 60, 360, 720 and 1440. - RdbBackupFrequency *float64 `json:"rdbBackupFrequency,omitempty" tf:"rdb_backup_frequency,omitempty"` +// Is Backup Enabled? Only supported on Premium SKUs. Defaults to false. +RdbBackupEnabled *bool `json:"rdbBackupEnabled,omitempty" tf:"rdb_backup_enabled,omitempty"` - // The maximum number of snapshots to create as a backup. Only supported for Premium SKUs. - RdbBackupMaxSnapshotCount *float64 `json:"rdbBackupMaxSnapshotCount,omitempty" tf:"rdb_backup_max_snapshot_count,omitempty"` +// The Backup Frequency in Minutes. Only supported on Premium SKUs. Possible values are: 15, 30, 60, 360, 720 and 1440. +RdbBackupFrequency *float64 `json:"rdbBackupFrequency,omitempty" tf:"rdb_backup_frequency,omitempty"` + +// The maximum number of snapshots to create as a backup. Only supported for Premium SKUs. +RdbBackupMaxSnapshotCount *float64 `json:"rdbBackupMaxSnapshotCount,omitempty" tf:"rdb_backup_max_snapshot_count,omitempty"` } + type RedisConfigurationParameters struct { - // Enable or disable AOF persistence for this Redis Cache. Defaults to false. - // +kubebuilder:validation:Optional - AofBackupEnabled *bool `json:"aofBackupEnabled,omitempty" tf:"aof_backup_enabled,omitempty"` - // First Storage Account connection string for AOF persistence. - // +kubebuilder:validation:Optional - AofStorageConnectionString0SecretRef *v1.SecretKeySelector `json:"aofStorageConnectionString0SecretRef,omitempty" tf:"-"` +// Enable or disable AOF persistence for this Redis Cache. Defaults to false. +// +kubebuilder:validation:Optional +AofBackupEnabled *bool `json:"aofBackupEnabled,omitempty" tf:"aof_backup_enabled,omitempty"` + +// First Storage Account connection string for AOF persistence. +// +kubebuilder:validation:Optional +AofStorageConnectionString0SecretRef *v1.SecretKeySelector `json:"aofStorageConnectionString0SecretRef,omitempty" tf:"-"` - // Second Storage Account connection string for AOF persistence. - // +kubebuilder:validation:Optional - AofStorageConnectionString1SecretRef *v1.SecretKeySelector `json:"aofStorageConnectionString1SecretRef,omitempty" tf:"-"` +// Second Storage Account connection string for AOF persistence. +// +kubebuilder:validation:Optional +AofStorageConnectionString1SecretRef *v1.SecretKeySelector `json:"aofStorageConnectionString1SecretRef,omitempty" tf:"-"` - // If set to false, the Redis instance will be accessible without authentication. Defaults to true. - // +kubebuilder:validation:Optional - EnableAuthentication *bool `json:"enableAuthentication,omitempty" tf:"enable_authentication,omitempty"` +// If set to false, the Redis instance will be accessible without authentication. Defaults to true. +// +kubebuilder:validation:Optional +EnableAuthentication *bool `json:"enableAuthentication,omitempty" tf:"enable_authentication,omitempty"` - // Value in megabytes reserved to accommodate for memory fragmentation. Defaults are shown below. - // +kubebuilder:validation:Optional - MaxfragmentationmemoryReserved *float64 `json:"maxfragmentationmemoryReserved,omitempty" tf:"maxfragmentationmemory_reserved,omitempty"` +// Value in megabytes reserved to accommodate for memory fragmentation. Defaults are shown below. +// +kubebuilder:validation:Optional +MaxfragmentationmemoryReserved *float64 `json:"maxfragmentationmemoryReserved,omitempty" tf:"maxfragmentationmemory_reserved,omitempty"` - // The max-memory delta for this Redis instance. Defaults are shown below. - // +kubebuilder:validation:Optional - MaxmemoryDelta *float64 `json:"maxmemoryDelta,omitempty" tf:"maxmemory_delta,omitempty"` +// The max-memory delta for this Redis instance. Defaults are shown below. +// +kubebuilder:validation:Optional +MaxmemoryDelta *float64 `json:"maxmemoryDelta,omitempty" tf:"maxmemory_delta,omitempty"` - // How Redis will select what to remove when maxmemory is reached. Defaults are shown below. Defaults to volatile-lru. - // +kubebuilder:validation:Optional - MaxmemoryPolicy *string `json:"maxmemoryPolicy,omitempty" tf:"maxmemory_policy,omitempty"` +// How Redis will select what to remove when maxmemory is reached. Defaults are shown below. Defaults to volatile-lru. +// +kubebuilder:validation:Optional +MaxmemoryPolicy *string `json:"maxmemoryPolicy,omitempty" tf:"maxmemory_policy,omitempty"` - // Value in megabytes reserved for non-cache usage e.g. failover. Defaults are shown below. - // +kubebuilder:validation:Optional - MaxmemoryReserved *float64 `json:"maxmemoryReserved,omitempty" tf:"maxmemory_reserved,omitempty"` +// Value in megabytes reserved for non-cache usage e.g. failover. Defaults are shown below. +// +kubebuilder:validation:Optional +MaxmemoryReserved *float64 `json:"maxmemoryReserved,omitempty" tf:"maxmemory_reserved,omitempty"` - // Keyspace notifications allows clients to subscribe to Pub/Sub channels in order to receive events affecting the Redis data set in some way. Reference - // +kubebuilder:validation:Optional - NotifyKeyspaceEvents *string `json:"notifyKeyspaceEvents,omitempty" tf:"notify_keyspace_events,omitempty"` +// Keyspace notifications allows clients to subscribe to Pub/Sub channels in order to receive events affecting the Redis data set in some way. Reference +// +kubebuilder:validation:Optional +NotifyKeyspaceEvents *string `json:"notifyKeyspaceEvents,omitempty" tf:"notify_keyspace_events,omitempty"` - // Is Backup Enabled? Only supported on Premium SKUs. Defaults to false. - // +kubebuilder:validation:Optional - RdbBackupEnabled *bool `json:"rdbBackupEnabled,omitempty" tf:"rdb_backup_enabled,omitempty"` +// Is Backup Enabled? Only supported on Premium SKUs. Defaults to false. +// +kubebuilder:validation:Optional +RdbBackupEnabled *bool `json:"rdbBackupEnabled,omitempty" tf:"rdb_backup_enabled,omitempty"` - // The Backup Frequency in Minutes. Only supported on Premium SKUs. Possible values are: 15, 30, 60, 360, 720 and 1440. - // +kubebuilder:validation:Optional - RdbBackupFrequency *float64 `json:"rdbBackupFrequency,omitempty" tf:"rdb_backup_frequency,omitempty"` +// The Backup Frequency in Minutes. Only supported on Premium SKUs. Possible values are: 15, 30, 60, 360, 720 and 1440. +// +kubebuilder:validation:Optional +RdbBackupFrequency *float64 `json:"rdbBackupFrequency,omitempty" tf:"rdb_backup_frequency,omitempty"` - // The maximum number of snapshots to create as a backup. Only supported for Premium SKUs. - // +kubebuilder:validation:Optional - RdbBackupMaxSnapshotCount *float64 `json:"rdbBackupMaxSnapshotCount,omitempty" tf:"rdb_backup_max_snapshot_count,omitempty"` +// The maximum number of snapshots to create as a backup. Only supported for Premium SKUs. +// +kubebuilder:validation:Optional +RdbBackupMaxSnapshotCount *float64 `json:"rdbBackupMaxSnapshotCount,omitempty" tf:"rdb_backup_max_snapshot_count,omitempty"` - // The Connection String to the Storage Account. Only supported for Premium SKUs. In the format: DefaultEndpointsProtocol=https;BlobEndpoint=${azurerm_storage_account.example.primary_blob_endpoint};AccountName=${azurerm_storage_account.example.name};AccountKey=${azurerm_storage_account.example.primary_access_key}. - // +kubebuilder:validation:Optional - RdbStorageConnectionStringSecretRef *v1.SecretKeySelector `json:"rdbStorageConnectionStringSecretRef,omitempty" tf:"-"` +// The Connection String to the Storage Account. Only supported for Premium SKUs. In the format: DefaultEndpointsProtocol=https;BlobEndpoint=${azurerm_storage_account.example.primary_blob_endpoint};AccountName=${azurerm_storage_account.example.name};AccountKey=${azurerm_storage_account.example.primary_access_key}. +// +kubebuilder:validation:Optional +RdbStorageConnectionStringSecretRef *v1.SecretKeySelector `json:"rdbStorageConnectionStringSecretRef,omitempty" tf:"-"` } // RedisCacheSpec defines the desired state of RedisCache type RedisCacheSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider RedisCacheParameters `json:"forProvider"` + ForProvider RedisCacheParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -463,13 +490,13 @@ type RedisCacheSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider RedisCacheInitParameters `json:"initProvider,omitempty"` + InitProvider RedisCacheInitParameters `json:"initProvider,omitempty"` } // RedisCacheStatus defines the observed state of RedisCache. type RedisCacheStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider RedisCacheObservation `json:"atProvider,omitempty"` + AtProvider RedisCacheObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -484,13 +511,13 @@ type RedisCacheStatus struct { type RedisCache struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.capacity) || (has(self.initProvider) && has(self.initProvider.capacity))",message="spec.forProvider.capacity is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.family) || (has(self.initProvider) && has(self.initProvider.family))",message="spec.forProvider.family is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.redisVersion) || (has(self.initProvider) && has(self.initProvider.redisVersion))",message="spec.forProvider.redisVersion is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.skuName) || (has(self.initProvider) && has(self.initProvider.skuName))",message="spec.forProvider.skuName is a required parameter" - Spec RedisCacheSpec `json:"spec"` - Status RedisCacheStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.capacity) || (has(self.initProvider) && has(self.initProvider.capacity))",message="spec.forProvider.capacity is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.family) || (has(self.initProvider) && has(self.initProvider.family))",message="spec.forProvider.family is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.redisVersion) || (has(self.initProvider) && has(self.initProvider.redisVersion))",message="spec.forProvider.redisVersion is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.skuName) || (has(self.initProvider) && has(self.initProvider.skuName))",message="spec.forProvider.skuName is a required parameter" + Spec RedisCacheSpec `json:"spec"` + Status RedisCacheStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/cache/v1alpha1/zz_redisenterprisecluster_types.go b/apis/cache/v1alpha1/zz_redisenterprisecluster_types.go index 37b39c6..ed3c106 100755 --- a/apis/cache/v1alpha1/zz_redisenterprisecluster_types.go +++ b/apis/cache/v1alpha1/zz_redisenterprisecluster_types.go @@ -15,93 +15,102 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type RedisEnterpriseClusterInitParameters struct { - // The Azure Region where the Redis Enterprise Cluster should exist. Changing this forces a new Redis Enterprise Cluster to be created. - Location *string `json:"location,omitempty" tf:"location,omitempty"` - // The minimum TLS version. Possible values are 1.0, 1.1 and 1.2. Defaults to 1.2. Changing this forces a new Redis Enterprise Cluster to be created. - MinimumTLSVersion *string `json:"minimumTlsVersion,omitempty" tf:"minimum_tls_version,omitempty"` +// The Azure Region where the Redis Enterprise Cluster should exist. Changing this forces a new Redis Enterprise Cluster to be created. +Location *string `json:"location,omitempty" tf:"location,omitempty"` + +// The minimum TLS version. Possible values are 1.0, 1.1 and 1.2. Defaults to 1.2. Changing this forces a new Redis Enterprise Cluster to be created. +MinimumTLSVersion *string `json:"minimumTlsVersion,omitempty" tf:"minimum_tls_version,omitempty"` - // The sku_name is comprised of two segments separated by a hyphen (e.g. Enterprise_E10-2). The first segment of the sku_name defines the name of the SKU, possible values are Enterprise_E10, Enterprise_E20", Enterprise_E50, Enterprise_E100, EnterpriseFlash_F300, EnterpriseFlash_F700 or EnterpriseFlash_F1500. The second segment defines the capacity of the sku_name, possible values for Enteprise SKUs are (2, 4, 6, ...). Possible values for EnterpriseFlash SKUs are (3, 9, 15, ...). Changing this forces a new Redis Enterprise Cluster to be created. - SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` +// The sku_name is comprised of two segments separated by a hyphen (e.g. Enterprise_E10-2). The first segment of the sku_name defines the name of the SKU, possible values are Enterprise_E10, Enterprise_E20", Enterprise_E50, Enterprise_E100, EnterpriseFlash_F300, EnterpriseFlash_F700 or EnterpriseFlash_F1500. The second segment defines the capacity of the sku_name, possible values for Enteprise SKUs are (2, 4, 6, ...). Possible values for EnterpriseFlash SKUs are (3, 9, 15, ...). Changing this forces a new Redis Enterprise Cluster to be created. +SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` - // A mapping of tags which should be assigned to the Redis Enterprise Cluster. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A mapping of tags which should be assigned to the Redis Enterprise Cluster. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - // Specifies a list of Availability Zones in which this Redis Enterprise Cluster should be located. Changing this forces a new Redis Enterprise Cluster to be created. - Zones []*string `json:"zones,omitempty" tf:"zones,omitempty"` +// Specifies a list of Availability Zones in which this Redis Enterprise Cluster should be located. Changing this forces a new Redis Enterprise Cluster to be created. +Zones []*string `json:"zones,omitempty" tf:"zones,omitempty"` } + type RedisEnterpriseClusterObservation struct { - // DNS name of the cluster endpoint. - Hostname *string `json:"hostname,omitempty" tf:"hostname,omitempty"` - // The ID of the Redis Enterprise Cluster. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// DNS name of the cluster endpoint. +Hostname *string `json:"hostname,omitempty" tf:"hostname,omitempty"` + +// The ID of the Redis Enterprise Cluster. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The Azure Region where the Redis Enterprise Cluster should exist. Changing this forces a new Redis Enterprise Cluster to be created. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// The Azure Region where the Redis Enterprise Cluster should exist. Changing this forces a new Redis Enterprise Cluster to be created. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // The minimum TLS version. Possible values are 1.0, 1.1 and 1.2. Defaults to 1.2. Changing this forces a new Redis Enterprise Cluster to be created. - MinimumTLSVersion *string `json:"minimumTlsVersion,omitempty" tf:"minimum_tls_version,omitempty"` +// The minimum TLS version. Possible values are 1.0, 1.1 and 1.2. Defaults to 1.2. Changing this forces a new Redis Enterprise Cluster to be created. +MinimumTLSVersion *string `json:"minimumTlsVersion,omitempty" tf:"minimum_tls_version,omitempty"` - // The name of the Resource Group where the Redis Enterprise Cluster should exist. Changing this forces a new Redis Enterprise Cluster to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the Resource Group where the Redis Enterprise Cluster should exist. Changing this forces a new Redis Enterprise Cluster to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // The sku_name is comprised of two segments separated by a hyphen (e.g. Enterprise_E10-2). The first segment of the sku_name defines the name of the SKU, possible values are Enterprise_E10, Enterprise_E20", Enterprise_E50, Enterprise_E100, EnterpriseFlash_F300, EnterpriseFlash_F700 or EnterpriseFlash_F1500. The second segment defines the capacity of the sku_name, possible values for Enteprise SKUs are (2, 4, 6, ...). Possible values for EnterpriseFlash SKUs are (3, 9, 15, ...). Changing this forces a new Redis Enterprise Cluster to be created. - SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` +// The sku_name is comprised of two segments separated by a hyphen (e.g. Enterprise_E10-2). The first segment of the sku_name defines the name of the SKU, possible values are Enterprise_E10, Enterprise_E20", Enterprise_E50, Enterprise_E100, EnterpriseFlash_F300, EnterpriseFlash_F700 or EnterpriseFlash_F1500. The second segment defines the capacity of the sku_name, possible values for Enteprise SKUs are (2, 4, 6, ...). Possible values for EnterpriseFlash SKUs are (3, 9, 15, ...). Changing this forces a new Redis Enterprise Cluster to be created. +SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` - // A mapping of tags which should be assigned to the Redis Enterprise Cluster. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A mapping of tags which should be assigned to the Redis Enterprise Cluster. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - // Specifies a list of Availability Zones in which this Redis Enterprise Cluster should be located. Changing this forces a new Redis Enterprise Cluster to be created. - Zones []*string `json:"zones,omitempty" tf:"zones,omitempty"` +// Specifies a list of Availability Zones in which this Redis Enterprise Cluster should be located. Changing this forces a new Redis Enterprise Cluster to be created. +Zones []*string `json:"zones,omitempty" tf:"zones,omitempty"` } + type RedisEnterpriseClusterParameters struct { - // The Azure Region where the Redis Enterprise Cluster should exist. Changing this forces a new Redis Enterprise Cluster to be created. - // +kubebuilder:validation:Optional - Location *string `json:"location,omitempty" tf:"location,omitempty"` - // The minimum TLS version. Possible values are 1.0, 1.1 and 1.2. Defaults to 1.2. Changing this forces a new Redis Enterprise Cluster to be created. - // +kubebuilder:validation:Optional - MinimumTLSVersion *string `json:"minimumTlsVersion,omitempty" tf:"minimum_tls_version,omitempty"` +// The Azure Region where the Redis Enterprise Cluster should exist. Changing this forces a new Redis Enterprise Cluster to be created. +// +kubebuilder:validation:Optional +Location *string `json:"location,omitempty" tf:"location,omitempty"` + +// The minimum TLS version. Possible values are 1.0, 1.1 and 1.2. Defaults to 1.2. Changing this forces a new Redis Enterprise Cluster to be created. +// +kubebuilder:validation:Optional +MinimumTLSVersion *string `json:"minimumTlsVersion,omitempty" tf:"minimum_tls_version,omitempty"` - // The name of the Resource Group where the Redis Enterprise Cluster should exist. Changing this forces a new Redis Enterprise Cluster to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the Resource Group where the Redis Enterprise Cluster should exist. Changing this forces a new Redis Enterprise Cluster to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - // The sku_name is comprised of two segments separated by a hyphen (e.g. Enterprise_E10-2). The first segment of the sku_name defines the name of the SKU, possible values are Enterprise_E10, Enterprise_E20", Enterprise_E50, Enterprise_E100, EnterpriseFlash_F300, EnterpriseFlash_F700 or EnterpriseFlash_F1500. The second segment defines the capacity of the sku_name, possible values for Enteprise SKUs are (2, 4, 6, ...). Possible values for EnterpriseFlash SKUs are (3, 9, 15, ...). Changing this forces a new Redis Enterprise Cluster to be created. - // +kubebuilder:validation:Optional - SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` +// The sku_name is comprised of two segments separated by a hyphen (e.g. Enterprise_E10-2). The first segment of the sku_name defines the name of the SKU, possible values are Enterprise_E10, Enterprise_E20", Enterprise_E50, Enterprise_E100, EnterpriseFlash_F300, EnterpriseFlash_F700 or EnterpriseFlash_F1500. The second segment defines the capacity of the sku_name, possible values for Enteprise SKUs are (2, 4, 6, ...). Possible values for EnterpriseFlash SKUs are (3, 9, 15, ...). Changing this forces a new Redis Enterprise Cluster to be created. +// +kubebuilder:validation:Optional +SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` - // A mapping of tags which should be assigned to the Redis Enterprise Cluster. - // +kubebuilder:validation:Optional - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A mapping of tags which should be assigned to the Redis Enterprise Cluster. +// +kubebuilder:validation:Optional +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - // Specifies a list of Availability Zones in which this Redis Enterprise Cluster should be located. Changing this forces a new Redis Enterprise Cluster to be created. - // +kubebuilder:validation:Optional - Zones []*string `json:"zones,omitempty" tf:"zones,omitempty"` +// Specifies a list of Availability Zones in which this Redis Enterprise Cluster should be located. Changing this forces a new Redis Enterprise Cluster to be created. +// +kubebuilder:validation:Optional +Zones []*string `json:"zones,omitempty" tf:"zones,omitempty"` } // RedisEnterpriseClusterSpec defines the desired state of RedisEnterpriseCluster type RedisEnterpriseClusterSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider RedisEnterpriseClusterParameters `json:"forProvider"` + ForProvider RedisEnterpriseClusterParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -112,13 +121,13 @@ type RedisEnterpriseClusterSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider RedisEnterpriseClusterInitParameters `json:"initProvider,omitempty"` + InitProvider RedisEnterpriseClusterInitParameters `json:"initProvider,omitempty"` } // RedisEnterpriseClusterStatus defines the observed state of RedisEnterpriseCluster. type RedisEnterpriseClusterStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider RedisEnterpriseClusterObservation `json:"atProvider,omitempty"` + AtProvider RedisEnterpriseClusterObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -133,10 +142,10 @@ type RedisEnterpriseClusterStatus struct { type RedisEnterpriseCluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.skuName) || (has(self.initProvider) && has(self.initProvider.skuName))",message="spec.forProvider.skuName is a required parameter" - Spec RedisEnterpriseClusterSpec `json:"spec"` - Status RedisEnterpriseClusterStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.skuName) || (has(self.initProvider) && has(self.initProvider.skuName))",message="spec.forProvider.skuName is a required parameter" + Spec RedisEnterpriseClusterSpec `json:"spec"` + Status RedisEnterpriseClusterStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/cache/v1alpha1/zz_redisenterprisedatabase_types.go b/apis/cache/v1alpha1/zz_redisenterprisedatabase_types.go index efe58cf..f227c7b 100755 --- a/apis/cache/v1alpha1/zz_redisenterprisedatabase_types.go +++ b/apis/cache/v1alpha1/zz_redisenterprisedatabase_types.go @@ -15,158 +15,173 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type ModuleInitParameters struct { - // Configuration options for the module (e.g. ERROR_RATE 0.00 INITIAL_SIZE 400). Changing this forces a new resource to be created. Defaults to "". - Args *string `json:"args,omitempty" tf:"args,omitempty"` - // The name which should be used for this module. Possible values are RedisBloom, RedisTimeSeries, RediSearch and RedisJSON. Changing this forces a new Redis Enterprise Database to be created. - Name *string `json:"name,omitempty" tf:"name,omitempty"` +// Configuration options for the module (e.g. ERROR_RATE 0.00 INITIAL_SIZE 400). Changing this forces a new resource to be created. Defaults to "". +Args *string `json:"args,omitempty" tf:"args,omitempty"` + +// The name which should be used for this module. Possible values are RedisBloom, RedisTimeSeries, RediSearch and RedisJSON. Changing this forces a new Redis Enterprise Database to be created. +Name *string `json:"name,omitempty" tf:"name,omitempty"` } + type ModuleObservation struct { - // Configuration options for the module (e.g. ERROR_RATE 0.00 INITIAL_SIZE 400). Changing this forces a new resource to be created. Defaults to "". - Args *string `json:"args,omitempty" tf:"args,omitempty"` - // The name which should be used for this module. Possible values are RedisBloom, RedisTimeSeries, RediSearch and RedisJSON. Changing this forces a new Redis Enterprise Database to be created. - Name *string `json:"name,omitempty" tf:"name,omitempty"` +// Configuration options for the module (e.g. ERROR_RATE 0.00 INITIAL_SIZE 400). Changing this forces a new resource to be created. Defaults to "". +Args *string `json:"args,omitempty" tf:"args,omitempty"` - Version *string `json:"version,omitempty" tf:"version,omitempty"` +// The name which should be used for this module. Possible values are RedisBloom, RedisTimeSeries, RediSearch and RedisJSON. Changing this forces a new Redis Enterprise Database to be created. +Name *string `json:"name,omitempty" tf:"name,omitempty"` + +Version *string `json:"version,omitempty" tf:"version,omitempty"` } + type ModuleParameters struct { - // Configuration options for the module (e.g. ERROR_RATE 0.00 INITIAL_SIZE 400). Changing this forces a new resource to be created. Defaults to "". - // +kubebuilder:validation:Optional - Args *string `json:"args,omitempty" tf:"args,omitempty"` - // The name which should be used for this module. Possible values are RedisBloom, RedisTimeSeries, RediSearch and RedisJSON. Changing this forces a new Redis Enterprise Database to be created. - // +kubebuilder:validation:Optional - Name *string `json:"name" tf:"name,omitempty"` +// Configuration options for the module (e.g. ERROR_RATE 0.00 INITIAL_SIZE 400). Changing this forces a new resource to be created. Defaults to "". +// +kubebuilder:validation:Optional +Args *string `json:"args,omitempty" tf:"args,omitempty"` + +// The name which should be used for this module. Possible values are RedisBloom, RedisTimeSeries, RediSearch and RedisJSON. Changing this forces a new Redis Enterprise Database to be created. +// +kubebuilder:validation:Optional +Name *string `json:"name" tf:"name,omitempty"` } + type RedisEnterpriseDatabaseInitParameters struct { - // Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Default is TLS-encrypted. Possible values are Encrypted and Plaintext. Defaults to Encrypted. Changing this forces a new Redis Enterprise Database to be created. - ClientProtocol *string `json:"clientProtocol,omitempty" tf:"client_protocol,omitempty"` - // Clustering policy - default is OSSCluster. Specified at create time. Possible values are EnterpriseCluster and OSSCluster. Defaults to OSSCluster. Changing this forces a new Redis Enterprise Database to be created. - ClusteringPolicy *string `json:"clusteringPolicy,omitempty" tf:"clustering_policy,omitempty"` +// Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Default is TLS-encrypted. Possible values are Encrypted and Plaintext. Defaults to Encrypted. Changing this forces a new Redis Enterprise Database to be created. +ClientProtocol *string `json:"clientProtocol,omitempty" tf:"client_protocol,omitempty"` - // Redis eviction policy - default is VolatileLRU. Possible values are AllKeysLFU, AllKeysLRU, AllKeysRandom, VolatileLRU, VolatileLFU, VolatileTTL, VolatileRandom and NoEviction. Changing this forces a new Redis Enterprise Database to be created. - EvictionPolicy *string `json:"evictionPolicy,omitempty" tf:"eviction_policy,omitempty"` +// Clustering policy - default is OSSCluster. Specified at create time. Possible values are EnterpriseCluster and OSSCluster. Defaults to OSSCluster. Changing this forces a new Redis Enterprise Database to be created. +ClusteringPolicy *string `json:"clusteringPolicy,omitempty" tf:"clustering_policy,omitempty"` - // Nickname of the group of linked databases. Changing this force a new Redis Enterprise Geo Database to be created. - LinkedDatabaseGroupNickname *string `json:"linkedDatabaseGroupNickname,omitempty" tf:"linked_database_group_nickname,omitempty"` +// Redis eviction policy - default is VolatileLRU. Possible values are AllKeysLFU, AllKeysLRU, AllKeysRandom, VolatileLRU, VolatileLFU, VolatileTTL, VolatileRandom and NoEviction. Changing this forces a new Redis Enterprise Database to be created. +EvictionPolicy *string `json:"evictionPolicy,omitempty" tf:"eviction_policy,omitempty"` - // A list of database resources to link with this database with a maximum of 5. - LinkedDatabaseID []*string `json:"linkedDatabaseId,omitempty" tf:"linked_database_id,omitempty"` +// Nickname of the group of linked databases. Changing this force a new Redis Enterprise Geo Database to be created. +LinkedDatabaseGroupNickname *string `json:"linkedDatabaseGroupNickname,omitempty" tf:"linked_database_group_nickname,omitempty"` - // A module block as defined below. Changing this forces a new resource to be created. - Module []ModuleInitParameters `json:"module,omitempty" tf:"module,omitempty"` +// A list of database resources to link with this database with a maximum of 5. +LinkedDatabaseID []*string `json:"linkedDatabaseId,omitempty" tf:"linked_database_id,omitempty"` - // TCP port of the database endpoint. Specified at create time. Defaults to an available port. Changing this forces a new Redis Enterprise Database to be created. Defaults to 10000. - Port *float64 `json:"port,omitempty" tf:"port,omitempty"` +// A module block as defined below. Changing this forces a new resource to be created. +Module []ModuleInitParameters `json:"module,omitempty" tf:"module,omitempty"` + +// TCP port of the database endpoint. Specified at create time. Defaults to an available port. Changing this forces a new Redis Enterprise Database to be created. Defaults to 10000. +Port *float64 `json:"port,omitempty" tf:"port,omitempty"` } + type RedisEnterpriseDatabaseObservation struct { - // Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Default is TLS-encrypted. Possible values are Encrypted and Plaintext. Defaults to Encrypted. Changing this forces a new Redis Enterprise Database to be created. - ClientProtocol *string `json:"clientProtocol,omitempty" tf:"client_protocol,omitempty"` - // The resource id of the Redis Enterprise Cluster to deploy this Redis Enterprise Database. Changing this forces a new Redis Enterprise Database to be created. - ClusterID *string `json:"clusterId,omitempty" tf:"cluster_id,omitempty"` +// Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Default is TLS-encrypted. Possible values are Encrypted and Plaintext. Defaults to Encrypted. Changing this forces a new Redis Enterprise Database to be created. +ClientProtocol *string `json:"clientProtocol,omitempty" tf:"client_protocol,omitempty"` - // Clustering policy - default is OSSCluster. Specified at create time. Possible values are EnterpriseCluster and OSSCluster. Defaults to OSSCluster. Changing this forces a new Redis Enterprise Database to be created. - ClusteringPolicy *string `json:"clusteringPolicy,omitempty" tf:"clustering_policy,omitempty"` +// The resource id of the Redis Enterprise Cluster to deploy this Redis Enterprise Database. Changing this forces a new Redis Enterprise Database to be created. +ClusterID *string `json:"clusterId,omitempty" tf:"cluster_id,omitempty"` - // Redis eviction policy - default is VolatileLRU. Possible values are AllKeysLFU, AllKeysLRU, AllKeysRandom, VolatileLRU, VolatileLFU, VolatileTTL, VolatileRandom and NoEviction. Changing this forces a new Redis Enterprise Database to be created. - EvictionPolicy *string `json:"evictionPolicy,omitempty" tf:"eviction_policy,omitempty"` +// Clustering policy - default is OSSCluster. Specified at create time. Possible values are EnterpriseCluster and OSSCluster. Defaults to OSSCluster. Changing this forces a new Redis Enterprise Database to be created. +ClusteringPolicy *string `json:"clusteringPolicy,omitempty" tf:"clustering_policy,omitempty"` - // The ID of the Redis Enterprise Database. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// Redis eviction policy - default is VolatileLRU. Possible values are AllKeysLFU, AllKeysLRU, AllKeysRandom, VolatileLRU, VolatileLFU, VolatileTTL, VolatileRandom and NoEviction. Changing this forces a new Redis Enterprise Database to be created. +EvictionPolicy *string `json:"evictionPolicy,omitempty" tf:"eviction_policy,omitempty"` - // Nickname of the group of linked databases. Changing this force a new Redis Enterprise Geo Database to be created. - LinkedDatabaseGroupNickname *string `json:"linkedDatabaseGroupNickname,omitempty" tf:"linked_database_group_nickname,omitempty"` +// The ID of the Redis Enterprise Database. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // A list of database resources to link with this database with a maximum of 5. - LinkedDatabaseID []*string `json:"linkedDatabaseId,omitempty" tf:"linked_database_id,omitempty"` +// Nickname of the group of linked databases. Changing this force a new Redis Enterprise Geo Database to be created. +LinkedDatabaseGroupNickname *string `json:"linkedDatabaseGroupNickname,omitempty" tf:"linked_database_group_nickname,omitempty"` - // A module block as defined below. Changing this forces a new resource to be created. - Module []ModuleObservation `json:"module,omitempty" tf:"module,omitempty"` +// A list of database resources to link with this database with a maximum of 5. +LinkedDatabaseID []*string `json:"linkedDatabaseId,omitempty" tf:"linked_database_id,omitempty"` - // TCP port of the database endpoint. Specified at create time. Defaults to an available port. Changing this forces a new Redis Enterprise Database to be created. Defaults to 10000. - Port *float64 `json:"port,omitempty" tf:"port,omitempty"` +// A module block as defined below. Changing this forces a new resource to be created. +Module []ModuleObservation `json:"module,omitempty" tf:"module,omitempty"` - // The name of the Resource Group where the Redis Enterprise Database should exist. Changing this forces a new Redis Enterprise Database to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// TCP port of the database endpoint. Specified at create time. Defaults to an available port. Changing this forces a new Redis Enterprise Database to be created. Defaults to 10000. +Port *float64 `json:"port,omitempty" tf:"port,omitempty"` + +// The name of the Resource Group where the Redis Enterprise Database should exist. Changing this forces a new Redis Enterprise Database to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` } + type RedisEnterpriseDatabaseParameters struct { - // Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Default is TLS-encrypted. Possible values are Encrypted and Plaintext. Defaults to Encrypted. Changing this forces a new Redis Enterprise Database to be created. - // +kubebuilder:validation:Optional - ClientProtocol *string `json:"clientProtocol,omitempty" tf:"client_protocol,omitempty"` - // The resource id of the Redis Enterprise Cluster to deploy this Redis Enterprise Database. Changing this forces a new Redis Enterprise Database to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/cache/v1alpha1.RedisEnterpriseCluster - // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() - // +kubebuilder:validation:Optional - ClusterID *string `json:"clusterId,omitempty" tf:"cluster_id,omitempty"` +// Specifies whether redis clients can connect using TLS-encrypted or plaintext redis protocols. Default is TLS-encrypted. Possible values are Encrypted and Plaintext. Defaults to Encrypted. Changing this forces a new Redis Enterprise Database to be created. +// +kubebuilder:validation:Optional +ClientProtocol *string `json:"clientProtocol,omitempty" tf:"client_protocol,omitempty"` + +// The resource id of the Redis Enterprise Cluster to deploy this Redis Enterprise Database. Changing this forces a new Redis Enterprise Database to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/cache/v1alpha1.RedisEnterpriseCluster +// +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() +// +kubebuilder:validation:Optional +ClusterID *string `json:"clusterId,omitempty" tf:"cluster_id,omitempty"` - // Reference to a RedisEnterpriseCluster in cache to populate clusterId. - // +kubebuilder:validation:Optional - ClusterIDRef *v1.Reference `json:"clusterIdRef,omitempty" tf:"-"` +// Reference to a RedisEnterpriseCluster in cache to populate clusterId. +// +kubebuilder:validation:Optional +ClusterIDRef *v1.Reference `json:"clusterIdRef,omitempty" tf:"-"` - // Selector for a RedisEnterpriseCluster in cache to populate clusterId. - // +kubebuilder:validation:Optional - ClusterIDSelector *v1.Selector `json:"clusterIdSelector,omitempty" tf:"-"` +// Selector for a RedisEnterpriseCluster in cache to populate clusterId. +// +kubebuilder:validation:Optional +ClusterIDSelector *v1.Selector `json:"clusterIdSelector,omitempty" tf:"-"` - // Clustering policy - default is OSSCluster. Specified at create time. Possible values are EnterpriseCluster and OSSCluster. Defaults to OSSCluster. Changing this forces a new Redis Enterprise Database to be created. - // +kubebuilder:validation:Optional - ClusteringPolicy *string `json:"clusteringPolicy,omitempty" tf:"clustering_policy,omitempty"` +// Clustering policy - default is OSSCluster. Specified at create time. Possible values are EnterpriseCluster and OSSCluster. Defaults to OSSCluster. Changing this forces a new Redis Enterprise Database to be created. +// +kubebuilder:validation:Optional +ClusteringPolicy *string `json:"clusteringPolicy,omitempty" tf:"clustering_policy,omitempty"` - // Redis eviction policy - default is VolatileLRU. Possible values are AllKeysLFU, AllKeysLRU, AllKeysRandom, VolatileLRU, VolatileLFU, VolatileTTL, VolatileRandom and NoEviction. Changing this forces a new Redis Enterprise Database to be created. - // +kubebuilder:validation:Optional - EvictionPolicy *string `json:"evictionPolicy,omitempty" tf:"eviction_policy,omitempty"` +// Redis eviction policy - default is VolatileLRU. Possible values are AllKeysLFU, AllKeysLRU, AllKeysRandom, VolatileLRU, VolatileLFU, VolatileTTL, VolatileRandom and NoEviction. Changing this forces a new Redis Enterprise Database to be created. +// +kubebuilder:validation:Optional +EvictionPolicy *string `json:"evictionPolicy,omitempty" tf:"eviction_policy,omitempty"` - // Nickname of the group of linked databases. Changing this force a new Redis Enterprise Geo Database to be created. - // +kubebuilder:validation:Optional - LinkedDatabaseGroupNickname *string `json:"linkedDatabaseGroupNickname,omitempty" tf:"linked_database_group_nickname,omitempty"` +// Nickname of the group of linked databases. Changing this force a new Redis Enterprise Geo Database to be created. +// +kubebuilder:validation:Optional +LinkedDatabaseGroupNickname *string `json:"linkedDatabaseGroupNickname,omitempty" tf:"linked_database_group_nickname,omitempty"` - // A list of database resources to link with this database with a maximum of 5. - // +kubebuilder:validation:Optional - LinkedDatabaseID []*string `json:"linkedDatabaseId,omitempty" tf:"linked_database_id,omitempty"` +// A list of database resources to link with this database with a maximum of 5. +// +kubebuilder:validation:Optional +LinkedDatabaseID []*string `json:"linkedDatabaseId,omitempty" tf:"linked_database_id,omitempty"` - // A module block as defined below. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Module []ModuleParameters `json:"module,omitempty" tf:"module,omitempty"` +// A module block as defined below. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Module []ModuleParameters `json:"module,omitempty" tf:"module,omitempty"` - // TCP port of the database endpoint. Specified at create time. Defaults to an available port. Changing this forces a new Redis Enterprise Database to be created. Defaults to 10000. - // +kubebuilder:validation:Optional - Port *float64 `json:"port,omitempty" tf:"port,omitempty"` +// TCP port of the database endpoint. Specified at create time. Defaults to an available port. Changing this forces a new Redis Enterprise Database to be created. Defaults to 10000. +// +kubebuilder:validation:Optional +Port *float64 `json:"port,omitempty" tf:"port,omitempty"` - // The name of the Resource Group where the Redis Enterprise Database should exist. Changing this forces a new Redis Enterprise Database to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the Resource Group where the Redis Enterprise Database should exist. Changing this forces a new Redis Enterprise Database to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` } // RedisEnterpriseDatabaseSpec defines the desired state of RedisEnterpriseDatabase type RedisEnterpriseDatabaseSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider RedisEnterpriseDatabaseParameters `json:"forProvider"` + ForProvider RedisEnterpriseDatabaseParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -177,13 +192,13 @@ type RedisEnterpriseDatabaseSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider RedisEnterpriseDatabaseInitParameters `json:"initProvider,omitempty"` + InitProvider RedisEnterpriseDatabaseInitParameters `json:"initProvider,omitempty"` } // RedisEnterpriseDatabaseStatus defines the observed state of RedisEnterpriseDatabase. type RedisEnterpriseDatabaseStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider RedisEnterpriseDatabaseObservation `json:"atProvider,omitempty"` + AtProvider RedisEnterpriseDatabaseObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/cache/v1alpha1/zz_redisfirewallrule_types.go b/apis/cache/v1alpha1/zz_redisfirewallrule_types.go index 0978c7c..7db1cca 100755 --- a/apis/cache/v1alpha1/zz_redisfirewallrule_types.go +++ b/apis/cache/v1alpha1/zz_redisfirewallrule_types.go @@ -15,76 +15,85 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type RedisFirewallRuleInitParameters struct { - // The highest IP address included in the range. - EndIP *string `json:"endIp,omitempty" tf:"end_ip,omitempty"` - // The lowest IP address included in the range - StartIP *string `json:"startIp,omitempty" tf:"start_ip,omitempty"` +// The highest IP address included in the range. +EndIP *string `json:"endIp,omitempty" tf:"end_ip,omitempty"` + +// The lowest IP address included in the range +StartIP *string `json:"startIp,omitempty" tf:"start_ip,omitempty"` } + type RedisFirewallRuleObservation struct { - // The highest IP address included in the range. - EndIP *string `json:"endIp,omitempty" tf:"end_ip,omitempty"` - // The ID of the Redis Firewall Rule. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// The highest IP address included in the range. +EndIP *string `json:"endIp,omitempty" tf:"end_ip,omitempty"` + +// The ID of the Redis Firewall Rule. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The name of the Redis Cache. Changing this forces a new resource to be created. - RedisCacheName *string `json:"redisCacheName,omitempty" tf:"redis_cache_name,omitempty"` +// The name of the Redis Cache. Changing this forces a new resource to be created. +RedisCacheName *string `json:"redisCacheName,omitempty" tf:"redis_cache_name,omitempty"` - // The name of the resource group in which this Redis Cache exists. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group in which this Redis Cache exists. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // The lowest IP address included in the range - StartIP *string `json:"startIp,omitempty" tf:"start_ip,omitempty"` +// The lowest IP address included in the range +StartIP *string `json:"startIp,omitempty" tf:"start_ip,omitempty"` } + type RedisFirewallRuleParameters struct { - // The highest IP address included in the range. - // +kubebuilder:validation:Optional - EndIP *string `json:"endIp,omitempty" tf:"end_ip,omitempty"` - // The name of the Redis Cache. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/cache/v1alpha1.RedisCache - // +kubebuilder:validation:Optional - RedisCacheName *string `json:"redisCacheName,omitempty" tf:"redis_cache_name,omitempty"` +// The highest IP address included in the range. +// +kubebuilder:validation:Optional +EndIP *string `json:"endIp,omitempty" tf:"end_ip,omitempty"` + +// The name of the Redis Cache. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/cache/v1alpha1.RedisCache +// +kubebuilder:validation:Optional +RedisCacheName *string `json:"redisCacheName,omitempty" tf:"redis_cache_name,omitempty"` - // Reference to a RedisCache in cache to populate redisCacheName. - // +kubebuilder:validation:Optional - RedisCacheNameRef *v1.Reference `json:"redisCacheNameRef,omitempty" tf:"-"` +// Reference to a RedisCache in cache to populate redisCacheName. +// +kubebuilder:validation:Optional +RedisCacheNameRef *v1.Reference `json:"redisCacheNameRef,omitempty" tf:"-"` - // Selector for a RedisCache in cache to populate redisCacheName. - // +kubebuilder:validation:Optional - RedisCacheNameSelector *v1.Selector `json:"redisCacheNameSelector,omitempty" tf:"-"` +// Selector for a RedisCache in cache to populate redisCacheName. +// +kubebuilder:validation:Optional +RedisCacheNameSelector *v1.Selector `json:"redisCacheNameSelector,omitempty" tf:"-"` - // The name of the resource group in which this Redis Cache exists. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group in which this Redis Cache exists. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - // The lowest IP address included in the range - // +kubebuilder:validation:Optional - StartIP *string `json:"startIp,omitempty" tf:"start_ip,omitempty"` +// The lowest IP address included in the range +// +kubebuilder:validation:Optional +StartIP *string `json:"startIp,omitempty" tf:"start_ip,omitempty"` } // RedisFirewallRuleSpec defines the desired state of RedisFirewallRule type RedisFirewallRuleSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider RedisFirewallRuleParameters `json:"forProvider"` + ForProvider RedisFirewallRuleParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -95,13 +104,13 @@ type RedisFirewallRuleSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider RedisFirewallRuleInitParameters `json:"initProvider,omitempty"` + InitProvider RedisFirewallRuleInitParameters `json:"initProvider,omitempty"` } // RedisFirewallRuleStatus defines the observed state of RedisFirewallRule. type RedisFirewallRuleStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider RedisFirewallRuleObservation `json:"atProvider,omitempty"` + AtProvider RedisFirewallRuleObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -116,10 +125,10 @@ type RedisFirewallRuleStatus struct { type RedisFirewallRule struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.endIp) || (has(self.initProvider) && has(self.initProvider.endIp))",message="spec.forProvider.endIp is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.startIp) || (has(self.initProvider) && has(self.initProvider.startIp))",message="spec.forProvider.startIp is a required parameter" - Spec RedisFirewallRuleSpec `json:"spec"` - Status RedisFirewallRuleStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.endIp) || (has(self.initProvider) && has(self.initProvider.endIp))",message="spec.forProvider.endIp is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.startIp) || (has(self.initProvider) && has(self.initProvider.startIp))",message="spec.forProvider.startIp is a required parameter" + Spec RedisFirewallRuleSpec `json:"spec"` + Status RedisFirewallRuleStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/cache/v1alpha1/zz_redislinkedserver_types.go b/apis/cache/v1alpha1/zz_redislinkedserver_types.go index 826d36e..2aa19bd 100755 --- a/apis/cache/v1alpha1/zz_redislinkedserver_types.go +++ b/apis/cache/v1alpha1/zz_redislinkedserver_types.go @@ -15,96 +15,105 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type RedisLinkedServerInitParameters struct { - // The location of the linked Redis cache. Changing this forces a new Redis to be created. - LinkedRedisCacheLocation *string `json:"linkedRedisCacheLocation,omitempty" tf:"linked_redis_cache_location,omitempty"` - // The role of the linked Redis cache (eg "Secondary"). Changing this forces a new Redis to be created. Possible values are Primary and Secondary. - ServerRole *string `json:"serverRole,omitempty" tf:"server_role,omitempty"` +// The location of the linked Redis cache. Changing this forces a new Redis to be created. +LinkedRedisCacheLocation *string `json:"linkedRedisCacheLocation,omitempty" tf:"linked_redis_cache_location,omitempty"` + +// The role of the linked Redis cache (eg "Secondary"). Changing this forces a new Redis to be created. Possible values are Primary and Secondary. +ServerRole *string `json:"serverRole,omitempty" tf:"server_role,omitempty"` } + type RedisLinkedServerObservation struct { - // The ID of the Redis. - ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The ID of the linked Redis cache. Changing this forces a new Redis to be created. - LinkedRedisCacheID *string `json:"linkedRedisCacheId,omitempty" tf:"linked_redis_cache_id,omitempty"` +// The ID of the Redis. +ID *string `json:"id,omitempty" tf:"id,omitempty"` + +// The ID of the linked Redis cache. Changing this forces a new Redis to be created. +LinkedRedisCacheID *string `json:"linkedRedisCacheId,omitempty" tf:"linked_redis_cache_id,omitempty"` - // The location of the linked Redis cache. Changing this forces a new Redis to be created. - LinkedRedisCacheLocation *string `json:"linkedRedisCacheLocation,omitempty" tf:"linked_redis_cache_location,omitempty"` +// The location of the linked Redis cache. Changing this forces a new Redis to be created. +LinkedRedisCacheLocation *string `json:"linkedRedisCacheLocation,omitempty" tf:"linked_redis_cache_location,omitempty"` - // The name of the linked server. - Name *string `json:"name,omitempty" tf:"name,omitempty"` +// The name of the linked server. +Name *string `json:"name,omitempty" tf:"name,omitempty"` - // The name of the Resource Group where the Redis caches exists. Changing this forces a new Redis to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the Resource Group where the Redis caches exists. Changing this forces a new Redis to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // The role of the linked Redis cache (eg "Secondary"). Changing this forces a new Redis to be created. Possible values are Primary and Secondary. - ServerRole *string `json:"serverRole,omitempty" tf:"server_role,omitempty"` +// The role of the linked Redis cache (eg "Secondary"). Changing this forces a new Redis to be created. Possible values are Primary and Secondary. +ServerRole *string `json:"serverRole,omitempty" tf:"server_role,omitempty"` - // The name of Redis cache to link with. Changing this forces a new Redis to be created. (eg The primary role) - TargetRedisCacheName *string `json:"targetRedisCacheName,omitempty" tf:"target_redis_cache_name,omitempty"` +// The name of Redis cache to link with. Changing this forces a new Redis to be created. (eg The primary role) +TargetRedisCacheName *string `json:"targetRedisCacheName,omitempty" tf:"target_redis_cache_name,omitempty"` } + type RedisLinkedServerParameters struct { - // The ID of the linked Redis cache. Changing this forces a new Redis to be created. - // +crossplane:generate:reference:type=RedisCache - // +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() - // +kubebuilder:validation:Optional - LinkedRedisCacheID *string `json:"linkedRedisCacheId,omitempty" tf:"linked_redis_cache_id,omitempty"` - - // Reference to a RedisCache to populate linkedRedisCacheId. - // +kubebuilder:validation:Optional - LinkedRedisCacheIDRef *v1.Reference `json:"linkedRedisCacheIdRef,omitempty" tf:"-"` - - // Selector for a RedisCache to populate linkedRedisCacheId. - // +kubebuilder:validation:Optional - LinkedRedisCacheIDSelector *v1.Selector `json:"linkedRedisCacheIdSelector,omitempty" tf:"-"` - - // The location of the linked Redis cache. Changing this forces a new Redis to be created. - // +kubebuilder:validation:Optional - LinkedRedisCacheLocation *string `json:"linkedRedisCacheLocation,omitempty" tf:"linked_redis_cache_location,omitempty"` - - // The name of the Resource Group where the Redis caches exists. Changing this forces a new Redis to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - - // The role of the linked Redis cache (eg "Secondary"). Changing this forces a new Redis to be created. Possible values are Primary and Secondary. - // +kubebuilder:validation:Optional - ServerRole *string `json:"serverRole,omitempty" tf:"server_role,omitempty"` - - // The name of Redis cache to link with. Changing this forces a new Redis to be created. (eg The primary role) - // +crossplane:generate:reference:type=RedisCache - // +kubebuilder:validation:Optional - TargetRedisCacheName *string `json:"targetRedisCacheName,omitempty" tf:"target_redis_cache_name,omitempty"` - - // Reference to a RedisCache to populate targetRedisCacheName. - // +kubebuilder:validation:Optional - TargetRedisCacheNameRef *v1.Reference `json:"targetRedisCacheNameRef,omitempty" tf:"-"` - - // Selector for a RedisCache to populate targetRedisCacheName. - // +kubebuilder:validation:Optional - TargetRedisCacheNameSelector *v1.Selector `json:"targetRedisCacheNameSelector,omitempty" tf:"-"` + +// The ID of the linked Redis cache. Changing this forces a new Redis to be created. +// +crossplane:generate:reference:type=RedisCache +// +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() +// +kubebuilder:validation:Optional +LinkedRedisCacheID *string `json:"linkedRedisCacheId,omitempty" tf:"linked_redis_cache_id,omitempty"` + +// Reference to a RedisCache to populate linkedRedisCacheId. +// +kubebuilder:validation:Optional +LinkedRedisCacheIDRef *v1.Reference `json:"linkedRedisCacheIdRef,omitempty" tf:"-"` + +// Selector for a RedisCache to populate linkedRedisCacheId. +// +kubebuilder:validation:Optional +LinkedRedisCacheIDSelector *v1.Selector `json:"linkedRedisCacheIdSelector,omitempty" tf:"-"` + +// The location of the linked Redis cache. Changing this forces a new Redis to be created. +// +kubebuilder:validation:Optional +LinkedRedisCacheLocation *string `json:"linkedRedisCacheLocation,omitempty" tf:"linked_redis_cache_location,omitempty"` + +// The name of the Resource Group where the Redis caches exists. Changing this forces a new Redis to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` + +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` + +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` + +// The role of the linked Redis cache (eg "Secondary"). Changing this forces a new Redis to be created. Possible values are Primary and Secondary. +// +kubebuilder:validation:Optional +ServerRole *string `json:"serverRole,omitempty" tf:"server_role,omitempty"` + +// The name of Redis cache to link with. Changing this forces a new Redis to be created. (eg The primary role) +// +crossplane:generate:reference:type=RedisCache +// +kubebuilder:validation:Optional +TargetRedisCacheName *string `json:"targetRedisCacheName,omitempty" tf:"target_redis_cache_name,omitempty"` + +// Reference to a RedisCache to populate targetRedisCacheName. +// +kubebuilder:validation:Optional +TargetRedisCacheNameRef *v1.Reference `json:"targetRedisCacheNameRef,omitempty" tf:"-"` + +// Selector for a RedisCache to populate targetRedisCacheName. +// +kubebuilder:validation:Optional +TargetRedisCacheNameSelector *v1.Selector `json:"targetRedisCacheNameSelector,omitempty" tf:"-"` } // RedisLinkedServerSpec defines the desired state of RedisLinkedServer type RedisLinkedServerSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider RedisLinkedServerParameters `json:"forProvider"` + ForProvider RedisLinkedServerParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -115,13 +124,13 @@ type RedisLinkedServerSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider RedisLinkedServerInitParameters `json:"initProvider,omitempty"` + InitProvider RedisLinkedServerInitParameters `json:"initProvider,omitempty"` } // RedisLinkedServerStatus defines the observed state of RedisLinkedServer. type RedisLinkedServerStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider RedisLinkedServerObservation `json:"atProvider,omitempty"` + AtProvider RedisLinkedServerObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -136,10 +145,10 @@ type RedisLinkedServerStatus struct { type RedisLinkedServer struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.linkedRedisCacheLocation) || (has(self.initProvider) && has(self.initProvider.linkedRedisCacheLocation))",message="spec.forProvider.linkedRedisCacheLocation is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.serverRole) || (has(self.initProvider) && has(self.initProvider.serverRole))",message="spec.forProvider.serverRole is a required parameter" - Spec RedisLinkedServerSpec `json:"spec"` - Status RedisLinkedServerStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.linkedRedisCacheLocation) || (has(self.initProvider) && has(self.initProvider.linkedRedisCacheLocation))",message="spec.forProvider.linkedRedisCacheLocation is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.serverRole) || (has(self.initProvider) && has(self.initProvider.serverRole))",message="spec.forProvider.serverRole is a required parameter" + Spec RedisLinkedServerSpec `json:"spec"` + Status RedisLinkedServerStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/cosmosdb/v1alpha1/zz_account_types.go b/apis/cosmosdb/v1alpha1/zz_account_types.go index 7cac2a3..98f31f9 100755 --- a/apis/cosmosdb/v1alpha1/zz_account_types.go +++ b/apis/cosmosdb/v1alpha1/zz_account_types.go @@ -15,724 +15,799 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type AccountInitParameters struct { - // Is write operations on metadata resources (databases, containers, throughput) via account keys enabled? Defaults to true. - AccessKeyMetadataWritesEnabled *bool `json:"accessKeyMetadataWritesEnabled,omitempty" tf:"access_key_metadata_writes_enabled,omitempty"` - // An analytical_storage block as defined below. - AnalyticalStorage []AnalyticalStorageInitParameters `json:"analyticalStorage,omitempty" tf:"analytical_storage,omitempty"` +// Is write operations on metadata resources (databases, containers, throughput) via account keys enabled? Defaults to true. +AccessKeyMetadataWritesEnabled *bool `json:"accessKeyMetadataWritesEnabled,omitempty" tf:"access_key_metadata_writes_enabled,omitempty"` + +// An analytical_storage block as defined below. +AnalyticalStorage []AnalyticalStorageInitParameters `json:"analyticalStorage,omitempty" tf:"analytical_storage,omitempty"` - // Enable Analytical Storage option for this Cosmos DB account. Defaults to false. Enabling and then disabling analytical storage forces a new resource to be created. - AnalyticalStorageEnabled *bool `json:"analyticalStorageEnabled,omitempty" tf:"analytical_storage_enabled,omitempty"` +// Enable Analytical Storage option for this Cosmos DB account. Defaults to false. Enabling and then disabling analytical storage forces a new resource to be created. +AnalyticalStorageEnabled *bool `json:"analyticalStorageEnabled,omitempty" tf:"analytical_storage_enabled,omitempty"` - // A backup block as defined below. - Backup []BackupInitParameters `json:"backup,omitempty" tf:"backup,omitempty"` +// A backup block as defined below. +Backup []BackupInitParameters `json:"backup,omitempty" tf:"backup,omitempty"` - // The capabilities which should be enabled for this Cosmos DB account. Value is a capabilities block as defined below. - Capabilities []CapabilitiesInitParameters `json:"capabilities,omitempty" tf:"capabilities,omitempty"` +// The capabilities which should be enabled for this Cosmos DB account. Value is a capabilities block as defined below. +Capabilities []CapabilitiesInitParameters `json:"capabilities,omitempty" tf:"capabilities,omitempty"` - // A capacity block as defined below. - Capacity []CapacityInitParameters `json:"capacity,omitempty" tf:"capacity,omitempty"` +// A capacity block as defined below. +Capacity []CapacityInitParameters `json:"capacity,omitempty" tf:"capacity,omitempty"` - // Specifies a consistency_policy resource, used to define the consistency policy for this CosmosDB account. - ConsistencyPolicy []ConsistencyPolicyInitParameters `json:"consistencyPolicy,omitempty" tf:"consistency_policy,omitempty"` +// Specifies a consistency_policy resource, used to define the consistency policy for this CosmosDB account. +ConsistencyPolicy []ConsistencyPolicyInitParameters `json:"consistencyPolicy,omitempty" tf:"consistency_policy,omitempty"` - // A cors_rule block as defined below. - CorsRule []CorsRuleInitParameters `json:"corsRule,omitempty" tf:"cors_rule,omitempty"` +// A cors_rule block as defined below. +CorsRule []CorsRuleInitParameters `json:"corsRule,omitempty" tf:"cors_rule,omitempty"` - // The creation mode for the CosmosDB Account. Possible values are Default and Restore. Changing this forces a new resource to be created. - CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` +// The creation mode for the CosmosDB Account. Possible values are Default and Restore. Changing this forces a new resource to be created. +CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` - // The default identity for accessing Key Vault. Possible values are FirstPartyIdentity, SystemAssignedIdentity or UserAssignedIdentity. Defaults to FirstPartyIdentity. - DefaultIdentityType *string `json:"defaultIdentityType,omitempty" tf:"default_identity_type,omitempty"` +// The default identity for accessing Key Vault. Possible values are FirstPartyIdentity, SystemAssignedIdentity or UserAssignedIdentity. Defaults to FirstPartyIdentity. +DefaultIdentityType *string `json:"defaultIdentityType,omitempty" tf:"default_identity_type,omitempty"` - // Enable automatic failover for this Cosmos DB account. - EnableAutomaticFailover *bool `json:"enableAutomaticFailover,omitempty" tf:"enable_automatic_failover,omitempty"` +// Enable automatic failover for this Cosmos DB account. +EnableAutomaticFailover *bool `json:"enableAutomaticFailover,omitempty" tf:"enable_automatic_failover,omitempty"` - // Enable the Free Tier pricing option for this Cosmos DB account. Defaults to false. Changing this forces a new resource to be created. - EnableFreeTier *bool `json:"enableFreeTier,omitempty" tf:"enable_free_tier,omitempty"` +// Enable the Free Tier pricing option for this Cosmos DB account. Defaults to false. Changing this forces a new resource to be created. +EnableFreeTier *bool `json:"enableFreeTier,omitempty" tf:"enable_free_tier,omitempty"` - // Enable multiple write locations for this Cosmos DB account. - EnableMultipleWriteLocations *bool `json:"enableMultipleWriteLocations,omitempty" tf:"enable_multiple_write_locations,omitempty"` +// Enable multiple write locations for this Cosmos DB account. +EnableMultipleWriteLocations *bool `json:"enableMultipleWriteLocations,omitempty" tf:"enable_multiple_write_locations,omitempty"` - // Specifies a geo_location resource, used to define where data should be replicated with the failover_priority 0 specifying the primary location. Value is a geo_location block as defined below. - GeoLocation []GeoLocationInitParameters `json:"geoLocation,omitempty" tf:"geo_location,omitempty"` +// Specifies a geo_location resource, used to define where data should be replicated with the failover_priority 0 specifying the primary location. Value is a geo_location block as defined below. +GeoLocation []GeoLocationInitParameters `json:"geoLocation,omitempty" tf:"geo_location,omitempty"` - // CosmosDB Firewall Support: This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account. IP addresses/ranges must be comma separated and must not contain any spaces. - IPRangeFilter *string `json:"ipRangeFilter,omitempty" tf:"ip_range_filter,omitempty"` +// CosmosDB Firewall Support: This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account. IP addresses/ranges must be comma separated and must not contain any spaces. +IPRangeFilter *string `json:"ipRangeFilter,omitempty" tf:"ip_range_filter,omitempty"` - // An identity block as defined below. - Identity []IdentityInitParameters `json:"identity,omitempty" tf:"identity,omitempty"` +// An identity block as defined below. +Identity []IdentityInitParameters `json:"identity,omitempty" tf:"identity,omitempty"` - // Enables virtual network filtering for this Cosmos DB account. - IsVirtualNetworkFilterEnabled *bool `json:"isVirtualNetworkFilterEnabled,omitempty" tf:"is_virtual_network_filter_enabled,omitempty"` +// Enables virtual network filtering for this Cosmos DB account. +IsVirtualNetworkFilterEnabled *bool `json:"isVirtualNetworkFilterEnabled,omitempty" tf:"is_virtual_network_filter_enabled,omitempty"` - // A versionless Key Vault Key ID for CMK encryption. Changing this forces a new resource to be created. - KeyVaultKeyID *string `json:"keyVaultKeyId,omitempty" tf:"key_vault_key_id,omitempty"` +// A versionless Key Vault Key ID for CMK encryption. Changing this forces a new resource to be created. +KeyVaultKeyID *string `json:"keyVaultKeyId,omitempty" tf:"key_vault_key_id,omitempty"` - // Specifies the Kind of CosmosDB to create - possible values are GlobalDocumentDB, MongoDB and Parse. Defaults to GlobalDocumentDB. Changing this forces a new resource to be created. - Kind *string `json:"kind,omitempty" tf:"kind,omitempty"` +// Specifies the Kind of CosmosDB to create - possible values are GlobalDocumentDB, MongoDB and Parse. Defaults to GlobalDocumentDB. Changing this forces a new resource to be created. +Kind *string `json:"kind,omitempty" tf:"kind,omitempty"` - // Disable local authentication and ensure only MSI and AAD can be used exclusively for authentication. Defaults to false. Can be set only when using the SQL API. - LocalAuthenticationDisabled *bool `json:"localAuthenticationDisabled,omitempty" tf:"local_authentication_disabled,omitempty"` +// Disable local authentication and ensure only MSI and AAD can be used exclusively for authentication. Defaults to false. Can be set only when using the SQL API. +LocalAuthenticationDisabled *bool `json:"localAuthenticationDisabled,omitempty" tf:"local_authentication_disabled,omitempty"` - // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // The Server Version of a MongoDB account. Possible values are 4.2, 4.0, 3.6, and 3.2. - MongoServerVersion *string `json:"mongoServerVersion,omitempty" tf:"mongo_server_version,omitempty"` +// The Server Version of a MongoDB account. Possible values are 4.2, 4.0, 3.6, and 3.2. +MongoServerVersion *string `json:"mongoServerVersion,omitempty" tf:"mongo_server_version,omitempty"` - // If Azure services can bypass ACLs. Defaults to false. - NetworkACLBypassForAzureServices *bool `json:"networkAclBypassForAzureServices,omitempty" tf:"network_acl_bypass_for_azure_services,omitempty"` +// If Azure services can bypass ACLs. Defaults to false. +NetworkACLBypassForAzureServices *bool `json:"networkAclBypassForAzureServices,omitempty" tf:"network_acl_bypass_for_azure_services,omitempty"` - // The list of resource Ids for Network Acl Bypass for this Cosmos DB account. - NetworkACLBypassIds []*string `json:"networkAclBypassIds,omitempty" tf:"network_acl_bypass_ids,omitempty"` +// The list of resource Ids for Network Acl Bypass for this Cosmos DB account. +NetworkACLBypassIds []*string `json:"networkAclBypassIds,omitempty" tf:"network_acl_bypass_ids,omitempty"` - // Specifies the Offer Type to use for this CosmosDB Account; currently, this can only be set to Standard. - OfferType *string `json:"offerType,omitempty" tf:"offer_type,omitempty"` +// Specifies the Offer Type to use for this CosmosDB Account; currently, this can only be set to Standard. +OfferType *string `json:"offerType,omitempty" tf:"offer_type,omitempty"` - // Whether or not public network access is allowed for this CosmosDB account. Defaults to true. - PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` +// Whether or not public network access is allowed for this CosmosDB account. Defaults to true. +PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` - // A restore block as defined below. - Restore []RestoreInitParameters `json:"restore,omitempty" tf:"restore,omitempty"` +// A restore block as defined below. +Restore []RestoreInitParameters `json:"restore,omitempty" tf:"restore,omitempty"` - // A mapping of tags to assign to the resource. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A mapping of tags to assign to the resource. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - // Specifies a virtual_network_rules resource, used to define which subnets are allowed to access this CosmosDB account. - VirtualNetworkRule []VirtualNetworkRuleInitParameters `json:"virtualNetworkRule,omitempty" tf:"virtual_network_rule,omitempty"` +// Specifies a virtual_network_rules resource, used to define which subnets are allowed to access this CosmosDB account. +VirtualNetworkRule []VirtualNetworkRuleInitParameters `json:"virtualNetworkRule,omitempty" tf:"virtual_network_rule,omitempty"` } + type AccountObservation struct { - // Is write operations on metadata resources (databases, containers, throughput) via account keys enabled? Defaults to true. - AccessKeyMetadataWritesEnabled *bool `json:"accessKeyMetadataWritesEnabled,omitempty" tf:"access_key_metadata_writes_enabled,omitempty"` - // An analytical_storage block as defined below. - AnalyticalStorage []AnalyticalStorageObservation `json:"analyticalStorage,omitempty" tf:"analytical_storage,omitempty"` +// Is write operations on metadata resources (databases, containers, throughput) via account keys enabled? Defaults to true. +AccessKeyMetadataWritesEnabled *bool `json:"accessKeyMetadataWritesEnabled,omitempty" tf:"access_key_metadata_writes_enabled,omitempty"` + +// An analytical_storage block as defined below. +AnalyticalStorage []AnalyticalStorageObservation `json:"analyticalStorage,omitempty" tf:"analytical_storage,omitempty"` - // Enable Analytical Storage option for this Cosmos DB account. Defaults to false. Enabling and then disabling analytical storage forces a new resource to be created. - AnalyticalStorageEnabled *bool `json:"analyticalStorageEnabled,omitempty" tf:"analytical_storage_enabled,omitempty"` +// Enable Analytical Storage option for this Cosmos DB account. Defaults to false. Enabling and then disabling analytical storage forces a new resource to be created. +AnalyticalStorageEnabled *bool `json:"analyticalStorageEnabled,omitempty" tf:"analytical_storage_enabled,omitempty"` - // A backup block as defined below. - Backup []BackupObservation `json:"backup,omitempty" tf:"backup,omitempty"` +// A backup block as defined below. +Backup []BackupObservation `json:"backup,omitempty" tf:"backup,omitempty"` - // The capabilities which should be enabled for this Cosmos DB account. Value is a capabilities block as defined below. - Capabilities []CapabilitiesObservation `json:"capabilities,omitempty" tf:"capabilities,omitempty"` +// The capabilities which should be enabled for this Cosmos DB account. Value is a capabilities block as defined below. +Capabilities []CapabilitiesObservation `json:"capabilities,omitempty" tf:"capabilities,omitempty"` - // A capacity block as defined below. - Capacity []CapacityObservation `json:"capacity,omitempty" tf:"capacity,omitempty"` +// A capacity block as defined below. +Capacity []CapacityObservation `json:"capacity,omitempty" tf:"capacity,omitempty"` - // Specifies a consistency_policy resource, used to define the consistency policy for this CosmosDB account. - ConsistencyPolicy []ConsistencyPolicyObservation `json:"consistencyPolicy,omitempty" tf:"consistency_policy,omitempty"` +// Specifies a consistency_policy resource, used to define the consistency policy for this CosmosDB account. +ConsistencyPolicy []ConsistencyPolicyObservation `json:"consistencyPolicy,omitempty" tf:"consistency_policy,omitempty"` - // A cors_rule block as defined below. - CorsRule []CorsRuleObservation `json:"corsRule,omitempty" tf:"cors_rule,omitempty"` +// A cors_rule block as defined below. +CorsRule []CorsRuleObservation `json:"corsRule,omitempty" tf:"cors_rule,omitempty"` - // The creation mode for the CosmosDB Account. Possible values are Default and Restore. Changing this forces a new resource to be created. - CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` +// The creation mode for the CosmosDB Account. Possible values are Default and Restore. Changing this forces a new resource to be created. +CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` - // The default identity for accessing Key Vault. Possible values are FirstPartyIdentity, SystemAssignedIdentity or UserAssignedIdentity. Defaults to FirstPartyIdentity. - DefaultIdentityType *string `json:"defaultIdentityType,omitempty" tf:"default_identity_type,omitempty"` +// The default identity for accessing Key Vault. Possible values are FirstPartyIdentity, SystemAssignedIdentity or UserAssignedIdentity. Defaults to FirstPartyIdentity. +DefaultIdentityType *string `json:"defaultIdentityType,omitempty" tf:"default_identity_type,omitempty"` - // Enable automatic failover for this Cosmos DB account. - EnableAutomaticFailover *bool `json:"enableAutomaticFailover,omitempty" tf:"enable_automatic_failover,omitempty"` +// Enable automatic failover for this Cosmos DB account. +EnableAutomaticFailover *bool `json:"enableAutomaticFailover,omitempty" tf:"enable_automatic_failover,omitempty"` - // Enable the Free Tier pricing option for this Cosmos DB account. Defaults to false. Changing this forces a new resource to be created. - EnableFreeTier *bool `json:"enableFreeTier,omitempty" tf:"enable_free_tier,omitempty"` +// Enable the Free Tier pricing option for this Cosmos DB account. Defaults to false. Changing this forces a new resource to be created. +EnableFreeTier *bool `json:"enableFreeTier,omitempty" tf:"enable_free_tier,omitempty"` - // Enable multiple write locations for this Cosmos DB account. - EnableMultipleWriteLocations *bool `json:"enableMultipleWriteLocations,omitempty" tf:"enable_multiple_write_locations,omitempty"` +// Enable multiple write locations for this Cosmos DB account. +EnableMultipleWriteLocations *bool `json:"enableMultipleWriteLocations,omitempty" tf:"enable_multiple_write_locations,omitempty"` - // The endpoint used to connect to the CosmosDB account. - Endpoint *string `json:"endpoint,omitempty" tf:"endpoint,omitempty"` +// The endpoint used to connect to the CosmosDB account. +Endpoint *string `json:"endpoint,omitempty" tf:"endpoint,omitempty"` - // Specifies a geo_location resource, used to define where data should be replicated with the failover_priority 0 specifying the primary location. Value is a geo_location block as defined below. - GeoLocation []GeoLocationObservation `json:"geoLocation,omitempty" tf:"geo_location,omitempty"` +// Specifies a geo_location resource, used to define where data should be replicated with the failover_priority 0 specifying the primary location. Value is a geo_location block as defined below. +GeoLocation []GeoLocationObservation `json:"geoLocation,omitempty" tf:"geo_location,omitempty"` - // The CosmosDB Account ID. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// The CosmosDB Account ID. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // CosmosDB Firewall Support: This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account. IP addresses/ranges must be comma separated and must not contain any spaces. - IPRangeFilter *string `json:"ipRangeFilter,omitempty" tf:"ip_range_filter,omitempty"` +// CosmosDB Firewall Support: This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account. IP addresses/ranges must be comma separated and must not contain any spaces. +IPRangeFilter *string `json:"ipRangeFilter,omitempty" tf:"ip_range_filter,omitempty"` - // An identity block as defined below. - Identity []IdentityObservation `json:"identity,omitempty" tf:"identity,omitempty"` +// An identity block as defined below. +Identity []IdentityObservation `json:"identity,omitempty" tf:"identity,omitempty"` - // Enables virtual network filtering for this Cosmos DB account. - IsVirtualNetworkFilterEnabled *bool `json:"isVirtualNetworkFilterEnabled,omitempty" tf:"is_virtual_network_filter_enabled,omitempty"` +// Enables virtual network filtering for this Cosmos DB account. +IsVirtualNetworkFilterEnabled *bool `json:"isVirtualNetworkFilterEnabled,omitempty" tf:"is_virtual_network_filter_enabled,omitempty"` - // A versionless Key Vault Key ID for CMK encryption. Changing this forces a new resource to be created. - KeyVaultKeyID *string `json:"keyVaultKeyId,omitempty" tf:"key_vault_key_id,omitempty"` +// A versionless Key Vault Key ID for CMK encryption. Changing this forces a new resource to be created. +KeyVaultKeyID *string `json:"keyVaultKeyId,omitempty" tf:"key_vault_key_id,omitempty"` - // Specifies the Kind of CosmosDB to create - possible values are GlobalDocumentDB, MongoDB and Parse. Defaults to GlobalDocumentDB. Changing this forces a new resource to be created. - Kind *string `json:"kind,omitempty" tf:"kind,omitempty"` +// Specifies the Kind of CosmosDB to create - possible values are GlobalDocumentDB, MongoDB and Parse. Defaults to GlobalDocumentDB. Changing this forces a new resource to be created. +Kind *string `json:"kind,omitempty" tf:"kind,omitempty"` - // Disable local authentication and ensure only MSI and AAD can be used exclusively for authentication. Defaults to false. Can be set only when using the SQL API. - LocalAuthenticationDisabled *bool `json:"localAuthenticationDisabled,omitempty" tf:"local_authentication_disabled,omitempty"` +// Disable local authentication and ensure only MSI and AAD can be used exclusively for authentication. Defaults to false. Can be set only when using the SQL API. +LocalAuthenticationDisabled *bool `json:"localAuthenticationDisabled,omitempty" tf:"local_authentication_disabled,omitempty"` - // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // The Server Version of a MongoDB account. Possible values are 4.2, 4.0, 3.6, and 3.2. - MongoServerVersion *string `json:"mongoServerVersion,omitempty" tf:"mongo_server_version,omitempty"` +// The Server Version of a MongoDB account. Possible values are 4.2, 4.0, 3.6, and 3.2. +MongoServerVersion *string `json:"mongoServerVersion,omitempty" tf:"mongo_server_version,omitempty"` - // If Azure services can bypass ACLs. Defaults to false. - NetworkACLBypassForAzureServices *bool `json:"networkAclBypassForAzureServices,omitempty" tf:"network_acl_bypass_for_azure_services,omitempty"` +// If Azure services can bypass ACLs. Defaults to false. +NetworkACLBypassForAzureServices *bool `json:"networkAclBypassForAzureServices,omitempty" tf:"network_acl_bypass_for_azure_services,omitempty"` - // The list of resource Ids for Network Acl Bypass for this Cosmos DB account. - NetworkACLBypassIds []*string `json:"networkAclBypassIds,omitempty" tf:"network_acl_bypass_ids,omitempty"` +// The list of resource Ids for Network Acl Bypass for this Cosmos DB account. +NetworkACLBypassIds []*string `json:"networkAclBypassIds,omitempty" tf:"network_acl_bypass_ids,omitempty"` - // Specifies the Offer Type to use for this CosmosDB Account; currently, this can only be set to Standard. - OfferType *string `json:"offerType,omitempty" tf:"offer_type,omitempty"` +// Specifies the Offer Type to use for this CosmosDB Account; currently, this can only be set to Standard. +OfferType *string `json:"offerType,omitempty" tf:"offer_type,omitempty"` - // Whether or not public network access is allowed for this CosmosDB account. Defaults to true. - PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` +// Whether or not public network access is allowed for this CosmosDB account. Defaults to true. +PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` - // A list of read endpoints available for this CosmosDB account. - ReadEndpoints []*string `json:"readEndpoints,omitempty" tf:"read_endpoints,omitempty"` +// A list of read endpoints available for this CosmosDB account. +ReadEndpoints []*string `json:"readEndpoints,omitempty" tf:"read_endpoints,omitempty"` - // The name of the resource group in which the CosmosDB Account is created. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group in which the CosmosDB Account is created. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // A restore block as defined below. - Restore []RestoreObservation `json:"restore,omitempty" tf:"restore,omitempty"` +// A restore block as defined below. +Restore []RestoreObservation `json:"restore,omitempty" tf:"restore,omitempty"` - // A mapping of tags to assign to the resource. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A mapping of tags to assign to the resource. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - // Specifies a virtual_network_rules resource, used to define which subnets are allowed to access this CosmosDB account. - VirtualNetworkRule []VirtualNetworkRuleObservation `json:"virtualNetworkRule,omitempty" tf:"virtual_network_rule,omitempty"` +// Specifies a virtual_network_rules resource, used to define which subnets are allowed to access this CosmosDB account. +VirtualNetworkRule []VirtualNetworkRuleObservation `json:"virtualNetworkRule,omitempty" tf:"virtual_network_rule,omitempty"` - // A list of write endpoints available for this CosmosDB account. - WriteEndpoints []*string `json:"writeEndpoints,omitempty" tf:"write_endpoints,omitempty"` +// A list of write endpoints available for this CosmosDB account. +WriteEndpoints []*string `json:"writeEndpoints,omitempty" tf:"write_endpoints,omitempty"` } + type AccountParameters struct { - // Is write operations on metadata resources (databases, containers, throughput) via account keys enabled? Defaults to true. - // +kubebuilder:validation:Optional - AccessKeyMetadataWritesEnabled *bool `json:"accessKeyMetadataWritesEnabled,omitempty" tf:"access_key_metadata_writes_enabled,omitempty"` - // An analytical_storage block as defined below. - // +kubebuilder:validation:Optional - AnalyticalStorage []AnalyticalStorageParameters `json:"analyticalStorage,omitempty" tf:"analytical_storage,omitempty"` +// Is write operations on metadata resources (databases, containers, throughput) via account keys enabled? Defaults to true. +// +kubebuilder:validation:Optional +AccessKeyMetadataWritesEnabled *bool `json:"accessKeyMetadataWritesEnabled,omitempty" tf:"access_key_metadata_writes_enabled,omitempty"` - // Enable Analytical Storage option for this Cosmos DB account. Defaults to false. Enabling and then disabling analytical storage forces a new resource to be created. - // +kubebuilder:validation:Optional - AnalyticalStorageEnabled *bool `json:"analyticalStorageEnabled,omitempty" tf:"analytical_storage_enabled,omitempty"` +// An analytical_storage block as defined below. +// +kubebuilder:validation:Optional +AnalyticalStorage []AnalyticalStorageParameters `json:"analyticalStorage,omitempty" tf:"analytical_storage,omitempty"` - // A backup block as defined below. - // +kubebuilder:validation:Optional - Backup []BackupParameters `json:"backup,omitempty" tf:"backup,omitempty"` +// Enable Analytical Storage option for this Cosmos DB account. Defaults to false. Enabling and then disabling analytical storage forces a new resource to be created. +// +kubebuilder:validation:Optional +AnalyticalStorageEnabled *bool `json:"analyticalStorageEnabled,omitempty" tf:"analytical_storage_enabled,omitempty"` - // The capabilities which should be enabled for this Cosmos DB account. Value is a capabilities block as defined below. - // +kubebuilder:validation:Optional - Capabilities []CapabilitiesParameters `json:"capabilities,omitempty" tf:"capabilities,omitempty"` +// A backup block as defined below. +// +kubebuilder:validation:Optional +Backup []BackupParameters `json:"backup,omitempty" tf:"backup,omitempty"` - // A capacity block as defined below. - // +kubebuilder:validation:Optional - Capacity []CapacityParameters `json:"capacity,omitempty" tf:"capacity,omitempty"` +// The capabilities which should be enabled for this Cosmos DB account. Value is a capabilities block as defined below. +// +kubebuilder:validation:Optional +Capabilities []CapabilitiesParameters `json:"capabilities,omitempty" tf:"capabilities,omitempty"` - // Specifies a consistency_policy resource, used to define the consistency policy for this CosmosDB account. - // +kubebuilder:validation:Optional - ConsistencyPolicy []ConsistencyPolicyParameters `json:"consistencyPolicy,omitempty" tf:"consistency_policy,omitempty"` +// A capacity block as defined below. +// +kubebuilder:validation:Optional +Capacity []CapacityParameters `json:"capacity,omitempty" tf:"capacity,omitempty"` - // A cors_rule block as defined below. - // +kubebuilder:validation:Optional - CorsRule []CorsRuleParameters `json:"corsRule,omitempty" tf:"cors_rule,omitempty"` +// Specifies a consistency_policy resource, used to define the consistency policy for this CosmosDB account. +// +kubebuilder:validation:Optional +ConsistencyPolicy []ConsistencyPolicyParameters `json:"consistencyPolicy,omitempty" tf:"consistency_policy,omitempty"` - // The creation mode for the CosmosDB Account. Possible values are Default and Restore. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` +// A cors_rule block as defined below. +// +kubebuilder:validation:Optional +CorsRule []CorsRuleParameters `json:"corsRule,omitempty" tf:"cors_rule,omitempty"` - // The default identity for accessing Key Vault. Possible values are FirstPartyIdentity, SystemAssignedIdentity or UserAssignedIdentity. Defaults to FirstPartyIdentity. - // +kubebuilder:validation:Optional - DefaultIdentityType *string `json:"defaultIdentityType,omitempty" tf:"default_identity_type,omitempty"` +// The creation mode for the CosmosDB Account. Possible values are Default and Restore. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` - // Enable automatic failover for this Cosmos DB account. - // +kubebuilder:validation:Optional - EnableAutomaticFailover *bool `json:"enableAutomaticFailover,omitempty" tf:"enable_automatic_failover,omitempty"` +// The default identity for accessing Key Vault. Possible values are FirstPartyIdentity, SystemAssignedIdentity or UserAssignedIdentity. Defaults to FirstPartyIdentity. +// +kubebuilder:validation:Optional +DefaultIdentityType *string `json:"defaultIdentityType,omitempty" tf:"default_identity_type,omitempty"` - // Enable the Free Tier pricing option for this Cosmos DB account. Defaults to false. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - EnableFreeTier *bool `json:"enableFreeTier,omitempty" tf:"enable_free_tier,omitempty"` +// Enable automatic failover for this Cosmos DB account. +// +kubebuilder:validation:Optional +EnableAutomaticFailover *bool `json:"enableAutomaticFailover,omitempty" tf:"enable_automatic_failover,omitempty"` - // Enable multiple write locations for this Cosmos DB account. - // +kubebuilder:validation:Optional - EnableMultipleWriteLocations *bool `json:"enableMultipleWriteLocations,omitempty" tf:"enable_multiple_write_locations,omitempty"` +// Enable the Free Tier pricing option for this Cosmos DB account. Defaults to false. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +EnableFreeTier *bool `json:"enableFreeTier,omitempty" tf:"enable_free_tier,omitempty"` - // Specifies a geo_location resource, used to define where data should be replicated with the failover_priority 0 specifying the primary location. Value is a geo_location block as defined below. - // +kubebuilder:validation:Optional - GeoLocation []GeoLocationParameters `json:"geoLocation,omitempty" tf:"geo_location,omitempty"` +// Enable multiple write locations for this Cosmos DB account. +// +kubebuilder:validation:Optional +EnableMultipleWriteLocations *bool `json:"enableMultipleWriteLocations,omitempty" tf:"enable_multiple_write_locations,omitempty"` - // CosmosDB Firewall Support: This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account. IP addresses/ranges must be comma separated and must not contain any spaces. - // +kubebuilder:validation:Optional - IPRangeFilter *string `json:"ipRangeFilter,omitempty" tf:"ip_range_filter,omitempty"` +// Specifies a geo_location resource, used to define where data should be replicated with the failover_priority 0 specifying the primary location. Value is a geo_location block as defined below. +// +kubebuilder:validation:Optional +GeoLocation []GeoLocationParameters `json:"geoLocation,omitempty" tf:"geo_location,omitempty"` - // An identity block as defined below. - // +kubebuilder:validation:Optional - Identity []IdentityParameters `json:"identity,omitempty" tf:"identity,omitempty"` +// CosmosDB Firewall Support: This value specifies the set of IP addresses or IP address ranges in CIDR form to be included as the allowed list of client IPs for a given database account. IP addresses/ranges must be comma separated and must not contain any spaces. +// +kubebuilder:validation:Optional +IPRangeFilter *string `json:"ipRangeFilter,omitempty" tf:"ip_range_filter,omitempty"` - // Enables virtual network filtering for this Cosmos DB account. - // +kubebuilder:validation:Optional - IsVirtualNetworkFilterEnabled *bool `json:"isVirtualNetworkFilterEnabled,omitempty" tf:"is_virtual_network_filter_enabled,omitempty"` +// An identity block as defined below. +// +kubebuilder:validation:Optional +Identity []IdentityParameters `json:"identity,omitempty" tf:"identity,omitempty"` - // A versionless Key Vault Key ID for CMK encryption. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - KeyVaultKeyID *string `json:"keyVaultKeyId,omitempty" tf:"key_vault_key_id,omitempty"` +// Enables virtual network filtering for this Cosmos DB account. +// +kubebuilder:validation:Optional +IsVirtualNetworkFilterEnabled *bool `json:"isVirtualNetworkFilterEnabled,omitempty" tf:"is_virtual_network_filter_enabled,omitempty"` - // Specifies the Kind of CosmosDB to create - possible values are GlobalDocumentDB, MongoDB and Parse. Defaults to GlobalDocumentDB. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Kind *string `json:"kind,omitempty" tf:"kind,omitempty"` +// A versionless Key Vault Key ID for CMK encryption. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +KeyVaultKeyID *string `json:"keyVaultKeyId,omitempty" tf:"key_vault_key_id,omitempty"` - // Disable local authentication and ensure only MSI and AAD can be used exclusively for authentication. Defaults to false. Can be set only when using the SQL API. - // +kubebuilder:validation:Optional - LocalAuthenticationDisabled *bool `json:"localAuthenticationDisabled,omitempty" tf:"local_authentication_disabled,omitempty"` +// Specifies the Kind of CosmosDB to create - possible values are GlobalDocumentDB, MongoDB and Parse. Defaults to GlobalDocumentDB. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Kind *string `json:"kind,omitempty" tf:"kind,omitempty"` - // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// Disable local authentication and ensure only MSI and AAD can be used exclusively for authentication. Defaults to false. Can be set only when using the SQL API. +// +kubebuilder:validation:Optional +LocalAuthenticationDisabled *bool `json:"localAuthenticationDisabled,omitempty" tf:"local_authentication_disabled,omitempty"` - // The Server Version of a MongoDB account. Possible values are 4.2, 4.0, 3.6, and 3.2. - // +kubebuilder:validation:Optional - MongoServerVersion *string `json:"mongoServerVersion,omitempty" tf:"mongo_server_version,omitempty"` +// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // If Azure services can bypass ACLs. Defaults to false. - // +kubebuilder:validation:Optional - NetworkACLBypassForAzureServices *bool `json:"networkAclBypassForAzureServices,omitempty" tf:"network_acl_bypass_for_azure_services,omitempty"` +// The Server Version of a MongoDB account. Possible values are 4.2, 4.0, 3.6, and 3.2. +// +kubebuilder:validation:Optional +MongoServerVersion *string `json:"mongoServerVersion,omitempty" tf:"mongo_server_version,omitempty"` - // The list of resource Ids for Network Acl Bypass for this Cosmos DB account. - // +kubebuilder:validation:Optional - NetworkACLBypassIds []*string `json:"networkAclBypassIds,omitempty" tf:"network_acl_bypass_ids,omitempty"` +// If Azure services can bypass ACLs. Defaults to false. +// +kubebuilder:validation:Optional +NetworkACLBypassForAzureServices *bool `json:"networkAclBypassForAzureServices,omitempty" tf:"network_acl_bypass_for_azure_services,omitempty"` - // Specifies the Offer Type to use for this CosmosDB Account; currently, this can only be set to Standard. - // +kubebuilder:validation:Optional - OfferType *string `json:"offerType,omitempty" tf:"offer_type,omitempty"` +// The list of resource Ids for Network Acl Bypass for this Cosmos DB account. +// +kubebuilder:validation:Optional +NetworkACLBypassIds []*string `json:"networkAclBypassIds,omitempty" tf:"network_acl_bypass_ids,omitempty"` - // Whether or not public network access is allowed for this CosmosDB account. Defaults to true. - // +kubebuilder:validation:Optional - PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` +// Specifies the Offer Type to use for this CosmosDB Account; currently, this can only be set to Standard. +// +kubebuilder:validation:Optional +OfferType *string `json:"offerType,omitempty" tf:"offer_type,omitempty"` - // The name of the resource group in which the CosmosDB Account is created. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// Whether or not public network access is allowed for this CosmosDB account. Defaults to true. +// +kubebuilder:validation:Optional +PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` +// The name of the resource group in which the CosmosDB Account is created. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - // A restore block as defined below. - // +kubebuilder:validation:Optional - Restore []RestoreParameters `json:"restore,omitempty" tf:"restore,omitempty"` +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - // A mapping of tags to assign to the resource. - // +kubebuilder:validation:Optional - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A restore block as defined below. +// +kubebuilder:validation:Optional +Restore []RestoreParameters `json:"restore,omitempty" tf:"restore,omitempty"` - // Specifies a virtual_network_rules resource, used to define which subnets are allowed to access this CosmosDB account. - // +kubebuilder:validation:Optional - VirtualNetworkRule []VirtualNetworkRuleParameters `json:"virtualNetworkRule,omitempty" tf:"virtual_network_rule,omitempty"` +// A mapping of tags to assign to the resource. +// +kubebuilder:validation:Optional +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + +// Specifies a virtual_network_rules resource, used to define which subnets are allowed to access this CosmosDB account. +// +kubebuilder:validation:Optional +VirtualNetworkRule []VirtualNetworkRuleParameters `json:"virtualNetworkRule,omitempty" tf:"virtual_network_rule,omitempty"` } + type AnalyticalStorageInitParameters struct { - // The schema type of the Analytical Storage for this Cosmos DB account. Possible values are FullFidelity and WellDefined. - SchemaType *string `json:"schemaType,omitempty" tf:"schema_type,omitempty"` + +// The schema type of the Analytical Storage for this Cosmos DB account. Possible values are FullFidelity and WellDefined. +SchemaType *string `json:"schemaType,omitempty" tf:"schema_type,omitempty"` } + type AnalyticalStorageObservation struct { - // The schema type of the Analytical Storage for this Cosmos DB account. Possible values are FullFidelity and WellDefined. - SchemaType *string `json:"schemaType,omitempty" tf:"schema_type,omitempty"` + +// The schema type of the Analytical Storage for this Cosmos DB account. Possible values are FullFidelity and WellDefined. +SchemaType *string `json:"schemaType,omitempty" tf:"schema_type,omitempty"` } + type AnalyticalStorageParameters struct { - // The schema type of the Analytical Storage for this Cosmos DB account. Possible values are FullFidelity and WellDefined. - // +kubebuilder:validation:Optional - SchemaType *string `json:"schemaType" tf:"schema_type,omitempty"` + +// The schema type of the Analytical Storage for this Cosmos DB account. Possible values are FullFidelity and WellDefined. +// +kubebuilder:validation:Optional +SchemaType *string `json:"schemaType" tf:"schema_type,omitempty"` } + type BackupInitParameters struct { - // The interval in minutes between two backups. This is configurable only when type is Periodic. Possible values are between 60 and 1440. - IntervalInMinutes *float64 `json:"intervalInMinutes,omitempty" tf:"interval_in_minutes,omitempty"` - // The time in hours that each backup is retained. This is configurable only when type is Periodic. Possible values are between 8 and 720. - RetentionInHours *float64 `json:"retentionInHours,omitempty" tf:"retention_in_hours,omitempty"` +// The interval in minutes between two backups. This is configurable only when type is Periodic. Possible values are between 60 and 1440. +IntervalInMinutes *float64 `json:"intervalInMinutes,omitempty" tf:"interval_in_minutes,omitempty"` + +// The time in hours that each backup is retained. This is configurable only when type is Periodic. Possible values are between 8 and 720. +RetentionInHours *float64 `json:"retentionInHours,omitempty" tf:"retention_in_hours,omitempty"` - // The storage redundancy is used to indicate the type of backup residency. This is configurable only when type is Periodic. Possible values are Geo, Local and Zone. - StorageRedundancy *string `json:"storageRedundancy,omitempty" tf:"storage_redundancy,omitempty"` +// The storage redundancy is used to indicate the type of backup residency. This is configurable only when type is Periodic. Possible values are Geo, Local and Zone. +StorageRedundancy *string `json:"storageRedundancy,omitempty" tf:"storage_redundancy,omitempty"` - // The type of the backup. Possible values are Continuous and Periodic. Migration of Periodic to Continuous is one-way, changing Continuous to Periodic forces a new resource to be created. - Type *string `json:"type,omitempty" tf:"type,omitempty"` +// The type of the backup. Possible values are Continuous and Periodic. Migration of Periodic to Continuous is one-way, changing Continuous to Periodic forces a new resource to be created. +Type *string `json:"type,omitempty" tf:"type,omitempty"` } + type BackupObservation struct { - // The interval in minutes between two backups. This is configurable only when type is Periodic. Possible values are between 60 and 1440. - IntervalInMinutes *float64 `json:"intervalInMinutes,omitempty" tf:"interval_in_minutes,omitempty"` - // The time in hours that each backup is retained. This is configurable only when type is Periodic. Possible values are between 8 and 720. - RetentionInHours *float64 `json:"retentionInHours,omitempty" tf:"retention_in_hours,omitempty"` +// The interval in minutes between two backups. This is configurable only when type is Periodic. Possible values are between 60 and 1440. +IntervalInMinutes *float64 `json:"intervalInMinutes,omitempty" tf:"interval_in_minutes,omitempty"` + +// The time in hours that each backup is retained. This is configurable only when type is Periodic. Possible values are between 8 and 720. +RetentionInHours *float64 `json:"retentionInHours,omitempty" tf:"retention_in_hours,omitempty"` - // The storage redundancy is used to indicate the type of backup residency. This is configurable only when type is Periodic. Possible values are Geo, Local and Zone. - StorageRedundancy *string `json:"storageRedundancy,omitempty" tf:"storage_redundancy,omitempty"` +// The storage redundancy is used to indicate the type of backup residency. This is configurable only when type is Periodic. Possible values are Geo, Local and Zone. +StorageRedundancy *string `json:"storageRedundancy,omitempty" tf:"storage_redundancy,omitempty"` - // The type of the backup. Possible values are Continuous and Periodic. Migration of Periodic to Continuous is one-way, changing Continuous to Periodic forces a new resource to be created. - Type *string `json:"type,omitempty" tf:"type,omitempty"` +// The type of the backup. Possible values are Continuous and Periodic. Migration of Periodic to Continuous is one-way, changing Continuous to Periodic forces a new resource to be created. +Type *string `json:"type,omitempty" tf:"type,omitempty"` } + type BackupParameters struct { - // The interval in minutes between two backups. This is configurable only when type is Periodic. Possible values are between 60 and 1440. - // +kubebuilder:validation:Optional - IntervalInMinutes *float64 `json:"intervalInMinutes,omitempty" tf:"interval_in_minutes,omitempty"` - // The time in hours that each backup is retained. This is configurable only when type is Periodic. Possible values are between 8 and 720. - // +kubebuilder:validation:Optional - RetentionInHours *float64 `json:"retentionInHours,omitempty" tf:"retention_in_hours,omitempty"` +// The interval in minutes between two backups. This is configurable only when type is Periodic. Possible values are between 60 and 1440. +// +kubebuilder:validation:Optional +IntervalInMinutes *float64 `json:"intervalInMinutes,omitempty" tf:"interval_in_minutes,omitempty"` + +// The time in hours that each backup is retained. This is configurable only when type is Periodic. Possible values are between 8 and 720. +// +kubebuilder:validation:Optional +RetentionInHours *float64 `json:"retentionInHours,omitempty" tf:"retention_in_hours,omitempty"` - // The storage redundancy is used to indicate the type of backup residency. This is configurable only when type is Periodic. Possible values are Geo, Local and Zone. - // +kubebuilder:validation:Optional - StorageRedundancy *string `json:"storageRedundancy,omitempty" tf:"storage_redundancy,omitempty"` +// The storage redundancy is used to indicate the type of backup residency. This is configurable only when type is Periodic. Possible values are Geo, Local and Zone. +// +kubebuilder:validation:Optional +StorageRedundancy *string `json:"storageRedundancy,omitempty" tf:"storage_redundancy,omitempty"` - // The type of the backup. Possible values are Continuous and Periodic. Migration of Periodic to Continuous is one-way, changing Continuous to Periodic forces a new resource to be created. - // +kubebuilder:validation:Optional - Type *string `json:"type" tf:"type,omitempty"` +// The type of the backup. Possible values are Continuous and Periodic. Migration of Periodic to Continuous is one-way, changing Continuous to Periodic forces a new resource to be created. +// +kubebuilder:validation:Optional +Type *string `json:"type" tf:"type,omitempty"` } + type CapabilitiesInitParameters struct { - // The capability to enable - Possible values are AllowSelfServeUpgradeToMongo36, DisableRateLimitingResponses, EnableAggregationPipeline, EnableCassandra, EnableGremlin, EnableMongo, EnableMongo16MBDocumentSupport, EnableMongoRetryableWrites, EnableMongoRoleBasedAccessControl, EnablePartialUniqueIndex, EnableServerless, EnableTable, EnableTtlOnCustomPath, EnableUniqueCompoundNestedDocs, MongoDBv3.4 and mongoEnableDocLevelTTL. - Name *string `json:"name,omitempty" tf:"name,omitempty"` + +// The capability to enable - Possible values are AllowSelfServeUpgradeToMongo36, DisableRateLimitingResponses, EnableAggregationPipeline, EnableCassandra, EnableGremlin, EnableMongo, EnableMongo16MBDocumentSupport, EnableMongoRetryableWrites, EnableMongoRoleBasedAccessControl, EnablePartialUniqueIndex, EnableServerless, EnableTable, EnableTtlOnCustomPath, EnableUniqueCompoundNestedDocs, MongoDBv3.4 and mongoEnableDocLevelTTL. +Name *string `json:"name,omitempty" tf:"name,omitempty"` } + type CapabilitiesObservation struct { - // The capability to enable - Possible values are AllowSelfServeUpgradeToMongo36, DisableRateLimitingResponses, EnableAggregationPipeline, EnableCassandra, EnableGremlin, EnableMongo, EnableMongo16MBDocumentSupport, EnableMongoRetryableWrites, EnableMongoRoleBasedAccessControl, EnablePartialUniqueIndex, EnableServerless, EnableTable, EnableTtlOnCustomPath, EnableUniqueCompoundNestedDocs, MongoDBv3.4 and mongoEnableDocLevelTTL. - Name *string `json:"name,omitempty" tf:"name,omitempty"` + +// The capability to enable - Possible values are AllowSelfServeUpgradeToMongo36, DisableRateLimitingResponses, EnableAggregationPipeline, EnableCassandra, EnableGremlin, EnableMongo, EnableMongo16MBDocumentSupport, EnableMongoRetryableWrites, EnableMongoRoleBasedAccessControl, EnablePartialUniqueIndex, EnableServerless, EnableTable, EnableTtlOnCustomPath, EnableUniqueCompoundNestedDocs, MongoDBv3.4 and mongoEnableDocLevelTTL. +Name *string `json:"name,omitempty" tf:"name,omitempty"` } + type CapabilitiesParameters struct { - // The capability to enable - Possible values are AllowSelfServeUpgradeToMongo36, DisableRateLimitingResponses, EnableAggregationPipeline, EnableCassandra, EnableGremlin, EnableMongo, EnableMongo16MBDocumentSupport, EnableMongoRetryableWrites, EnableMongoRoleBasedAccessControl, EnablePartialUniqueIndex, EnableServerless, EnableTable, EnableTtlOnCustomPath, EnableUniqueCompoundNestedDocs, MongoDBv3.4 and mongoEnableDocLevelTTL. - // +kubebuilder:validation:Optional - Name *string `json:"name" tf:"name,omitempty"` + +// The capability to enable - Possible values are AllowSelfServeUpgradeToMongo36, DisableRateLimitingResponses, EnableAggregationPipeline, EnableCassandra, EnableGremlin, EnableMongo, EnableMongo16MBDocumentSupport, EnableMongoRetryableWrites, EnableMongoRoleBasedAccessControl, EnablePartialUniqueIndex, EnableServerless, EnableTable, EnableTtlOnCustomPath, EnableUniqueCompoundNestedDocs, MongoDBv3.4 and mongoEnableDocLevelTTL. +// +kubebuilder:validation:Optional +Name *string `json:"name" tf:"name,omitempty"` } + type CapacityInitParameters struct { - // The total throughput limit imposed on this Cosmos DB account (RU/s). Possible values are at least -1. -1 means no limit. - TotalThroughputLimit *float64 `json:"totalThroughputLimit,omitempty" tf:"total_throughput_limit,omitempty"` + +// The total throughput limit imposed on this Cosmos DB account (RU/s). Possible values are at least -1. -1 means no limit. +TotalThroughputLimit *float64 `json:"totalThroughputLimit,omitempty" tf:"total_throughput_limit,omitempty"` } + type CapacityObservation struct { - // The total throughput limit imposed on this Cosmos DB account (RU/s). Possible values are at least -1. -1 means no limit. - TotalThroughputLimit *float64 `json:"totalThroughputLimit,omitempty" tf:"total_throughput_limit,omitempty"` + +// The total throughput limit imposed on this Cosmos DB account (RU/s). Possible values are at least -1. -1 means no limit. +TotalThroughputLimit *float64 `json:"totalThroughputLimit,omitempty" tf:"total_throughput_limit,omitempty"` } + type CapacityParameters struct { - // The total throughput limit imposed on this Cosmos DB account (RU/s). Possible values are at least -1. -1 means no limit. - // +kubebuilder:validation:Optional - TotalThroughputLimit *float64 `json:"totalThroughputLimit" tf:"total_throughput_limit,omitempty"` + +// The total throughput limit imposed on this Cosmos DB account (RU/s). Possible values are at least -1. -1 means no limit. +// +kubebuilder:validation:Optional +TotalThroughputLimit *float64 `json:"totalThroughputLimit" tf:"total_throughput_limit,omitempty"` } + type ConsistencyPolicyInitParameters struct { - // The Consistency Level to use for this CosmosDB Account - can be either BoundedStaleness, Eventual, Session, Strong or ConsistentPrefix. - ConsistencyLevel *string `json:"consistencyLevel,omitempty" tf:"consistency_level,omitempty"` - // When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. The accepted range for this value is 5 - 86400 (1 day). Defaults to 5. Required when consistency_level is set to BoundedStaleness. - MaxIntervalInSeconds *float64 `json:"maxIntervalInSeconds,omitempty" tf:"max_interval_in_seconds,omitempty"` +// The Consistency Level to use for this CosmosDB Account - can be either BoundedStaleness, Eventual, Session, Strong or ConsistentPrefix. +ConsistencyLevel *string `json:"consistencyLevel,omitempty" tf:"consistency_level,omitempty"` - // When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. The accepted range for this value is 10 – 2147483647. Defaults to 100. Required when consistency_level is set to BoundedStaleness. - MaxStalenessPrefix *float64 `json:"maxStalenessPrefix,omitempty" tf:"max_staleness_prefix,omitempty"` +// When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. The accepted range for this value is 5 - 86400 (1 day). Defaults to 5. Required when consistency_level is set to BoundedStaleness. +MaxIntervalInSeconds *float64 `json:"maxIntervalInSeconds,omitempty" tf:"max_interval_in_seconds,omitempty"` + +// When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. The accepted range for this value is 10 – 2147483647. Defaults to 100. Required when consistency_level is set to BoundedStaleness. +MaxStalenessPrefix *float64 `json:"maxStalenessPrefix,omitempty" tf:"max_staleness_prefix,omitempty"` } + type ConsistencyPolicyObservation struct { - // The Consistency Level to use for this CosmosDB Account - can be either BoundedStaleness, Eventual, Session, Strong or ConsistentPrefix. - ConsistencyLevel *string `json:"consistencyLevel,omitempty" tf:"consistency_level,omitempty"` - // When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. The accepted range for this value is 5 - 86400 (1 day). Defaults to 5. Required when consistency_level is set to BoundedStaleness. - MaxIntervalInSeconds *float64 `json:"maxIntervalInSeconds,omitempty" tf:"max_interval_in_seconds,omitempty"` +// The Consistency Level to use for this CosmosDB Account - can be either BoundedStaleness, Eventual, Session, Strong or ConsistentPrefix. +ConsistencyLevel *string `json:"consistencyLevel,omitempty" tf:"consistency_level,omitempty"` - // When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. The accepted range for this value is 10 – 2147483647. Defaults to 100. Required when consistency_level is set to BoundedStaleness. - MaxStalenessPrefix *float64 `json:"maxStalenessPrefix,omitempty" tf:"max_staleness_prefix,omitempty"` +// When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. The accepted range for this value is 5 - 86400 (1 day). Defaults to 5. Required when consistency_level is set to BoundedStaleness. +MaxIntervalInSeconds *float64 `json:"maxIntervalInSeconds,omitempty" tf:"max_interval_in_seconds,omitempty"` + +// When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. The accepted range for this value is 10 – 2147483647. Defaults to 100. Required when consistency_level is set to BoundedStaleness. +MaxStalenessPrefix *float64 `json:"maxStalenessPrefix,omitempty" tf:"max_staleness_prefix,omitempty"` } + type ConsistencyPolicyParameters struct { - // The Consistency Level to use for this CosmosDB Account - can be either BoundedStaleness, Eventual, Session, Strong or ConsistentPrefix. - // +kubebuilder:validation:Optional - ConsistencyLevel *string `json:"consistencyLevel" tf:"consistency_level,omitempty"` - // When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. The accepted range for this value is 5 - 86400 (1 day). Defaults to 5. Required when consistency_level is set to BoundedStaleness. - // +kubebuilder:validation:Optional - MaxIntervalInSeconds *float64 `json:"maxIntervalInSeconds,omitempty" tf:"max_interval_in_seconds,omitempty"` +// The Consistency Level to use for this CosmosDB Account - can be either BoundedStaleness, Eventual, Session, Strong or ConsistentPrefix. +// +kubebuilder:validation:Optional +ConsistencyLevel *string `json:"consistencyLevel" tf:"consistency_level,omitempty"` - // When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. The accepted range for this value is 10 – 2147483647. Defaults to 100. Required when consistency_level is set to BoundedStaleness. - // +kubebuilder:validation:Optional - MaxStalenessPrefix *float64 `json:"maxStalenessPrefix,omitempty" tf:"max_staleness_prefix,omitempty"` +// When used with the Bounded Staleness consistency level, this value represents the time amount of staleness (in seconds) tolerated. The accepted range for this value is 5 - 86400 (1 day). Defaults to 5. Required when consistency_level is set to BoundedStaleness. +// +kubebuilder:validation:Optional +MaxIntervalInSeconds *float64 `json:"maxIntervalInSeconds,omitempty" tf:"max_interval_in_seconds,omitempty"` + +// When used with the Bounded Staleness consistency level, this value represents the number of stale requests tolerated. The accepted range for this value is 10 – 2147483647. Defaults to 100. Required when consistency_level is set to BoundedStaleness. +// +kubebuilder:validation:Optional +MaxStalenessPrefix *float64 `json:"maxStalenessPrefix,omitempty" tf:"max_staleness_prefix,omitempty"` } + type CorsRuleInitParameters struct { - // A list of headers that are allowed to be a part of the cross-origin request. - AllowedHeaders []*string `json:"allowedHeaders,omitempty" tf:"allowed_headers,omitempty"` - // A list of HTTP headers that are allowed to be executed by the origin. Valid options are DELETE, GET, HEAD, MERGE, POST, OPTIONS, PUT or PATCH. - AllowedMethods []*string `json:"allowedMethods,omitempty" tf:"allowed_methods,omitempty"` +// A list of headers that are allowed to be a part of the cross-origin request. +AllowedHeaders []*string `json:"allowedHeaders,omitempty" tf:"allowed_headers,omitempty"` + +// A list of HTTP headers that are allowed to be executed by the origin. Valid options are DELETE, GET, HEAD, MERGE, POST, OPTIONS, PUT or PATCH. +AllowedMethods []*string `json:"allowedMethods,omitempty" tf:"allowed_methods,omitempty"` - // A list of origin domains that will be allowed by CORS. - AllowedOrigins []*string `json:"allowedOrigins,omitempty" tf:"allowed_origins,omitempty"` +// A list of origin domains that will be allowed by CORS. +AllowedOrigins []*string `json:"allowedOrigins,omitempty" tf:"allowed_origins,omitempty"` - // A list of response headers that are exposed to CORS clients. - ExposedHeaders []*string `json:"exposedHeaders,omitempty" tf:"exposed_headers,omitempty"` +// A list of response headers that are exposed to CORS clients. +ExposedHeaders []*string `json:"exposedHeaders,omitempty" tf:"exposed_headers,omitempty"` - // The number of seconds the client should cache a preflight response. - MaxAgeInSeconds *float64 `json:"maxAgeInSeconds,omitempty" tf:"max_age_in_seconds,omitempty"` +// The number of seconds the client should cache a preflight response. +MaxAgeInSeconds *float64 `json:"maxAgeInSeconds,omitempty" tf:"max_age_in_seconds,omitempty"` } + type CorsRuleObservation struct { - // A list of headers that are allowed to be a part of the cross-origin request. - AllowedHeaders []*string `json:"allowedHeaders,omitempty" tf:"allowed_headers,omitempty"` - // A list of HTTP headers that are allowed to be executed by the origin. Valid options are DELETE, GET, HEAD, MERGE, POST, OPTIONS, PUT or PATCH. - AllowedMethods []*string `json:"allowedMethods,omitempty" tf:"allowed_methods,omitempty"` +// A list of headers that are allowed to be a part of the cross-origin request. +AllowedHeaders []*string `json:"allowedHeaders,omitempty" tf:"allowed_headers,omitempty"` + +// A list of HTTP headers that are allowed to be executed by the origin. Valid options are DELETE, GET, HEAD, MERGE, POST, OPTIONS, PUT or PATCH. +AllowedMethods []*string `json:"allowedMethods,omitempty" tf:"allowed_methods,omitempty"` - // A list of origin domains that will be allowed by CORS. - AllowedOrigins []*string `json:"allowedOrigins,omitempty" tf:"allowed_origins,omitempty"` +// A list of origin domains that will be allowed by CORS. +AllowedOrigins []*string `json:"allowedOrigins,omitempty" tf:"allowed_origins,omitempty"` - // A list of response headers that are exposed to CORS clients. - ExposedHeaders []*string `json:"exposedHeaders,omitempty" tf:"exposed_headers,omitempty"` +// A list of response headers that are exposed to CORS clients. +ExposedHeaders []*string `json:"exposedHeaders,omitempty" tf:"exposed_headers,omitempty"` - // The number of seconds the client should cache a preflight response. - MaxAgeInSeconds *float64 `json:"maxAgeInSeconds,omitempty" tf:"max_age_in_seconds,omitempty"` +// The number of seconds the client should cache a preflight response. +MaxAgeInSeconds *float64 `json:"maxAgeInSeconds,omitempty" tf:"max_age_in_seconds,omitempty"` } + type CorsRuleParameters struct { - // A list of headers that are allowed to be a part of the cross-origin request. - // +kubebuilder:validation:Optional - AllowedHeaders []*string `json:"allowedHeaders" tf:"allowed_headers,omitempty"` - // A list of HTTP headers that are allowed to be executed by the origin. Valid options are DELETE, GET, HEAD, MERGE, POST, OPTIONS, PUT or PATCH. - // +kubebuilder:validation:Optional - AllowedMethods []*string `json:"allowedMethods" tf:"allowed_methods,omitempty"` +// A list of headers that are allowed to be a part of the cross-origin request. +// +kubebuilder:validation:Optional +AllowedHeaders []*string `json:"allowedHeaders" tf:"allowed_headers,omitempty"` + +// A list of HTTP headers that are allowed to be executed by the origin. Valid options are DELETE, GET, HEAD, MERGE, POST, OPTIONS, PUT or PATCH. +// +kubebuilder:validation:Optional +AllowedMethods []*string `json:"allowedMethods" tf:"allowed_methods,omitempty"` - // A list of origin domains that will be allowed by CORS. - // +kubebuilder:validation:Optional - AllowedOrigins []*string `json:"allowedOrigins" tf:"allowed_origins,omitempty"` +// A list of origin domains that will be allowed by CORS. +// +kubebuilder:validation:Optional +AllowedOrigins []*string `json:"allowedOrigins" tf:"allowed_origins,omitempty"` - // A list of response headers that are exposed to CORS clients. - // +kubebuilder:validation:Optional - ExposedHeaders []*string `json:"exposedHeaders" tf:"exposed_headers,omitempty"` +// A list of response headers that are exposed to CORS clients. +// +kubebuilder:validation:Optional +ExposedHeaders []*string `json:"exposedHeaders" tf:"exposed_headers,omitempty"` - // The number of seconds the client should cache a preflight response. - // +kubebuilder:validation:Optional - MaxAgeInSeconds *float64 `json:"maxAgeInSeconds" tf:"max_age_in_seconds,omitempty"` +// The number of seconds the client should cache a preflight response. +// +kubebuilder:validation:Optional +MaxAgeInSeconds *float64 `json:"maxAgeInSeconds" tf:"max_age_in_seconds,omitempty"` } + type DatabaseInitParameters struct { - // A list of the collection names for the restore request. Changing this forces a new resource to be created. - CollectionNames []*string `json:"collectionNames,omitempty" tf:"collection_names,omitempty"` - // Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created. - Name *string `json:"name,omitempty" tf:"name,omitempty"` +// A list of the collection names for the restore request. Changing this forces a new resource to be created. +CollectionNames []*string `json:"collectionNames,omitempty" tf:"collection_names,omitempty"` + +// Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created. +Name *string `json:"name,omitempty" tf:"name,omitempty"` } + type DatabaseObservation struct { - // A list of the collection names for the restore request. Changing this forces a new resource to be created. - CollectionNames []*string `json:"collectionNames,omitempty" tf:"collection_names,omitempty"` - // Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created. - Name *string `json:"name,omitempty" tf:"name,omitempty"` +// A list of the collection names for the restore request. Changing this forces a new resource to be created. +CollectionNames []*string `json:"collectionNames,omitempty" tf:"collection_names,omitempty"` + +// Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created. +Name *string `json:"name,omitempty" tf:"name,omitempty"` } + type DatabaseParameters struct { - // A list of the collection names for the restore request. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - CollectionNames []*string `json:"collectionNames,omitempty" tf:"collection_names,omitempty"` - // Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Name *string `json:"name" tf:"name,omitempty"` +// A list of the collection names for the restore request. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +CollectionNames []*string `json:"collectionNames,omitempty" tf:"collection_names,omitempty"` + +// Specifies the name of the CosmosDB Account. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Name *string `json:"name" tf:"name,omitempty"` } + type GeoLocationInitParameters struct { - // The failover priority of the region. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. Changing this causes the location to be re-provisioned and cannot be changed for the location with failover priority 0. - FailoverPriority *float64 `json:"failoverPriority,omitempty" tf:"failover_priority,omitempty"` - // The name of the Azure region to host replicated data. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// The failover priority of the region. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. Changing this causes the location to be re-provisioned and cannot be changed for the location with failover priority 0. +FailoverPriority *float64 `json:"failoverPriority,omitempty" tf:"failover_priority,omitempty"` + +// The name of the Azure region to host replicated data. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // Should zone redundancy be enabled for this region? Defaults to false. - ZoneRedundant *bool `json:"zoneRedundant,omitempty" tf:"zone_redundant,omitempty"` +// Should zone redundancy be enabled for this region? Defaults to false. +ZoneRedundant *bool `json:"zoneRedundant,omitempty" tf:"zone_redundant,omitempty"` } + type GeoLocationObservation struct { - // The failover priority of the region. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. Changing this causes the location to be re-provisioned and cannot be changed for the location with failover priority 0. - FailoverPriority *float64 `json:"failoverPriority,omitempty" tf:"failover_priority,omitempty"` - // The ID of the virtual network subnet. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// The failover priority of the region. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. Changing this causes the location to be re-provisioned and cannot be changed for the location with failover priority 0. +FailoverPriority *float64 `json:"failoverPriority,omitempty" tf:"failover_priority,omitempty"` + +// The ID of the virtual network subnet. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The name of the Azure region to host replicated data. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// The name of the Azure region to host replicated data. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // Should zone redundancy be enabled for this region? Defaults to false. - ZoneRedundant *bool `json:"zoneRedundant,omitempty" tf:"zone_redundant,omitempty"` +// Should zone redundancy be enabled for this region? Defaults to false. +ZoneRedundant *bool `json:"zoneRedundant,omitempty" tf:"zone_redundant,omitempty"` } + type GeoLocationParameters struct { - // The failover priority of the region. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. Changing this causes the location to be re-provisioned and cannot be changed for the location with failover priority 0. - // +kubebuilder:validation:Optional - FailoverPriority *float64 `json:"failoverPriority" tf:"failover_priority,omitempty"` - // The name of the Azure region to host replicated data. - // +kubebuilder:validation:Optional - Location *string `json:"location" tf:"location,omitempty"` +// The failover priority of the region. A failover priority of 0 indicates a write region. The maximum value for a failover priority = (total number of regions - 1). Failover priority values must be unique for each of the regions in which the database account exists. Changing this causes the location to be re-provisioned and cannot be changed for the location with failover priority 0. +// +kubebuilder:validation:Optional +FailoverPriority *float64 `json:"failoverPriority" tf:"failover_priority,omitempty"` + +// The name of the Azure region to host replicated data. +// +kubebuilder:validation:Optional +Location *string `json:"location" tf:"location,omitempty"` - // Should zone redundancy be enabled for this region? Defaults to false. - // +kubebuilder:validation:Optional - ZoneRedundant *bool `json:"zoneRedundant,omitempty" tf:"zone_redundant,omitempty"` +// Should zone redundancy be enabled for this region? Defaults to false. +// +kubebuilder:validation:Optional +ZoneRedundant *bool `json:"zoneRedundant,omitempty" tf:"zone_redundant,omitempty"` } + type IdentityInitParameters struct { - // Specifies a list of User Assigned Managed Identity IDs to be assigned to this Cosmos Account. - IdentityIds []*string `json:"identityIds,omitempty" tf:"identity_ids,omitempty"` - // The Type of Managed Identity assigned to this Cosmos account. Possible values are SystemAssigned, UserAssigned and SystemAssigned, UserAssigned. - Type *string `json:"type,omitempty" tf:"type,omitempty"` +// Specifies a list of User Assigned Managed Identity IDs to be assigned to this Cosmos Account. +IdentityIds []*string `json:"identityIds,omitempty" tf:"identity_ids,omitempty"` + +// The Type of Managed Identity assigned to this Cosmos account. Possible values are SystemAssigned, UserAssigned and SystemAssigned, UserAssigned. +Type *string `json:"type,omitempty" tf:"type,omitempty"` } + type IdentityObservation struct { - // Specifies a list of User Assigned Managed Identity IDs to be assigned to this Cosmos Account. - IdentityIds []*string `json:"identityIds,omitempty" tf:"identity_ids,omitempty"` - // The Principal ID associated with this Managed Service Identity. - PrincipalID *string `json:"principalId,omitempty" tf:"principal_id,omitempty"` +// Specifies a list of User Assigned Managed Identity IDs to be assigned to this Cosmos Account. +IdentityIds []*string `json:"identityIds,omitempty" tf:"identity_ids,omitempty"` - // The Tenant ID associated with this Managed Service Identity. - TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` +// The Principal ID associated with this Managed Service Identity. +PrincipalID *string `json:"principalId,omitempty" tf:"principal_id,omitempty"` - // The Type of Managed Identity assigned to this Cosmos account. Possible values are SystemAssigned, UserAssigned and SystemAssigned, UserAssigned. - Type *string `json:"type,omitempty" tf:"type,omitempty"` +// The Tenant ID associated with this Managed Service Identity. +TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` + +// The Type of Managed Identity assigned to this Cosmos account. Possible values are SystemAssigned, UserAssigned and SystemAssigned, UserAssigned. +Type *string `json:"type,omitempty" tf:"type,omitempty"` } + type IdentityParameters struct { - // Specifies a list of User Assigned Managed Identity IDs to be assigned to this Cosmos Account. - // +kubebuilder:validation:Optional - IdentityIds []*string `json:"identityIds,omitempty" tf:"identity_ids,omitempty"` - // The Type of Managed Identity assigned to this Cosmos account. Possible values are SystemAssigned, UserAssigned and SystemAssigned, UserAssigned. - // +kubebuilder:validation:Optional - Type *string `json:"type" tf:"type,omitempty"` +// Specifies a list of User Assigned Managed Identity IDs to be assigned to this Cosmos Account. +// +kubebuilder:validation:Optional +IdentityIds []*string `json:"identityIds,omitempty" tf:"identity_ids,omitempty"` + +// The Type of Managed Identity assigned to this Cosmos account. Possible values are SystemAssigned, UserAssigned and SystemAssigned, UserAssigned. +// +kubebuilder:validation:Optional +Type *string `json:"type" tf:"type,omitempty"` } + type RestoreInitParameters struct { - // A database block as defined below. Changing this forces a new resource to be created. - Database []DatabaseInitParameters `json:"database,omitempty" tf:"database,omitempty"` - // The creation time of the database or the collection (Datetime Format RFC 3339). Changing this forces a new resource to be created. - RestoreTimestampInUtc *string `json:"restoreTimestampInUtc,omitempty" tf:"restore_timestamp_in_utc,omitempty"` +// A database block as defined below. Changing this forces a new resource to be created. +Database []DatabaseInitParameters `json:"database,omitempty" tf:"database,omitempty"` + +// The creation time of the database or the collection (Datetime Format RFC 3339). Changing this forces a new resource to be created. +RestoreTimestampInUtc *string `json:"restoreTimestampInUtc,omitempty" tf:"restore_timestamp_in_utc,omitempty"` } + type RestoreObservation struct { - // A database block as defined below. Changing this forces a new resource to be created. - Database []DatabaseObservation `json:"database,omitempty" tf:"database,omitempty"` - // The creation time of the database or the collection (Datetime Format RFC 3339). Changing this forces a new resource to be created. - RestoreTimestampInUtc *string `json:"restoreTimestampInUtc,omitempty" tf:"restore_timestamp_in_utc,omitempty"` +// A database block as defined below. Changing this forces a new resource to be created. +Database []DatabaseObservation `json:"database,omitempty" tf:"database,omitempty"` - // The resource ID of the restorable database account from which the restore has to be initiated. The example is /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}. Changing this forces a new resource to be created. - SourceCosmosdbAccountID *string `json:"sourceCosmosdbAccountId,omitempty" tf:"source_cosmosdb_account_id,omitempty"` +// The creation time of the database or the collection (Datetime Format RFC 3339). Changing this forces a new resource to be created. +RestoreTimestampInUtc *string `json:"restoreTimestampInUtc,omitempty" tf:"restore_timestamp_in_utc,omitempty"` + +// The resource ID of the restorable database account from which the restore has to be initiated. The example is /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}. Changing this forces a new resource to be created. +SourceCosmosdbAccountID *string `json:"sourceCosmosdbAccountId,omitempty" tf:"source_cosmosdb_account_id,omitempty"` } + type RestoreParameters struct { - // A database block as defined below. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Database []DatabaseParameters `json:"database,omitempty" tf:"database,omitempty"` - // The creation time of the database or the collection (Datetime Format RFC 3339). Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - RestoreTimestampInUtc *string `json:"restoreTimestampInUtc" tf:"restore_timestamp_in_utc,omitempty"` +// A database block as defined below. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Database []DatabaseParameters `json:"database,omitempty" tf:"database,omitempty"` + +// The creation time of the database or the collection (Datetime Format RFC 3339). Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +RestoreTimestampInUtc *string `json:"restoreTimestampInUtc" tf:"restore_timestamp_in_utc,omitempty"` - // The resource ID of the restorable database account from which the restore has to be initiated. The example is /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=Account - // +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() - // +kubebuilder:validation:Optional - SourceCosmosdbAccountID *string `json:"sourceCosmosdbAccountId,omitempty" tf:"source_cosmosdb_account_id,omitempty"` +// The resource ID of the restorable database account from which the restore has to be initiated. The example is /subscriptions/{subscriptionId}/providers/Microsoft.DocumentDB/locations/{location}/restorableDatabaseAccounts/{restorableDatabaseAccountName}. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=Account +// +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() +// +kubebuilder:validation:Optional +SourceCosmosdbAccountID *string `json:"sourceCosmosdbAccountId,omitempty" tf:"source_cosmosdb_account_id,omitempty"` - // Reference to a Account to populate sourceCosmosdbAccountId. - // +kubebuilder:validation:Optional - SourceCosmosdbAccountIDRef *v1.Reference `json:"sourceCosmosdbAccountIdRef,omitempty" tf:"-"` +// Reference to a Account to populate sourceCosmosdbAccountId. +// +kubebuilder:validation:Optional +SourceCosmosdbAccountIDRef *v1.Reference `json:"sourceCosmosdbAccountIdRef,omitempty" tf:"-"` - // Selector for a Account to populate sourceCosmosdbAccountId. - // +kubebuilder:validation:Optional - SourceCosmosdbAccountIDSelector *v1.Selector `json:"sourceCosmosdbAccountIdSelector,omitempty" tf:"-"` +// Selector for a Account to populate sourceCosmosdbAccountId. +// +kubebuilder:validation:Optional +SourceCosmosdbAccountIDSelector *v1.Selector `json:"sourceCosmosdbAccountIdSelector,omitempty" tf:"-"` } + type VirtualNetworkRuleInitParameters struct { - // The ID of the virtual network subnet. - ID *string `json:"id,omitempty" tf:"id,omitempty"` - // If set to true, the specified subnet will be added as a virtual network rule even if its CosmosDB service endpoint is not active. Defaults to false. - IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty" tf:"ignore_missing_vnet_service_endpoint,omitempty"` +// The ID of the virtual network subnet. +ID *string `json:"id,omitempty" tf:"id,omitempty"` + +// If set to true, the specified subnet will be added as a virtual network rule even if its CosmosDB service endpoint is not active. Defaults to false. +IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty" tf:"ignore_missing_vnet_service_endpoint,omitempty"` } + type VirtualNetworkRuleObservation struct { - // The ID of the virtual network subnet. - ID *string `json:"id,omitempty" tf:"id,omitempty"` - // If set to true, the specified subnet will be added as a virtual network rule even if its CosmosDB service endpoint is not active. Defaults to false. - IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty" tf:"ignore_missing_vnet_service_endpoint,omitempty"` +// The ID of the virtual network subnet. +ID *string `json:"id,omitempty" tf:"id,omitempty"` + +// If set to true, the specified subnet will be added as a virtual network rule even if its CosmosDB service endpoint is not active. Defaults to false. +IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty" tf:"ignore_missing_vnet_service_endpoint,omitempty"` } + type VirtualNetworkRuleParameters struct { - // The ID of the virtual network subnet. - // +kubebuilder:validation:Optional - ID *string `json:"id" tf:"id,omitempty"` - // If set to true, the specified subnet will be added as a virtual network rule even if its CosmosDB service endpoint is not active. Defaults to false. - // +kubebuilder:validation:Optional - IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty" tf:"ignore_missing_vnet_service_endpoint,omitempty"` +// The ID of the virtual network subnet. +// +kubebuilder:validation:Optional +ID *string `json:"id" tf:"id,omitempty"` + +// If set to true, the specified subnet will be added as a virtual network rule even if its CosmosDB service endpoint is not active. Defaults to false. +// +kubebuilder:validation:Optional +IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty" tf:"ignore_missing_vnet_service_endpoint,omitempty"` } // AccountSpec defines the desired state of Account type AccountSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider AccountParameters `json:"forProvider"` + ForProvider AccountParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -743,13 +818,13 @@ type AccountSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider AccountInitParameters `json:"initProvider,omitempty"` + InitProvider AccountInitParameters `json:"initProvider,omitempty"` } // AccountStatus defines the observed state of Account. type AccountStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider AccountObservation `json:"atProvider,omitempty"` + AtProvider AccountObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -764,12 +839,12 @@ type AccountStatus struct { type Account struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.consistencyPolicy) || (has(self.initProvider) && has(self.initProvider.consistencyPolicy))",message="spec.forProvider.consistencyPolicy is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.geoLocation) || (has(self.initProvider) && has(self.initProvider.geoLocation))",message="spec.forProvider.geoLocation is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.offerType) || (has(self.initProvider) && has(self.initProvider.offerType))",message="spec.forProvider.offerType is a required parameter" - Spec AccountSpec `json:"spec"` - Status AccountStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.consistencyPolicy) || (has(self.initProvider) && has(self.initProvider.consistencyPolicy))",message="spec.forProvider.consistencyPolicy is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.geoLocation) || (has(self.initProvider) && has(self.initProvider.geoLocation))",message="spec.forProvider.geoLocation is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.offerType) || (has(self.initProvider) && has(self.initProvider.offerType))",message="spec.forProvider.offerType is a required parameter" + Spec AccountSpec `json:"spec"` + Status AccountStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/cosmosdb/v1alpha1/zz_cassandracluster_types.go b/apis/cosmosdb/v1alpha1/zz_cassandracluster_types.go index 9dc0195..9f4be2a 100755 --- a/apis/cosmosdb/v1alpha1/zz_cassandracluster_types.go +++ b/apis/cosmosdb/v1alpha1/zz_cassandracluster_types.go @@ -15,186 +15,201 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type CassandraClusterIdentityInitParameters struct { - // Specifies the type of Managed Service Identity that should be configured on this Cassandra Cluster. The only possible value is SystemAssigned. - Type *string `json:"type,omitempty" tf:"type,omitempty"` + +// Specifies the type of Managed Service Identity that should be configured on this Cassandra Cluster. The only possible value is SystemAssigned. +Type *string `json:"type,omitempty" tf:"type,omitempty"` } + type CassandraClusterIdentityObservation struct { - // The ID of the Cassandra Cluster. - PrincipalID *string `json:"principalId,omitempty" tf:"principal_id,omitempty"` - // The ID of the Cassandra Cluster. - TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` +// The ID of the Cassandra Cluster. +PrincipalID *string `json:"principalId,omitempty" tf:"principal_id,omitempty"` - // Specifies the type of Managed Service Identity that should be configured on this Cassandra Cluster. The only possible value is SystemAssigned. - Type *string `json:"type,omitempty" tf:"type,omitempty"` +// The ID of the Cassandra Cluster. +TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` + +// Specifies the type of Managed Service Identity that should be configured on this Cassandra Cluster. The only possible value is SystemAssigned. +Type *string `json:"type,omitempty" tf:"type,omitempty"` } + type CassandraClusterIdentityParameters struct { - // Specifies the type of Managed Service Identity that should be configured on this Cassandra Cluster. The only possible value is SystemAssigned. - // +kubebuilder:validation:Optional - Type *string `json:"type" tf:"type,omitempty"` + +// Specifies the type of Managed Service Identity that should be configured on this Cassandra Cluster. The only possible value is SystemAssigned. +// +kubebuilder:validation:Optional +Type *string `json:"type" tf:"type,omitempty"` } + type CassandraClusterInitParameters struct { - // The authentication method that is used to authenticate clients. Possible values are None and Cassandra. Defaults to Cassandra. - AuthenticationMethod *string `json:"authenticationMethod,omitempty" tf:"authentication_method,omitempty"` - // A list of TLS certificates that is used to authorize client connecting to the Cassandra Cluster. - ClientCertificatePems []*string `json:"clientCertificatePems,omitempty" tf:"client_certificate_pems,omitempty"` +// The authentication method that is used to authenticate clients. Possible values are None and Cassandra. Defaults to Cassandra. +AuthenticationMethod *string `json:"authenticationMethod,omitempty" tf:"authentication_method,omitempty"` - // A list of TLS certificates that is used to authorize gossip from unmanaged Cassandra Data Center. - ExternalGossipCertificatePems []*string `json:"externalGossipCertificatePems,omitempty" tf:"external_gossip_certificate_pems,omitempty"` +// A list of TLS certificates that is used to authorize client connecting to the Cassandra Cluster. +ClientCertificatePems []*string `json:"clientCertificatePems,omitempty" tf:"client_certificate_pems,omitempty"` - // A list of IP Addresses of the seed nodes in unmanaged the Cassandra Data Center which will be added to the seed node lists of all managed nodes. - ExternalSeedNodeIPAddresses []*string `json:"externalSeedNodeIpAddresses,omitempty" tf:"external_seed_node_ip_addresses,omitempty"` +// A list of TLS certificates that is used to authorize gossip from unmanaged Cassandra Data Center. +ExternalGossipCertificatePems []*string `json:"externalGossipCertificatePems,omitempty" tf:"external_gossip_certificate_pems,omitempty"` - // The number of hours to wait between taking a backup of the Cassandra Cluster. Defaults to 24. - HoursBetweenBackups *float64 `json:"hoursBetweenBackups,omitempty" tf:"hours_between_backups,omitempty"` +// A list of IP Addresses of the seed nodes in unmanaged the Cassandra Data Center which will be added to the seed node lists of all managed nodes. +ExternalSeedNodeIPAddresses []*string `json:"externalSeedNodeIpAddresses,omitempty" tf:"external_seed_node_ip_addresses,omitempty"` - // An identity block as defined below. - Identity []CassandraClusterIdentityInitParameters `json:"identity,omitempty" tf:"identity,omitempty"` +// The number of hours to wait between taking a backup of the Cassandra Cluster. Defaults to 24. +HoursBetweenBackups *float64 `json:"hoursBetweenBackups,omitempty" tf:"hours_between_backups,omitempty"` - // The Azure Region where the Cassandra Cluster should exist. Changing this forces a new Cassandra Cluster to be created. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// An identity block as defined below. +Identity []CassandraClusterIdentityInitParameters `json:"identity,omitempty" tf:"identity,omitempty"` - // Is the automatic repair enabled on the Cassandra Cluster? Defaults to true. - RepairEnabled *bool `json:"repairEnabled,omitempty" tf:"repair_enabled,omitempty"` +// The Azure Region where the Cassandra Cluster should exist. Changing this forces a new Cassandra Cluster to be created. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // A mapping of tags assigned to the resource. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// Is the automatic repair enabled on the Cassandra Cluster? Defaults to true. +RepairEnabled *bool `json:"repairEnabled,omitempty" tf:"repair_enabled,omitempty"` - // The version of Cassandra what the Cluster converges to run. Possible values are 3.11 and 4.0. Defaults to 3.11. Changing this forces a new Cassandra Cluster to be created. - Version *string `json:"version,omitempty" tf:"version,omitempty"` +// A mapping of tags assigned to the resource. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + +// The version of Cassandra what the Cluster converges to run. Possible values are 3.11 and 4.0. Defaults to 3.11. Changing this forces a new Cassandra Cluster to be created. +Version *string `json:"version,omitempty" tf:"version,omitempty"` } + type CassandraClusterObservation struct { - // The authentication method that is used to authenticate clients. Possible values are None and Cassandra. Defaults to Cassandra. - AuthenticationMethod *string `json:"authenticationMethod,omitempty" tf:"authentication_method,omitempty"` - // A list of TLS certificates that is used to authorize client connecting to the Cassandra Cluster. - ClientCertificatePems []*string `json:"clientCertificatePems,omitempty" tf:"client_certificate_pems,omitempty"` +// The authentication method that is used to authenticate clients. Possible values are None and Cassandra. Defaults to Cassandra. +AuthenticationMethod *string `json:"authenticationMethod,omitempty" tf:"authentication_method,omitempty"` - // The ID of the delegated management subnet for this Cassandra Cluster. Changing this forces a new Cassandra Cluster to be created. - DelegatedManagementSubnetID *string `json:"delegatedManagementSubnetId,omitempty" tf:"delegated_management_subnet_id,omitempty"` +// A list of TLS certificates that is used to authorize client connecting to the Cassandra Cluster. +ClientCertificatePems []*string `json:"clientCertificatePems,omitempty" tf:"client_certificate_pems,omitempty"` - // A list of TLS certificates that is used to authorize gossip from unmanaged Cassandra Data Center. - ExternalGossipCertificatePems []*string `json:"externalGossipCertificatePems,omitempty" tf:"external_gossip_certificate_pems,omitempty"` +// The ID of the delegated management subnet for this Cassandra Cluster. Changing this forces a new Cassandra Cluster to be created. +DelegatedManagementSubnetID *string `json:"delegatedManagementSubnetId,omitempty" tf:"delegated_management_subnet_id,omitempty"` - // A list of IP Addresses of the seed nodes in unmanaged the Cassandra Data Center which will be added to the seed node lists of all managed nodes. - ExternalSeedNodeIPAddresses []*string `json:"externalSeedNodeIpAddresses,omitempty" tf:"external_seed_node_ip_addresses,omitempty"` +// A list of TLS certificates that is used to authorize gossip from unmanaged Cassandra Data Center. +ExternalGossipCertificatePems []*string `json:"externalGossipCertificatePems,omitempty" tf:"external_gossip_certificate_pems,omitempty"` - // The number of hours to wait between taking a backup of the Cassandra Cluster. Defaults to 24. - HoursBetweenBackups *float64 `json:"hoursBetweenBackups,omitempty" tf:"hours_between_backups,omitempty"` +// A list of IP Addresses of the seed nodes in unmanaged the Cassandra Data Center which will be added to the seed node lists of all managed nodes. +ExternalSeedNodeIPAddresses []*string `json:"externalSeedNodeIpAddresses,omitempty" tf:"external_seed_node_ip_addresses,omitempty"` - // The ID of the Cassandra Cluster. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// The number of hours to wait between taking a backup of the Cassandra Cluster. Defaults to 24. +HoursBetweenBackups *float64 `json:"hoursBetweenBackups,omitempty" tf:"hours_between_backups,omitempty"` - // An identity block as defined below. - Identity []CassandraClusterIdentityObservation `json:"identity,omitempty" tf:"identity,omitempty"` +// The ID of the Cassandra Cluster. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The Azure Region where the Cassandra Cluster should exist. Changing this forces a new Cassandra Cluster to be created. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// An identity block as defined below. +Identity []CassandraClusterIdentityObservation `json:"identity,omitempty" tf:"identity,omitempty"` - // Is the automatic repair enabled on the Cassandra Cluster? Defaults to true. - RepairEnabled *bool `json:"repairEnabled,omitempty" tf:"repair_enabled,omitempty"` +// The Azure Region where the Cassandra Cluster should exist. Changing this forces a new Cassandra Cluster to be created. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // The name of the Resource Group where the Cassandra Cluster should exist. Changing this forces a new Cassandra Cluster to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// Is the automatic repair enabled on the Cassandra Cluster? Defaults to true. +RepairEnabled *bool `json:"repairEnabled,omitempty" tf:"repair_enabled,omitempty"` - // A mapping of tags assigned to the resource. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// The name of the Resource Group where the Cassandra Cluster should exist. Changing this forces a new Cassandra Cluster to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // The version of Cassandra what the Cluster converges to run. Possible values are 3.11 and 4.0. Defaults to 3.11. Changing this forces a new Cassandra Cluster to be created. - Version *string `json:"version,omitempty" tf:"version,omitempty"` +// A mapping of tags assigned to the resource. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + +// The version of Cassandra what the Cluster converges to run. Possible values are 3.11 and 4.0. Defaults to 3.11. Changing this forces a new Cassandra Cluster to be created. +Version *string `json:"version,omitempty" tf:"version,omitempty"` } + type CassandraClusterParameters struct { - // The authentication method that is used to authenticate clients. Possible values are None and Cassandra. Defaults to Cassandra. - // +kubebuilder:validation:Optional - AuthenticationMethod *string `json:"authenticationMethod,omitempty" tf:"authentication_method,omitempty"` - // A list of TLS certificates that is used to authorize client connecting to the Cassandra Cluster. - // +kubebuilder:validation:Optional - ClientCertificatePems []*string `json:"clientCertificatePems,omitempty" tf:"client_certificate_pems,omitempty"` +// The authentication method that is used to authenticate clients. Possible values are None and Cassandra. Defaults to Cassandra. +// +kubebuilder:validation:Optional +AuthenticationMethod *string `json:"authenticationMethod,omitempty" tf:"authentication_method,omitempty"` + +// A list of TLS certificates that is used to authorize client connecting to the Cassandra Cluster. +// +kubebuilder:validation:Optional +ClientCertificatePems []*string `json:"clientCertificatePems,omitempty" tf:"client_certificate_pems,omitempty"` - // The initial admin password for this Cassandra Cluster. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - DefaultAdminPasswordSecretRef v1.SecretKeySelector `json:"defaultAdminPasswordSecretRef" tf:"-"` +// The initial admin password for this Cassandra Cluster. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +DefaultAdminPasswordSecretRef v1.SecretKeySelector `json:"defaultAdminPasswordSecretRef" tf:"-"` - // The ID of the delegated management subnet for this Cassandra Cluster. Changing this forces a new Cassandra Cluster to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/network/v1alpha1.Subnet - // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() - // +kubebuilder:validation:Optional - DelegatedManagementSubnetID *string `json:"delegatedManagementSubnetId,omitempty" tf:"delegated_management_subnet_id,omitempty"` +// The ID of the delegated management subnet for this Cassandra Cluster. Changing this forces a new Cassandra Cluster to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/network/v1alpha1.Subnet +// +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() +// +kubebuilder:validation:Optional +DelegatedManagementSubnetID *string `json:"delegatedManagementSubnetId,omitempty" tf:"delegated_management_subnet_id,omitempty"` - // Reference to a Subnet in network to populate delegatedManagementSubnetId. - // +kubebuilder:validation:Optional - DelegatedManagementSubnetIDRef *v1.Reference `json:"delegatedManagementSubnetIdRef,omitempty" tf:"-"` +// Reference to a Subnet in network to populate delegatedManagementSubnetId. +// +kubebuilder:validation:Optional +DelegatedManagementSubnetIDRef *v1.Reference `json:"delegatedManagementSubnetIdRef,omitempty" tf:"-"` - // Selector for a Subnet in network to populate delegatedManagementSubnetId. - // +kubebuilder:validation:Optional - DelegatedManagementSubnetIDSelector *v1.Selector `json:"delegatedManagementSubnetIdSelector,omitempty" tf:"-"` +// Selector for a Subnet in network to populate delegatedManagementSubnetId. +// +kubebuilder:validation:Optional +DelegatedManagementSubnetIDSelector *v1.Selector `json:"delegatedManagementSubnetIdSelector,omitempty" tf:"-"` - // A list of TLS certificates that is used to authorize gossip from unmanaged Cassandra Data Center. - // +kubebuilder:validation:Optional - ExternalGossipCertificatePems []*string `json:"externalGossipCertificatePems,omitempty" tf:"external_gossip_certificate_pems,omitempty"` +// A list of TLS certificates that is used to authorize gossip from unmanaged Cassandra Data Center. +// +kubebuilder:validation:Optional +ExternalGossipCertificatePems []*string `json:"externalGossipCertificatePems,omitempty" tf:"external_gossip_certificate_pems,omitempty"` - // A list of IP Addresses of the seed nodes in unmanaged the Cassandra Data Center which will be added to the seed node lists of all managed nodes. - // +kubebuilder:validation:Optional - ExternalSeedNodeIPAddresses []*string `json:"externalSeedNodeIpAddresses,omitempty" tf:"external_seed_node_ip_addresses,omitempty"` +// A list of IP Addresses of the seed nodes in unmanaged the Cassandra Data Center which will be added to the seed node lists of all managed nodes. +// +kubebuilder:validation:Optional +ExternalSeedNodeIPAddresses []*string `json:"externalSeedNodeIpAddresses,omitempty" tf:"external_seed_node_ip_addresses,omitempty"` - // The number of hours to wait between taking a backup of the Cassandra Cluster. Defaults to 24. - // +kubebuilder:validation:Optional - HoursBetweenBackups *float64 `json:"hoursBetweenBackups,omitempty" tf:"hours_between_backups,omitempty"` +// The number of hours to wait between taking a backup of the Cassandra Cluster. Defaults to 24. +// +kubebuilder:validation:Optional +HoursBetweenBackups *float64 `json:"hoursBetweenBackups,omitempty" tf:"hours_between_backups,omitempty"` - // An identity block as defined below. - // +kubebuilder:validation:Optional - Identity []CassandraClusterIdentityParameters `json:"identity,omitempty" tf:"identity,omitempty"` +// An identity block as defined below. +// +kubebuilder:validation:Optional +Identity []CassandraClusterIdentityParameters `json:"identity,omitempty" tf:"identity,omitempty"` - // The Azure Region where the Cassandra Cluster should exist. Changing this forces a new Cassandra Cluster to be created. - // +kubebuilder:validation:Optional - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// The Azure Region where the Cassandra Cluster should exist. Changing this forces a new Cassandra Cluster to be created. +// +kubebuilder:validation:Optional +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // Is the automatic repair enabled on the Cassandra Cluster? Defaults to true. - // +kubebuilder:validation:Optional - RepairEnabled *bool `json:"repairEnabled,omitempty" tf:"repair_enabled,omitempty"` +// Is the automatic repair enabled on the Cassandra Cluster? Defaults to true. +// +kubebuilder:validation:Optional +RepairEnabled *bool `json:"repairEnabled,omitempty" tf:"repair_enabled,omitempty"` - // The name of the Resource Group where the Cassandra Cluster should exist. Changing this forces a new Cassandra Cluster to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the Resource Group where the Cassandra Cluster should exist. Changing this forces a new Cassandra Cluster to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - // A mapping of tags assigned to the resource. - // +kubebuilder:validation:Optional - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A mapping of tags assigned to the resource. +// +kubebuilder:validation:Optional +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - // The version of Cassandra what the Cluster converges to run. Possible values are 3.11 and 4.0. Defaults to 3.11. Changing this forces a new Cassandra Cluster to be created. - // +kubebuilder:validation:Optional - Version *string `json:"version,omitempty" tf:"version,omitempty"` +// The version of Cassandra what the Cluster converges to run. Possible values are 3.11 and 4.0. Defaults to 3.11. Changing this forces a new Cassandra Cluster to be created. +// +kubebuilder:validation:Optional +Version *string `json:"version,omitempty" tf:"version,omitempty"` } // CassandraClusterSpec defines the desired state of CassandraCluster type CassandraClusterSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider CassandraClusterParameters `json:"forProvider"` + ForProvider CassandraClusterParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -205,13 +220,13 @@ type CassandraClusterSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider CassandraClusterInitParameters `json:"initProvider,omitempty"` + InitProvider CassandraClusterInitParameters `json:"initProvider,omitempty"` } // CassandraClusterStatus defines the observed state of CassandraCluster. type CassandraClusterStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider CassandraClusterObservation `json:"atProvider,omitempty"` + AtProvider CassandraClusterObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -226,10 +241,10 @@ type CassandraClusterStatus struct { type CassandraCluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.defaultAdminPasswordSecretRef)",message="spec.forProvider.defaultAdminPasswordSecretRef is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" - Spec CassandraClusterSpec `json:"spec"` - Status CassandraClusterStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.defaultAdminPasswordSecretRef)",message="spec.forProvider.defaultAdminPasswordSecretRef is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" + Spec CassandraClusterSpec `json:"spec"` + Status CassandraClusterStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/cosmosdb/v1alpha1/zz_cassandradatacenter_types.go b/apis/cosmosdb/v1alpha1/zz_cassandradatacenter_types.go index ac7ef3c..1aedea6 100755 --- a/apis/cosmosdb/v1alpha1/zz_cassandradatacenter_types.go +++ b/apis/cosmosdb/v1alpha1/zz_cassandradatacenter_types.go @@ -15,148 +15,157 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type CassandraDatacenterInitParameters struct { - // Determines whether availability zones are enabled. Defaults to true. - AvailabilityZonesEnabled *bool `json:"availabilityZonesEnabled,omitempty" tf:"availability_zones_enabled,omitempty"` - // The key URI of the customer key to use for the encryption of the backup Storage Account. - BackupStorageCustomerKeyURI *string `json:"backupStorageCustomerKeyUri,omitempty" tf:"backup_storage_customer_key_uri,omitempty"` +// Determines whether availability zones are enabled. Defaults to true. +AvailabilityZonesEnabled *bool `json:"availabilityZonesEnabled,omitempty" tf:"availability_zones_enabled,omitempty"` + +// The key URI of the customer key to use for the encryption of the backup Storage Account. +BackupStorageCustomerKeyURI *string `json:"backupStorageCustomerKeyUri,omitempty" tf:"backup_storage_customer_key_uri,omitempty"` - // The fragment of the cassandra.yaml configuration file to be included in the cassandra.yaml for all nodes in this Cassandra Datacenter. The fragment should be Base64 encoded and only a subset of keys is allowed. - Base64EncodedYamlFragment *string `json:"base64EncodedYamlFragment,omitempty" tf:"base64_encoded_yaml_fragment,omitempty"` +// The fragment of the cassandra.yaml configuration file to be included in the cassandra.yaml for all nodes in this Cassandra Datacenter. The fragment should be Base64 encoded and only a subset of keys is allowed. +Base64EncodedYamlFragment *string `json:"base64EncodedYamlFragment,omitempty" tf:"base64_encoded_yaml_fragment,omitempty"` - // Determines the number of p30 disks that are attached to each node. - DiskCount *float64 `json:"diskCount,omitempty" tf:"disk_count,omitempty"` +// Determines the number of p30 disks that are attached to each node. +DiskCount *float64 `json:"diskCount,omitempty" tf:"disk_count,omitempty"` - // The Disk SKU that is used for this Cassandra Datacenter. Defaults to P30. - DiskSku *string `json:"diskSku,omitempty" tf:"disk_sku,omitempty"` +// The Disk SKU that is used for this Cassandra Datacenter. Defaults to P30. +DiskSku *string `json:"diskSku,omitempty" tf:"disk_sku,omitempty"` - // The Azure Region where the Cassandra Datacenter should exist. Changing this forces a new Cassandra Datacenter to be created. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// The Azure Region where the Cassandra Datacenter should exist. Changing this forces a new Cassandra Datacenter to be created. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // The key URI of the customer key to use for the encryption of the Managed Disk. - ManagedDiskCustomerKeyURI *string `json:"managedDiskCustomerKeyUri,omitempty" tf:"managed_disk_customer_key_uri,omitempty"` +// The key URI of the customer key to use for the encryption of the Managed Disk. +ManagedDiskCustomerKeyURI *string `json:"managedDiskCustomerKeyUri,omitempty" tf:"managed_disk_customer_key_uri,omitempty"` - // The number of nodes the Cassandra Datacenter should have. The number should be equal or greater than 3. Defaults to 3. - NodeCount *float64 `json:"nodeCount,omitempty" tf:"node_count,omitempty"` +// The number of nodes the Cassandra Datacenter should have. The number should be equal or greater than 3. Defaults to 3. +NodeCount *float64 `json:"nodeCount,omitempty" tf:"node_count,omitempty"` - // Determines the selected sku. - SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` +// Determines the selected sku. +SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` } + type CassandraDatacenterObservation struct { - // Determines whether availability zones are enabled. Defaults to true. - AvailabilityZonesEnabled *bool `json:"availabilityZonesEnabled,omitempty" tf:"availability_zones_enabled,omitempty"` - // The key URI of the customer key to use for the encryption of the backup Storage Account. - BackupStorageCustomerKeyURI *string `json:"backupStorageCustomerKeyUri,omitempty" tf:"backup_storage_customer_key_uri,omitempty"` +// Determines whether availability zones are enabled. Defaults to true. +AvailabilityZonesEnabled *bool `json:"availabilityZonesEnabled,omitempty" tf:"availability_zones_enabled,omitempty"` - // The fragment of the cassandra.yaml configuration file to be included in the cassandra.yaml for all nodes in this Cassandra Datacenter. The fragment should be Base64 encoded and only a subset of keys is allowed. - Base64EncodedYamlFragment *string `json:"base64EncodedYamlFragment,omitempty" tf:"base64_encoded_yaml_fragment,omitempty"` +// The key URI of the customer key to use for the encryption of the backup Storage Account. +BackupStorageCustomerKeyURI *string `json:"backupStorageCustomerKeyUri,omitempty" tf:"backup_storage_customer_key_uri,omitempty"` - // The ID of the Cassandra Cluster. Changing this forces a new Cassandra Datacenter to be created. - CassandraClusterID *string `json:"cassandraClusterId,omitempty" tf:"cassandra_cluster_id,omitempty"` +// The fragment of the cassandra.yaml configuration file to be included in the cassandra.yaml for all nodes in this Cassandra Datacenter. The fragment should be Base64 encoded and only a subset of keys is allowed. +Base64EncodedYamlFragment *string `json:"base64EncodedYamlFragment,omitempty" tf:"base64_encoded_yaml_fragment,omitempty"` - // The ID of the delegated management subnet for this Cassandra Datacenter. Changing this forces a new Cassandra Datacenter to be created. - DelegatedManagementSubnetID *string `json:"delegatedManagementSubnetId,omitempty" tf:"delegated_management_subnet_id,omitempty"` +// The ID of the Cassandra Cluster. Changing this forces a new Cassandra Datacenter to be created. +CassandraClusterID *string `json:"cassandraClusterId,omitempty" tf:"cassandra_cluster_id,omitempty"` - // Determines the number of p30 disks that are attached to each node. - DiskCount *float64 `json:"diskCount,omitempty" tf:"disk_count,omitempty"` +// The ID of the delegated management subnet for this Cassandra Datacenter. Changing this forces a new Cassandra Datacenter to be created. +DelegatedManagementSubnetID *string `json:"delegatedManagementSubnetId,omitempty" tf:"delegated_management_subnet_id,omitempty"` - // The Disk SKU that is used for this Cassandra Datacenter. Defaults to P30. - DiskSku *string `json:"diskSku,omitempty" tf:"disk_sku,omitempty"` +// Determines the number of p30 disks that are attached to each node. +DiskCount *float64 `json:"diskCount,omitempty" tf:"disk_count,omitempty"` - // The ID of the Cassandra Datacenter. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// The Disk SKU that is used for this Cassandra Datacenter. Defaults to P30. +DiskSku *string `json:"diskSku,omitempty" tf:"disk_sku,omitempty"` - // The Azure Region where the Cassandra Datacenter should exist. Changing this forces a new Cassandra Datacenter to be created. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// The ID of the Cassandra Datacenter. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The key URI of the customer key to use for the encryption of the Managed Disk. - ManagedDiskCustomerKeyURI *string `json:"managedDiskCustomerKeyUri,omitempty" tf:"managed_disk_customer_key_uri,omitempty"` +// The Azure Region where the Cassandra Datacenter should exist. Changing this forces a new Cassandra Datacenter to be created. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // The number of nodes the Cassandra Datacenter should have. The number should be equal or greater than 3. Defaults to 3. - NodeCount *float64 `json:"nodeCount,omitempty" tf:"node_count,omitempty"` +// The key URI of the customer key to use for the encryption of the Managed Disk. +ManagedDiskCustomerKeyURI *string `json:"managedDiskCustomerKeyUri,omitempty" tf:"managed_disk_customer_key_uri,omitempty"` - // Determines the selected sku. - SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` +// The number of nodes the Cassandra Datacenter should have. The number should be equal or greater than 3. Defaults to 3. +NodeCount *float64 `json:"nodeCount,omitempty" tf:"node_count,omitempty"` + +// Determines the selected sku. +SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` } + type CassandraDatacenterParameters struct { - // Determines whether availability zones are enabled. Defaults to true. - // +kubebuilder:validation:Optional - AvailabilityZonesEnabled *bool `json:"availabilityZonesEnabled,omitempty" tf:"availability_zones_enabled,omitempty"` - - // The key URI of the customer key to use for the encryption of the backup Storage Account. - // +kubebuilder:validation:Optional - BackupStorageCustomerKeyURI *string `json:"backupStorageCustomerKeyUri,omitempty" tf:"backup_storage_customer_key_uri,omitempty"` - - // The fragment of the cassandra.yaml configuration file to be included in the cassandra.yaml for all nodes in this Cassandra Datacenter. The fragment should be Base64 encoded and only a subset of keys is allowed. - // +kubebuilder:validation:Optional - Base64EncodedYamlFragment *string `json:"base64EncodedYamlFragment,omitempty" tf:"base64_encoded_yaml_fragment,omitempty"` - - // The ID of the Cassandra Cluster. Changing this forces a new Cassandra Datacenter to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/cosmosdb/v1alpha1.CassandraCluster - // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() - // +kubebuilder:validation:Optional - CassandraClusterID *string `json:"cassandraClusterId,omitempty" tf:"cassandra_cluster_id,omitempty"` - - // Reference to a CassandraCluster in cosmosdb to populate cassandraClusterId. - // +kubebuilder:validation:Optional - CassandraClusterIDRef *v1.Reference `json:"cassandraClusterIdRef,omitempty" tf:"-"` - - // Selector for a CassandraCluster in cosmosdb to populate cassandraClusterId. - // +kubebuilder:validation:Optional - CassandraClusterIDSelector *v1.Selector `json:"cassandraClusterIdSelector,omitempty" tf:"-"` - - // The ID of the delegated management subnet for this Cassandra Datacenter. Changing this forces a new Cassandra Datacenter to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/network/v1alpha1.Subnet - // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() - // +kubebuilder:validation:Optional - DelegatedManagementSubnetID *string `json:"delegatedManagementSubnetId,omitempty" tf:"delegated_management_subnet_id,omitempty"` - - // Reference to a Subnet in network to populate delegatedManagementSubnetId. - // +kubebuilder:validation:Optional - DelegatedManagementSubnetIDRef *v1.Reference `json:"delegatedManagementSubnetIdRef,omitempty" tf:"-"` - - // Selector for a Subnet in network to populate delegatedManagementSubnetId. - // +kubebuilder:validation:Optional - DelegatedManagementSubnetIDSelector *v1.Selector `json:"delegatedManagementSubnetIdSelector,omitempty" tf:"-"` - - // Determines the number of p30 disks that are attached to each node. - // +kubebuilder:validation:Optional - DiskCount *float64 `json:"diskCount,omitempty" tf:"disk_count,omitempty"` - - // The Disk SKU that is used for this Cassandra Datacenter. Defaults to P30. - // +kubebuilder:validation:Optional - DiskSku *string `json:"diskSku,omitempty" tf:"disk_sku,omitempty"` - - // The Azure Region where the Cassandra Datacenter should exist. Changing this forces a new Cassandra Datacenter to be created. - // +kubebuilder:validation:Optional - Location *string `json:"location,omitempty" tf:"location,omitempty"` - - // The key URI of the customer key to use for the encryption of the Managed Disk. - // +kubebuilder:validation:Optional - ManagedDiskCustomerKeyURI *string `json:"managedDiskCustomerKeyUri,omitempty" tf:"managed_disk_customer_key_uri,omitempty"` - - // The number of nodes the Cassandra Datacenter should have. The number should be equal or greater than 3. Defaults to 3. - // +kubebuilder:validation:Optional - NodeCount *float64 `json:"nodeCount,omitempty" tf:"node_count,omitempty"` - - // Determines the selected sku. - // +kubebuilder:validation:Optional - SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` + +// Determines whether availability zones are enabled. Defaults to true. +// +kubebuilder:validation:Optional +AvailabilityZonesEnabled *bool `json:"availabilityZonesEnabled,omitempty" tf:"availability_zones_enabled,omitempty"` + +// The key URI of the customer key to use for the encryption of the backup Storage Account. +// +kubebuilder:validation:Optional +BackupStorageCustomerKeyURI *string `json:"backupStorageCustomerKeyUri,omitempty" tf:"backup_storage_customer_key_uri,omitempty"` + +// The fragment of the cassandra.yaml configuration file to be included in the cassandra.yaml for all nodes in this Cassandra Datacenter. The fragment should be Base64 encoded and only a subset of keys is allowed. +// +kubebuilder:validation:Optional +Base64EncodedYamlFragment *string `json:"base64EncodedYamlFragment,omitempty" tf:"base64_encoded_yaml_fragment,omitempty"` + +// The ID of the Cassandra Cluster. Changing this forces a new Cassandra Datacenter to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/cosmosdb/v1alpha1.CassandraCluster +// +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() +// +kubebuilder:validation:Optional +CassandraClusterID *string `json:"cassandraClusterId,omitempty" tf:"cassandra_cluster_id,omitempty"` + +// Reference to a CassandraCluster in cosmosdb to populate cassandraClusterId. +// +kubebuilder:validation:Optional +CassandraClusterIDRef *v1.Reference `json:"cassandraClusterIdRef,omitempty" tf:"-"` + +// Selector for a CassandraCluster in cosmosdb to populate cassandraClusterId. +// +kubebuilder:validation:Optional +CassandraClusterIDSelector *v1.Selector `json:"cassandraClusterIdSelector,omitempty" tf:"-"` + +// The ID of the delegated management subnet for this Cassandra Datacenter. Changing this forces a new Cassandra Datacenter to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/network/v1alpha1.Subnet +// +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() +// +kubebuilder:validation:Optional +DelegatedManagementSubnetID *string `json:"delegatedManagementSubnetId,omitempty" tf:"delegated_management_subnet_id,omitempty"` + +// Reference to a Subnet in network to populate delegatedManagementSubnetId. +// +kubebuilder:validation:Optional +DelegatedManagementSubnetIDRef *v1.Reference `json:"delegatedManagementSubnetIdRef,omitempty" tf:"-"` + +// Selector for a Subnet in network to populate delegatedManagementSubnetId. +// +kubebuilder:validation:Optional +DelegatedManagementSubnetIDSelector *v1.Selector `json:"delegatedManagementSubnetIdSelector,omitempty" tf:"-"` + +// Determines the number of p30 disks that are attached to each node. +// +kubebuilder:validation:Optional +DiskCount *float64 `json:"diskCount,omitempty" tf:"disk_count,omitempty"` + +// The Disk SKU that is used for this Cassandra Datacenter. Defaults to P30. +// +kubebuilder:validation:Optional +DiskSku *string `json:"diskSku,omitempty" tf:"disk_sku,omitempty"` + +// The Azure Region where the Cassandra Datacenter should exist. Changing this forces a new Cassandra Datacenter to be created. +// +kubebuilder:validation:Optional +Location *string `json:"location,omitempty" tf:"location,omitempty"` + +// The key URI of the customer key to use for the encryption of the Managed Disk. +// +kubebuilder:validation:Optional +ManagedDiskCustomerKeyURI *string `json:"managedDiskCustomerKeyUri,omitempty" tf:"managed_disk_customer_key_uri,omitempty"` + +// The number of nodes the Cassandra Datacenter should have. The number should be equal or greater than 3. Defaults to 3. +// +kubebuilder:validation:Optional +NodeCount *float64 `json:"nodeCount,omitempty" tf:"node_count,omitempty"` + +// Determines the selected sku. +// +kubebuilder:validation:Optional +SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` } // CassandraDatacenterSpec defines the desired state of CassandraDatacenter type CassandraDatacenterSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider CassandraDatacenterParameters `json:"forProvider"` + ForProvider CassandraDatacenterParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -167,13 +176,13 @@ type CassandraDatacenterSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider CassandraDatacenterInitParameters `json:"initProvider,omitempty"` + InitProvider CassandraDatacenterInitParameters `json:"initProvider,omitempty"` } // CassandraDatacenterStatus defines the observed state of CassandraDatacenter. type CassandraDatacenterStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider CassandraDatacenterObservation `json:"atProvider,omitempty"` + AtProvider CassandraDatacenterObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -188,9 +197,9 @@ type CassandraDatacenterStatus struct { type CassandraDatacenter struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" - Spec CassandraDatacenterSpec `json:"spec"` - Status CassandraDatacenterStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" + Spec CassandraDatacenterSpec `json:"spec"` + Status CassandraDatacenterStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/cosmosdb/v1alpha1/zz_cassandrakeyspace_types.go b/apis/cosmosdb/v1alpha1/zz_cassandrakeyspace_types.go index cab28a5..656e8fc 100755 --- a/apis/cosmosdb/v1alpha1/zz_cassandrakeyspace_types.go +++ b/apis/cosmosdb/v1alpha1/zz_cassandrakeyspace_types.go @@ -15,95 +15,110 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type AutoscaleSettingsInitParameters struct { - // The maximum throughput of the Cassandra KeySpace (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. - MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` + +// The maximum throughput of the Cassandra KeySpace (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. +MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` } + type AutoscaleSettingsObservation struct { - // The maximum throughput of the Cassandra KeySpace (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. - MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` + +// The maximum throughput of the Cassandra KeySpace (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. +MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` } + type AutoscaleSettingsParameters struct { - // The maximum throughput of the Cassandra KeySpace (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. - // +kubebuilder:validation:Optional - MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` + +// The maximum throughput of the Cassandra KeySpace (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. +// +kubebuilder:validation:Optional +MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` } + type CassandraKeySpaceInitParameters struct { - // An autoscale_settings block as defined below. - AutoscaleSettings []AutoscaleSettingsInitParameters `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` - // The throughput of Cassandra KeySpace (RU/s). Must be set in increments of 100. The minimum value is 400. - Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` +// An autoscale_settings block as defined below. +AutoscaleSettings []AutoscaleSettingsInitParameters `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` + +// The throughput of Cassandra KeySpace (RU/s). Must be set in increments of 100. The minimum value is 400. +Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` } + type CassandraKeySpaceObservation struct { - // The name of the Cosmos DB Cassandra KeySpace to create the table within. Changing this forces a new resource to be created. - AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` - // An autoscale_settings block as defined below. - AutoscaleSettings []AutoscaleSettingsObservation `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` +// The name of the Cosmos DB Cassandra KeySpace to create the table within. Changing this forces a new resource to be created. +AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` - // the ID of the CosmosDB Cassandra KeySpace. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// An autoscale_settings block as defined below. +AutoscaleSettings []AutoscaleSettingsObservation `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` - // The name of the resource group in which the Cosmos DB Cassandra KeySpace is created. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// the ID of the CosmosDB Cassandra KeySpace. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The throughput of Cassandra KeySpace (RU/s). Must be set in increments of 100. The minimum value is 400. - Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` +// The name of the resource group in which the Cosmos DB Cassandra KeySpace is created. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` + +// The throughput of Cassandra KeySpace (RU/s). Must be set in increments of 100. The minimum value is 400. +Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` } + type CassandraKeySpaceParameters struct { - // The name of the Cosmos DB Cassandra KeySpace to create the table within. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/cosmosdb/v1alpha1.Account - // +kubebuilder:validation:Optional - AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` - // Reference to a Account in cosmosdb to populate accountName. - // +kubebuilder:validation:Optional - AccountNameRef *v1.Reference `json:"accountNameRef,omitempty" tf:"-"` +// The name of the Cosmos DB Cassandra KeySpace to create the table within. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/cosmosdb/v1alpha1.Account +// +kubebuilder:validation:Optional +AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` + +// Reference to a Account in cosmosdb to populate accountName. +// +kubebuilder:validation:Optional +AccountNameRef *v1.Reference `json:"accountNameRef,omitempty" tf:"-"` - // Selector for a Account in cosmosdb to populate accountName. - // +kubebuilder:validation:Optional - AccountNameSelector *v1.Selector `json:"accountNameSelector,omitempty" tf:"-"` +// Selector for a Account in cosmosdb to populate accountName. +// +kubebuilder:validation:Optional +AccountNameSelector *v1.Selector `json:"accountNameSelector,omitempty" tf:"-"` - // An autoscale_settings block as defined below. - // +kubebuilder:validation:Optional - AutoscaleSettings []AutoscaleSettingsParameters `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` +// An autoscale_settings block as defined below. +// +kubebuilder:validation:Optional +AutoscaleSettings []AutoscaleSettingsParameters `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` - // The name of the resource group in which the Cosmos DB Cassandra KeySpace is created. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group in which the Cosmos DB Cassandra KeySpace is created. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - // The throughput of Cassandra KeySpace (RU/s). Must be set in increments of 100. The minimum value is 400. - // +kubebuilder:validation:Optional - Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` +// The throughput of Cassandra KeySpace (RU/s). Must be set in increments of 100. The minimum value is 400. +// +kubebuilder:validation:Optional +Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` } // CassandraKeySpaceSpec defines the desired state of CassandraKeySpace type CassandraKeySpaceSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider CassandraKeySpaceParameters `json:"forProvider"` + ForProvider CassandraKeySpaceParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -114,13 +129,13 @@ type CassandraKeySpaceSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider CassandraKeySpaceInitParameters `json:"initProvider,omitempty"` + InitProvider CassandraKeySpaceInitParameters `json:"initProvider,omitempty"` } // CassandraKeySpaceStatus defines the observed state of CassandraKeySpace. type CassandraKeySpaceStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider CassandraKeySpaceObservation `json:"atProvider,omitempty"` + AtProvider CassandraKeySpaceObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/cosmosdb/v1alpha1/zz_cassandratable_types.go b/apis/cosmosdb/v1alpha1/zz_cassandratable_types.go index a636129..b45e6d1 100755 --- a/apis/cosmosdb/v1alpha1/zz_cassandratable_types.go +++ b/apis/cosmosdb/v1alpha1/zz_cassandratable_types.go @@ -15,226 +15,265 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type CassandraTableAutoscaleSettingsInitParameters struct { - // The maximum throughput of the Cassandra Table (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. - MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` + +// The maximum throughput of the Cassandra Table (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. +MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` } + type CassandraTableAutoscaleSettingsObservation struct { - // The maximum throughput of the Cassandra Table (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. - MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` + +// The maximum throughput of the Cassandra Table (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. +MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` } + type CassandraTableAutoscaleSettingsParameters struct { - // The maximum throughput of the Cassandra Table (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. - // +kubebuilder:validation:Optional - MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` + +// The maximum throughput of the Cassandra Table (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. +// +kubebuilder:validation:Optional +MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` } + type CassandraTableInitParameters struct { - // Time to live of the Analytical Storage. Possible values are between -1 and 2147483647 except 0. -1 means the Analytical Storage never expires. Changing this forces a new resource to be created. - AnalyticalStorageTTL *float64 `json:"analyticalStorageTtl,omitempty" tf:"analytical_storage_ttl,omitempty"` - // An autoscale_settings block as defined below. - AutoscaleSettings []CassandraTableAutoscaleSettingsInitParameters `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` +// Time to live of the Analytical Storage. Possible values are between -1 and 2147483647 except 0. -1 means the Analytical Storage never expires. Changing this forces a new resource to be created. +AnalyticalStorageTTL *float64 `json:"analyticalStorageTtl,omitempty" tf:"analytical_storage_ttl,omitempty"` - // Time to live of the Cosmos DB Cassandra table. Possible values are at least -1. -1 means the Cassandra table never expires. - DefaultTTL *float64 `json:"defaultTtl,omitempty" tf:"default_ttl,omitempty"` +// An autoscale_settings block as defined below. +AutoscaleSettings []CassandraTableAutoscaleSettingsInitParameters `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` - // A schema block as defined below. - Schema []SchemaInitParameters `json:"schema,omitempty" tf:"schema,omitempty"` +// Time to live of the Cosmos DB Cassandra table. Possible values are at least -1. -1 means the Cassandra table never expires. +DefaultTTL *float64 `json:"defaultTtl,omitempty" tf:"default_ttl,omitempty"` - // The throughput of Cassandra KeySpace (RU/s). Must be set in increments of 100. The minimum value is 400. - Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` +// A schema block as defined below. +Schema []SchemaInitParameters `json:"schema,omitempty" tf:"schema,omitempty"` + +// The throughput of Cassandra KeySpace (RU/s). Must be set in increments of 100. The minimum value is 400. +Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` } + type CassandraTableObservation struct { - // Time to live of the Analytical Storage. Possible values are between -1 and 2147483647 except 0. -1 means the Analytical Storage never expires. Changing this forces a new resource to be created. - AnalyticalStorageTTL *float64 `json:"analyticalStorageTtl,omitempty" tf:"analytical_storage_ttl,omitempty"` - // An autoscale_settings block as defined below. - AutoscaleSettings []CassandraTableAutoscaleSettingsObservation `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` +// Time to live of the Analytical Storage. Possible values are between -1 and 2147483647 except 0. -1 means the Analytical Storage never expires. Changing this forces a new resource to be created. +AnalyticalStorageTTL *float64 `json:"analyticalStorageTtl,omitempty" tf:"analytical_storage_ttl,omitempty"` + +// An autoscale_settings block as defined below. +AutoscaleSettings []CassandraTableAutoscaleSettingsObservation `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` - // The ID of the Cosmos DB Cassandra Keyspace to create the table within. Changing this forces a new resource to be created. - CassandraKeyspaceID *string `json:"cassandraKeyspaceId,omitempty" tf:"cassandra_keyspace_id,omitempty"` +// The ID of the Cosmos DB Cassandra Keyspace to create the table within. Changing this forces a new resource to be created. +CassandraKeyspaceID *string `json:"cassandraKeyspaceId,omitempty" tf:"cassandra_keyspace_id,omitempty"` - // Time to live of the Cosmos DB Cassandra table. Possible values are at least -1. -1 means the Cassandra table never expires. - DefaultTTL *float64 `json:"defaultTtl,omitempty" tf:"default_ttl,omitempty"` +// Time to live of the Cosmos DB Cassandra table. Possible values are at least -1. -1 means the Cassandra table never expires. +DefaultTTL *float64 `json:"defaultTtl,omitempty" tf:"default_ttl,omitempty"` - // the ID of the CosmosDB Cassandra Table. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// the ID of the CosmosDB Cassandra Table. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // A schema block as defined below. - Schema []SchemaObservation `json:"schema,omitempty" tf:"schema,omitempty"` +// A schema block as defined below. +Schema []SchemaObservation `json:"schema,omitempty" tf:"schema,omitempty"` - // The throughput of Cassandra KeySpace (RU/s). Must be set in increments of 100. The minimum value is 400. - Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` +// The throughput of Cassandra KeySpace (RU/s). Must be set in increments of 100. The minimum value is 400. +Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` } + type CassandraTableParameters struct { - // Time to live of the Analytical Storage. Possible values are between -1 and 2147483647 except 0. -1 means the Analytical Storage never expires. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - AnalyticalStorageTTL *float64 `json:"analyticalStorageTtl,omitempty" tf:"analytical_storage_ttl,omitempty"` - // An autoscale_settings block as defined below. - // +kubebuilder:validation:Optional - AutoscaleSettings []CassandraTableAutoscaleSettingsParameters `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` +// Time to live of the Analytical Storage. Possible values are between -1 and 2147483647 except 0. -1 means the Analytical Storage never expires. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +AnalyticalStorageTTL *float64 `json:"analyticalStorageTtl,omitempty" tf:"analytical_storage_ttl,omitempty"` + +// An autoscale_settings block as defined below. +// +kubebuilder:validation:Optional +AutoscaleSettings []CassandraTableAutoscaleSettingsParameters `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` - // The ID of the Cosmos DB Cassandra Keyspace to create the table within. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=CassandraKeySpace - // +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() - // +kubebuilder:validation:Optional - CassandraKeyspaceID *string `json:"cassandraKeyspaceId,omitempty" tf:"cassandra_keyspace_id,omitempty"` +// The ID of the Cosmos DB Cassandra Keyspace to create the table within. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=CassandraKeySpace +// +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() +// +kubebuilder:validation:Optional +CassandraKeyspaceID *string `json:"cassandraKeyspaceId,omitempty" tf:"cassandra_keyspace_id,omitempty"` - // Reference to a CassandraKeySpace to populate cassandraKeyspaceId. - // +kubebuilder:validation:Optional - CassandraKeyspaceIDRef *v1.Reference `json:"cassandraKeyspaceIdRef,omitempty" tf:"-"` +// Reference to a CassandraKeySpace to populate cassandraKeyspaceId. +// +kubebuilder:validation:Optional +CassandraKeyspaceIDRef *v1.Reference `json:"cassandraKeyspaceIdRef,omitempty" tf:"-"` - // Selector for a CassandraKeySpace to populate cassandraKeyspaceId. - // +kubebuilder:validation:Optional - CassandraKeyspaceIDSelector *v1.Selector `json:"cassandraKeyspaceIdSelector,omitempty" tf:"-"` +// Selector for a CassandraKeySpace to populate cassandraKeyspaceId. +// +kubebuilder:validation:Optional +CassandraKeyspaceIDSelector *v1.Selector `json:"cassandraKeyspaceIdSelector,omitempty" tf:"-"` - // Time to live of the Cosmos DB Cassandra table. Possible values are at least -1. -1 means the Cassandra table never expires. - // +kubebuilder:validation:Optional - DefaultTTL *float64 `json:"defaultTtl,omitempty" tf:"default_ttl,omitempty"` +// Time to live of the Cosmos DB Cassandra table. Possible values are at least -1. -1 means the Cassandra table never expires. +// +kubebuilder:validation:Optional +DefaultTTL *float64 `json:"defaultTtl,omitempty" tf:"default_ttl,omitempty"` - // A schema block as defined below. - // +kubebuilder:validation:Optional - Schema []SchemaParameters `json:"schema,omitempty" tf:"schema,omitempty"` +// A schema block as defined below. +// +kubebuilder:validation:Optional +Schema []SchemaParameters `json:"schema,omitempty" tf:"schema,omitempty"` - // The throughput of Cassandra KeySpace (RU/s). Must be set in increments of 100. The minimum value is 400. - // +kubebuilder:validation:Optional - Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` +// The throughput of Cassandra KeySpace (RU/s). Must be set in increments of 100. The minimum value is 400. +// +kubebuilder:validation:Optional +Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` } + type ClusterKeyInitParameters struct { - // Name of the column to be created. - Name *string `json:"name,omitempty" tf:"name,omitempty"` - // Order of the key. Currently supported values are Asc and Desc. - OrderBy *string `json:"orderBy,omitempty" tf:"order_by,omitempty"` +// Name of the column to be created. +Name *string `json:"name,omitempty" tf:"name,omitempty"` + +// Order of the key. Currently supported values are Asc and Desc. +OrderBy *string `json:"orderBy,omitempty" tf:"order_by,omitempty"` } + type ClusterKeyObservation struct { - // Name of the column to be created. - Name *string `json:"name,omitempty" tf:"name,omitempty"` - // Order of the key. Currently supported values are Asc and Desc. - OrderBy *string `json:"orderBy,omitempty" tf:"order_by,omitempty"` +// Name of the column to be created. +Name *string `json:"name,omitempty" tf:"name,omitempty"` + +// Order of the key. Currently supported values are Asc and Desc. +OrderBy *string `json:"orderBy,omitempty" tf:"order_by,omitempty"` } + type ClusterKeyParameters struct { - // Name of the column to be created. - // +kubebuilder:validation:Optional - Name *string `json:"name" tf:"name,omitempty"` - // Order of the key. Currently supported values are Asc and Desc. - // +kubebuilder:validation:Optional - OrderBy *string `json:"orderBy" tf:"order_by,omitempty"` +// Name of the column to be created. +// +kubebuilder:validation:Optional +Name *string `json:"name" tf:"name,omitempty"` + +// Order of the key. Currently supported values are Asc and Desc. +// +kubebuilder:validation:Optional +OrderBy *string `json:"orderBy" tf:"order_by,omitempty"` } + type ColumnInitParameters struct { - // Name of the column to be created. - Name *string `json:"name,omitempty" tf:"name,omitempty"` - // Type of the column to be created. - Type *string `json:"type,omitempty" tf:"type,omitempty"` +// Name of the column to be created. +Name *string `json:"name,omitempty" tf:"name,omitempty"` + +// Type of the column to be created. +Type *string `json:"type,omitempty" tf:"type,omitempty"` } + type ColumnObservation struct { - // Name of the column to be created. - Name *string `json:"name,omitempty" tf:"name,omitempty"` - // Type of the column to be created. - Type *string `json:"type,omitempty" tf:"type,omitempty"` +// Name of the column to be created. +Name *string `json:"name,omitempty" tf:"name,omitempty"` + +// Type of the column to be created. +Type *string `json:"type,omitempty" tf:"type,omitempty"` } + type ColumnParameters struct { - // Name of the column to be created. - // +kubebuilder:validation:Optional - Name *string `json:"name" tf:"name,omitempty"` - // Type of the column to be created. - // +kubebuilder:validation:Optional - Type *string `json:"type" tf:"type,omitempty"` +// Name of the column to be created. +// +kubebuilder:validation:Optional +Name *string `json:"name" tf:"name,omitempty"` + +// Type of the column to be created. +// +kubebuilder:validation:Optional +Type *string `json:"type" tf:"type,omitempty"` } + type PartitionKeyInitParameters struct { - // Name of the column to be created. - Name *string `json:"name,omitempty" tf:"name,omitempty"` + +// Name of the column to be created. +Name *string `json:"name,omitempty" tf:"name,omitempty"` } + type PartitionKeyObservation struct { - // Name of the column to be created. - Name *string `json:"name,omitempty" tf:"name,omitempty"` + +// Name of the column to be created. +Name *string `json:"name,omitempty" tf:"name,omitempty"` } + type PartitionKeyParameters struct { - // Name of the column to be created. - // +kubebuilder:validation:Optional - Name *string `json:"name" tf:"name,omitempty"` + +// Name of the column to be created. +// +kubebuilder:validation:Optional +Name *string `json:"name" tf:"name,omitempty"` } + type SchemaInitParameters struct { - // One or more cluster_key blocks as defined below. - ClusterKey []ClusterKeyInitParameters `json:"clusterKey,omitempty" tf:"cluster_key,omitempty"` - // One or more column blocks as defined below. - Column []ColumnInitParameters `json:"column,omitempty" tf:"column,omitempty"` +// One or more cluster_key blocks as defined below. +ClusterKey []ClusterKeyInitParameters `json:"clusterKey,omitempty" tf:"cluster_key,omitempty"` + +// One or more column blocks as defined below. +Column []ColumnInitParameters `json:"column,omitempty" tf:"column,omitempty"` - // One or more partition_key blocks as defined below. - PartitionKey []PartitionKeyInitParameters `json:"partitionKey,omitempty" tf:"partition_key,omitempty"` +// One or more partition_key blocks as defined below. +PartitionKey []PartitionKeyInitParameters `json:"partitionKey,omitempty" tf:"partition_key,omitempty"` } + type SchemaObservation struct { - // One or more cluster_key blocks as defined below. - ClusterKey []ClusterKeyObservation `json:"clusterKey,omitempty" tf:"cluster_key,omitempty"` - // One or more column blocks as defined below. - Column []ColumnObservation `json:"column,omitempty" tf:"column,omitempty"` +// One or more cluster_key blocks as defined below. +ClusterKey []ClusterKeyObservation `json:"clusterKey,omitempty" tf:"cluster_key,omitempty"` + +// One or more column blocks as defined below. +Column []ColumnObservation `json:"column,omitempty" tf:"column,omitempty"` - // One or more partition_key blocks as defined below. - PartitionKey []PartitionKeyObservation `json:"partitionKey,omitempty" tf:"partition_key,omitempty"` +// One or more partition_key blocks as defined below. +PartitionKey []PartitionKeyObservation `json:"partitionKey,omitempty" tf:"partition_key,omitempty"` } + type SchemaParameters struct { - // One or more cluster_key blocks as defined below. - // +kubebuilder:validation:Optional - ClusterKey []ClusterKeyParameters `json:"clusterKey,omitempty" tf:"cluster_key,omitempty"` - // One or more column blocks as defined below. - // +kubebuilder:validation:Optional - Column []ColumnParameters `json:"column" tf:"column,omitempty"` +// One or more cluster_key blocks as defined below. +// +kubebuilder:validation:Optional +ClusterKey []ClusterKeyParameters `json:"clusterKey,omitempty" tf:"cluster_key,omitempty"` + +// One or more column blocks as defined below. +// +kubebuilder:validation:Optional +Column []ColumnParameters `json:"column" tf:"column,omitempty"` - // One or more partition_key blocks as defined below. - // +kubebuilder:validation:Optional - PartitionKey []PartitionKeyParameters `json:"partitionKey" tf:"partition_key,omitempty"` +// One or more partition_key blocks as defined below. +// +kubebuilder:validation:Optional +PartitionKey []PartitionKeyParameters `json:"partitionKey" tf:"partition_key,omitempty"` } // CassandraTableSpec defines the desired state of CassandraTable type CassandraTableSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider CassandraTableParameters `json:"forProvider"` + ForProvider CassandraTableParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -245,13 +284,13 @@ type CassandraTableSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider CassandraTableInitParameters `json:"initProvider,omitempty"` + InitProvider CassandraTableInitParameters `json:"initProvider,omitempty"` } // CassandraTableStatus defines the observed state of CassandraTable. type CassandraTableStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider CassandraTableObservation `json:"atProvider,omitempty"` + AtProvider CassandraTableObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -266,9 +305,9 @@ type CassandraTableStatus struct { type CassandraTable struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.schema) || (has(self.initProvider) && has(self.initProvider.schema))",message="spec.forProvider.schema is a required parameter" - Spec CassandraTableSpec `json:"spec"` - Status CassandraTableStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.schema) || (has(self.initProvider) && has(self.initProvider.schema))",message="spec.forProvider.schema is a required parameter" + Spec CassandraTableSpec `json:"spec"` + Status CassandraTableStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/cosmosdb/v1alpha1/zz_generated_terraformed.go b/apis/cosmosdb/v1alpha1/zz_generated_terraformed.go index 07d8e45..3213d3f 100755 --- a/apis/cosmosdb/v1alpha1/zz_generated_terraformed.go +++ b/apis/cosmosdb/v1alpha1/zz_generated_terraformed.go @@ -11,6 +11,7 @@ Copyright 2022 Upbound Inc. package v1alpha1 import ( + "dario.cat/mergo" "github.com/pkg/errors" "github.com/crossplane/upjet/pkg/resource" @@ -83,6 +84,36 @@ func (tr *Account) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this Account +func (tr *Account) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Account using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Account) LateInitialize(attrs []byte) (bool, error) { @@ -167,6 +198,36 @@ func (tr *CassandraCluster) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this CassandraCluster +func (tr *CassandraCluster) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this CassandraCluster using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *CassandraCluster) LateInitialize(attrs []byte) (bool, error) { @@ -251,6 +312,36 @@ func (tr *CassandraDatacenter) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this CassandraDatacenter +func (tr *CassandraDatacenter) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this CassandraDatacenter using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *CassandraDatacenter) LateInitialize(attrs []byte) (bool, error) { @@ -335,6 +426,36 @@ func (tr *CassandraKeySpace) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this CassandraKeySpace +func (tr *CassandraKeySpace) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this CassandraKeySpace using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *CassandraKeySpace) LateInitialize(attrs []byte) (bool, error) { @@ -419,6 +540,36 @@ func (tr *CassandraTable) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this CassandraTable +func (tr *CassandraTable) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this CassandraTable using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *CassandraTable) LateInitialize(attrs []byte) (bool, error) { @@ -504,6 +655,36 @@ func (tr *GremlinDatabase) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this GremlinDatabase +func (tr *GremlinDatabase) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this GremlinDatabase using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *GremlinDatabase) LateInitialize(attrs []byte) (bool, error) { @@ -588,6 +769,36 @@ func (tr *GremlinGraph) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this GremlinGraph +func (tr *GremlinGraph) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this GremlinGraph using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *GremlinGraph) LateInitialize(attrs []byte) (bool, error) { @@ -672,6 +883,36 @@ func (tr *MongoCollection) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this MongoCollection +func (tr *MongoCollection) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this MongoCollection using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *MongoCollection) LateInitialize(attrs []byte) (bool, error) { @@ -756,6 +997,36 @@ func (tr *MongoDatabase) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this MongoDatabase +func (tr *MongoDatabase) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this MongoDatabase using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *MongoDatabase) LateInitialize(attrs []byte) (bool, error) { @@ -840,6 +1111,36 @@ func (tr *SQLContainer) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this SQLContainer +func (tr *SQLContainer) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this SQLContainer using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *SQLContainer) LateInitialize(attrs []byte) (bool, error) { @@ -924,6 +1225,36 @@ func (tr *SQLDatabase) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this SQLDatabase +func (tr *SQLDatabase) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this SQLDatabase using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *SQLDatabase) LateInitialize(attrs []byte) (bool, error) { @@ -1008,6 +1339,36 @@ func (tr *SQLDedicatedGateway) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this SQLDedicatedGateway +func (tr *SQLDedicatedGateway) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this SQLDedicatedGateway using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *SQLDedicatedGateway) LateInitialize(attrs []byte) (bool, error) { @@ -1092,6 +1453,36 @@ func (tr *SQLFunction) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this SQLFunction +func (tr *SQLFunction) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this SQLFunction using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *SQLFunction) LateInitialize(attrs []byte) (bool, error) { @@ -1176,6 +1567,36 @@ func (tr *SQLRoleAssignment) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this SQLRoleAssignment +func (tr *SQLRoleAssignment) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this SQLRoleAssignment using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *SQLRoleAssignment) LateInitialize(attrs []byte) (bool, error) { @@ -1260,6 +1681,36 @@ func (tr *SQLRoleDefinition) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this SQLRoleDefinition +func (tr *SQLRoleDefinition) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this SQLRoleDefinition using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *SQLRoleDefinition) LateInitialize(attrs []byte) (bool, error) { @@ -1344,6 +1795,36 @@ func (tr *SQLStoredProcedure) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this SQLStoredProcedure +func (tr *SQLStoredProcedure) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this SQLStoredProcedure using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *SQLStoredProcedure) LateInitialize(attrs []byte) (bool, error) { @@ -1428,6 +1909,36 @@ func (tr *SQLTrigger) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this SQLTrigger +func (tr *SQLTrigger) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this SQLTrigger using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *SQLTrigger) LateInitialize(attrs []byte) (bool, error) { @@ -1512,6 +2023,36 @@ func (tr *Table) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this Table +func (tr *Table) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Table using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Table) LateInitialize(attrs []byte) (bool, error) { diff --git a/apis/cosmosdb/v1alpha1/zz_gremlindatabase_types.go b/apis/cosmosdb/v1alpha1/zz_gremlindatabase_types.go index b557247..9399e6e 100755 --- a/apis/cosmosdb/v1alpha1/zz_gremlindatabase_types.go +++ b/apis/cosmosdb/v1alpha1/zz_gremlindatabase_types.go @@ -15,95 +15,110 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type GremlinDatabaseAutoscaleSettingsInitParameters struct { - // The maximum throughput of the Gremlin database (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. - MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` + +// The maximum throughput of the Gremlin database (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. +MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` } + type GremlinDatabaseAutoscaleSettingsObservation struct { - // The maximum throughput of the Gremlin database (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. - MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` + +// The maximum throughput of the Gremlin database (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. +MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` } + type GremlinDatabaseAutoscaleSettingsParameters struct { - // The maximum throughput of the Gremlin database (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. - // +kubebuilder:validation:Optional - MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` + +// The maximum throughput of the Gremlin database (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. +// +kubebuilder:validation:Optional +MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` } + type GremlinDatabaseInitParameters struct { - // An autoscale_settings block as defined below. - AutoscaleSettings []GremlinDatabaseAutoscaleSettingsInitParameters `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` - // The throughput of the Gremlin database (RU/s). Must be set in increments of 100. The minimum value is 400. - Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` +// An autoscale_settings block as defined below. +AutoscaleSettings []GremlinDatabaseAutoscaleSettingsInitParameters `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` + +// The throughput of the Gremlin database (RU/s). Must be set in increments of 100. The minimum value is 400. +Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` } + type GremlinDatabaseObservation struct { - // The name of the CosmosDB Account to create the Gremlin Database within. Changing this forces a new resource to be created. - AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` - // An autoscale_settings block as defined below. - AutoscaleSettings []GremlinDatabaseAutoscaleSettingsObservation `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` +// The name of the CosmosDB Account to create the Gremlin Database within. Changing this forces a new resource to be created. +AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` - // The ID of the CosmosDB Gremlin Database. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// An autoscale_settings block as defined below. +AutoscaleSettings []GremlinDatabaseAutoscaleSettingsObservation `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` - // The name of the resource group in which the Cosmos DB Gremlin Database is created. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The ID of the CosmosDB Gremlin Database. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The throughput of the Gremlin database (RU/s). Must be set in increments of 100. The minimum value is 400. - Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` +// The name of the resource group in which the Cosmos DB Gremlin Database is created. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` + +// The throughput of the Gremlin database (RU/s). Must be set in increments of 100. The minimum value is 400. +Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` } + type GremlinDatabaseParameters struct { - // The name of the CosmosDB Account to create the Gremlin Database within. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=Account - // +kubebuilder:validation:Optional - AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` - // Reference to a Account to populate accountName. - // +kubebuilder:validation:Optional - AccountNameRef *v1.Reference `json:"accountNameRef,omitempty" tf:"-"` +// The name of the CosmosDB Account to create the Gremlin Database within. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=Account +// +kubebuilder:validation:Optional +AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` + +// Reference to a Account to populate accountName. +// +kubebuilder:validation:Optional +AccountNameRef *v1.Reference `json:"accountNameRef,omitempty" tf:"-"` - // Selector for a Account to populate accountName. - // +kubebuilder:validation:Optional - AccountNameSelector *v1.Selector `json:"accountNameSelector,omitempty" tf:"-"` +// Selector for a Account to populate accountName. +// +kubebuilder:validation:Optional +AccountNameSelector *v1.Selector `json:"accountNameSelector,omitempty" tf:"-"` - // An autoscale_settings block as defined below. - // +kubebuilder:validation:Optional - AutoscaleSettings []GremlinDatabaseAutoscaleSettingsParameters `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` +// An autoscale_settings block as defined below. +// +kubebuilder:validation:Optional +AutoscaleSettings []GremlinDatabaseAutoscaleSettingsParameters `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` - // The name of the resource group in which the Cosmos DB Gremlin Database is created. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group in which the Cosmos DB Gremlin Database is created. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - // The throughput of the Gremlin database (RU/s). Must be set in increments of 100. The minimum value is 400. - // +kubebuilder:validation:Optional - Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` +// The throughput of the Gremlin database (RU/s). Must be set in increments of 100. The minimum value is 400. +// +kubebuilder:validation:Optional +Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` } // GremlinDatabaseSpec defines the desired state of GremlinDatabase type GremlinDatabaseSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider GremlinDatabaseParameters `json:"forProvider"` + ForProvider GremlinDatabaseParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -114,13 +129,13 @@ type GremlinDatabaseSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider GremlinDatabaseInitParameters `json:"initProvider,omitempty"` + InitProvider GremlinDatabaseInitParameters `json:"initProvider,omitempty"` } // GremlinDatabaseStatus defines the observed state of GremlinDatabase. type GremlinDatabaseStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider GremlinDatabaseObservation `json:"atProvider,omitempty"` + AtProvider GremlinDatabaseObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/cosmosdb/v1alpha1/zz_gremlingraph_types.go b/apis/cosmosdb/v1alpha1/zz_gremlingraph_types.go index 3490fc6..7af7a84 100755 --- a/apis/cosmosdb/v1alpha1/zz_gremlingraph_types.go +++ b/apis/cosmosdb/v1alpha1/zz_gremlingraph_types.go @@ -15,367 +15,418 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type CompositeIndexInitParameters struct { - // One or more index blocks as defined below. - Index []IndexInitParameters `json:"index,omitempty" tf:"index,omitempty"` + +// One or more index blocks as defined below. +Index []IndexInitParameters `json:"index,omitempty" tf:"index,omitempty"` } + type CompositeIndexObservation struct { - // One or more index blocks as defined below. - Index []IndexObservation `json:"index,omitempty" tf:"index,omitempty"` + +// One or more index blocks as defined below. +Index []IndexObservation `json:"index,omitempty" tf:"index,omitempty"` } + type CompositeIndexParameters struct { - // One or more index blocks as defined below. - // +kubebuilder:validation:Optional - Index []IndexParameters `json:"index" tf:"index,omitempty"` + +// One or more index blocks as defined below. +// +kubebuilder:validation:Optional +Index []IndexParameters `json:"index" tf:"index,omitempty"` } + type ConflictResolutionPolicyInitParameters struct { - // The conflict resolution path in the case of LastWriterWins mode. - ConflictResolutionPath *string `json:"conflictResolutionPath,omitempty" tf:"conflict_resolution_path,omitempty"` - // The procedure to resolve conflicts in the case of custom mode. - ConflictResolutionProcedure *string `json:"conflictResolutionProcedure,omitempty" tf:"conflict_resolution_procedure,omitempty"` +// The conflict resolution path in the case of LastWriterWins mode. +ConflictResolutionPath *string `json:"conflictResolutionPath,omitempty" tf:"conflict_resolution_path,omitempty"` - // Indicates the conflict resolution mode. Possible values include: LastWriterWins, Custom. - Mode *string `json:"mode,omitempty" tf:"mode,omitempty"` +// The procedure to resolve conflicts in the case of custom mode. +ConflictResolutionProcedure *string `json:"conflictResolutionProcedure,omitempty" tf:"conflict_resolution_procedure,omitempty"` + +// Indicates the conflict resolution mode. Possible values include: LastWriterWins, Custom. +Mode *string `json:"mode,omitempty" tf:"mode,omitempty"` } + type ConflictResolutionPolicyObservation struct { - // The conflict resolution path in the case of LastWriterWins mode. - ConflictResolutionPath *string `json:"conflictResolutionPath,omitempty" tf:"conflict_resolution_path,omitempty"` - // The procedure to resolve conflicts in the case of custom mode. - ConflictResolutionProcedure *string `json:"conflictResolutionProcedure,omitempty" tf:"conflict_resolution_procedure,omitempty"` +// The conflict resolution path in the case of LastWriterWins mode. +ConflictResolutionPath *string `json:"conflictResolutionPath,omitempty" tf:"conflict_resolution_path,omitempty"` + +// The procedure to resolve conflicts in the case of custom mode. +ConflictResolutionProcedure *string `json:"conflictResolutionProcedure,omitempty" tf:"conflict_resolution_procedure,omitempty"` - // Indicates the conflict resolution mode. Possible values include: LastWriterWins, Custom. - Mode *string `json:"mode,omitempty" tf:"mode,omitempty"` +// Indicates the conflict resolution mode. Possible values include: LastWriterWins, Custom. +Mode *string `json:"mode,omitempty" tf:"mode,omitempty"` } + type ConflictResolutionPolicyParameters struct { - // The conflict resolution path in the case of LastWriterWins mode. - // +kubebuilder:validation:Optional - ConflictResolutionPath *string `json:"conflictResolutionPath,omitempty" tf:"conflict_resolution_path,omitempty"` - // The procedure to resolve conflicts in the case of custom mode. - // +kubebuilder:validation:Optional - ConflictResolutionProcedure *string `json:"conflictResolutionProcedure,omitempty" tf:"conflict_resolution_procedure,omitempty"` +// The conflict resolution path in the case of LastWriterWins mode. +// +kubebuilder:validation:Optional +ConflictResolutionPath *string `json:"conflictResolutionPath,omitempty" tf:"conflict_resolution_path,omitempty"` + +// The procedure to resolve conflicts in the case of custom mode. +// +kubebuilder:validation:Optional +ConflictResolutionProcedure *string `json:"conflictResolutionProcedure,omitempty" tf:"conflict_resolution_procedure,omitempty"` - // Indicates the conflict resolution mode. Possible values include: LastWriterWins, Custom. - // +kubebuilder:validation:Optional - Mode *string `json:"mode" tf:"mode,omitempty"` +// Indicates the conflict resolution mode. Possible values include: LastWriterWins, Custom. +// +kubebuilder:validation:Optional +Mode *string `json:"mode" tf:"mode,omitempty"` } + type GremlinGraphAutoscaleSettingsInitParameters struct { - // The maximum throughput of the Gremlin graph (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. - MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` + +// The maximum throughput of the Gremlin graph (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. +MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` } + type GremlinGraphAutoscaleSettingsObservation struct { - // The maximum throughput of the Gremlin graph (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. - MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` + +// The maximum throughput of the Gremlin graph (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. +MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` } + type GremlinGraphAutoscaleSettingsParameters struct { - // The maximum throughput of the Gremlin graph (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. - // +kubebuilder:validation:Optional - MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` + +// The maximum throughput of the Gremlin graph (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. +// +kubebuilder:validation:Optional +MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` } + type GremlinGraphInitParameters struct { - // An autoscale_settings block as defined below. Requires partition_key_path to be set. - AutoscaleSettings []GremlinGraphAutoscaleSettingsInitParameters `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` - // A conflict_resolution_policy blocks as defined below. Changing this forces a new resource to be created. - ConflictResolutionPolicy []ConflictResolutionPolicyInitParameters `json:"conflictResolutionPolicy,omitempty" tf:"conflict_resolution_policy,omitempty"` +// An autoscale_settings block as defined below. Requires partition_key_path to be set. +AutoscaleSettings []GremlinGraphAutoscaleSettingsInitParameters `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` + +// A conflict_resolution_policy blocks as defined below. Changing this forces a new resource to be created. +ConflictResolutionPolicy []ConflictResolutionPolicyInitParameters `json:"conflictResolutionPolicy,omitempty" tf:"conflict_resolution_policy,omitempty"` - // The default time to live (TTL) of the Gremlin graph. If the value is missing or set to "-1", items don’t expire. - DefaultTTL *float64 `json:"defaultTtl,omitempty" tf:"default_ttl,omitempty"` +// The default time to live (TTL) of the Gremlin graph. If the value is missing or set to "-1", items don’t expire. +DefaultTTL *float64 `json:"defaultTtl,omitempty" tf:"default_ttl,omitempty"` - // The configuration of the indexing policy. One or more index_policy blocks as defined below. - IndexPolicy []IndexPolicyInitParameters `json:"indexPolicy,omitempty" tf:"index_policy,omitempty"` +// The configuration of the indexing policy. One or more index_policy blocks as defined below. +IndexPolicy []IndexPolicyInitParameters `json:"indexPolicy,omitempty" tf:"index_policy,omitempty"` - // Define a partition key. Changing this forces a new resource to be created. - PartitionKeyPath *string `json:"partitionKeyPath,omitempty" tf:"partition_key_path,omitempty"` +// Define a partition key. Changing this forces a new resource to be created. +PartitionKeyPath *string `json:"partitionKeyPath,omitempty" tf:"partition_key_path,omitempty"` - // Define a partition key version. Changing this forces a new resource to be created. Possible values are 1and 2. This should be set to 2 in order to use large partition keys. - PartitionKeyVersion *float64 `json:"partitionKeyVersion,omitempty" tf:"partition_key_version,omitempty"` +// Define a partition key version. Changing this forces a new resource to be created. Possible values are 1and 2. This should be set to 2 in order to use large partition keys. +PartitionKeyVersion *float64 `json:"partitionKeyVersion,omitempty" tf:"partition_key_version,omitempty"` - // The throughput of the Gremlin graph (RU/s). Must be set in increments of 100. The minimum value is 400. - Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` +// The throughput of the Gremlin graph (RU/s). Must be set in increments of 100. The minimum value is 400. +Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` - // One or more unique_key blocks as defined below. Changing this forces a new resource to be created. - UniqueKey []UniqueKeyInitParameters `json:"uniqueKey,omitempty" tf:"unique_key,omitempty"` +// One or more unique_key blocks as defined below. Changing this forces a new resource to be created. +UniqueKey []UniqueKeyInitParameters `json:"uniqueKey,omitempty" tf:"unique_key,omitempty"` } + type GremlinGraphObservation struct { - // The name of the CosmosDB Account to create the Gremlin Graph within. Changing this forces a new resource to be created. - AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` - // An autoscale_settings block as defined below. Requires partition_key_path to be set. - AutoscaleSettings []GremlinGraphAutoscaleSettingsObservation `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` +// The name of the CosmosDB Account to create the Gremlin Graph within. Changing this forces a new resource to be created. +AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` + +// An autoscale_settings block as defined below. Requires partition_key_path to be set. +AutoscaleSettings []GremlinGraphAutoscaleSettingsObservation `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` - // A conflict_resolution_policy blocks as defined below. Changing this forces a new resource to be created. - ConflictResolutionPolicy []ConflictResolutionPolicyObservation `json:"conflictResolutionPolicy,omitempty" tf:"conflict_resolution_policy,omitempty"` +// A conflict_resolution_policy blocks as defined below. Changing this forces a new resource to be created. +ConflictResolutionPolicy []ConflictResolutionPolicyObservation `json:"conflictResolutionPolicy,omitempty" tf:"conflict_resolution_policy,omitempty"` - // The name of the Cosmos DB Graph Database in which the Cosmos DB Gremlin Graph is created. Changing this forces a new resource to be created. - DatabaseName *string `json:"databaseName,omitempty" tf:"database_name,omitempty"` +// The name of the Cosmos DB Graph Database in which the Cosmos DB Gremlin Graph is created. Changing this forces a new resource to be created. +DatabaseName *string `json:"databaseName,omitempty" tf:"database_name,omitempty"` - // The default time to live (TTL) of the Gremlin graph. If the value is missing or set to "-1", items don’t expire. - DefaultTTL *float64 `json:"defaultTtl,omitempty" tf:"default_ttl,omitempty"` +// The default time to live (TTL) of the Gremlin graph. If the value is missing or set to "-1", items don’t expire. +DefaultTTL *float64 `json:"defaultTtl,omitempty" tf:"default_ttl,omitempty"` - // The ID of the CosmosDB Gremlin Graph. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// The ID of the CosmosDB Gremlin Graph. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The configuration of the indexing policy. One or more index_policy blocks as defined below. - IndexPolicy []IndexPolicyObservation `json:"indexPolicy,omitempty" tf:"index_policy,omitempty"` +// The configuration of the indexing policy. One or more index_policy blocks as defined below. +IndexPolicy []IndexPolicyObservation `json:"indexPolicy,omitempty" tf:"index_policy,omitempty"` - // Define a partition key. Changing this forces a new resource to be created. - PartitionKeyPath *string `json:"partitionKeyPath,omitempty" tf:"partition_key_path,omitempty"` +// Define a partition key. Changing this forces a new resource to be created. +PartitionKeyPath *string `json:"partitionKeyPath,omitempty" tf:"partition_key_path,omitempty"` - // Define a partition key version. Changing this forces a new resource to be created. Possible values are 1and 2. This should be set to 2 in order to use large partition keys. - PartitionKeyVersion *float64 `json:"partitionKeyVersion,omitempty" tf:"partition_key_version,omitempty"` +// Define a partition key version. Changing this forces a new resource to be created. Possible values are 1and 2. This should be set to 2 in order to use large partition keys. +PartitionKeyVersion *float64 `json:"partitionKeyVersion,omitempty" tf:"partition_key_version,omitempty"` - // The name of the resource group in which the Cosmos DB Gremlin Graph is created. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group in which the Cosmos DB Gremlin Graph is created. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // The throughput of the Gremlin graph (RU/s). Must be set in increments of 100. The minimum value is 400. - Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` +// The throughput of the Gremlin graph (RU/s). Must be set in increments of 100. The minimum value is 400. +Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` - // One or more unique_key blocks as defined below. Changing this forces a new resource to be created. - UniqueKey []UniqueKeyObservation `json:"uniqueKey,omitempty" tf:"unique_key,omitempty"` +// One or more unique_key blocks as defined below. Changing this forces a new resource to be created. +UniqueKey []UniqueKeyObservation `json:"uniqueKey,omitempty" tf:"unique_key,omitempty"` } + type GremlinGraphParameters struct { - // The name of the CosmosDB Account to create the Gremlin Graph within. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=Account - // +kubebuilder:validation:Optional - AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` - // Reference to a Account to populate accountName. - // +kubebuilder:validation:Optional - AccountNameRef *v1.Reference `json:"accountNameRef,omitempty" tf:"-"` +// The name of the CosmosDB Account to create the Gremlin Graph within. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=Account +// +kubebuilder:validation:Optional +AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` - // Selector for a Account to populate accountName. - // +kubebuilder:validation:Optional - AccountNameSelector *v1.Selector `json:"accountNameSelector,omitempty" tf:"-"` +// Reference to a Account to populate accountName. +// +kubebuilder:validation:Optional +AccountNameRef *v1.Reference `json:"accountNameRef,omitempty" tf:"-"` - // An autoscale_settings block as defined below. Requires partition_key_path to be set. - // +kubebuilder:validation:Optional - AutoscaleSettings []GremlinGraphAutoscaleSettingsParameters `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` +// Selector for a Account to populate accountName. +// +kubebuilder:validation:Optional +AccountNameSelector *v1.Selector `json:"accountNameSelector,omitempty" tf:"-"` - // A conflict_resolution_policy blocks as defined below. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - ConflictResolutionPolicy []ConflictResolutionPolicyParameters `json:"conflictResolutionPolicy,omitempty" tf:"conflict_resolution_policy,omitempty"` +// An autoscale_settings block as defined below. Requires partition_key_path to be set. +// +kubebuilder:validation:Optional +AutoscaleSettings []GremlinGraphAutoscaleSettingsParameters `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` - // The name of the Cosmos DB Graph Database in which the Cosmos DB Gremlin Graph is created. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=GremlinDatabase - // +kubebuilder:validation:Optional - DatabaseName *string `json:"databaseName,omitempty" tf:"database_name,omitempty"` +// A conflict_resolution_policy blocks as defined below. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +ConflictResolutionPolicy []ConflictResolutionPolicyParameters `json:"conflictResolutionPolicy,omitempty" tf:"conflict_resolution_policy,omitempty"` - // Reference to a GremlinDatabase to populate databaseName. - // +kubebuilder:validation:Optional - DatabaseNameRef *v1.Reference `json:"databaseNameRef,omitempty" tf:"-"` +// The name of the Cosmos DB Graph Database in which the Cosmos DB Gremlin Graph is created. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=GremlinDatabase +// +kubebuilder:validation:Optional +DatabaseName *string `json:"databaseName,omitempty" tf:"database_name,omitempty"` - // Selector for a GremlinDatabase to populate databaseName. - // +kubebuilder:validation:Optional - DatabaseNameSelector *v1.Selector `json:"databaseNameSelector,omitempty" tf:"-"` +// Reference to a GremlinDatabase to populate databaseName. +// +kubebuilder:validation:Optional +DatabaseNameRef *v1.Reference `json:"databaseNameRef,omitempty" tf:"-"` - // The default time to live (TTL) of the Gremlin graph. If the value is missing or set to "-1", items don’t expire. - // +kubebuilder:validation:Optional - DefaultTTL *float64 `json:"defaultTtl,omitempty" tf:"default_ttl,omitempty"` +// Selector for a GremlinDatabase to populate databaseName. +// +kubebuilder:validation:Optional +DatabaseNameSelector *v1.Selector `json:"databaseNameSelector,omitempty" tf:"-"` - // The configuration of the indexing policy. One or more index_policy blocks as defined below. - // +kubebuilder:validation:Optional - IndexPolicy []IndexPolicyParameters `json:"indexPolicy,omitempty" tf:"index_policy,omitempty"` +// The default time to live (TTL) of the Gremlin graph. If the value is missing or set to "-1", items don’t expire. +// +kubebuilder:validation:Optional +DefaultTTL *float64 `json:"defaultTtl,omitempty" tf:"default_ttl,omitempty"` - // Define a partition key. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - PartitionKeyPath *string `json:"partitionKeyPath,omitempty" tf:"partition_key_path,omitempty"` +// The configuration of the indexing policy. One or more index_policy blocks as defined below. +// +kubebuilder:validation:Optional +IndexPolicy []IndexPolicyParameters `json:"indexPolicy,omitempty" tf:"index_policy,omitempty"` - // Define a partition key version. Changing this forces a new resource to be created. Possible values are 1and 2. This should be set to 2 in order to use large partition keys. - // +kubebuilder:validation:Optional - PartitionKeyVersion *float64 `json:"partitionKeyVersion,omitempty" tf:"partition_key_version,omitempty"` +// Define a partition key. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +PartitionKeyPath *string `json:"partitionKeyPath,omitempty" tf:"partition_key_path,omitempty"` - // The name of the resource group in which the Cosmos DB Gremlin Graph is created. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// Define a partition key version. Changing this forces a new resource to be created. Possible values are 1and 2. This should be set to 2 in order to use large partition keys. +// +kubebuilder:validation:Optional +PartitionKeyVersion *float64 `json:"partitionKeyVersion,omitempty" tf:"partition_key_version,omitempty"` - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` +// The name of the resource group in which the Cosmos DB Gremlin Graph is created. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - // The throughput of the Gremlin graph (RU/s). Must be set in increments of 100. The minimum value is 400. - // +kubebuilder:validation:Optional - Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - // One or more unique_key blocks as defined below. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - UniqueKey []UniqueKeyParameters `json:"uniqueKey,omitempty" tf:"unique_key,omitempty"` +// The throughput of the Gremlin graph (RU/s). Must be set in increments of 100. The minimum value is 400. +// +kubebuilder:validation:Optional +Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` + +// One or more unique_key blocks as defined below. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +UniqueKey []UniqueKeyParameters `json:"uniqueKey,omitempty" tf:"unique_key,omitempty"` } + type IndexInitParameters struct { - // Order of the index. Possible values are Ascending or Descending. - Order *string `json:"order,omitempty" tf:"order,omitempty"` - // Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path. - Path *string `json:"path,omitempty" tf:"path,omitempty"` +// Order of the index. Possible values are Ascending or Descending. +Order *string `json:"order,omitempty" tf:"order,omitempty"` + +// Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path. +Path *string `json:"path,omitempty" tf:"path,omitempty"` } + type IndexObservation struct { - // Order of the index. Possible values are Ascending or Descending. - Order *string `json:"order,omitempty" tf:"order,omitempty"` - // Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path. - Path *string `json:"path,omitempty" tf:"path,omitempty"` +// Order of the index. Possible values are Ascending or Descending. +Order *string `json:"order,omitempty" tf:"order,omitempty"` + +// Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path. +Path *string `json:"path,omitempty" tf:"path,omitempty"` } + type IndexParameters struct { - // Order of the index. Possible values are Ascending or Descending. - // +kubebuilder:validation:Optional - Order *string `json:"order" tf:"order,omitempty"` - // Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path. - // +kubebuilder:validation:Optional - Path *string `json:"path" tf:"path,omitempty"` +// Order of the index. Possible values are Ascending or Descending. +// +kubebuilder:validation:Optional +Order *string `json:"order" tf:"order,omitempty"` + +// Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path. +// +kubebuilder:validation:Optional +Path *string `json:"path" tf:"path,omitempty"` } + type IndexPolicyInitParameters struct { - // Indicates if the indexing policy is automatic. Defaults to true. - Automatic *bool `json:"automatic,omitempty" tf:"automatic,omitempty"` - // One or more composite_index blocks as defined below. - CompositeIndex []CompositeIndexInitParameters `json:"compositeIndex,omitempty" tf:"composite_index,omitempty"` +// Indicates if the indexing policy is automatic. Defaults to true. +Automatic *bool `json:"automatic,omitempty" tf:"automatic,omitempty"` + +// One or more composite_index blocks as defined below. +CompositeIndex []CompositeIndexInitParameters `json:"compositeIndex,omitempty" tf:"composite_index,omitempty"` - // List of paths to exclude from indexing. Required if indexing_mode is Consistent or Lazy. - ExcludedPaths []*string `json:"excludedPaths,omitempty" tf:"excluded_paths,omitempty"` +// List of paths to exclude from indexing. Required if indexing_mode is Consistent or Lazy. +ExcludedPaths []*string `json:"excludedPaths,omitempty" tf:"excluded_paths,omitempty"` - // List of paths to include in the indexing. Required if indexing_mode is Consistent or Lazy. - IncludedPaths []*string `json:"includedPaths,omitempty" tf:"included_paths,omitempty"` +// List of paths to include in the indexing. Required if indexing_mode is Consistent or Lazy. +IncludedPaths []*string `json:"includedPaths,omitempty" tf:"included_paths,omitempty"` - // Indicates the indexing mode. Possible values include: Consistent, Lazy, None. - IndexingMode *string `json:"indexingMode,omitempty" tf:"indexing_mode,omitempty"` +// Indicates the indexing mode. Possible values include: Consistent, Lazy, None. +IndexingMode *string `json:"indexingMode,omitempty" tf:"indexing_mode,omitempty"` - // One or more spatial_index blocks as defined below. - SpatialIndex []SpatialIndexInitParameters `json:"spatialIndex,omitempty" tf:"spatial_index,omitempty"` +// One or more spatial_index blocks as defined below. +SpatialIndex []SpatialIndexInitParameters `json:"spatialIndex,omitempty" tf:"spatial_index,omitempty"` } + type IndexPolicyObservation struct { - // Indicates if the indexing policy is automatic. Defaults to true. - Automatic *bool `json:"automatic,omitempty" tf:"automatic,omitempty"` - // One or more composite_index blocks as defined below. - CompositeIndex []CompositeIndexObservation `json:"compositeIndex,omitempty" tf:"composite_index,omitempty"` +// Indicates if the indexing policy is automatic. Defaults to true. +Automatic *bool `json:"automatic,omitempty" tf:"automatic,omitempty"` - // List of paths to exclude from indexing. Required if indexing_mode is Consistent or Lazy. - ExcludedPaths []*string `json:"excludedPaths,omitempty" tf:"excluded_paths,omitempty"` +// One or more composite_index blocks as defined below. +CompositeIndex []CompositeIndexObservation `json:"compositeIndex,omitempty" tf:"composite_index,omitempty"` - // List of paths to include in the indexing. Required if indexing_mode is Consistent or Lazy. - IncludedPaths []*string `json:"includedPaths,omitempty" tf:"included_paths,omitempty"` +// List of paths to exclude from indexing. Required if indexing_mode is Consistent or Lazy. +ExcludedPaths []*string `json:"excludedPaths,omitempty" tf:"excluded_paths,omitempty"` - // Indicates the indexing mode. Possible values include: Consistent, Lazy, None. - IndexingMode *string `json:"indexingMode,omitempty" tf:"indexing_mode,omitempty"` +// List of paths to include in the indexing. Required if indexing_mode is Consistent or Lazy. +IncludedPaths []*string `json:"includedPaths,omitempty" tf:"included_paths,omitempty"` - // One or more spatial_index blocks as defined below. - SpatialIndex []SpatialIndexObservation `json:"spatialIndex,omitempty" tf:"spatial_index,omitempty"` +// Indicates the indexing mode. Possible values include: Consistent, Lazy, None. +IndexingMode *string `json:"indexingMode,omitempty" tf:"indexing_mode,omitempty"` + +// One or more spatial_index blocks as defined below. +SpatialIndex []SpatialIndexObservation `json:"spatialIndex,omitempty" tf:"spatial_index,omitempty"` } + type IndexPolicyParameters struct { - // Indicates if the indexing policy is automatic. Defaults to true. - // +kubebuilder:validation:Optional - Automatic *bool `json:"automatic,omitempty" tf:"automatic,omitempty"` - // One or more composite_index blocks as defined below. - // +kubebuilder:validation:Optional - CompositeIndex []CompositeIndexParameters `json:"compositeIndex,omitempty" tf:"composite_index,omitempty"` +// Indicates if the indexing policy is automatic. Defaults to true. +// +kubebuilder:validation:Optional +Automatic *bool `json:"automatic,omitempty" tf:"automatic,omitempty"` + +// One or more composite_index blocks as defined below. +// +kubebuilder:validation:Optional +CompositeIndex []CompositeIndexParameters `json:"compositeIndex,omitempty" tf:"composite_index,omitempty"` - // List of paths to exclude from indexing. Required if indexing_mode is Consistent or Lazy. - // +kubebuilder:validation:Optional - ExcludedPaths []*string `json:"excludedPaths,omitempty" tf:"excluded_paths,omitempty"` +// List of paths to exclude from indexing. Required if indexing_mode is Consistent or Lazy. +// +kubebuilder:validation:Optional +ExcludedPaths []*string `json:"excludedPaths,omitempty" tf:"excluded_paths,omitempty"` - // List of paths to include in the indexing. Required if indexing_mode is Consistent or Lazy. - // +kubebuilder:validation:Optional - IncludedPaths []*string `json:"includedPaths,omitempty" tf:"included_paths,omitempty"` +// List of paths to include in the indexing. Required if indexing_mode is Consistent or Lazy. +// +kubebuilder:validation:Optional +IncludedPaths []*string `json:"includedPaths,omitempty" tf:"included_paths,omitempty"` - // Indicates the indexing mode. Possible values include: Consistent, Lazy, None. - // +kubebuilder:validation:Optional - IndexingMode *string `json:"indexingMode" tf:"indexing_mode,omitempty"` +// Indicates the indexing mode. Possible values include: Consistent, Lazy, None. +// +kubebuilder:validation:Optional +IndexingMode *string `json:"indexingMode" tf:"indexing_mode,omitempty"` - // One or more spatial_index blocks as defined below. - // +kubebuilder:validation:Optional - SpatialIndex []SpatialIndexParameters `json:"spatialIndex,omitempty" tf:"spatial_index,omitempty"` +// One or more spatial_index blocks as defined below. +// +kubebuilder:validation:Optional +SpatialIndex []SpatialIndexParameters `json:"spatialIndex,omitempty" tf:"spatial_index,omitempty"` } + type SpatialIndexInitParameters struct { - // Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path. - Path *string `json:"path,omitempty" tf:"path,omitempty"` + +// Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path. +Path *string `json:"path,omitempty" tf:"path,omitempty"` } + type SpatialIndexObservation struct { - // Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path. - Path *string `json:"path,omitempty" tf:"path,omitempty"` - Types []*string `json:"types,omitempty" tf:"types,omitempty"` +// Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path. +Path *string `json:"path,omitempty" tf:"path,omitempty"` + +Types []*string `json:"types,omitempty" tf:"types,omitempty"` } + type SpatialIndexParameters struct { - // Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path. - // +kubebuilder:validation:Optional - Path *string `json:"path" tf:"path,omitempty"` + +// Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path. +// +kubebuilder:validation:Optional +Path *string `json:"path" tf:"path,omitempty"` } + type UniqueKeyInitParameters struct { - // A list of paths to use for this unique key. Changing this forces a new resource to be created. - Paths []*string `json:"paths,omitempty" tf:"paths,omitempty"` + +// A list of paths to use for this unique key. Changing this forces a new resource to be created. +Paths []*string `json:"paths,omitempty" tf:"paths,omitempty"` } + type UniqueKeyObservation struct { - // A list of paths to use for this unique key. Changing this forces a new resource to be created. - Paths []*string `json:"paths,omitempty" tf:"paths,omitempty"` + +// A list of paths to use for this unique key. Changing this forces a new resource to be created. +Paths []*string `json:"paths,omitempty" tf:"paths,omitempty"` } + type UniqueKeyParameters struct { - // A list of paths to use for this unique key. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Paths []*string `json:"paths" tf:"paths,omitempty"` + +// A list of paths to use for this unique key. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Paths []*string `json:"paths" tf:"paths,omitempty"` } // GremlinGraphSpec defines the desired state of GremlinGraph type GremlinGraphSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider GremlinGraphParameters `json:"forProvider"` + ForProvider GremlinGraphParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -386,13 +437,13 @@ type GremlinGraphSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider GremlinGraphInitParameters `json:"initProvider,omitempty"` + InitProvider GremlinGraphInitParameters `json:"initProvider,omitempty"` } // GremlinGraphStatus defines the observed state of GremlinGraph. type GremlinGraphStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider GremlinGraphObservation `json:"atProvider,omitempty"` + AtProvider GremlinGraphObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -407,9 +458,9 @@ type GremlinGraphStatus struct { type GremlinGraph struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.partitionKeyPath) || (has(self.initProvider) && has(self.initProvider.partitionKeyPath))",message="spec.forProvider.partitionKeyPath is a required parameter" - Spec GremlinGraphSpec `json:"spec"` - Status GremlinGraphStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.partitionKeyPath) || (has(self.initProvider) && has(self.initProvider.partitionKeyPath))",message="spec.forProvider.partitionKeyPath is a required parameter" + Spec GremlinGraphSpec `json:"spec"` + Status GremlinGraphStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/cosmosdb/v1alpha1/zz_mongocollection_types.go b/apis/cosmosdb/v1alpha1/zz_mongocollection_types.go index 7b3b7ac..93da4a0 100755 --- a/apis/cosmosdb/v1alpha1/zz_mongocollection_types.go +++ b/apis/cosmosdb/v1alpha1/zz_mongocollection_types.go @@ -15,198 +15,225 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type MongoCollectionAutoscaleSettingsInitParameters struct { - // The maximum throughput of the MongoDB collection (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. - MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` + +// The maximum throughput of the MongoDB collection (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. +MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` } + type MongoCollectionAutoscaleSettingsObservation struct { - // The maximum throughput of the MongoDB collection (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. - MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` + +// The maximum throughput of the MongoDB collection (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. +MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` } + type MongoCollectionAutoscaleSettingsParameters struct { - // The maximum throughput of the MongoDB collection (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. - // +kubebuilder:validation:Optional - MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` + +// The maximum throughput of the MongoDB collection (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. +// +kubebuilder:validation:Optional +MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` } + type MongoCollectionIndexInitParameters struct { - // Specifies the list of user settable keys for each Cosmos DB Mongo Collection. - Keys []*string `json:"keys,omitempty" tf:"keys,omitempty"` - // Is the index unique or not? Defaults to false. - Unique *bool `json:"unique,omitempty" tf:"unique,omitempty"` +// Specifies the list of user settable keys for each Cosmos DB Mongo Collection. +Keys []*string `json:"keys,omitempty" tf:"keys,omitempty"` + +// Is the index unique or not? Defaults to false. +Unique *bool `json:"unique,omitempty" tf:"unique,omitempty"` } + type MongoCollectionIndexObservation struct { - // Specifies the list of user settable keys for each Cosmos DB Mongo Collection. - Keys []*string `json:"keys,omitempty" tf:"keys,omitempty"` - // Is the index unique or not? Defaults to false. - Unique *bool `json:"unique,omitempty" tf:"unique,omitempty"` +// Specifies the list of user settable keys for each Cosmos DB Mongo Collection. +Keys []*string `json:"keys,omitempty" tf:"keys,omitempty"` + +// Is the index unique or not? Defaults to false. +Unique *bool `json:"unique,omitempty" tf:"unique,omitempty"` } + type MongoCollectionIndexParameters struct { - // Specifies the list of user settable keys for each Cosmos DB Mongo Collection. - // +kubebuilder:validation:Optional - Keys []*string `json:"keys" tf:"keys,omitempty"` - // Is the index unique or not? Defaults to false. - // +kubebuilder:validation:Optional - Unique *bool `json:"unique,omitempty" tf:"unique,omitempty"` +// Specifies the list of user settable keys for each Cosmos DB Mongo Collection. +// +kubebuilder:validation:Optional +Keys []*string `json:"keys" tf:"keys,omitempty"` + +// Is the index unique or not? Defaults to false. +// +kubebuilder:validation:Optional +Unique *bool `json:"unique,omitempty" tf:"unique,omitempty"` } + type MongoCollectionInitParameters struct { - // The default time to live of Analytical Storage for this Mongo Collection. If present and the value is set to -1, it is equal to infinity, and items don’t expire by default. If present and the value is set to some number n – items will expire n seconds after their last modified time. - AnalyticalStorageTTL *float64 `json:"analyticalStorageTtl,omitempty" tf:"analytical_storage_ttl,omitempty"` - // An autoscale_settings block as defined below. - AutoscaleSettings []MongoCollectionAutoscaleSettingsInitParameters `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` +// The default time to live of Analytical Storage for this Mongo Collection. If present and the value is set to -1, it is equal to infinity, and items don’t expire by default. If present and the value is set to some number n – items will expire n seconds after their last modified time. +AnalyticalStorageTTL *float64 `json:"analyticalStorageTtl,omitempty" tf:"analytical_storage_ttl,omitempty"` - // The default Time To Live in seconds. If the value is -1, items are not automatically expired. - DefaultTTLSeconds *float64 `json:"defaultTtlSeconds,omitempty" tf:"default_ttl_seconds,omitempty"` +// An autoscale_settings block as defined below. +AutoscaleSettings []MongoCollectionAutoscaleSettingsInitParameters `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` - // One or more index blocks as defined below. - Index []MongoCollectionIndexInitParameters `json:"index,omitempty" tf:"index,omitempty"` +// The default Time To Live in seconds. If the value is -1, items are not automatically expired. +DefaultTTLSeconds *float64 `json:"defaultTtlSeconds,omitempty" tf:"default_ttl_seconds,omitempty"` - // The name of the key to partition on for sharding. There must not be any other unique index keys. Changing this forces a new resource to be created. - ShardKey *string `json:"shardKey,omitempty" tf:"shard_key,omitempty"` +// One or more index blocks as defined below. +Index []MongoCollectionIndexInitParameters `json:"index,omitempty" tf:"index,omitempty"` - // The throughput of the MongoDB collection (RU/s). Must be set in increments of 100. The minimum value is 400. - Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` +// The name of the key to partition on for sharding. There must not be any other unique index keys. Changing this forces a new resource to be created. +ShardKey *string `json:"shardKey,omitempty" tf:"shard_key,omitempty"` + +// The throughput of the MongoDB collection (RU/s). Must be set in increments of 100. The minimum value is 400. +Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` } + type MongoCollectionObservation struct { - // The name of the Cosmos DB Account in which the Cosmos DB Mongo Collection is created. Changing this forces a new resource to be created. - AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` - // The default time to live of Analytical Storage for this Mongo Collection. If present and the value is set to -1, it is equal to infinity, and items don’t expire by default. If present and the value is set to some number n – items will expire n seconds after their last modified time. - AnalyticalStorageTTL *float64 `json:"analyticalStorageTtl,omitempty" tf:"analytical_storage_ttl,omitempty"` +// The name of the Cosmos DB Account in which the Cosmos DB Mongo Collection is created. Changing this forces a new resource to be created. +AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` - // An autoscale_settings block as defined below. - AutoscaleSettings []MongoCollectionAutoscaleSettingsObservation `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` +// The default time to live of Analytical Storage for this Mongo Collection. If present and the value is set to -1, it is equal to infinity, and items don’t expire by default. If present and the value is set to some number n – items will expire n seconds after their last modified time. +AnalyticalStorageTTL *float64 `json:"analyticalStorageTtl,omitempty" tf:"analytical_storage_ttl,omitempty"` - // The name of the Cosmos DB Mongo Database in which the Cosmos DB Mongo Collection is created. Changing this forces a new resource to be created. - DatabaseName *string `json:"databaseName,omitempty" tf:"database_name,omitempty"` +// An autoscale_settings block as defined below. +AutoscaleSettings []MongoCollectionAutoscaleSettingsObservation `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` - // The default Time To Live in seconds. If the value is -1, items are not automatically expired. - DefaultTTLSeconds *float64 `json:"defaultTtlSeconds,omitempty" tf:"default_ttl_seconds,omitempty"` +// The name of the Cosmos DB Mongo Database in which the Cosmos DB Mongo Collection is created. Changing this forces a new resource to be created. +DatabaseName *string `json:"databaseName,omitempty" tf:"database_name,omitempty"` - // The ID of the Cosmos DB Mongo Collection. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// The default Time To Live in seconds. If the value is -1, items are not automatically expired. +DefaultTTLSeconds *float64 `json:"defaultTtlSeconds,omitempty" tf:"default_ttl_seconds,omitempty"` - // One or more index blocks as defined below. - Index []MongoCollectionIndexObservation `json:"index,omitempty" tf:"index,omitempty"` +// The ID of the Cosmos DB Mongo Collection. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The name of the resource group in which the Cosmos DB Mongo Collection is created. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// One or more index blocks as defined below. +Index []MongoCollectionIndexObservation `json:"index,omitempty" tf:"index,omitempty"` - // The name of the key to partition on for sharding. There must not be any other unique index keys. Changing this forces a new resource to be created. - ShardKey *string `json:"shardKey,omitempty" tf:"shard_key,omitempty"` +// The name of the resource group in which the Cosmos DB Mongo Collection is created. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // One or more system_indexes blocks as defined below. - SystemIndexes []SystemIndexesObservation `json:"systemIndexes,omitempty" tf:"system_indexes,omitempty"` +// The name of the key to partition on for sharding. There must not be any other unique index keys. Changing this forces a new resource to be created. +ShardKey *string `json:"shardKey,omitempty" tf:"shard_key,omitempty"` - // The throughput of the MongoDB collection (RU/s). Must be set in increments of 100. The minimum value is 400. - Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` +// One or more system_indexes blocks as defined below. +SystemIndexes []SystemIndexesObservation `json:"systemIndexes,omitempty" tf:"system_indexes,omitempty"` + +// The throughput of the MongoDB collection (RU/s). Must be set in increments of 100. The minimum value is 400. +Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` } + type MongoCollectionParameters struct { - // The name of the Cosmos DB Account in which the Cosmos DB Mongo Collection is created. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=Account - // +kubebuilder:validation:Optional - AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` - // Reference to a Account to populate accountName. - // +kubebuilder:validation:Optional - AccountNameRef *v1.Reference `json:"accountNameRef,omitempty" tf:"-"` +// The name of the Cosmos DB Account in which the Cosmos DB Mongo Collection is created. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=Account +// +kubebuilder:validation:Optional +AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` + +// Reference to a Account to populate accountName. +// +kubebuilder:validation:Optional +AccountNameRef *v1.Reference `json:"accountNameRef,omitempty" tf:"-"` - // Selector for a Account to populate accountName. - // +kubebuilder:validation:Optional - AccountNameSelector *v1.Selector `json:"accountNameSelector,omitempty" tf:"-"` +// Selector for a Account to populate accountName. +// +kubebuilder:validation:Optional +AccountNameSelector *v1.Selector `json:"accountNameSelector,omitempty" tf:"-"` - // The default time to live of Analytical Storage for this Mongo Collection. If present and the value is set to -1, it is equal to infinity, and items don’t expire by default. If present and the value is set to some number n – items will expire n seconds after their last modified time. - // +kubebuilder:validation:Optional - AnalyticalStorageTTL *float64 `json:"analyticalStorageTtl,omitempty" tf:"analytical_storage_ttl,omitempty"` +// The default time to live of Analytical Storage for this Mongo Collection. If present and the value is set to -1, it is equal to infinity, and items don’t expire by default. If present and the value is set to some number n – items will expire n seconds after their last modified time. +// +kubebuilder:validation:Optional +AnalyticalStorageTTL *float64 `json:"analyticalStorageTtl,omitempty" tf:"analytical_storage_ttl,omitempty"` - // An autoscale_settings block as defined below. - // +kubebuilder:validation:Optional - AutoscaleSettings []MongoCollectionAutoscaleSettingsParameters `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` +// An autoscale_settings block as defined below. +// +kubebuilder:validation:Optional +AutoscaleSettings []MongoCollectionAutoscaleSettingsParameters `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` - // The name of the Cosmos DB Mongo Database in which the Cosmos DB Mongo Collection is created. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=MongoDatabase - // +kubebuilder:validation:Optional - DatabaseName *string `json:"databaseName,omitempty" tf:"database_name,omitempty"` +// The name of the Cosmos DB Mongo Database in which the Cosmos DB Mongo Collection is created. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=MongoDatabase +// +kubebuilder:validation:Optional +DatabaseName *string `json:"databaseName,omitempty" tf:"database_name,omitempty"` - // Reference to a MongoDatabase to populate databaseName. - // +kubebuilder:validation:Optional - DatabaseNameRef *v1.Reference `json:"databaseNameRef,omitempty" tf:"-"` +// Reference to a MongoDatabase to populate databaseName. +// +kubebuilder:validation:Optional +DatabaseNameRef *v1.Reference `json:"databaseNameRef,omitempty" tf:"-"` - // Selector for a MongoDatabase to populate databaseName. - // +kubebuilder:validation:Optional - DatabaseNameSelector *v1.Selector `json:"databaseNameSelector,omitempty" tf:"-"` +// Selector for a MongoDatabase to populate databaseName. +// +kubebuilder:validation:Optional +DatabaseNameSelector *v1.Selector `json:"databaseNameSelector,omitempty" tf:"-"` - // The default Time To Live in seconds. If the value is -1, items are not automatically expired. - // +kubebuilder:validation:Optional - DefaultTTLSeconds *float64 `json:"defaultTtlSeconds,omitempty" tf:"default_ttl_seconds,omitempty"` +// The default Time To Live in seconds. If the value is -1, items are not automatically expired. +// +kubebuilder:validation:Optional +DefaultTTLSeconds *float64 `json:"defaultTtlSeconds,omitempty" tf:"default_ttl_seconds,omitempty"` - // One or more index blocks as defined below. - // +kubebuilder:validation:Optional - Index []MongoCollectionIndexParameters `json:"index,omitempty" tf:"index,omitempty"` +// One or more index blocks as defined below. +// +kubebuilder:validation:Optional +Index []MongoCollectionIndexParameters `json:"index,omitempty" tf:"index,omitempty"` - // The name of the resource group in which the Cosmos DB Mongo Collection is created. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group in which the Cosmos DB Mongo Collection is created. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - // The name of the key to partition on for sharding. There must not be any other unique index keys. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - ShardKey *string `json:"shardKey,omitempty" tf:"shard_key,omitempty"` +// The name of the key to partition on for sharding. There must not be any other unique index keys. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +ShardKey *string `json:"shardKey,omitempty" tf:"shard_key,omitempty"` - // The throughput of the MongoDB collection (RU/s). Must be set in increments of 100. The minimum value is 400. - // +kubebuilder:validation:Optional - Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` +// The throughput of the MongoDB collection (RU/s). Must be set in increments of 100. The minimum value is 400. +// +kubebuilder:validation:Optional +Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` } + type SystemIndexesInitParameters struct { + } + type SystemIndexesObservation struct { - // The list of system keys which are not settable for each Cosmos DB Mongo Collection. - Keys []*string `json:"keys,omitempty" tf:"keys,omitempty"` - // Identifies whether the table contains no duplicate values. - Unique *bool `json:"unique,omitempty" tf:"unique,omitempty"` +// The list of system keys which are not settable for each Cosmos DB Mongo Collection. +Keys []*string `json:"keys,omitempty" tf:"keys,omitempty"` + +// Identifies whether the table contains no duplicate values. +Unique *bool `json:"unique,omitempty" tf:"unique,omitempty"` } + type SystemIndexesParameters struct { + } // MongoCollectionSpec defines the desired state of MongoCollection type MongoCollectionSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider MongoCollectionParameters `json:"forProvider"` + ForProvider MongoCollectionParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -217,13 +244,13 @@ type MongoCollectionSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider MongoCollectionInitParameters `json:"initProvider,omitempty"` + InitProvider MongoCollectionInitParameters `json:"initProvider,omitempty"` } // MongoCollectionStatus defines the observed state of MongoCollection. type MongoCollectionStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider MongoCollectionObservation `json:"atProvider,omitempty"` + AtProvider MongoCollectionObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/cosmosdb/v1alpha1/zz_mongodatabase_types.go b/apis/cosmosdb/v1alpha1/zz_mongodatabase_types.go index 745296a..1391aaf 100755 --- a/apis/cosmosdb/v1alpha1/zz_mongodatabase_types.go +++ b/apis/cosmosdb/v1alpha1/zz_mongodatabase_types.go @@ -15,95 +15,110 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type MongoDatabaseAutoscaleSettingsInitParameters struct { - // The maximum throughput of the MongoDB database (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. - MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` + +// The maximum throughput of the MongoDB database (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. +MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` } + type MongoDatabaseAutoscaleSettingsObservation struct { - // The maximum throughput of the MongoDB database (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. - MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` + +// The maximum throughput of the MongoDB database (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. +MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` } + type MongoDatabaseAutoscaleSettingsParameters struct { - // The maximum throughput of the MongoDB database (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. - // +kubebuilder:validation:Optional - MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` + +// The maximum throughput of the MongoDB database (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. +// +kubebuilder:validation:Optional +MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` } + type MongoDatabaseInitParameters struct { - // An autoscale_settings block as defined below. - AutoscaleSettings []MongoDatabaseAutoscaleSettingsInitParameters `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` - // The throughput of the MongoDB database (RU/s). Must be set in increments of 100. The minimum value is 400. - Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` +// An autoscale_settings block as defined below. +AutoscaleSettings []MongoDatabaseAutoscaleSettingsInitParameters `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` + +// The throughput of the MongoDB database (RU/s). Must be set in increments of 100. The minimum value is 400. +Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` } + type MongoDatabaseObservation struct { - // The name of the Cosmos DB Mongo Database to create the table within. Changing this forces a new resource to be created. - AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` - // An autoscale_settings block as defined below. - AutoscaleSettings []MongoDatabaseAutoscaleSettingsObservation `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` +// The name of the Cosmos DB Mongo Database to create the table within. Changing this forces a new resource to be created. +AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` - // The ID of the Cosmos DB Mongo Database. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// An autoscale_settings block as defined below. +AutoscaleSettings []MongoDatabaseAutoscaleSettingsObservation `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` - // The name of the resource group in which the Cosmos DB Mongo Database is created. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The ID of the Cosmos DB Mongo Database. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The throughput of the MongoDB database (RU/s). Must be set in increments of 100. The minimum value is 400. - Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` +// The name of the resource group in which the Cosmos DB Mongo Database is created. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` + +// The throughput of the MongoDB database (RU/s). Must be set in increments of 100. The minimum value is 400. +Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` } + type MongoDatabaseParameters struct { - // The name of the Cosmos DB Mongo Database to create the table within. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=Account - // +kubebuilder:validation:Optional - AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` - // Reference to a Account to populate accountName. - // +kubebuilder:validation:Optional - AccountNameRef *v1.Reference `json:"accountNameRef,omitempty" tf:"-"` +// The name of the Cosmos DB Mongo Database to create the table within. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=Account +// +kubebuilder:validation:Optional +AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` + +// Reference to a Account to populate accountName. +// +kubebuilder:validation:Optional +AccountNameRef *v1.Reference `json:"accountNameRef,omitempty" tf:"-"` - // Selector for a Account to populate accountName. - // +kubebuilder:validation:Optional - AccountNameSelector *v1.Selector `json:"accountNameSelector,omitempty" tf:"-"` +// Selector for a Account to populate accountName. +// +kubebuilder:validation:Optional +AccountNameSelector *v1.Selector `json:"accountNameSelector,omitempty" tf:"-"` - // An autoscale_settings block as defined below. - // +kubebuilder:validation:Optional - AutoscaleSettings []MongoDatabaseAutoscaleSettingsParameters `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` +// An autoscale_settings block as defined below. +// +kubebuilder:validation:Optional +AutoscaleSettings []MongoDatabaseAutoscaleSettingsParameters `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` - // The name of the resource group in which the Cosmos DB Mongo Database is created. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group in which the Cosmos DB Mongo Database is created. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - // The throughput of the MongoDB database (RU/s). Must be set in increments of 100. The minimum value is 400. - // +kubebuilder:validation:Optional - Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` +// The throughput of the MongoDB database (RU/s). Must be set in increments of 100. The minimum value is 400. +// +kubebuilder:validation:Optional +Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` } // MongoDatabaseSpec defines the desired state of MongoDatabase type MongoDatabaseSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider MongoDatabaseParameters `json:"forProvider"` + ForProvider MongoDatabaseParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -114,13 +129,13 @@ type MongoDatabaseSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider MongoDatabaseInitParameters `json:"initProvider,omitempty"` + InitProvider MongoDatabaseInitParameters `json:"initProvider,omitempty"` } // MongoDatabaseStatus defines the observed state of MongoDatabase. type MongoDatabaseStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider MongoDatabaseObservation `json:"atProvider,omitempty"` + AtProvider MongoDatabaseObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/cosmosdb/v1alpha1/zz_sqlcontainer_types.go b/apis/cosmosdb/v1alpha1/zz_sqlcontainer_types.go index 92a3390..ddd5d04 100755 --- a/apis/cosmosdb/v1alpha1/zz_sqlcontainer_types.go +++ b/apis/cosmosdb/v1alpha1/zz_sqlcontainer_types.go @@ -15,406 +15,469 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type CompositeIndexIndexInitParameters struct { - // Order of the index. Possible values are Ascending or Descending. - Order *string `json:"order,omitempty" tf:"order,omitempty"` - // Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path. - Path *string `json:"path,omitempty" tf:"path,omitempty"` +// Order of the index. Possible values are Ascending or Descending. +Order *string `json:"order,omitempty" tf:"order,omitempty"` + +// Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path. +Path *string `json:"path,omitempty" tf:"path,omitempty"` } + type CompositeIndexIndexObservation struct { - // Order of the index. Possible values are Ascending or Descending. - Order *string `json:"order,omitempty" tf:"order,omitempty"` - // Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path. - Path *string `json:"path,omitempty" tf:"path,omitempty"` +// Order of the index. Possible values are Ascending or Descending. +Order *string `json:"order,omitempty" tf:"order,omitempty"` + +// Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path. +Path *string `json:"path,omitempty" tf:"path,omitempty"` } + type CompositeIndexIndexParameters struct { - // Order of the index. Possible values are Ascending or Descending. - // +kubebuilder:validation:Optional - Order *string `json:"order" tf:"order,omitempty"` - // Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path. - // +kubebuilder:validation:Optional - Path *string `json:"path" tf:"path,omitempty"` +// Order of the index. Possible values are Ascending or Descending. +// +kubebuilder:validation:Optional +Order *string `json:"order" tf:"order,omitempty"` + +// Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path. +// +kubebuilder:validation:Optional +Path *string `json:"path" tf:"path,omitempty"` } + type ExcludedPathInitParameters struct { - // Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path. - Path *string `json:"path,omitempty" tf:"path,omitempty"` + +// Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path. +Path *string `json:"path,omitempty" tf:"path,omitempty"` } + type ExcludedPathObservation struct { - // Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path. - Path *string `json:"path,omitempty" tf:"path,omitempty"` + +// Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path. +Path *string `json:"path,omitempty" tf:"path,omitempty"` } + type ExcludedPathParameters struct { - // Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path. - // +kubebuilder:validation:Optional - Path *string `json:"path" tf:"path,omitempty"` + +// Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path. +// +kubebuilder:validation:Optional +Path *string `json:"path" tf:"path,omitempty"` } + type IncludedPathInitParameters struct { - // Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path. - Path *string `json:"path,omitempty" tf:"path,omitempty"` + +// Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path. +Path *string `json:"path,omitempty" tf:"path,omitempty"` } + type IncludedPathObservation struct { - // Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path. - Path *string `json:"path,omitempty" tf:"path,omitempty"` + +// Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path. +Path *string `json:"path,omitempty" tf:"path,omitempty"` } + type IncludedPathParameters struct { - // Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path. - // +kubebuilder:validation:Optional - Path *string `json:"path" tf:"path,omitempty"` + +// Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path. +// +kubebuilder:validation:Optional +Path *string `json:"path" tf:"path,omitempty"` } + type IndexingPolicyCompositeIndexInitParameters struct { - // One or more index blocks as defined below. - Index []CompositeIndexIndexInitParameters `json:"index,omitempty" tf:"index,omitempty"` + +// One or more index blocks as defined below. +Index []CompositeIndexIndexInitParameters `json:"index,omitempty" tf:"index,omitempty"` } + type IndexingPolicyCompositeIndexObservation struct { - // One or more index blocks as defined below. - Index []CompositeIndexIndexObservation `json:"index,omitempty" tf:"index,omitempty"` + +// One or more index blocks as defined below. +Index []CompositeIndexIndexObservation `json:"index,omitempty" tf:"index,omitempty"` } + type IndexingPolicyCompositeIndexParameters struct { - // One or more index blocks as defined below. - // +kubebuilder:validation:Optional - Index []CompositeIndexIndexParameters `json:"index" tf:"index,omitempty"` + +// One or more index blocks as defined below. +// +kubebuilder:validation:Optional +Index []CompositeIndexIndexParameters `json:"index" tf:"index,omitempty"` } + type IndexingPolicyInitParameters struct { - // One or more composite_index blocks as defined below. - CompositeIndex []IndexingPolicyCompositeIndexInitParameters `json:"compositeIndex,omitempty" tf:"composite_index,omitempty"` - // One or more excluded_path blocks as defined below. Either included_path or excluded_path must contain the path /* - ExcludedPath []ExcludedPathInitParameters `json:"excludedPath,omitempty" tf:"excluded_path,omitempty"` +// One or more composite_index blocks as defined below. +CompositeIndex []IndexingPolicyCompositeIndexInitParameters `json:"compositeIndex,omitempty" tf:"composite_index,omitempty"` - // One or more included_path blocks as defined below. Either included_path or excluded_path must contain the path /* - IncludedPath []IncludedPathInitParameters `json:"includedPath,omitempty" tf:"included_path,omitempty"` +// One or more excluded_path blocks as defined below. Either included_path or excluded_path must contain the path /* +ExcludedPath []ExcludedPathInitParameters `json:"excludedPath,omitempty" tf:"excluded_path,omitempty"` - // Indicates the indexing mode. Possible values include: consistent and none. Defaults to consistent. - IndexingMode *string `json:"indexingMode,omitempty" tf:"indexing_mode,omitempty"` +// One or more included_path blocks as defined below. Either included_path or excluded_path must contain the path /* +IncludedPath []IncludedPathInitParameters `json:"includedPath,omitempty" tf:"included_path,omitempty"` - // One or more spatial_index blocks as defined below. - SpatialIndex []IndexingPolicySpatialIndexInitParameters `json:"spatialIndex,omitempty" tf:"spatial_index,omitempty"` +// Indicates the indexing mode. Possible values include: consistent and none. Defaults to consistent. +IndexingMode *string `json:"indexingMode,omitempty" tf:"indexing_mode,omitempty"` + +// One or more spatial_index blocks as defined below. +SpatialIndex []IndexingPolicySpatialIndexInitParameters `json:"spatialIndex,omitempty" tf:"spatial_index,omitempty"` } + type IndexingPolicyObservation struct { - // One or more composite_index blocks as defined below. - CompositeIndex []IndexingPolicyCompositeIndexObservation `json:"compositeIndex,omitempty" tf:"composite_index,omitempty"` - // One or more excluded_path blocks as defined below. Either included_path or excluded_path must contain the path /* - ExcludedPath []ExcludedPathObservation `json:"excludedPath,omitempty" tf:"excluded_path,omitempty"` +// One or more composite_index blocks as defined below. +CompositeIndex []IndexingPolicyCompositeIndexObservation `json:"compositeIndex,omitempty" tf:"composite_index,omitempty"` - // One or more included_path blocks as defined below. Either included_path or excluded_path must contain the path /* - IncludedPath []IncludedPathObservation `json:"includedPath,omitempty" tf:"included_path,omitempty"` +// One or more excluded_path blocks as defined below. Either included_path or excluded_path must contain the path /* +ExcludedPath []ExcludedPathObservation `json:"excludedPath,omitempty" tf:"excluded_path,omitempty"` - // Indicates the indexing mode. Possible values include: consistent and none. Defaults to consistent. - IndexingMode *string `json:"indexingMode,omitempty" tf:"indexing_mode,omitempty"` +// One or more included_path blocks as defined below. Either included_path or excluded_path must contain the path /* +IncludedPath []IncludedPathObservation `json:"includedPath,omitempty" tf:"included_path,omitempty"` - // One or more spatial_index blocks as defined below. - SpatialIndex []IndexingPolicySpatialIndexObservation `json:"spatialIndex,omitempty" tf:"spatial_index,omitempty"` +// Indicates the indexing mode. Possible values include: consistent and none. Defaults to consistent. +IndexingMode *string `json:"indexingMode,omitempty" tf:"indexing_mode,omitempty"` + +// One or more spatial_index blocks as defined below. +SpatialIndex []IndexingPolicySpatialIndexObservation `json:"spatialIndex,omitempty" tf:"spatial_index,omitempty"` } + type IndexingPolicyParameters struct { - // One or more composite_index blocks as defined below. - // +kubebuilder:validation:Optional - CompositeIndex []IndexingPolicyCompositeIndexParameters `json:"compositeIndex,omitempty" tf:"composite_index,omitempty"` - // One or more excluded_path blocks as defined below. Either included_path or excluded_path must contain the path /* - // +kubebuilder:validation:Optional - ExcludedPath []ExcludedPathParameters `json:"excludedPath,omitempty" tf:"excluded_path,omitempty"` +// One or more composite_index blocks as defined below. +// +kubebuilder:validation:Optional +CompositeIndex []IndexingPolicyCompositeIndexParameters `json:"compositeIndex,omitempty" tf:"composite_index,omitempty"` - // One or more included_path blocks as defined below. Either included_path or excluded_path must contain the path /* - // +kubebuilder:validation:Optional - IncludedPath []IncludedPathParameters `json:"includedPath,omitempty" tf:"included_path,omitempty"` +// One or more excluded_path blocks as defined below. Either included_path or excluded_path must contain the path /* +// +kubebuilder:validation:Optional +ExcludedPath []ExcludedPathParameters `json:"excludedPath,omitempty" tf:"excluded_path,omitempty"` - // Indicates the indexing mode. Possible values include: consistent and none. Defaults to consistent. - // +kubebuilder:validation:Optional - IndexingMode *string `json:"indexingMode,omitempty" tf:"indexing_mode,omitempty"` +// One or more included_path blocks as defined below. Either included_path or excluded_path must contain the path /* +// +kubebuilder:validation:Optional +IncludedPath []IncludedPathParameters `json:"includedPath,omitempty" tf:"included_path,omitempty"` - // One or more spatial_index blocks as defined below. - // +kubebuilder:validation:Optional - SpatialIndex []IndexingPolicySpatialIndexParameters `json:"spatialIndex,omitempty" tf:"spatial_index,omitempty"` +// Indicates the indexing mode. Possible values include: consistent and none. Defaults to consistent. +// +kubebuilder:validation:Optional +IndexingMode *string `json:"indexingMode,omitempty" tf:"indexing_mode,omitempty"` + +// One or more spatial_index blocks as defined below. +// +kubebuilder:validation:Optional +SpatialIndex []IndexingPolicySpatialIndexParameters `json:"spatialIndex,omitempty" tf:"spatial_index,omitempty"` } + type IndexingPolicySpatialIndexInitParameters struct { - // Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path. - Path *string `json:"path,omitempty" tf:"path,omitempty"` + +// Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path. +Path *string `json:"path,omitempty" tf:"path,omitempty"` } + type IndexingPolicySpatialIndexObservation struct { - // Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path. - Path *string `json:"path,omitempty" tf:"path,omitempty"` - // A set of spatial types of the path. - Types []*string `json:"types,omitempty" tf:"types,omitempty"` +// Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path. +Path *string `json:"path,omitempty" tf:"path,omitempty"` + +// A set of spatial types of the path. +Types []*string `json:"types,omitempty" tf:"types,omitempty"` } + type IndexingPolicySpatialIndexParameters struct { - // Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path. - // +kubebuilder:validation:Optional - Path *string `json:"path" tf:"path,omitempty"` + +// Path for which the indexing behaviour applies to. According to the service design, all spatial types including LineString, MultiPolygon, Point, and Polygon will be applied to the path. +// +kubebuilder:validation:Optional +Path *string `json:"path" tf:"path,omitempty"` } + type SQLContainerAutoscaleSettingsInitParameters struct { - // The maximum throughput of the SQL container (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. - MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` + +// The maximum throughput of the SQL container (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. +MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` } + type SQLContainerAutoscaleSettingsObservation struct { - // The maximum throughput of the SQL container (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. - MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` + +// The maximum throughput of the SQL container (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. +MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` } + type SQLContainerAutoscaleSettingsParameters struct { - // The maximum throughput of the SQL container (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. - // +kubebuilder:validation:Optional - MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` + +// The maximum throughput of the SQL container (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. +// +kubebuilder:validation:Optional +MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` } + type SQLContainerConflictResolutionPolicyInitParameters struct { - // The conflict resolution path in the case of LastWriterWins mode. - ConflictResolutionPath *string `json:"conflictResolutionPath,omitempty" tf:"conflict_resolution_path,omitempty"` - // The procedure to resolve conflicts in the case of Custom mode. - ConflictResolutionProcedure *string `json:"conflictResolutionProcedure,omitempty" tf:"conflict_resolution_procedure,omitempty"` +// The conflict resolution path in the case of LastWriterWins mode. +ConflictResolutionPath *string `json:"conflictResolutionPath,omitempty" tf:"conflict_resolution_path,omitempty"` - // Indicates the conflict resolution mode. Possible values include: LastWriterWins, Custom. - Mode *string `json:"mode,omitempty" tf:"mode,omitempty"` +// The procedure to resolve conflicts in the case of Custom mode. +ConflictResolutionProcedure *string `json:"conflictResolutionProcedure,omitempty" tf:"conflict_resolution_procedure,omitempty"` + +// Indicates the conflict resolution mode. Possible values include: LastWriterWins, Custom. +Mode *string `json:"mode,omitempty" tf:"mode,omitempty"` } + type SQLContainerConflictResolutionPolicyObservation struct { - // The conflict resolution path in the case of LastWriterWins mode. - ConflictResolutionPath *string `json:"conflictResolutionPath,omitempty" tf:"conflict_resolution_path,omitempty"` - // The procedure to resolve conflicts in the case of Custom mode. - ConflictResolutionProcedure *string `json:"conflictResolutionProcedure,omitempty" tf:"conflict_resolution_procedure,omitempty"` +// The conflict resolution path in the case of LastWriterWins mode. +ConflictResolutionPath *string `json:"conflictResolutionPath,omitempty" tf:"conflict_resolution_path,omitempty"` - // Indicates the conflict resolution mode. Possible values include: LastWriterWins, Custom. - Mode *string `json:"mode,omitempty" tf:"mode,omitempty"` +// The procedure to resolve conflicts in the case of Custom mode. +ConflictResolutionProcedure *string `json:"conflictResolutionProcedure,omitempty" tf:"conflict_resolution_procedure,omitempty"` + +// Indicates the conflict resolution mode. Possible values include: LastWriterWins, Custom. +Mode *string `json:"mode,omitempty" tf:"mode,omitempty"` } + type SQLContainerConflictResolutionPolicyParameters struct { - // The conflict resolution path in the case of LastWriterWins mode. - // +kubebuilder:validation:Optional - ConflictResolutionPath *string `json:"conflictResolutionPath,omitempty" tf:"conflict_resolution_path,omitempty"` - // The procedure to resolve conflicts in the case of Custom mode. - // +kubebuilder:validation:Optional - ConflictResolutionProcedure *string `json:"conflictResolutionProcedure,omitempty" tf:"conflict_resolution_procedure,omitempty"` +// The conflict resolution path in the case of LastWriterWins mode. +// +kubebuilder:validation:Optional +ConflictResolutionPath *string `json:"conflictResolutionPath,omitempty" tf:"conflict_resolution_path,omitempty"` - // Indicates the conflict resolution mode. Possible values include: LastWriterWins, Custom. - // +kubebuilder:validation:Optional - Mode *string `json:"mode" tf:"mode,omitempty"` +// The procedure to resolve conflicts in the case of Custom mode. +// +kubebuilder:validation:Optional +ConflictResolutionProcedure *string `json:"conflictResolutionProcedure,omitempty" tf:"conflict_resolution_procedure,omitempty"` + +// Indicates the conflict resolution mode. Possible values include: LastWriterWins, Custom. +// +kubebuilder:validation:Optional +Mode *string `json:"mode" tf:"mode,omitempty"` } + type SQLContainerInitParameters struct { - // The default time to live of Analytical Storage for this SQL container. If present and the value is set to -1, it is equal to infinity, and items don’t expire by default. If present and the value is set to some number n – items will expire n seconds after their last modified time. - AnalyticalStorageTTL *float64 `json:"analyticalStorageTtl,omitempty" tf:"analytical_storage_ttl,omitempty"` - // An autoscale_settings block as defined below. Requires partition_key_path to be set. - AutoscaleSettings []SQLContainerAutoscaleSettingsInitParameters `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` +// The default time to live of Analytical Storage for this SQL container. If present and the value is set to -1, it is equal to infinity, and items don’t expire by default. If present and the value is set to some number n – items will expire n seconds after their last modified time. +AnalyticalStorageTTL *float64 `json:"analyticalStorageTtl,omitempty" tf:"analytical_storage_ttl,omitempty"` - // A conflict_resolution_policy blocks as defined below. Changing this forces a new resource to be created. - ConflictResolutionPolicy []SQLContainerConflictResolutionPolicyInitParameters `json:"conflictResolutionPolicy,omitempty" tf:"conflict_resolution_policy,omitempty"` +// An autoscale_settings block as defined below. Requires partition_key_path to be set. +AutoscaleSettings []SQLContainerAutoscaleSettingsInitParameters `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` - // The default time to live of SQL container. If missing, items are not expired automatically. If present and the value is set to -1, it is equal to infinity, and items don’t expire by default. If present and the value is set to some number n – items will expire n seconds after their last modified time. - DefaultTTL *float64 `json:"defaultTtl,omitempty" tf:"default_ttl,omitempty"` +// A conflict_resolution_policy blocks as defined below. Changing this forces a new resource to be created. +ConflictResolutionPolicy []SQLContainerConflictResolutionPolicyInitParameters `json:"conflictResolutionPolicy,omitempty" tf:"conflict_resolution_policy,omitempty"` - // An indexing_policy block as defined below. - IndexingPolicy []IndexingPolicyInitParameters `json:"indexingPolicy,omitempty" tf:"indexing_policy,omitempty"` +// The default time to live of SQL container. If missing, items are not expired automatically. If present and the value is set to -1, it is equal to infinity, and items don’t expire by default. If present and the value is set to some number n – items will expire n seconds after their last modified time. +DefaultTTL *float64 `json:"defaultTtl,omitempty" tf:"default_ttl,omitempty"` - // Define a partition key. Changing this forces a new resource to be created. - PartitionKeyPath *string `json:"partitionKeyPath,omitempty" tf:"partition_key_path,omitempty"` +// An indexing_policy block as defined below. +IndexingPolicy []IndexingPolicyInitParameters `json:"indexingPolicy,omitempty" tf:"indexing_policy,omitempty"` - // Define a partition key version. Changing this forces a new resource to be created. Possible values are 1and 2. This should be set to 2 in order to use large partition keys. - PartitionKeyVersion *float64 `json:"partitionKeyVersion,omitempty" tf:"partition_key_version,omitempty"` +// Define a partition key. Changing this forces a new resource to be created. +PartitionKeyPath *string `json:"partitionKeyPath,omitempty" tf:"partition_key_path,omitempty"` - // The throughput of SQL container (RU/s). Must be set in increments of 100. The minimum value is 400. - Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` +// Define a partition key version. Changing this forces a new resource to be created. Possible values are 1and 2. This should be set to 2 in order to use large partition keys. +PartitionKeyVersion *float64 `json:"partitionKeyVersion,omitempty" tf:"partition_key_version,omitempty"` - // One or more unique_key blocks as defined below. Changing this forces a new resource to be created. - UniqueKey []SQLContainerUniqueKeyInitParameters `json:"uniqueKey,omitempty" tf:"unique_key,omitempty"` +// The throughput of SQL container (RU/s). Must be set in increments of 100. The minimum value is 400. +Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` + +// One or more unique_key blocks as defined below. Changing this forces a new resource to be created. +UniqueKey []SQLContainerUniqueKeyInitParameters `json:"uniqueKey,omitempty" tf:"unique_key,omitempty"` } + type SQLContainerObservation struct { - // The name of the Cosmos DB Account to create the container within. Changing this forces a new resource to be created. - AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` - // The default time to live of Analytical Storage for this SQL container. If present and the value is set to -1, it is equal to infinity, and items don’t expire by default. If present and the value is set to some number n – items will expire n seconds after their last modified time. - AnalyticalStorageTTL *float64 `json:"analyticalStorageTtl,omitempty" tf:"analytical_storage_ttl,omitempty"` +// The name of the Cosmos DB Account to create the container within. Changing this forces a new resource to be created. +AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` - // An autoscale_settings block as defined below. Requires partition_key_path to be set. - AutoscaleSettings []SQLContainerAutoscaleSettingsObservation `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` +// The default time to live of Analytical Storage for this SQL container. If present and the value is set to -1, it is equal to infinity, and items don’t expire by default. If present and the value is set to some number n – items will expire n seconds after their last modified time. +AnalyticalStorageTTL *float64 `json:"analyticalStorageTtl,omitempty" tf:"analytical_storage_ttl,omitempty"` - // A conflict_resolution_policy blocks as defined below. Changing this forces a new resource to be created. - ConflictResolutionPolicy []SQLContainerConflictResolutionPolicyObservation `json:"conflictResolutionPolicy,omitempty" tf:"conflict_resolution_policy,omitempty"` +// An autoscale_settings block as defined below. Requires partition_key_path to be set. +AutoscaleSettings []SQLContainerAutoscaleSettingsObservation `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` - // The name of the Cosmos DB SQL Database to create the container within. Changing this forces a new resource to be created. - DatabaseName *string `json:"databaseName,omitempty" tf:"database_name,omitempty"` +// A conflict_resolution_policy blocks as defined below. Changing this forces a new resource to be created. +ConflictResolutionPolicy []SQLContainerConflictResolutionPolicyObservation `json:"conflictResolutionPolicy,omitempty" tf:"conflict_resolution_policy,omitempty"` - // The default time to live of SQL container. If missing, items are not expired automatically. If present and the value is set to -1, it is equal to infinity, and items don’t expire by default. If present and the value is set to some number n – items will expire n seconds after their last modified time. - DefaultTTL *float64 `json:"defaultTtl,omitempty" tf:"default_ttl,omitempty"` +// The name of the Cosmos DB SQL Database to create the container within. Changing this forces a new resource to be created. +DatabaseName *string `json:"databaseName,omitempty" tf:"database_name,omitempty"` - // The ID of the CosmosDB SQL Container. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// The default time to live of SQL container. If missing, items are not expired automatically. If present and the value is set to -1, it is equal to infinity, and items don’t expire by default. If present and the value is set to some number n – items will expire n seconds after their last modified time. +DefaultTTL *float64 `json:"defaultTtl,omitempty" tf:"default_ttl,omitempty"` - // An indexing_policy block as defined below. - IndexingPolicy []IndexingPolicyObservation `json:"indexingPolicy,omitempty" tf:"indexing_policy,omitempty"` +// The ID of the CosmosDB SQL Container. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // Define a partition key. Changing this forces a new resource to be created. - PartitionKeyPath *string `json:"partitionKeyPath,omitempty" tf:"partition_key_path,omitempty"` +// An indexing_policy block as defined below. +IndexingPolicy []IndexingPolicyObservation `json:"indexingPolicy,omitempty" tf:"indexing_policy,omitempty"` - // Define a partition key version. Changing this forces a new resource to be created. Possible values are 1and 2. This should be set to 2 in order to use large partition keys. - PartitionKeyVersion *float64 `json:"partitionKeyVersion,omitempty" tf:"partition_key_version,omitempty"` +// Define a partition key. Changing this forces a new resource to be created. +PartitionKeyPath *string `json:"partitionKeyPath,omitempty" tf:"partition_key_path,omitempty"` - // The name of the resource group in which the Cosmos DB SQL Container is created. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// Define a partition key version. Changing this forces a new resource to be created. Possible values are 1and 2. This should be set to 2 in order to use large partition keys. +PartitionKeyVersion *float64 `json:"partitionKeyVersion,omitempty" tf:"partition_key_version,omitempty"` - // The throughput of SQL container (RU/s). Must be set in increments of 100. The minimum value is 400. - Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` +// The name of the resource group in which the Cosmos DB SQL Container is created. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // One or more unique_key blocks as defined below. Changing this forces a new resource to be created. - UniqueKey []SQLContainerUniqueKeyObservation `json:"uniqueKey,omitempty" tf:"unique_key,omitempty"` +// The throughput of SQL container (RU/s). Must be set in increments of 100. The minimum value is 400. +Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` + +// One or more unique_key blocks as defined below. Changing this forces a new resource to be created. +UniqueKey []SQLContainerUniqueKeyObservation `json:"uniqueKey,omitempty" tf:"unique_key,omitempty"` } + type SQLContainerParameters struct { - // The name of the Cosmos DB Account to create the container within. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=Account - // +kubebuilder:validation:Optional - AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` - // Reference to a Account to populate accountName. - // +kubebuilder:validation:Optional - AccountNameRef *v1.Reference `json:"accountNameRef,omitempty" tf:"-"` +// The name of the Cosmos DB Account to create the container within. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=Account +// +kubebuilder:validation:Optional +AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` - // Selector for a Account to populate accountName. - // +kubebuilder:validation:Optional - AccountNameSelector *v1.Selector `json:"accountNameSelector,omitempty" tf:"-"` +// Reference to a Account to populate accountName. +// +kubebuilder:validation:Optional +AccountNameRef *v1.Reference `json:"accountNameRef,omitempty" tf:"-"` - // The default time to live of Analytical Storage for this SQL container. If present and the value is set to -1, it is equal to infinity, and items don’t expire by default. If present and the value is set to some number n – items will expire n seconds after their last modified time. - // +kubebuilder:validation:Optional - AnalyticalStorageTTL *float64 `json:"analyticalStorageTtl,omitempty" tf:"analytical_storage_ttl,omitempty"` +// Selector for a Account to populate accountName. +// +kubebuilder:validation:Optional +AccountNameSelector *v1.Selector `json:"accountNameSelector,omitempty" tf:"-"` - // An autoscale_settings block as defined below. Requires partition_key_path to be set. - // +kubebuilder:validation:Optional - AutoscaleSettings []SQLContainerAutoscaleSettingsParameters `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` +// The default time to live of Analytical Storage for this SQL container. If present and the value is set to -1, it is equal to infinity, and items don’t expire by default. If present and the value is set to some number n – items will expire n seconds after their last modified time. +// +kubebuilder:validation:Optional +AnalyticalStorageTTL *float64 `json:"analyticalStorageTtl,omitempty" tf:"analytical_storage_ttl,omitempty"` - // A conflict_resolution_policy blocks as defined below. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - ConflictResolutionPolicy []SQLContainerConflictResolutionPolicyParameters `json:"conflictResolutionPolicy,omitempty" tf:"conflict_resolution_policy,omitempty"` +// An autoscale_settings block as defined below. Requires partition_key_path to be set. +// +kubebuilder:validation:Optional +AutoscaleSettings []SQLContainerAutoscaleSettingsParameters `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` - // The name of the Cosmos DB SQL Database to create the container within. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=SQLDatabase - // +kubebuilder:validation:Optional - DatabaseName *string `json:"databaseName,omitempty" tf:"database_name,omitempty"` +// A conflict_resolution_policy blocks as defined below. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +ConflictResolutionPolicy []SQLContainerConflictResolutionPolicyParameters `json:"conflictResolutionPolicy,omitempty" tf:"conflict_resolution_policy,omitempty"` - // Reference to a SQLDatabase to populate databaseName. - // +kubebuilder:validation:Optional - DatabaseNameRef *v1.Reference `json:"databaseNameRef,omitempty" tf:"-"` +// The name of the Cosmos DB SQL Database to create the container within. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=SQLDatabase +// +kubebuilder:validation:Optional +DatabaseName *string `json:"databaseName,omitempty" tf:"database_name,omitempty"` - // Selector for a SQLDatabase to populate databaseName. - // +kubebuilder:validation:Optional - DatabaseNameSelector *v1.Selector `json:"databaseNameSelector,omitempty" tf:"-"` +// Reference to a SQLDatabase to populate databaseName. +// +kubebuilder:validation:Optional +DatabaseNameRef *v1.Reference `json:"databaseNameRef,omitempty" tf:"-"` - // The default time to live of SQL container. If missing, items are not expired automatically. If present and the value is set to -1, it is equal to infinity, and items don’t expire by default. If present and the value is set to some number n – items will expire n seconds after their last modified time. - // +kubebuilder:validation:Optional - DefaultTTL *float64 `json:"defaultTtl,omitempty" tf:"default_ttl,omitempty"` +// Selector for a SQLDatabase to populate databaseName. +// +kubebuilder:validation:Optional +DatabaseNameSelector *v1.Selector `json:"databaseNameSelector,omitempty" tf:"-"` - // An indexing_policy block as defined below. - // +kubebuilder:validation:Optional - IndexingPolicy []IndexingPolicyParameters `json:"indexingPolicy,omitempty" tf:"indexing_policy,omitempty"` +// The default time to live of SQL container. If missing, items are not expired automatically. If present and the value is set to -1, it is equal to infinity, and items don’t expire by default. If present and the value is set to some number n – items will expire n seconds after their last modified time. +// +kubebuilder:validation:Optional +DefaultTTL *float64 `json:"defaultTtl,omitempty" tf:"default_ttl,omitempty"` - // Define a partition key. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - PartitionKeyPath *string `json:"partitionKeyPath,omitempty" tf:"partition_key_path,omitempty"` +// An indexing_policy block as defined below. +// +kubebuilder:validation:Optional +IndexingPolicy []IndexingPolicyParameters `json:"indexingPolicy,omitempty" tf:"indexing_policy,omitempty"` - // Define a partition key version. Changing this forces a new resource to be created. Possible values are 1and 2. This should be set to 2 in order to use large partition keys. - // +kubebuilder:validation:Optional - PartitionKeyVersion *float64 `json:"partitionKeyVersion,omitempty" tf:"partition_key_version,omitempty"` +// Define a partition key. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +PartitionKeyPath *string `json:"partitionKeyPath,omitempty" tf:"partition_key_path,omitempty"` - // The name of the resource group in which the Cosmos DB SQL Container is created. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// Define a partition key version. Changing this forces a new resource to be created. Possible values are 1and 2. This should be set to 2 in order to use large partition keys. +// +kubebuilder:validation:Optional +PartitionKeyVersion *float64 `json:"partitionKeyVersion,omitempty" tf:"partition_key_version,omitempty"` - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` +// The name of the resource group in which the Cosmos DB SQL Container is created. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - // The throughput of SQL container (RU/s). Must be set in increments of 100. The minimum value is 400. - // +kubebuilder:validation:Optional - Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - // One or more unique_key blocks as defined below. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - UniqueKey []SQLContainerUniqueKeyParameters `json:"uniqueKey,omitempty" tf:"unique_key,omitempty"` +// The throughput of SQL container (RU/s). Must be set in increments of 100. The minimum value is 400. +// +kubebuilder:validation:Optional +Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` + +// One or more unique_key blocks as defined below. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +UniqueKey []SQLContainerUniqueKeyParameters `json:"uniqueKey,omitempty" tf:"unique_key,omitempty"` } + type SQLContainerUniqueKeyInitParameters struct { - // A list of paths to use for this unique key. Changing this forces a new resource to be created. - Paths []*string `json:"paths,omitempty" tf:"paths,omitempty"` + +// A list of paths to use for this unique key. Changing this forces a new resource to be created. +Paths []*string `json:"paths,omitempty" tf:"paths,omitempty"` } + type SQLContainerUniqueKeyObservation struct { - // A list of paths to use for this unique key. Changing this forces a new resource to be created. - Paths []*string `json:"paths,omitempty" tf:"paths,omitempty"` + +// A list of paths to use for this unique key. Changing this forces a new resource to be created. +Paths []*string `json:"paths,omitempty" tf:"paths,omitempty"` } + type SQLContainerUniqueKeyParameters struct { - // A list of paths to use for this unique key. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Paths []*string `json:"paths" tf:"paths,omitempty"` + +// A list of paths to use for this unique key. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Paths []*string `json:"paths" tf:"paths,omitempty"` } // SQLContainerSpec defines the desired state of SQLContainer type SQLContainerSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider SQLContainerParameters `json:"forProvider"` + ForProvider SQLContainerParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -425,13 +488,13 @@ type SQLContainerSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider SQLContainerInitParameters `json:"initProvider,omitempty"` + InitProvider SQLContainerInitParameters `json:"initProvider,omitempty"` } // SQLContainerStatus defines the observed state of SQLContainer. type SQLContainerStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider SQLContainerObservation `json:"atProvider,omitempty"` + AtProvider SQLContainerObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -446,9 +509,9 @@ type SQLContainerStatus struct { type SQLContainer struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.partitionKeyPath) || (has(self.initProvider) && has(self.initProvider.partitionKeyPath))",message="spec.forProvider.partitionKeyPath is a required parameter" - Spec SQLContainerSpec `json:"spec"` - Status SQLContainerStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.partitionKeyPath) || (has(self.initProvider) && has(self.initProvider.partitionKeyPath))",message="spec.forProvider.partitionKeyPath is a required parameter" + Spec SQLContainerSpec `json:"spec"` + Status SQLContainerStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/cosmosdb/v1alpha1/zz_sqldatabase_types.go b/apis/cosmosdb/v1alpha1/zz_sqldatabase_types.go index 22966e9..7699d28 100755 --- a/apis/cosmosdb/v1alpha1/zz_sqldatabase_types.go +++ b/apis/cosmosdb/v1alpha1/zz_sqldatabase_types.go @@ -15,95 +15,110 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type SQLDatabaseAutoscaleSettingsInitParameters struct { - // The maximum throughput of the SQL database (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. - MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` + +// The maximum throughput of the SQL database (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. +MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` } + type SQLDatabaseAutoscaleSettingsObservation struct { - // The maximum throughput of the SQL database (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. - MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` + +// The maximum throughput of the SQL database (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. +MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` } + type SQLDatabaseAutoscaleSettingsParameters struct { - // The maximum throughput of the SQL database (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. - // +kubebuilder:validation:Optional - MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` + +// The maximum throughput of the SQL database (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. +// +kubebuilder:validation:Optional +MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` } + type SQLDatabaseInitParameters struct { - // An autoscale_settings block as defined below. - AutoscaleSettings []SQLDatabaseAutoscaleSettingsInitParameters `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` - // The throughput of SQL database (RU/s). Must be set in increments of 100. The minimum value is 400. Do not set when azurerm_cosmosdb_account is configured with EnableServerless capability. - Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` +// An autoscale_settings block as defined below. +AutoscaleSettings []SQLDatabaseAutoscaleSettingsInitParameters `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` + +// The throughput of SQL database (RU/s). Must be set in increments of 100. The minimum value is 400. Do not set when azurerm_cosmosdb_account is configured with EnableServerless capability. +Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` } + type SQLDatabaseObservation struct { - // The name of the Cosmos DB SQL Database to create the table within. Changing this forces a new resource to be created. - AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` - // An autoscale_settings block as defined below. - AutoscaleSettings []SQLDatabaseAutoscaleSettingsObservation `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` +// The name of the Cosmos DB SQL Database to create the table within. Changing this forces a new resource to be created. +AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` - // The ID of the CosmosDB SQL Database. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// An autoscale_settings block as defined below. +AutoscaleSettings []SQLDatabaseAutoscaleSettingsObservation `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` - // The name of the resource group in which the Cosmos DB SQL Database is created. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The ID of the CosmosDB SQL Database. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The throughput of SQL database (RU/s). Must be set in increments of 100. The minimum value is 400. Do not set when azurerm_cosmosdb_account is configured with EnableServerless capability. - Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` +// The name of the resource group in which the Cosmos DB SQL Database is created. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` + +// The throughput of SQL database (RU/s). Must be set in increments of 100. The minimum value is 400. Do not set when azurerm_cosmosdb_account is configured with EnableServerless capability. +Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` } + type SQLDatabaseParameters struct { - // The name of the Cosmos DB SQL Database to create the table within. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=Account - // +kubebuilder:validation:Optional - AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` - // Reference to a Account to populate accountName. - // +kubebuilder:validation:Optional - AccountNameRef *v1.Reference `json:"accountNameRef,omitempty" tf:"-"` +// The name of the Cosmos DB SQL Database to create the table within. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=Account +// +kubebuilder:validation:Optional +AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` + +// Reference to a Account to populate accountName. +// +kubebuilder:validation:Optional +AccountNameRef *v1.Reference `json:"accountNameRef,omitempty" tf:"-"` - // Selector for a Account to populate accountName. - // +kubebuilder:validation:Optional - AccountNameSelector *v1.Selector `json:"accountNameSelector,omitempty" tf:"-"` +// Selector for a Account to populate accountName. +// +kubebuilder:validation:Optional +AccountNameSelector *v1.Selector `json:"accountNameSelector,omitempty" tf:"-"` - // An autoscale_settings block as defined below. - // +kubebuilder:validation:Optional - AutoscaleSettings []SQLDatabaseAutoscaleSettingsParameters `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` +// An autoscale_settings block as defined below. +// +kubebuilder:validation:Optional +AutoscaleSettings []SQLDatabaseAutoscaleSettingsParameters `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` - // The name of the resource group in which the Cosmos DB SQL Database is created. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group in which the Cosmos DB SQL Database is created. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - // The throughput of SQL database (RU/s). Must be set in increments of 100. The minimum value is 400. Do not set when azurerm_cosmosdb_account is configured with EnableServerless capability. - // +kubebuilder:validation:Optional - Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` +// The throughput of SQL database (RU/s). Must be set in increments of 100. The minimum value is 400. Do not set when azurerm_cosmosdb_account is configured with EnableServerless capability. +// +kubebuilder:validation:Optional +Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` } // SQLDatabaseSpec defines the desired state of SQLDatabase type SQLDatabaseSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider SQLDatabaseParameters `json:"forProvider"` + ForProvider SQLDatabaseParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -114,13 +129,13 @@ type SQLDatabaseSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider SQLDatabaseInitParameters `json:"initProvider,omitempty"` + InitProvider SQLDatabaseInitParameters `json:"initProvider,omitempty"` } // SQLDatabaseStatus defines the observed state of SQLDatabase. type SQLDatabaseStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider SQLDatabaseObservation `json:"atProvider,omitempty"` + AtProvider SQLDatabaseObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/cosmosdb/v1alpha1/zz_sqldedicatedgateway_types.go b/apis/cosmosdb/v1alpha1/zz_sqldedicatedgateway_types.go index 3470340..68ff914 100755 --- a/apis/cosmosdb/v1alpha1/zz_sqldedicatedgateway_types.go +++ b/apis/cosmosdb/v1alpha1/zz_sqldedicatedgateway_types.go @@ -15,61 +15,70 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type SQLDedicatedGatewayInitParameters struct { - // The instance count for the CosmosDB SQL Dedicated Gateway. Possible value is between 1 and 5. - InstanceCount *float64 `json:"instanceCount,omitempty" tf:"instance_count,omitempty"` - // The instance size for the CosmosDB SQL Dedicated Gateway. Changing this forces a new resource to be created. Possible values are Cosmos.D4s, Cosmos.D8s and Cosmos.D16s. - InstanceSize *string `json:"instanceSize,omitempty" tf:"instance_size,omitempty"` +// The instance count for the CosmosDB SQL Dedicated Gateway. Possible value is between 1 and 5. +InstanceCount *float64 `json:"instanceCount,omitempty" tf:"instance_count,omitempty"` + +// The instance size for the CosmosDB SQL Dedicated Gateway. Changing this forces a new resource to be created. Possible values are Cosmos.D4s, Cosmos.D8s and Cosmos.D16s. +InstanceSize *string `json:"instanceSize,omitempty" tf:"instance_size,omitempty"` } + type SQLDedicatedGatewayObservation struct { - // The resource ID of the CosmosDB Account. Changing this forces a new resource to be created. - CosmosdbAccountID *string `json:"cosmosdbAccountId,omitempty" tf:"cosmosdb_account_id,omitempty"` - // The ID of the CosmosDB SQL Dedicated Gateway. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// The resource ID of the CosmosDB Account. Changing this forces a new resource to be created. +CosmosdbAccountID *string `json:"cosmosdbAccountId,omitempty" tf:"cosmosdb_account_id,omitempty"` + +// The ID of the CosmosDB SQL Dedicated Gateway. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The instance count for the CosmosDB SQL Dedicated Gateway. Possible value is between 1 and 5. - InstanceCount *float64 `json:"instanceCount,omitempty" tf:"instance_count,omitempty"` +// The instance count for the CosmosDB SQL Dedicated Gateway. Possible value is between 1 and 5. +InstanceCount *float64 `json:"instanceCount,omitempty" tf:"instance_count,omitempty"` - // The instance size for the CosmosDB SQL Dedicated Gateway. Changing this forces a new resource to be created. Possible values are Cosmos.D4s, Cosmos.D8s and Cosmos.D16s. - InstanceSize *string `json:"instanceSize,omitempty" tf:"instance_size,omitempty"` +// The instance size for the CosmosDB SQL Dedicated Gateway. Changing this forces a new resource to be created. Possible values are Cosmos.D4s, Cosmos.D8s and Cosmos.D16s. +InstanceSize *string `json:"instanceSize,omitempty" tf:"instance_size,omitempty"` } + type SQLDedicatedGatewayParameters struct { - // The resource ID of the CosmosDB Account. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/cosmosdb/v1alpha1.Account - // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() - // +kubebuilder:validation:Optional - CosmosdbAccountID *string `json:"cosmosdbAccountId,omitempty" tf:"cosmosdb_account_id,omitempty"` - // Reference to a Account in cosmosdb to populate cosmosdbAccountId. - // +kubebuilder:validation:Optional - CosmosdbAccountIDRef *v1.Reference `json:"cosmosdbAccountIdRef,omitempty" tf:"-"` +// The resource ID of the CosmosDB Account. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/cosmosdb/v1alpha1.Account +// +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() +// +kubebuilder:validation:Optional +CosmosdbAccountID *string `json:"cosmosdbAccountId,omitempty" tf:"cosmosdb_account_id,omitempty"` + +// Reference to a Account in cosmosdb to populate cosmosdbAccountId. +// +kubebuilder:validation:Optional +CosmosdbAccountIDRef *v1.Reference `json:"cosmosdbAccountIdRef,omitempty" tf:"-"` - // Selector for a Account in cosmosdb to populate cosmosdbAccountId. - // +kubebuilder:validation:Optional - CosmosdbAccountIDSelector *v1.Selector `json:"cosmosdbAccountIdSelector,omitempty" tf:"-"` +// Selector for a Account in cosmosdb to populate cosmosdbAccountId. +// +kubebuilder:validation:Optional +CosmosdbAccountIDSelector *v1.Selector `json:"cosmosdbAccountIdSelector,omitempty" tf:"-"` - // The instance count for the CosmosDB SQL Dedicated Gateway. Possible value is between 1 and 5. - // +kubebuilder:validation:Optional - InstanceCount *float64 `json:"instanceCount,omitempty" tf:"instance_count,omitempty"` +// The instance count for the CosmosDB SQL Dedicated Gateway. Possible value is between 1 and 5. +// +kubebuilder:validation:Optional +InstanceCount *float64 `json:"instanceCount,omitempty" tf:"instance_count,omitempty"` - // The instance size for the CosmosDB SQL Dedicated Gateway. Changing this forces a new resource to be created. Possible values are Cosmos.D4s, Cosmos.D8s and Cosmos.D16s. - // +kubebuilder:validation:Optional - InstanceSize *string `json:"instanceSize,omitempty" tf:"instance_size,omitempty"` +// The instance size for the CosmosDB SQL Dedicated Gateway. Changing this forces a new resource to be created. Possible values are Cosmos.D4s, Cosmos.D8s and Cosmos.D16s. +// +kubebuilder:validation:Optional +InstanceSize *string `json:"instanceSize,omitempty" tf:"instance_size,omitempty"` } // SQLDedicatedGatewaySpec defines the desired state of SQLDedicatedGateway type SQLDedicatedGatewaySpec struct { v1.ResourceSpec `json:",inline"` - ForProvider SQLDedicatedGatewayParameters `json:"forProvider"` + ForProvider SQLDedicatedGatewayParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -80,13 +89,13 @@ type SQLDedicatedGatewaySpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider SQLDedicatedGatewayInitParameters `json:"initProvider,omitempty"` + InitProvider SQLDedicatedGatewayInitParameters `json:"initProvider,omitempty"` } // SQLDedicatedGatewayStatus defines the observed state of SQLDedicatedGateway. type SQLDedicatedGatewayStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider SQLDedicatedGatewayObservation `json:"atProvider,omitempty"` + AtProvider SQLDedicatedGatewayObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -101,10 +110,10 @@ type SQLDedicatedGatewayStatus struct { type SQLDedicatedGateway struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.instanceCount) || (has(self.initProvider) && has(self.initProvider.instanceCount))",message="spec.forProvider.instanceCount is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.instanceSize) || (has(self.initProvider) && has(self.initProvider.instanceSize))",message="spec.forProvider.instanceSize is a required parameter" - Spec SQLDedicatedGatewaySpec `json:"spec"` - Status SQLDedicatedGatewayStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.instanceCount) || (has(self.initProvider) && has(self.initProvider.instanceCount))",message="spec.forProvider.instanceCount is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.instanceSize) || (has(self.initProvider) && has(self.initProvider.instanceSize))",message="spec.forProvider.instanceSize is a required parameter" + Spec SQLDedicatedGatewaySpec `json:"spec"` + Status SQLDedicatedGatewayStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/cosmosdb/v1alpha1/zz_sqlfunction_types.go b/apis/cosmosdb/v1alpha1/zz_sqlfunction_types.go index 1a37fe8..b209d3b 100755 --- a/apis/cosmosdb/v1alpha1/zz_sqlfunction_types.go +++ b/apis/cosmosdb/v1alpha1/zz_sqlfunction_types.go @@ -15,51 +15,60 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type SQLFunctionInitParameters struct { - // Body of the User Defined Function. - Body *string `json:"body,omitempty" tf:"body,omitempty"` + +// Body of the User Defined Function. +Body *string `json:"body,omitempty" tf:"body,omitempty"` } + type SQLFunctionObservation struct { - // Body of the User Defined Function. - Body *string `json:"body,omitempty" tf:"body,omitempty"` - // The id of the Cosmos DB SQL Container to create the SQL User Defined Function within. Changing this forces a new SQL User Defined Function to be created. - ContainerID *string `json:"containerId,omitempty" tf:"container_id,omitempty"` +// Body of the User Defined Function. +Body *string `json:"body,omitempty" tf:"body,omitempty"` + +// The id of the Cosmos DB SQL Container to create the SQL User Defined Function within. Changing this forces a new SQL User Defined Function to be created. +ContainerID *string `json:"containerId,omitempty" tf:"container_id,omitempty"` - // The ID of the SQL User Defined Function. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// The ID of the SQL User Defined Function. +ID *string `json:"id,omitempty" tf:"id,omitempty"` } + type SQLFunctionParameters struct { - // Body of the User Defined Function. - // +kubebuilder:validation:Optional - Body *string `json:"body,omitempty" tf:"body,omitempty"` - // The id of the Cosmos DB SQL Container to create the SQL User Defined Function within. Changing this forces a new SQL User Defined Function to be created. - // +crossplane:generate:reference:type=SQLContainer - // +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() - // +kubebuilder:validation:Optional - ContainerID *string `json:"containerId,omitempty" tf:"container_id,omitempty"` +// Body of the User Defined Function. +// +kubebuilder:validation:Optional +Body *string `json:"body,omitempty" tf:"body,omitempty"` + +// The id of the Cosmos DB SQL Container to create the SQL User Defined Function within. Changing this forces a new SQL User Defined Function to be created. +// +crossplane:generate:reference:type=SQLContainer +// +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() +// +kubebuilder:validation:Optional +ContainerID *string `json:"containerId,omitempty" tf:"container_id,omitempty"` - // Reference to a SQLContainer to populate containerId. - // +kubebuilder:validation:Optional - ContainerIDRef *v1.Reference `json:"containerIdRef,omitempty" tf:"-"` +// Reference to a SQLContainer to populate containerId. +// +kubebuilder:validation:Optional +ContainerIDRef *v1.Reference `json:"containerIdRef,omitempty" tf:"-"` - // Selector for a SQLContainer to populate containerId. - // +kubebuilder:validation:Optional - ContainerIDSelector *v1.Selector `json:"containerIdSelector,omitempty" tf:"-"` +// Selector for a SQLContainer to populate containerId. +// +kubebuilder:validation:Optional +ContainerIDSelector *v1.Selector `json:"containerIdSelector,omitempty" tf:"-"` } // SQLFunctionSpec defines the desired state of SQLFunction type SQLFunctionSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider SQLFunctionParameters `json:"forProvider"` + ForProvider SQLFunctionParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -70,13 +79,13 @@ type SQLFunctionSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider SQLFunctionInitParameters `json:"initProvider,omitempty"` + InitProvider SQLFunctionInitParameters `json:"initProvider,omitempty"` } // SQLFunctionStatus defines the observed state of SQLFunction. type SQLFunctionStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider SQLFunctionObservation `json:"atProvider,omitempty"` + AtProvider SQLFunctionObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -91,9 +100,9 @@ type SQLFunctionStatus struct { type SQLFunction struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.body) || (has(self.initProvider) && has(self.initProvider.body))",message="spec.forProvider.body is a required parameter" - Spec SQLFunctionSpec `json:"spec"` - Status SQLFunctionStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.body) || (has(self.initProvider) && has(self.initProvider.body))",message="spec.forProvider.body is a required parameter" + Spec SQLFunctionSpec `json:"spec"` + Status SQLFunctionStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/cosmosdb/v1alpha1/zz_sqlroleassignment_types.go b/apis/cosmosdb/v1alpha1/zz_sqlroleassignment_types.go index 054a774..5f7b670 100755 --- a/apis/cosmosdb/v1alpha1/zz_sqlroleassignment_types.go +++ b/apis/cosmosdb/v1alpha1/zz_sqlroleassignment_types.go @@ -15,110 +15,119 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type SQLRoleAssignmentInitParameters struct { - // The GUID as the name of the Cosmos DB SQL Role Assignment - one will be generated if not specified. Changing this forces a new resource to be created. - Name *string `json:"name,omitempty" tf:"name,omitempty"` - // The ID of the Principal (Client) in Azure Active Directory. Changing this forces a new resource to be created. - PrincipalID *string `json:"principalId,omitempty" tf:"principal_id,omitempty"` +// The GUID as the name of the Cosmos DB SQL Role Assignment - one will be generated if not specified. Changing this forces a new resource to be created. +Name *string `json:"name,omitempty" tf:"name,omitempty"` + +// The ID of the Principal (Client) in Azure Active Directory. Changing this forces a new resource to be created. +PrincipalID *string `json:"principalId,omitempty" tf:"principal_id,omitempty"` } + type SQLRoleAssignmentObservation struct { - // The name of the Cosmos DB Account. Changing this forces a new resource to be created. - AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` - // The ID of the Cosmos DB SQL Role Assignment. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// The name of the Cosmos DB Account. Changing this forces a new resource to be created. +AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` - // The GUID as the name of the Cosmos DB SQL Role Assignment - one will be generated if not specified. Changing this forces a new resource to be created. - Name *string `json:"name,omitempty" tf:"name,omitempty"` +// The ID of the Cosmos DB SQL Role Assignment. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The ID of the Principal (Client) in Azure Active Directory. Changing this forces a new resource to be created. - PrincipalID *string `json:"principalId,omitempty" tf:"principal_id,omitempty"` +// The GUID as the name of the Cosmos DB SQL Role Assignment - one will be generated if not specified. Changing this forces a new resource to be created. +Name *string `json:"name,omitempty" tf:"name,omitempty"` - // The name of the Resource Group in which the Cosmos DB SQL Role Assignment is created. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The ID of the Principal (Client) in Azure Active Directory. Changing this forces a new resource to be created. +PrincipalID *string `json:"principalId,omitempty" tf:"principal_id,omitempty"` - // The resource ID of the Cosmos DB SQL Role Definition. - RoleDefinitionID *string `json:"roleDefinitionId,omitempty" tf:"role_definition_id,omitempty"` +// The name of the Resource Group in which the Cosmos DB SQL Role Assignment is created. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // The data plane resource path for which access is being granted through this Cosmos DB SQL Role Assignment. Changing this forces a new resource to be created. - Scope *string `json:"scope,omitempty" tf:"scope,omitempty"` +// The resource ID of the Cosmos DB SQL Role Definition. +RoleDefinitionID *string `json:"roleDefinitionId,omitempty" tf:"role_definition_id,omitempty"` + +// The data plane resource path for which access is being granted through this Cosmos DB SQL Role Assignment. Changing this forces a new resource to be created. +Scope *string `json:"scope,omitempty" tf:"scope,omitempty"` } + type SQLRoleAssignmentParameters struct { - // The name of the Cosmos DB Account. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/cosmosdb/v1alpha1.Account - // +kubebuilder:validation:Optional - AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` - - // Reference to a Account in cosmosdb to populate accountName. - // +kubebuilder:validation:Optional - AccountNameRef *v1.Reference `json:"accountNameRef,omitempty" tf:"-"` - - // Selector for a Account in cosmosdb to populate accountName. - // +kubebuilder:validation:Optional - AccountNameSelector *v1.Selector `json:"accountNameSelector,omitempty" tf:"-"` - - // The GUID as the name of the Cosmos DB SQL Role Assignment - one will be generated if not specified. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Name *string `json:"name,omitempty" tf:"name,omitempty"` - - // The ID of the Principal (Client) in Azure Active Directory. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - PrincipalID *string `json:"principalId,omitempty" tf:"principal_id,omitempty"` - - // The name of the Resource Group in which the Cosmos DB SQL Role Assignment is created. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - - // The resource ID of the Cosmos DB SQL Role Definition. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/cosmosdb/v1alpha1.SQLRoleDefinition - // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() - // +kubebuilder:validation:Optional - RoleDefinitionID *string `json:"roleDefinitionId,omitempty" tf:"role_definition_id,omitempty"` - - // Reference to a SQLRoleDefinition in cosmosdb to populate roleDefinitionId. - // +kubebuilder:validation:Optional - RoleDefinitionIDRef *v1.Reference `json:"roleDefinitionIdRef,omitempty" tf:"-"` - - // Selector for a SQLRoleDefinition in cosmosdb to populate roleDefinitionId. - // +kubebuilder:validation:Optional - RoleDefinitionIDSelector *v1.Selector `json:"roleDefinitionIdSelector,omitempty" tf:"-"` - - // The data plane resource path for which access is being granted through this Cosmos DB SQL Role Assignment. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/cosmosdb/v1alpha1.Account - // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() - // +kubebuilder:validation:Optional - Scope *string `json:"scope,omitempty" tf:"scope,omitempty"` - - // Reference to a Account in cosmosdb to populate scope. - // +kubebuilder:validation:Optional - ScopeRef *v1.Reference `json:"scopeRef,omitempty" tf:"-"` - - // Selector for a Account in cosmosdb to populate scope. - // +kubebuilder:validation:Optional - ScopeSelector *v1.Selector `json:"scopeSelector,omitempty" tf:"-"` + +// The name of the Cosmos DB Account. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/cosmosdb/v1alpha1.Account +// +kubebuilder:validation:Optional +AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` + +// Reference to a Account in cosmosdb to populate accountName. +// +kubebuilder:validation:Optional +AccountNameRef *v1.Reference `json:"accountNameRef,omitempty" tf:"-"` + +// Selector for a Account in cosmosdb to populate accountName. +// +kubebuilder:validation:Optional +AccountNameSelector *v1.Selector `json:"accountNameSelector,omitempty" tf:"-"` + +// The GUID as the name of the Cosmos DB SQL Role Assignment - one will be generated if not specified. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Name *string `json:"name,omitempty" tf:"name,omitempty"` + +// The ID of the Principal (Client) in Azure Active Directory. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +PrincipalID *string `json:"principalId,omitempty" tf:"principal_id,omitempty"` + +// The name of the Resource Group in which the Cosmos DB SQL Role Assignment is created. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` + +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` + +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` + +// The resource ID of the Cosmos DB SQL Role Definition. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/cosmosdb/v1alpha1.SQLRoleDefinition +// +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() +// +kubebuilder:validation:Optional +RoleDefinitionID *string `json:"roleDefinitionId,omitempty" tf:"role_definition_id,omitempty"` + +// Reference to a SQLRoleDefinition in cosmosdb to populate roleDefinitionId. +// +kubebuilder:validation:Optional +RoleDefinitionIDRef *v1.Reference `json:"roleDefinitionIdRef,omitempty" tf:"-"` + +// Selector for a SQLRoleDefinition in cosmosdb to populate roleDefinitionId. +// +kubebuilder:validation:Optional +RoleDefinitionIDSelector *v1.Selector `json:"roleDefinitionIdSelector,omitempty" tf:"-"` + +// The data plane resource path for which access is being granted through this Cosmos DB SQL Role Assignment. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/cosmosdb/v1alpha1.Account +// +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() +// +kubebuilder:validation:Optional +Scope *string `json:"scope,omitempty" tf:"scope,omitempty"` + +// Reference to a Account in cosmosdb to populate scope. +// +kubebuilder:validation:Optional +ScopeRef *v1.Reference `json:"scopeRef,omitempty" tf:"-"` + +// Selector for a Account in cosmosdb to populate scope. +// +kubebuilder:validation:Optional +ScopeSelector *v1.Selector `json:"scopeSelector,omitempty" tf:"-"` } // SQLRoleAssignmentSpec defines the desired state of SQLRoleAssignment type SQLRoleAssignmentSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider SQLRoleAssignmentParameters `json:"forProvider"` + ForProvider SQLRoleAssignmentParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -129,13 +138,13 @@ type SQLRoleAssignmentSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider SQLRoleAssignmentInitParameters `json:"initProvider,omitempty"` + InitProvider SQLRoleAssignmentInitParameters `json:"initProvider,omitempty"` } // SQLRoleAssignmentStatus defines the observed state of SQLRoleAssignment. type SQLRoleAssignmentStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider SQLRoleAssignmentObservation `json:"atProvider,omitempty"` + AtProvider SQLRoleAssignmentObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -150,9 +159,9 @@ type SQLRoleAssignmentStatus struct { type SQLRoleAssignment struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.principalId) || (has(self.initProvider) && has(self.initProvider.principalId))",message="spec.forProvider.principalId is a required parameter" - Spec SQLRoleAssignmentSpec `json:"spec"` - Status SQLRoleAssignmentStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.principalId) || (has(self.initProvider) && has(self.initProvider.principalId))",message="spec.forProvider.principalId is a required parameter" + Spec SQLRoleAssignmentSpec `json:"spec"` + Status SQLRoleAssignmentStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/cosmosdb/v1alpha1/zz_sqlroledefinition_types.go b/apis/cosmosdb/v1alpha1/zz_sqlroledefinition_types.go index 18e48ea..fab7825 100755 --- a/apis/cosmosdb/v1alpha1/zz_sqlroledefinition_types.go +++ b/apis/cosmosdb/v1alpha1/zz_sqlroledefinition_types.go @@ -15,125 +15,140 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type PermissionsInitParameters struct { - // A list of data actions that are allowed for the Cosmos DB SQL Role Definition. - DataActions []*string `json:"dataActions,omitempty" tf:"data_actions,omitempty"` + +// A list of data actions that are allowed for the Cosmos DB SQL Role Definition. +DataActions []*string `json:"dataActions,omitempty" tf:"data_actions,omitempty"` } + type PermissionsObservation struct { - // A list of data actions that are allowed for the Cosmos DB SQL Role Definition. - DataActions []*string `json:"dataActions,omitempty" tf:"data_actions,omitempty"` + +// A list of data actions that are allowed for the Cosmos DB SQL Role Definition. +DataActions []*string `json:"dataActions,omitempty" tf:"data_actions,omitempty"` } + type PermissionsParameters struct { - // A list of data actions that are allowed for the Cosmos DB SQL Role Definition. - // +kubebuilder:validation:Optional - DataActions []*string `json:"dataActions" tf:"data_actions,omitempty"` + +// A list of data actions that are allowed for the Cosmos DB SQL Role Definition. +// +kubebuilder:validation:Optional +DataActions []*string `json:"dataActions" tf:"data_actions,omitempty"` } + type SQLRoleDefinitionInitParameters struct { - // A list of fully qualified scopes at or below which Role Assignments may be created using this Cosmos DB SQL Role Definition. It will allow application of this Cosmos DB SQL Role Definition on the entire Database Account or any underlying Database/Collection. Scopes higher than Database Account are not enforceable as assignable scopes. - AssignableScopes []*string `json:"assignableScopes,omitempty" tf:"assignable_scopes,omitempty"` - // An user-friendly name for the Cosmos DB SQL Role Definition which must be unique for the Database Account. - Name *string `json:"name,omitempty" tf:"name,omitempty"` +// A list of fully qualified scopes at or below which Role Assignments may be created using this Cosmos DB SQL Role Definition. It will allow application of this Cosmos DB SQL Role Definition on the entire Database Account or any underlying Database/Collection. Scopes higher than Database Account are not enforceable as assignable scopes. +AssignableScopes []*string `json:"assignableScopes,omitempty" tf:"assignable_scopes,omitempty"` - // A permissions block as defined below. - Permissions []PermissionsInitParameters `json:"permissions,omitempty" tf:"permissions,omitempty"` +// An user-friendly name for the Cosmos DB SQL Role Definition which must be unique for the Database Account. +Name *string `json:"name,omitempty" tf:"name,omitempty"` - // The GUID as the name of the Cosmos DB SQL Role Definition - one will be generated if not specified. Changing this forces a new resource to be created. - RoleDefinitionID *string `json:"roleDefinitionId,omitempty" tf:"role_definition_id,omitempty"` +// A permissions block as defined below. +Permissions []PermissionsInitParameters `json:"permissions,omitempty" tf:"permissions,omitempty"` - // The type of the Cosmos DB SQL Role Definition. Possible values are BuiltInRole and CustomRole. Defaults to CustomRole. Changing this forces a new resource to be created. - Type *string `json:"type,omitempty" tf:"type,omitempty"` +// The GUID as the name of the Cosmos DB SQL Role Definition - one will be generated if not specified. Changing this forces a new resource to be created. +RoleDefinitionID *string `json:"roleDefinitionId,omitempty" tf:"role_definition_id,omitempty"` + +// The type of the Cosmos DB SQL Role Definition. Possible values are BuiltInRole and CustomRole. Defaults to CustomRole. Changing this forces a new resource to be created. +Type *string `json:"type,omitempty" tf:"type,omitempty"` } + type SQLRoleDefinitionObservation struct { - // The name of the Cosmos DB Account. Changing this forces a new resource to be created. - AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` - // A list of fully qualified scopes at or below which Role Assignments may be created using this Cosmos DB SQL Role Definition. It will allow application of this Cosmos DB SQL Role Definition on the entire Database Account or any underlying Database/Collection. Scopes higher than Database Account are not enforceable as assignable scopes. - AssignableScopes []*string `json:"assignableScopes,omitempty" tf:"assignable_scopes,omitempty"` +// The name of the Cosmos DB Account. Changing this forces a new resource to be created. +AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` - // The ID of the Cosmos DB SQL Role Definition. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// A list of fully qualified scopes at or below which Role Assignments may be created using this Cosmos DB SQL Role Definition. It will allow application of this Cosmos DB SQL Role Definition on the entire Database Account or any underlying Database/Collection. Scopes higher than Database Account are not enforceable as assignable scopes. +AssignableScopes []*string `json:"assignableScopes,omitempty" tf:"assignable_scopes,omitempty"` - // An user-friendly name for the Cosmos DB SQL Role Definition which must be unique for the Database Account. - Name *string `json:"name,omitempty" tf:"name,omitempty"` +// The ID of the Cosmos DB SQL Role Definition. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // A permissions block as defined below. - Permissions []PermissionsObservation `json:"permissions,omitempty" tf:"permissions,omitempty"` +// An user-friendly name for the Cosmos DB SQL Role Definition which must be unique for the Database Account. +Name *string `json:"name,omitempty" tf:"name,omitempty"` - // The name of the Resource Group in which the Cosmos DB SQL Role Definition is created. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// A permissions block as defined below. +Permissions []PermissionsObservation `json:"permissions,omitempty" tf:"permissions,omitempty"` - // The GUID as the name of the Cosmos DB SQL Role Definition - one will be generated if not specified. Changing this forces a new resource to be created. - RoleDefinitionID *string `json:"roleDefinitionId,omitempty" tf:"role_definition_id,omitempty"` +// The name of the Resource Group in which the Cosmos DB SQL Role Definition is created. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // The type of the Cosmos DB SQL Role Definition. Possible values are BuiltInRole and CustomRole. Defaults to CustomRole. Changing this forces a new resource to be created. - Type *string `json:"type,omitempty" tf:"type,omitempty"` +// The GUID as the name of the Cosmos DB SQL Role Definition - one will be generated if not specified. Changing this forces a new resource to be created. +RoleDefinitionID *string `json:"roleDefinitionId,omitempty" tf:"role_definition_id,omitempty"` + +// The type of the Cosmos DB SQL Role Definition. Possible values are BuiltInRole and CustomRole. Defaults to CustomRole. Changing this forces a new resource to be created. +Type *string `json:"type,omitempty" tf:"type,omitempty"` } + type SQLRoleDefinitionParameters struct { - // The name of the Cosmos DB Account. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/cosmosdb/v1alpha1.Account - // +kubebuilder:validation:Optional - AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` - // Reference to a Account in cosmosdb to populate accountName. - // +kubebuilder:validation:Optional - AccountNameRef *v1.Reference `json:"accountNameRef,omitempty" tf:"-"` +// The name of the Cosmos DB Account. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/cosmosdb/v1alpha1.Account +// +kubebuilder:validation:Optional +AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` + +// Reference to a Account in cosmosdb to populate accountName. +// +kubebuilder:validation:Optional +AccountNameRef *v1.Reference `json:"accountNameRef,omitempty" tf:"-"` - // Selector for a Account in cosmosdb to populate accountName. - // +kubebuilder:validation:Optional - AccountNameSelector *v1.Selector `json:"accountNameSelector,omitempty" tf:"-"` +// Selector for a Account in cosmosdb to populate accountName. +// +kubebuilder:validation:Optional +AccountNameSelector *v1.Selector `json:"accountNameSelector,omitempty" tf:"-"` - // A list of fully qualified scopes at or below which Role Assignments may be created using this Cosmos DB SQL Role Definition. It will allow application of this Cosmos DB SQL Role Definition on the entire Database Account or any underlying Database/Collection. Scopes higher than Database Account are not enforceable as assignable scopes. - // +kubebuilder:validation:Optional - AssignableScopes []*string `json:"assignableScopes,omitempty" tf:"assignable_scopes,omitempty"` +// A list of fully qualified scopes at or below which Role Assignments may be created using this Cosmos DB SQL Role Definition. It will allow application of this Cosmos DB SQL Role Definition on the entire Database Account or any underlying Database/Collection. Scopes higher than Database Account are not enforceable as assignable scopes. +// +kubebuilder:validation:Optional +AssignableScopes []*string `json:"assignableScopes,omitempty" tf:"assignable_scopes,omitempty"` - // An user-friendly name for the Cosmos DB SQL Role Definition which must be unique for the Database Account. - // +kubebuilder:validation:Optional - Name *string `json:"name,omitempty" tf:"name,omitempty"` +// An user-friendly name for the Cosmos DB SQL Role Definition which must be unique for the Database Account. +// +kubebuilder:validation:Optional +Name *string `json:"name,omitempty" tf:"name,omitempty"` - // A permissions block as defined below. - // +kubebuilder:validation:Optional - Permissions []PermissionsParameters `json:"permissions,omitempty" tf:"permissions,omitempty"` +// A permissions block as defined below. +// +kubebuilder:validation:Optional +Permissions []PermissionsParameters `json:"permissions,omitempty" tf:"permissions,omitempty"` - // The name of the Resource Group in which the Cosmos DB SQL Role Definition is created. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the Resource Group in which the Cosmos DB SQL Role Definition is created. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - // The GUID as the name of the Cosmos DB SQL Role Definition - one will be generated if not specified. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - RoleDefinitionID *string `json:"roleDefinitionId,omitempty" tf:"role_definition_id,omitempty"` +// The GUID as the name of the Cosmos DB SQL Role Definition - one will be generated if not specified. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +RoleDefinitionID *string `json:"roleDefinitionId,omitempty" tf:"role_definition_id,omitempty"` - // The type of the Cosmos DB SQL Role Definition. Possible values are BuiltInRole and CustomRole. Defaults to CustomRole. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Type *string `json:"type,omitempty" tf:"type,omitempty"` +// The type of the Cosmos DB SQL Role Definition. Possible values are BuiltInRole and CustomRole. Defaults to CustomRole. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Type *string `json:"type,omitempty" tf:"type,omitempty"` } // SQLRoleDefinitionSpec defines the desired state of SQLRoleDefinition type SQLRoleDefinitionSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider SQLRoleDefinitionParameters `json:"forProvider"` + ForProvider SQLRoleDefinitionParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -144,13 +159,13 @@ type SQLRoleDefinitionSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider SQLRoleDefinitionInitParameters `json:"initProvider,omitempty"` + InitProvider SQLRoleDefinitionInitParameters `json:"initProvider,omitempty"` } // SQLRoleDefinitionStatus defines the observed state of SQLRoleDefinition. type SQLRoleDefinitionStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider SQLRoleDefinitionObservation `json:"atProvider,omitempty"` + AtProvider SQLRoleDefinitionObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -165,11 +180,11 @@ type SQLRoleDefinitionStatus struct { type SQLRoleDefinition struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.assignableScopes) || (has(self.initProvider) && has(self.initProvider.assignableScopes))",message="spec.forProvider.assignableScopes is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.name) || (has(self.initProvider) && has(self.initProvider.name))",message="spec.forProvider.name is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.permissions) || (has(self.initProvider) && has(self.initProvider.permissions))",message="spec.forProvider.permissions is a required parameter" - Spec SQLRoleDefinitionSpec `json:"spec"` - Status SQLRoleDefinitionStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.assignableScopes) || (has(self.initProvider) && has(self.initProvider.assignableScopes))",message="spec.forProvider.assignableScopes is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.name) || (has(self.initProvider) && has(self.initProvider.name))",message="spec.forProvider.name is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.permissions) || (has(self.initProvider) && has(self.initProvider.permissions))",message="spec.forProvider.permissions is a required parameter" + Spec SQLRoleDefinitionSpec `json:"spec"` + Status SQLRoleDefinitionStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/cosmosdb/v1alpha1/zz_sqlstoredprocedure_types.go b/apis/cosmosdb/v1alpha1/zz_sqlstoredprocedure_types.go index 091371f..75a4c95 100755 --- a/apis/cosmosdb/v1alpha1/zz_sqlstoredprocedure_types.go +++ b/apis/cosmosdb/v1alpha1/zz_sqlstoredprocedure_types.go @@ -15,98 +15,107 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type SQLStoredProcedureInitParameters struct { - // The body of the stored procedure. - Body *string `json:"body,omitempty" tf:"body,omitempty"` + +// The body of the stored procedure. +Body *string `json:"body,omitempty" tf:"body,omitempty"` } + type SQLStoredProcedureObservation struct { - // The name of the Cosmos DB Account to create the stored procedure within. Changing this forces a new resource to be created. - AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` - // The body of the stored procedure. - Body *string `json:"body,omitempty" tf:"body,omitempty"` +// The name of the Cosmos DB Account to create the stored procedure within. Changing this forces a new resource to be created. +AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` - // The name of the Cosmos DB SQL Container to create the stored procedure within. Changing this forces a new resource to be created. - ContainerName *string `json:"containerName,omitempty" tf:"container_name,omitempty"` +// The body of the stored procedure. +Body *string `json:"body,omitempty" tf:"body,omitempty"` - // The name of the Cosmos DB SQL Database to create the stored procedure within. Changing this forces a new resource to be created. - DatabaseName *string `json:"databaseName,omitempty" tf:"database_name,omitempty"` +// The name of the Cosmos DB SQL Container to create the stored procedure within. Changing this forces a new resource to be created. +ContainerName *string `json:"containerName,omitempty" tf:"container_name,omitempty"` - // The ID of the Cosmos DB SQL Stored Procedure. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// The name of the Cosmos DB SQL Database to create the stored procedure within. Changing this forces a new resource to be created. +DatabaseName *string `json:"databaseName,omitempty" tf:"database_name,omitempty"` - // The name of the resource group in which the Cosmos DB SQL Database is created. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The ID of the Cosmos DB SQL Stored Procedure. +ID *string `json:"id,omitempty" tf:"id,omitempty"` + +// The name of the resource group in which the Cosmos DB SQL Database is created. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` } + type SQLStoredProcedureParameters struct { - // The name of the Cosmos DB Account to create the stored procedure within. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=Account - // +kubebuilder:validation:Optional - AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` - - // Reference to a Account to populate accountName. - // +kubebuilder:validation:Optional - AccountNameRef *v1.Reference `json:"accountNameRef,omitempty" tf:"-"` - - // Selector for a Account to populate accountName. - // +kubebuilder:validation:Optional - AccountNameSelector *v1.Selector `json:"accountNameSelector,omitempty" tf:"-"` - - // The body of the stored procedure. - // +kubebuilder:validation:Optional - Body *string `json:"body,omitempty" tf:"body,omitempty"` - - // The name of the Cosmos DB SQL Container to create the stored procedure within. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=SQLContainer - // +kubebuilder:validation:Optional - ContainerName *string `json:"containerName,omitempty" tf:"container_name,omitempty"` - - // Reference to a SQLContainer to populate containerName. - // +kubebuilder:validation:Optional - ContainerNameRef *v1.Reference `json:"containerNameRef,omitempty" tf:"-"` - - // Selector for a SQLContainer to populate containerName. - // +kubebuilder:validation:Optional - ContainerNameSelector *v1.Selector `json:"containerNameSelector,omitempty" tf:"-"` - - // The name of the Cosmos DB SQL Database to create the stored procedure within. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=SQLDatabase - // +kubebuilder:validation:Optional - DatabaseName *string `json:"databaseName,omitempty" tf:"database_name,omitempty"` - - // Reference to a SQLDatabase to populate databaseName. - // +kubebuilder:validation:Optional - DatabaseNameRef *v1.Reference `json:"databaseNameRef,omitempty" tf:"-"` - - // Selector for a SQLDatabase to populate databaseName. - // +kubebuilder:validation:Optional - DatabaseNameSelector *v1.Selector `json:"databaseNameSelector,omitempty" tf:"-"` - - // The name of the resource group in which the Cosmos DB SQL Database is created. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` + +// The name of the Cosmos DB Account to create the stored procedure within. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=Account +// +kubebuilder:validation:Optional +AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` + +// Reference to a Account to populate accountName. +// +kubebuilder:validation:Optional +AccountNameRef *v1.Reference `json:"accountNameRef,omitempty" tf:"-"` + +// Selector for a Account to populate accountName. +// +kubebuilder:validation:Optional +AccountNameSelector *v1.Selector `json:"accountNameSelector,omitempty" tf:"-"` + +// The body of the stored procedure. +// +kubebuilder:validation:Optional +Body *string `json:"body,omitempty" tf:"body,omitempty"` + +// The name of the Cosmos DB SQL Container to create the stored procedure within. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=SQLContainer +// +kubebuilder:validation:Optional +ContainerName *string `json:"containerName,omitempty" tf:"container_name,omitempty"` + +// Reference to a SQLContainer to populate containerName. +// +kubebuilder:validation:Optional +ContainerNameRef *v1.Reference `json:"containerNameRef,omitempty" tf:"-"` + +// Selector for a SQLContainer to populate containerName. +// +kubebuilder:validation:Optional +ContainerNameSelector *v1.Selector `json:"containerNameSelector,omitempty" tf:"-"` + +// The name of the Cosmos DB SQL Database to create the stored procedure within. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=SQLDatabase +// +kubebuilder:validation:Optional +DatabaseName *string `json:"databaseName,omitempty" tf:"database_name,omitempty"` + +// Reference to a SQLDatabase to populate databaseName. +// +kubebuilder:validation:Optional +DatabaseNameRef *v1.Reference `json:"databaseNameRef,omitempty" tf:"-"` + +// Selector for a SQLDatabase to populate databaseName. +// +kubebuilder:validation:Optional +DatabaseNameSelector *v1.Selector `json:"databaseNameSelector,omitempty" tf:"-"` + +// The name of the resource group in which the Cosmos DB SQL Database is created. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` + +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` + +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` } // SQLStoredProcedureSpec defines the desired state of SQLStoredProcedure type SQLStoredProcedureSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider SQLStoredProcedureParameters `json:"forProvider"` + ForProvider SQLStoredProcedureParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -117,13 +126,13 @@ type SQLStoredProcedureSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider SQLStoredProcedureInitParameters `json:"initProvider,omitempty"` + InitProvider SQLStoredProcedureInitParameters `json:"initProvider,omitempty"` } // SQLStoredProcedureStatus defines the observed state of SQLStoredProcedure. type SQLStoredProcedureStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider SQLStoredProcedureObservation `json:"atProvider,omitempty"` + AtProvider SQLStoredProcedureObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -138,9 +147,9 @@ type SQLStoredProcedureStatus struct { type SQLStoredProcedure struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.body) || (has(self.initProvider) && has(self.initProvider.body))",message="spec.forProvider.body is a required parameter" - Spec SQLStoredProcedureSpec `json:"spec"` - Status SQLStoredProcedureStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.body) || (has(self.initProvider) && has(self.initProvider.body))",message="spec.forProvider.body is a required parameter" + Spec SQLStoredProcedureSpec `json:"spec"` + Status SQLStoredProcedureStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/cosmosdb/v1alpha1/zz_sqltrigger_types.go b/apis/cosmosdb/v1alpha1/zz_sqltrigger_types.go index 87ce264..f537968 100755 --- a/apis/cosmosdb/v1alpha1/zz_sqltrigger_types.go +++ b/apis/cosmosdb/v1alpha1/zz_sqltrigger_types.go @@ -15,71 +15,80 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type SQLTriggerInitParameters struct { - // Body of the Trigger. - Body *string `json:"body,omitempty" tf:"body,omitempty"` - // The operation the trigger is associated with. Possible values are All, Create, Update, Delete and Replace. - Operation *string `json:"operation,omitempty" tf:"operation,omitempty"` +// Body of the Trigger. +Body *string `json:"body,omitempty" tf:"body,omitempty"` + +// The operation the trigger is associated with. Possible values are All, Create, Update, Delete and Replace. +Operation *string `json:"operation,omitempty" tf:"operation,omitempty"` - // Type of the Trigger. Possible values are Pre and Post. - Type *string `json:"type,omitempty" tf:"type,omitempty"` +// Type of the Trigger. Possible values are Pre and Post. +Type *string `json:"type,omitempty" tf:"type,omitempty"` } + type SQLTriggerObservation struct { - // Body of the Trigger. - Body *string `json:"body,omitempty" tf:"body,omitempty"` - // The id of the Cosmos DB SQL Container to create the SQL Trigger within. Changing this forces a new SQL Trigger to be created. - ContainerID *string `json:"containerId,omitempty" tf:"container_id,omitempty"` +// Body of the Trigger. +Body *string `json:"body,omitempty" tf:"body,omitempty"` + +// The id of the Cosmos DB SQL Container to create the SQL Trigger within. Changing this forces a new SQL Trigger to be created. +ContainerID *string `json:"containerId,omitempty" tf:"container_id,omitempty"` - // The ID of the SQL Trigger. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// The ID of the SQL Trigger. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The operation the trigger is associated with. Possible values are All, Create, Update, Delete and Replace. - Operation *string `json:"operation,omitempty" tf:"operation,omitempty"` +// The operation the trigger is associated with. Possible values are All, Create, Update, Delete and Replace. +Operation *string `json:"operation,omitempty" tf:"operation,omitempty"` - // Type of the Trigger. Possible values are Pre and Post. - Type *string `json:"type,omitempty" tf:"type,omitempty"` +// Type of the Trigger. Possible values are Pre and Post. +Type *string `json:"type,omitempty" tf:"type,omitempty"` } + type SQLTriggerParameters struct { - // Body of the Trigger. - // +kubebuilder:validation:Optional - Body *string `json:"body,omitempty" tf:"body,omitempty"` - // The id of the Cosmos DB SQL Container to create the SQL Trigger within. Changing this forces a new SQL Trigger to be created. - // +crossplane:generate:reference:type=SQLContainer - // +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() - // +kubebuilder:validation:Optional - ContainerID *string `json:"containerId,omitempty" tf:"container_id,omitempty"` +// Body of the Trigger. +// +kubebuilder:validation:Optional +Body *string `json:"body,omitempty" tf:"body,omitempty"` + +// The id of the Cosmos DB SQL Container to create the SQL Trigger within. Changing this forces a new SQL Trigger to be created. +// +crossplane:generate:reference:type=SQLContainer +// +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() +// +kubebuilder:validation:Optional +ContainerID *string `json:"containerId,omitempty" tf:"container_id,omitempty"` - // Reference to a SQLContainer to populate containerId. - // +kubebuilder:validation:Optional - ContainerIDRef *v1.Reference `json:"containerIdRef,omitempty" tf:"-"` +// Reference to a SQLContainer to populate containerId. +// +kubebuilder:validation:Optional +ContainerIDRef *v1.Reference `json:"containerIdRef,omitempty" tf:"-"` - // Selector for a SQLContainer to populate containerId. - // +kubebuilder:validation:Optional - ContainerIDSelector *v1.Selector `json:"containerIdSelector,omitempty" tf:"-"` +// Selector for a SQLContainer to populate containerId. +// +kubebuilder:validation:Optional +ContainerIDSelector *v1.Selector `json:"containerIdSelector,omitempty" tf:"-"` - // The operation the trigger is associated with. Possible values are All, Create, Update, Delete and Replace. - // +kubebuilder:validation:Optional - Operation *string `json:"operation,omitempty" tf:"operation,omitempty"` +// The operation the trigger is associated with. Possible values are All, Create, Update, Delete and Replace. +// +kubebuilder:validation:Optional +Operation *string `json:"operation,omitempty" tf:"operation,omitempty"` - // Type of the Trigger. Possible values are Pre and Post. - // +kubebuilder:validation:Optional - Type *string `json:"type,omitempty" tf:"type,omitempty"` +// Type of the Trigger. Possible values are Pre and Post. +// +kubebuilder:validation:Optional +Type *string `json:"type,omitempty" tf:"type,omitempty"` } // SQLTriggerSpec defines the desired state of SQLTrigger type SQLTriggerSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider SQLTriggerParameters `json:"forProvider"` + ForProvider SQLTriggerParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -90,13 +99,13 @@ type SQLTriggerSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider SQLTriggerInitParameters `json:"initProvider,omitempty"` + InitProvider SQLTriggerInitParameters `json:"initProvider,omitempty"` } // SQLTriggerStatus defines the observed state of SQLTrigger. type SQLTriggerStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider SQLTriggerObservation `json:"atProvider,omitempty"` + AtProvider SQLTriggerObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -111,11 +120,11 @@ type SQLTriggerStatus struct { type SQLTrigger struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.body) || (has(self.initProvider) && has(self.initProvider.body))",message="spec.forProvider.body is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.operation) || (has(self.initProvider) && has(self.initProvider.operation))",message="spec.forProvider.operation is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.type) || (has(self.initProvider) && has(self.initProvider.type))",message="spec.forProvider.type is a required parameter" - Spec SQLTriggerSpec `json:"spec"` - Status SQLTriggerStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.body) || (has(self.initProvider) && has(self.initProvider.body))",message="spec.forProvider.body is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.operation) || (has(self.initProvider) && has(self.initProvider.operation))",message="spec.forProvider.operation is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.type) || (has(self.initProvider) && has(self.initProvider.type))",message="spec.forProvider.type is a required parameter" + Spec SQLTriggerSpec `json:"spec"` + Status SQLTriggerStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/cosmosdb/v1alpha1/zz_table_types.go b/apis/cosmosdb/v1alpha1/zz_table_types.go index 7d2c57f..8bd5f79 100755 --- a/apis/cosmosdb/v1alpha1/zz_table_types.go +++ b/apis/cosmosdb/v1alpha1/zz_table_types.go @@ -15,95 +15,110 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type TableAutoscaleSettingsInitParameters struct { - // The maximum throughput of the Table (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. - MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` + +// The maximum throughput of the Table (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. +MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` } + type TableAutoscaleSettingsObservation struct { - // The maximum throughput of the Table (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. - MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` + +// The maximum throughput of the Table (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. +MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` } + type TableAutoscaleSettingsParameters struct { - // The maximum throughput of the Table (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. - // +kubebuilder:validation:Optional - MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` + +// The maximum throughput of the Table (RU/s). Must be between 1,000 and 1,000,000. Must be set in increments of 1,000. Conflicts with throughput. +// +kubebuilder:validation:Optional +MaxThroughput *float64 `json:"maxThroughput,omitempty" tf:"max_throughput,omitempty"` } + type TableInitParameters struct { - // An autoscale_settings block as defined below. - AutoscaleSettings []TableAutoscaleSettingsInitParameters `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` - // The throughput of Table (RU/s). Must be set in increments of 100. The minimum value is 400. - Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` +// An autoscale_settings block as defined below. +AutoscaleSettings []TableAutoscaleSettingsInitParameters `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` + +// The throughput of Table (RU/s). Must be set in increments of 100. The minimum value is 400. +Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` } + type TableObservation struct { - // The name of the Cosmos DB Table to create the table within. Changing this forces a new resource to be created. - AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` - // An autoscale_settings block as defined below. - AutoscaleSettings []TableAutoscaleSettingsObservation `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` +// The name of the Cosmos DB Table to create the table within. Changing this forces a new resource to be created. +AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` - // The ID of the CosmosDB Table. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// An autoscale_settings block as defined below. +AutoscaleSettings []TableAutoscaleSettingsObservation `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` - // The name of the resource group in which the Cosmos DB Table is created. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The ID of the CosmosDB Table. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The throughput of Table (RU/s). Must be set in increments of 100. The minimum value is 400. - Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` +// The name of the resource group in which the Cosmos DB Table is created. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` + +// The throughput of Table (RU/s). Must be set in increments of 100. The minimum value is 400. +Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` } + type TableParameters struct { - // The name of the Cosmos DB Table to create the table within. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=Account - // +kubebuilder:validation:Optional - AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` - // Reference to a Account to populate accountName. - // +kubebuilder:validation:Optional - AccountNameRef *v1.Reference `json:"accountNameRef,omitempty" tf:"-"` +// The name of the Cosmos DB Table to create the table within. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=Account +// +kubebuilder:validation:Optional +AccountName *string `json:"accountName,omitempty" tf:"account_name,omitempty"` + +// Reference to a Account to populate accountName. +// +kubebuilder:validation:Optional +AccountNameRef *v1.Reference `json:"accountNameRef,omitempty" tf:"-"` - // Selector for a Account to populate accountName. - // +kubebuilder:validation:Optional - AccountNameSelector *v1.Selector `json:"accountNameSelector,omitempty" tf:"-"` +// Selector for a Account to populate accountName. +// +kubebuilder:validation:Optional +AccountNameSelector *v1.Selector `json:"accountNameSelector,omitempty" tf:"-"` - // An autoscale_settings block as defined below. - // +kubebuilder:validation:Optional - AutoscaleSettings []TableAutoscaleSettingsParameters `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` +// An autoscale_settings block as defined below. +// +kubebuilder:validation:Optional +AutoscaleSettings []TableAutoscaleSettingsParameters `json:"autoscaleSettings,omitempty" tf:"autoscale_settings,omitempty"` - // The name of the resource group in which the Cosmos DB Table is created. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group in which the Cosmos DB Table is created. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - // The throughput of Table (RU/s). Must be set in increments of 100. The minimum value is 400. - // +kubebuilder:validation:Optional - Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` +// The throughput of Table (RU/s). Must be set in increments of 100. The minimum value is 400. +// +kubebuilder:validation:Optional +Throughput *float64 `json:"throughput,omitempty" tf:"throughput,omitempty"` } // TableSpec defines the desired state of Table type TableSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider TableParameters `json:"forProvider"` + ForProvider TableParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -114,13 +129,13 @@ type TableSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider TableInitParameters `json:"initProvider,omitempty"` + InitProvider TableInitParameters `json:"initProvider,omitempty"` } // TableStatus defines the observed state of Table. type TableStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider TableObservation `json:"atProvider,omitempty"` + AtProvider TableObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/dbformariadb/v1alpha1/zz_configuration_types.go b/apis/dbformariadb/v1alpha1/zz_configuration_types.go index 16093bf..b8a03c9 100755 --- a/apis/dbformariadb/v1alpha1/zz_configuration_types.go +++ b/apis/dbformariadb/v1alpha1/zz_configuration_types.go @@ -15,76 +15,85 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type ConfigurationInitParameters struct { - // Specifies the name of the MariaDB Configuration, which needs to be a valid MariaDB configuration name. Changing this forces a new resource to be created. - Name *string `json:"name,omitempty" tf:"name,omitempty"` - // Specifies the value of the MariaDB Configuration. See the MariaDB documentation for valid values. Changing this forces a new resource to be created. - Value *string `json:"value,omitempty" tf:"value,omitempty"` +// Specifies the name of the MariaDB Configuration, which needs to be a valid MariaDB configuration name. Changing this forces a new resource to be created. +Name *string `json:"name,omitempty" tf:"name,omitempty"` + +// Specifies the value of the MariaDB Configuration. See the MariaDB documentation for valid values. Changing this forces a new resource to be created. +Value *string `json:"value,omitempty" tf:"value,omitempty"` } + type ConfigurationObservation struct { - // The ID of the MariaDB Configuration. - ID *string `json:"id,omitempty" tf:"id,omitempty"` - // Specifies the name of the MariaDB Configuration, which needs to be a valid MariaDB configuration name. Changing this forces a new resource to be created. - Name *string `json:"name,omitempty" tf:"name,omitempty"` +// The ID of the MariaDB Configuration. +ID *string `json:"id,omitempty" tf:"id,omitempty"` + +// Specifies the name of the MariaDB Configuration, which needs to be a valid MariaDB configuration name. Changing this forces a new resource to be created. +Name *string `json:"name,omitempty" tf:"name,omitempty"` - // The name of the resource group in which the MariaDB Server exists. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group in which the MariaDB Server exists. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Specifies the name of the MariaDB Server. Changing this forces a new resource to be created. - ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` +// Specifies the name of the MariaDB Server. Changing this forces a new resource to be created. +ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` - // Specifies the value of the MariaDB Configuration. See the MariaDB documentation for valid values. Changing this forces a new resource to be created. - Value *string `json:"value,omitempty" tf:"value,omitempty"` +// Specifies the value of the MariaDB Configuration. See the MariaDB documentation for valid values. Changing this forces a new resource to be created. +Value *string `json:"value,omitempty" tf:"value,omitempty"` } + type ConfigurationParameters struct { - // Specifies the name of the MariaDB Configuration, which needs to be a valid MariaDB configuration name. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Name *string `json:"name,omitempty" tf:"name,omitempty"` - // The name of the resource group in which the MariaDB Server exists. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// Specifies the name of the MariaDB Configuration, which needs to be a valid MariaDB configuration name. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Name *string `json:"name,omitempty" tf:"name,omitempty"` + +// The name of the resource group in which the MariaDB Server exists. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - // Specifies the name of the MariaDB Server. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/dbformariadb/v1alpha1.Server - // +kubebuilder:validation:Optional - ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` +// Specifies the name of the MariaDB Server. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/dbformariadb/v1alpha1.Server +// +kubebuilder:validation:Optional +ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` - // Reference to a Server in dbformariadb to populate serverName. - // +kubebuilder:validation:Optional - ServerNameRef *v1.Reference `json:"serverNameRef,omitempty" tf:"-"` +// Reference to a Server in dbformariadb to populate serverName. +// +kubebuilder:validation:Optional +ServerNameRef *v1.Reference `json:"serverNameRef,omitempty" tf:"-"` - // Selector for a Server in dbformariadb to populate serverName. - // +kubebuilder:validation:Optional - ServerNameSelector *v1.Selector `json:"serverNameSelector,omitempty" tf:"-"` +// Selector for a Server in dbformariadb to populate serverName. +// +kubebuilder:validation:Optional +ServerNameSelector *v1.Selector `json:"serverNameSelector,omitempty" tf:"-"` - // Specifies the value of the MariaDB Configuration. See the MariaDB documentation for valid values. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Value *string `json:"value,omitempty" tf:"value,omitempty"` +// Specifies the value of the MariaDB Configuration. See the MariaDB documentation for valid values. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Value *string `json:"value,omitempty" tf:"value,omitempty"` } // ConfigurationSpec defines the desired state of Configuration type ConfigurationSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider ConfigurationParameters `json:"forProvider"` + ForProvider ConfigurationParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -95,13 +104,13 @@ type ConfigurationSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider ConfigurationInitParameters `json:"initProvider,omitempty"` + InitProvider ConfigurationInitParameters `json:"initProvider,omitempty"` } // ConfigurationStatus defines the observed state of Configuration. type ConfigurationStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider ConfigurationObservation `json:"atProvider,omitempty"` + AtProvider ConfigurationObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -116,10 +125,10 @@ type ConfigurationStatus struct { type Configuration struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.name) || (has(self.initProvider) && has(self.initProvider.name))",message="spec.forProvider.name is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.value) || (has(self.initProvider) && has(self.initProvider.value))",message="spec.forProvider.value is a required parameter" - Spec ConfigurationSpec `json:"spec"` - Status ConfigurationStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.name) || (has(self.initProvider) && has(self.initProvider.name))",message="spec.forProvider.name is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.value) || (has(self.initProvider) && has(self.initProvider.value))",message="spec.forProvider.value is a required parameter" + Spec ConfigurationSpec `json:"spec"` + Status ConfigurationStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/dbformariadb/v1alpha1/zz_database_types.go b/apis/dbformariadb/v1alpha1/zz_database_types.go index b8cbb3b..5a08f5e 100755 --- a/apis/dbformariadb/v1alpha1/zz_database_types.go +++ b/apis/dbformariadb/v1alpha1/zz_database_types.go @@ -15,76 +15,85 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type DatabaseInitParameters struct { - // Specifies the Charset for the MariaDB Database, which needs to be a valid MariaDB Charset. Changing this forces a new resource to be created. - Charset *string `json:"charset,omitempty" tf:"charset,omitempty"` - // Specifies the Collation for the MariaDB Database, which needs to be a valid MariaDB Collation. Changing this forces a new resource to be created. - Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` +// Specifies the Charset for the MariaDB Database, which needs to be a valid MariaDB Charset. Changing this forces a new resource to be created. +Charset *string `json:"charset,omitempty" tf:"charset,omitempty"` + +// Specifies the Collation for the MariaDB Database, which needs to be a valid MariaDB Collation. Changing this forces a new resource to be created. +Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` } + type DatabaseObservation struct { - // Specifies the Charset for the MariaDB Database, which needs to be a valid MariaDB Charset. Changing this forces a new resource to be created. - Charset *string `json:"charset,omitempty" tf:"charset,omitempty"` - // Specifies the Collation for the MariaDB Database, which needs to be a valid MariaDB Collation. Changing this forces a new resource to be created. - Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` +// Specifies the Charset for the MariaDB Database, which needs to be a valid MariaDB Charset. Changing this forces a new resource to be created. +Charset *string `json:"charset,omitempty" tf:"charset,omitempty"` + +// Specifies the Collation for the MariaDB Database, which needs to be a valid MariaDB Collation. Changing this forces a new resource to be created. +Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` - // The ID of the MariaDB Database. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// The ID of the MariaDB Database. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The name of the resource group in which the MariaDB Server exists. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group in which the MariaDB Server exists. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Specifies the name of the MariaDB Server. Changing this forces a new resource to be created. - ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` +// Specifies the name of the MariaDB Server. Changing this forces a new resource to be created. +ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` } + type DatabaseParameters struct { - // Specifies the Charset for the MariaDB Database, which needs to be a valid MariaDB Charset. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Charset *string `json:"charset,omitempty" tf:"charset,omitempty"` - // Specifies the Collation for the MariaDB Database, which needs to be a valid MariaDB Collation. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` +// Specifies the Charset for the MariaDB Database, which needs to be a valid MariaDB Charset. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Charset *string `json:"charset,omitempty" tf:"charset,omitempty"` + +// Specifies the Collation for the MariaDB Database, which needs to be a valid MariaDB Collation. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` - // The name of the resource group in which the MariaDB Server exists. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group in which the MariaDB Server exists. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - // Specifies the name of the MariaDB Server. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/dbformariadb/v1alpha1.Server - // +kubebuilder:validation:Optional - ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` +// Specifies the name of the MariaDB Server. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/dbformariadb/v1alpha1.Server +// +kubebuilder:validation:Optional +ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` - // Reference to a Server in dbformariadb to populate serverName. - // +kubebuilder:validation:Optional - ServerNameRef *v1.Reference `json:"serverNameRef,omitempty" tf:"-"` +// Reference to a Server in dbformariadb to populate serverName. +// +kubebuilder:validation:Optional +ServerNameRef *v1.Reference `json:"serverNameRef,omitempty" tf:"-"` - // Selector for a Server in dbformariadb to populate serverName. - // +kubebuilder:validation:Optional - ServerNameSelector *v1.Selector `json:"serverNameSelector,omitempty" tf:"-"` +// Selector for a Server in dbformariadb to populate serverName. +// +kubebuilder:validation:Optional +ServerNameSelector *v1.Selector `json:"serverNameSelector,omitempty" tf:"-"` } // DatabaseSpec defines the desired state of Database type DatabaseSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider DatabaseParameters `json:"forProvider"` + ForProvider DatabaseParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -95,13 +104,13 @@ type DatabaseSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider DatabaseInitParameters `json:"initProvider,omitempty"` + InitProvider DatabaseInitParameters `json:"initProvider,omitempty"` } // DatabaseStatus defines the observed state of Database. type DatabaseStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider DatabaseObservation `json:"atProvider,omitempty"` + AtProvider DatabaseObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -116,10 +125,10 @@ type DatabaseStatus struct { type Database struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.charset) || (has(self.initProvider) && has(self.initProvider.charset))",message="spec.forProvider.charset is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.collation) || (has(self.initProvider) && has(self.initProvider.collation))",message="spec.forProvider.collation is a required parameter" - Spec DatabaseSpec `json:"spec"` - Status DatabaseStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.charset) || (has(self.initProvider) && has(self.initProvider.charset))",message="spec.forProvider.charset is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.collation) || (has(self.initProvider) && has(self.initProvider.collation))",message="spec.forProvider.collation is a required parameter" + Spec DatabaseSpec `json:"spec"` + Status DatabaseStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/dbformariadb/v1alpha1/zz_firewallrule_types.go b/apis/dbformariadb/v1alpha1/zz_firewallrule_types.go index 9503033..7b93ab0 100755 --- a/apis/dbformariadb/v1alpha1/zz_firewallrule_types.go +++ b/apis/dbformariadb/v1alpha1/zz_firewallrule_types.go @@ -15,76 +15,85 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type FirewallRuleInitParameters struct { - // Specifies the End IP Address associated with this Firewall Rule. - EndIPAddress *string `json:"endIpAddress,omitempty" tf:"end_ip_address,omitempty"` - // Specifies the Start IP Address associated with this Firewall Rule. - StartIPAddress *string `json:"startIpAddress,omitempty" tf:"start_ip_address,omitempty"` +// Specifies the End IP Address associated with this Firewall Rule. +EndIPAddress *string `json:"endIpAddress,omitempty" tf:"end_ip_address,omitempty"` + +// Specifies the Start IP Address associated with this Firewall Rule. +StartIPAddress *string `json:"startIpAddress,omitempty" tf:"start_ip_address,omitempty"` } + type FirewallRuleObservation struct { - // Specifies the End IP Address associated with this Firewall Rule. - EndIPAddress *string `json:"endIpAddress,omitempty" tf:"end_ip_address,omitempty"` - // The ID of the MariaDB Firewall Rule. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// Specifies the End IP Address associated with this Firewall Rule. +EndIPAddress *string `json:"endIpAddress,omitempty" tf:"end_ip_address,omitempty"` + +// The ID of the MariaDB Firewall Rule. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The name of the resource group in which the MariaDB Server exists. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group in which the MariaDB Server exists. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Specifies the name of the MariaDB Server. Changing this forces a new resource to be created. - ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` +// Specifies the name of the MariaDB Server. Changing this forces a new resource to be created. +ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` - // Specifies the Start IP Address associated with this Firewall Rule. - StartIPAddress *string `json:"startIpAddress,omitempty" tf:"start_ip_address,omitempty"` +// Specifies the Start IP Address associated with this Firewall Rule. +StartIPAddress *string `json:"startIpAddress,omitempty" tf:"start_ip_address,omitempty"` } + type FirewallRuleParameters struct { - // Specifies the End IP Address associated with this Firewall Rule. - // +kubebuilder:validation:Optional - EndIPAddress *string `json:"endIpAddress,omitempty" tf:"end_ip_address,omitempty"` - // The name of the resource group in which the MariaDB Server exists. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// Specifies the End IP Address associated with this Firewall Rule. +// +kubebuilder:validation:Optional +EndIPAddress *string `json:"endIpAddress,omitempty" tf:"end_ip_address,omitempty"` + +// The name of the resource group in which the MariaDB Server exists. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - // Specifies the name of the MariaDB Server. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=Server - // +kubebuilder:validation:Optional - ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` +// Specifies the name of the MariaDB Server. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=Server +// +kubebuilder:validation:Optional +ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` - // Reference to a Server to populate serverName. - // +kubebuilder:validation:Optional - ServerNameRef *v1.Reference `json:"serverNameRef,omitempty" tf:"-"` +// Reference to a Server to populate serverName. +// +kubebuilder:validation:Optional +ServerNameRef *v1.Reference `json:"serverNameRef,omitempty" tf:"-"` - // Selector for a Server to populate serverName. - // +kubebuilder:validation:Optional - ServerNameSelector *v1.Selector `json:"serverNameSelector,omitempty" tf:"-"` +// Selector for a Server to populate serverName. +// +kubebuilder:validation:Optional +ServerNameSelector *v1.Selector `json:"serverNameSelector,omitempty" tf:"-"` - // Specifies the Start IP Address associated with this Firewall Rule. - // +kubebuilder:validation:Optional - StartIPAddress *string `json:"startIpAddress,omitempty" tf:"start_ip_address,omitempty"` +// Specifies the Start IP Address associated with this Firewall Rule. +// +kubebuilder:validation:Optional +StartIPAddress *string `json:"startIpAddress,omitempty" tf:"start_ip_address,omitempty"` } // FirewallRuleSpec defines the desired state of FirewallRule type FirewallRuleSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider FirewallRuleParameters `json:"forProvider"` + ForProvider FirewallRuleParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -95,13 +104,13 @@ type FirewallRuleSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider FirewallRuleInitParameters `json:"initProvider,omitempty"` + InitProvider FirewallRuleInitParameters `json:"initProvider,omitempty"` } // FirewallRuleStatus defines the observed state of FirewallRule. type FirewallRuleStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider FirewallRuleObservation `json:"atProvider,omitempty"` + AtProvider FirewallRuleObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -116,10 +125,10 @@ type FirewallRuleStatus struct { type FirewallRule struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.endIpAddress) || (has(self.initProvider) && has(self.initProvider.endIpAddress))",message="spec.forProvider.endIpAddress is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.startIpAddress) || (has(self.initProvider) && has(self.initProvider.startIpAddress))",message="spec.forProvider.startIpAddress is a required parameter" - Spec FirewallRuleSpec `json:"spec"` - Status FirewallRuleStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.endIpAddress) || (has(self.initProvider) && has(self.initProvider.endIpAddress))",message="spec.forProvider.endIpAddress is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.startIpAddress) || (has(self.initProvider) && has(self.initProvider.startIpAddress))",message="spec.forProvider.startIpAddress is a required parameter" + Spec FirewallRuleSpec `json:"spec"` + Status FirewallRuleStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/dbformariadb/v1alpha1/zz_generated_terraformed.go b/apis/dbformariadb/v1alpha1/zz_generated_terraformed.go index 17c9432..89207c9 100755 --- a/apis/dbformariadb/v1alpha1/zz_generated_terraformed.go +++ b/apis/dbformariadb/v1alpha1/zz_generated_terraformed.go @@ -11,6 +11,7 @@ Copyright 2022 Upbound Inc. package v1alpha1 import ( + "dario.cat/mergo" "github.com/pkg/errors" "github.com/crossplane/upjet/pkg/resource" @@ -83,6 +84,36 @@ func (tr *Configuration) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this Configuration +func (tr *Configuration) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Configuration using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Configuration) LateInitialize(attrs []byte) (bool, error) { @@ -167,6 +198,36 @@ func (tr *Database) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this Database +func (tr *Database) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Database using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Database) LateInitialize(attrs []byte) (bool, error) { @@ -251,6 +312,36 @@ func (tr *FirewallRule) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this FirewallRule +func (tr *FirewallRule) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this FirewallRule using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *FirewallRule) LateInitialize(attrs []byte) (bool, error) { @@ -335,6 +426,36 @@ func (tr *Server) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this Server +func (tr *Server) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Server using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Server) LateInitialize(attrs []byte) (bool, error) { @@ -419,6 +540,36 @@ func (tr *VirtualNetworkRule) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this VirtualNetworkRule +func (tr *VirtualNetworkRule) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this VirtualNetworkRule using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *VirtualNetworkRule) LateInitialize(attrs []byte) (bool, error) { diff --git a/apis/dbformariadb/v1alpha1/zz_server_types.go b/apis/dbformariadb/v1alpha1/zz_server_types.go index 406c96f..2c9e31a 100755 --- a/apis/dbformariadb/v1alpha1/zz_server_types.go +++ b/apis/dbformariadb/v1alpha1/zz_server_types.go @@ -15,204 +15,213 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type ServerInitParameters struct { - // The Administrator login for the MariaDB Server. Changing this forces a new resource to be created. - AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` - // Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is true. - AutoGrowEnabled *bool `json:"autoGrowEnabled,omitempty" tf:"auto_grow_enabled,omitempty"` +// The Administrator login for the MariaDB Server. Changing this forces a new resource to be created. +AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` + +// Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is true. +AutoGrowEnabled *bool `json:"autoGrowEnabled,omitempty" tf:"auto_grow_enabled,omitempty"` - // Backup retention days for the server, supported values are between 7 and 35 days. - BackupRetentionDays *float64 `json:"backupRetentionDays,omitempty" tf:"backup_retention_days,omitempty"` +// Backup retention days for the server, supported values are between 7 and 35 days. +BackupRetentionDays *float64 `json:"backupRetentionDays,omitempty" tf:"backup_retention_days,omitempty"` - // The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default. - CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` +// The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default. +CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` - // Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not supported for the Basic tier. - GeoRedundantBackupEnabled *bool `json:"geoRedundantBackupEnabled,omitempty" tf:"geo_redundant_backup_enabled,omitempty"` +// Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not supported for the Basic tier. +GeoRedundantBackupEnabled *bool `json:"geoRedundantBackupEnabled,omitempty" tf:"geo_redundant_backup_enabled,omitempty"` - // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // Whether or not public network access is allowed for this server. Defaults to true. - PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` +// Whether or not public network access is allowed for this server. Defaults to true. +PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` - // When create_mode is PointInTimeRestore, specifies the point in time to restore from creation_source_server_id. It should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z. - RestorePointInTime *string `json:"restorePointInTime,omitempty" tf:"restore_point_in_time,omitempty"` +// When create_mode is PointInTimeRestore, specifies the point in time to restore from creation_source_server_id. It should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z. +RestorePointInTime *string `json:"restorePointInTime,omitempty" tf:"restore_point_in_time,omitempty"` - // Specifies if SSL should be enforced on connections. Possible values are true and false. - SSLEnforcementEnabled *bool `json:"sslEnforcementEnabled,omitempty" tf:"ssl_enforcement_enabled,omitempty"` +// Specifies if SSL should be enforced on connections. Possible values are true and false. +SSLEnforcementEnabled *bool `json:"sslEnforcementEnabled,omitempty" tf:"ssl_enforcement_enabled,omitempty"` - // The minimum TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLS1_2. - SSLMinimalTLSVersionEnforced *string `json:"sslMinimalTlsVersionEnforced,omitempty" tf:"ssl_minimal_tls_version_enforced,omitempty"` +// The minimum TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLS1_2. +SSLMinimalTLSVersionEnforced *string `json:"sslMinimalTlsVersionEnforced,omitempty" tf:"ssl_minimal_tls_version_enforced,omitempty"` - // Specifies the SKU Name for this MariaDB Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation. Possible values are B_Gen5_1, B_Gen5_2, GP_Gen5_2, GP_Gen5_4, GP_Gen5_8, GP_Gen5_16, GP_Gen5_32, MO_Gen5_2, MO_Gen5_4, MO_Gen5_8 and MO_Gen5_16. - SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` +// Specifies the SKU Name for this MariaDB Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation. Possible values are B_Gen5_1, B_Gen5_2, GP_Gen5_2, GP_Gen5_4, GP_Gen5_8, GP_Gen5_16, GP_Gen5_32, MO_Gen5_2, MO_Gen5_4, MO_Gen5_8 and MO_Gen5_16. +SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` - // Max storage allowed for a server. Possible values are between 5120 MB (5GB) and 1024000MB (1TB) for the Basic SKU and between 5120 MB (5GB) and 4096000 MB (4TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation. - StorageMb *float64 `json:"storageMb,omitempty" tf:"storage_mb,omitempty"` +// Max storage allowed for a server. Possible values are between 5120 MB (5GB) and 1024000MB (1TB) for the Basic SKU and between 5120 MB (5GB) and 4096000 MB (4TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation. +StorageMb *float64 `json:"storageMb,omitempty" tf:"storage_mb,omitempty"` - // A mapping of tags to assign to the resource. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A mapping of tags to assign to the resource. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - // Specifies the version of MariaDB to use. Possible values are 10.2 and 10.3. Changing this forces a new resource to be created. - Version *string `json:"version,omitempty" tf:"version,omitempty"` +// Specifies the version of MariaDB to use. Possible values are 10.2 and 10.3. Changing this forces a new resource to be created. +Version *string `json:"version,omitempty" tf:"version,omitempty"` } + type ServerObservation struct { - // The Administrator login for the MariaDB Server. Changing this forces a new resource to be created. - AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` - // Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is true. - AutoGrowEnabled *bool `json:"autoGrowEnabled,omitempty" tf:"auto_grow_enabled,omitempty"` +// The Administrator login for the MariaDB Server. Changing this forces a new resource to be created. +AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` + +// Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is true. +AutoGrowEnabled *bool `json:"autoGrowEnabled,omitempty" tf:"auto_grow_enabled,omitempty"` - // Backup retention days for the server, supported values are between 7 and 35 days. - BackupRetentionDays *float64 `json:"backupRetentionDays,omitempty" tf:"backup_retention_days,omitempty"` +// Backup retention days for the server, supported values are between 7 and 35 days. +BackupRetentionDays *float64 `json:"backupRetentionDays,omitempty" tf:"backup_retention_days,omitempty"` - // The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default. - CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` +// The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default. +CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` - // For creation modes other than Default, the source server ID to use. - CreationSourceServerID *string `json:"creationSourceServerId,omitempty" tf:"creation_source_server_id,omitempty"` +// For creation modes other than Default, the source server ID to use. +CreationSourceServerID *string `json:"creationSourceServerId,omitempty" tf:"creation_source_server_id,omitempty"` - // The FQDN of the MariaDB Server. - Fqdn *string `json:"fqdn,omitempty" tf:"fqdn,omitempty"` +// The FQDN of the MariaDB Server. +Fqdn *string `json:"fqdn,omitempty" tf:"fqdn,omitempty"` - // Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not supported for the Basic tier. - GeoRedundantBackupEnabled *bool `json:"geoRedundantBackupEnabled,omitempty" tf:"geo_redundant_backup_enabled,omitempty"` +// Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not supported for the Basic tier. +GeoRedundantBackupEnabled *bool `json:"geoRedundantBackupEnabled,omitempty" tf:"geo_redundant_backup_enabled,omitempty"` - // The ID of the MariaDB Server. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// The ID of the MariaDB Server. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // Whether or not public network access is allowed for this server. Defaults to true. - PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` +// Whether or not public network access is allowed for this server. Defaults to true. +PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` - // The name of the resource group in which to create the MariaDB Server. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group in which to create the MariaDB Server. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // When create_mode is PointInTimeRestore, specifies the point in time to restore from creation_source_server_id. It should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z. - RestorePointInTime *string `json:"restorePointInTime,omitempty" tf:"restore_point_in_time,omitempty"` +// When create_mode is PointInTimeRestore, specifies the point in time to restore from creation_source_server_id. It should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z. +RestorePointInTime *string `json:"restorePointInTime,omitempty" tf:"restore_point_in_time,omitempty"` - // Specifies if SSL should be enforced on connections. Possible values are true and false. - SSLEnforcementEnabled *bool `json:"sslEnforcementEnabled,omitempty" tf:"ssl_enforcement_enabled,omitempty"` +// Specifies if SSL should be enforced on connections. Possible values are true and false. +SSLEnforcementEnabled *bool `json:"sslEnforcementEnabled,omitempty" tf:"ssl_enforcement_enabled,omitempty"` - // The minimum TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLS1_2. - SSLMinimalTLSVersionEnforced *string `json:"sslMinimalTlsVersionEnforced,omitempty" tf:"ssl_minimal_tls_version_enforced,omitempty"` +// The minimum TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLS1_2. +SSLMinimalTLSVersionEnforced *string `json:"sslMinimalTlsVersionEnforced,omitempty" tf:"ssl_minimal_tls_version_enforced,omitempty"` - // Specifies the SKU Name for this MariaDB Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation. Possible values are B_Gen5_1, B_Gen5_2, GP_Gen5_2, GP_Gen5_4, GP_Gen5_8, GP_Gen5_16, GP_Gen5_32, MO_Gen5_2, MO_Gen5_4, MO_Gen5_8 and MO_Gen5_16. - SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` +// Specifies the SKU Name for this MariaDB Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation. Possible values are B_Gen5_1, B_Gen5_2, GP_Gen5_2, GP_Gen5_4, GP_Gen5_8, GP_Gen5_16, GP_Gen5_32, MO_Gen5_2, MO_Gen5_4, MO_Gen5_8 and MO_Gen5_16. +SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` - // Max storage allowed for a server. Possible values are between 5120 MB (5GB) and 1024000MB (1TB) for the Basic SKU and between 5120 MB (5GB) and 4096000 MB (4TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation. - StorageMb *float64 `json:"storageMb,omitempty" tf:"storage_mb,omitempty"` +// Max storage allowed for a server. Possible values are between 5120 MB (5GB) and 1024000MB (1TB) for the Basic SKU and between 5120 MB (5GB) and 4096000 MB (4TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation. +StorageMb *float64 `json:"storageMb,omitempty" tf:"storage_mb,omitempty"` - // A mapping of tags to assign to the resource. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A mapping of tags to assign to the resource. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - // Specifies the version of MariaDB to use. Possible values are 10.2 and 10.3. Changing this forces a new resource to be created. - Version *string `json:"version,omitempty" tf:"version,omitempty"` +// Specifies the version of MariaDB to use. Possible values are 10.2 and 10.3. Changing this forces a new resource to be created. +Version *string `json:"version,omitempty" tf:"version,omitempty"` } + type ServerParameters struct { - // The Administrator login for the MariaDB Server. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` - // The Password associated with the administrator_login for the MariaDB Server. - // +kubebuilder:validation:Optional - AdministratorLoginPasswordSecretRef *v1.SecretKeySelector `json:"administratorLoginPasswordSecretRef,omitempty" tf:"-"` +// The Administrator login for the MariaDB Server. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` + +// The Password associated with the administrator_login for the MariaDB Server. +// +kubebuilder:validation:Optional +AdministratorLoginPasswordSecretRef *v1.SecretKeySelector `json:"administratorLoginPasswordSecretRef,omitempty" tf:"-"` - // Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is true. - // +kubebuilder:validation:Optional - AutoGrowEnabled *bool `json:"autoGrowEnabled,omitempty" tf:"auto_grow_enabled,omitempty"` +// Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is true. +// +kubebuilder:validation:Optional +AutoGrowEnabled *bool `json:"autoGrowEnabled,omitempty" tf:"auto_grow_enabled,omitempty"` - // Backup retention days for the server, supported values are between 7 and 35 days. - // +kubebuilder:validation:Optional - BackupRetentionDays *float64 `json:"backupRetentionDays,omitempty" tf:"backup_retention_days,omitempty"` +// Backup retention days for the server, supported values are between 7 and 35 days. +// +kubebuilder:validation:Optional +BackupRetentionDays *float64 `json:"backupRetentionDays,omitempty" tf:"backup_retention_days,omitempty"` - // The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default. - // +kubebuilder:validation:Optional - CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` +// The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default. +// +kubebuilder:validation:Optional +CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` - // For creation modes other than Default, the source server ID to use. - // +crossplane:generate:reference:type=Server - // +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() - // +kubebuilder:validation:Optional - CreationSourceServerID *string `json:"creationSourceServerId,omitempty" tf:"creation_source_server_id,omitempty"` +// For creation modes other than Default, the source server ID to use. +// +crossplane:generate:reference:type=Server +// +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() +// +kubebuilder:validation:Optional +CreationSourceServerID *string `json:"creationSourceServerId,omitempty" tf:"creation_source_server_id,omitempty"` - // Reference to a Server to populate creationSourceServerId. - // +kubebuilder:validation:Optional - CreationSourceServerIDRef *v1.Reference `json:"creationSourceServerIdRef,omitempty" tf:"-"` +// Reference to a Server to populate creationSourceServerId. +// +kubebuilder:validation:Optional +CreationSourceServerIDRef *v1.Reference `json:"creationSourceServerIdRef,omitempty" tf:"-"` - // Selector for a Server to populate creationSourceServerId. - // +kubebuilder:validation:Optional - CreationSourceServerIDSelector *v1.Selector `json:"creationSourceServerIdSelector,omitempty" tf:"-"` +// Selector for a Server to populate creationSourceServerId. +// +kubebuilder:validation:Optional +CreationSourceServerIDSelector *v1.Selector `json:"creationSourceServerIdSelector,omitempty" tf:"-"` - // Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not supported for the Basic tier. - // +kubebuilder:validation:Optional - GeoRedundantBackupEnabled *bool `json:"geoRedundantBackupEnabled,omitempty" tf:"geo_redundant_backup_enabled,omitempty"` +// Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not supported for the Basic tier. +// +kubebuilder:validation:Optional +GeoRedundantBackupEnabled *bool `json:"geoRedundantBackupEnabled,omitempty" tf:"geo_redundant_backup_enabled,omitempty"` - // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // Whether or not public network access is allowed for this server. Defaults to true. - // +kubebuilder:validation:Optional - PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` +// Whether or not public network access is allowed for this server. Defaults to true. +// +kubebuilder:validation:Optional +PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` - // The name of the resource group in which to create the MariaDB Server. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group in which to create the MariaDB Server. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - // When create_mode is PointInTimeRestore, specifies the point in time to restore from creation_source_server_id. It should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z. - // +kubebuilder:validation:Optional - RestorePointInTime *string `json:"restorePointInTime,omitempty" tf:"restore_point_in_time,omitempty"` +// When create_mode is PointInTimeRestore, specifies the point in time to restore from creation_source_server_id. It should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z. +// +kubebuilder:validation:Optional +RestorePointInTime *string `json:"restorePointInTime,omitempty" tf:"restore_point_in_time,omitempty"` - // Specifies if SSL should be enforced on connections. Possible values are true and false. - // +kubebuilder:validation:Optional - SSLEnforcementEnabled *bool `json:"sslEnforcementEnabled,omitempty" tf:"ssl_enforcement_enabled,omitempty"` +// Specifies if SSL should be enforced on connections. Possible values are true and false. +// +kubebuilder:validation:Optional +SSLEnforcementEnabled *bool `json:"sslEnforcementEnabled,omitempty" tf:"ssl_enforcement_enabled,omitempty"` - // The minimum TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLS1_2. - // +kubebuilder:validation:Optional - SSLMinimalTLSVersionEnforced *string `json:"sslMinimalTlsVersionEnforced,omitempty" tf:"ssl_minimal_tls_version_enforced,omitempty"` +// The minimum TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLS1_2. +// +kubebuilder:validation:Optional +SSLMinimalTLSVersionEnforced *string `json:"sslMinimalTlsVersionEnforced,omitempty" tf:"ssl_minimal_tls_version_enforced,omitempty"` - // Specifies the SKU Name for this MariaDB Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation. Possible values are B_Gen5_1, B_Gen5_2, GP_Gen5_2, GP_Gen5_4, GP_Gen5_8, GP_Gen5_16, GP_Gen5_32, MO_Gen5_2, MO_Gen5_4, MO_Gen5_8 and MO_Gen5_16. - // +kubebuilder:validation:Optional - SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` +// Specifies the SKU Name for this MariaDB Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation. Possible values are B_Gen5_1, B_Gen5_2, GP_Gen5_2, GP_Gen5_4, GP_Gen5_8, GP_Gen5_16, GP_Gen5_32, MO_Gen5_2, MO_Gen5_4, MO_Gen5_8 and MO_Gen5_16. +// +kubebuilder:validation:Optional +SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` - // Max storage allowed for a server. Possible values are between 5120 MB (5GB) and 1024000MB (1TB) for the Basic SKU and between 5120 MB (5GB) and 4096000 MB (4TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation. - // +kubebuilder:validation:Optional - StorageMb *float64 `json:"storageMb,omitempty" tf:"storage_mb,omitempty"` +// Max storage allowed for a server. Possible values are between 5120 MB (5GB) and 1024000MB (1TB) for the Basic SKU and between 5120 MB (5GB) and 4096000 MB (4TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation. +// +kubebuilder:validation:Optional +StorageMb *float64 `json:"storageMb,omitempty" tf:"storage_mb,omitempty"` - // A mapping of tags to assign to the resource. - // +kubebuilder:validation:Optional - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A mapping of tags to assign to the resource. +// +kubebuilder:validation:Optional +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - // Specifies the version of MariaDB to use. Possible values are 10.2 and 10.3. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Version *string `json:"version,omitempty" tf:"version,omitempty"` +// Specifies the version of MariaDB to use. Possible values are 10.2 and 10.3. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Version *string `json:"version,omitempty" tf:"version,omitempty"` } // ServerSpec defines the desired state of Server type ServerSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider ServerParameters `json:"forProvider"` + ForProvider ServerParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -223,13 +232,13 @@ type ServerSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider ServerInitParameters `json:"initProvider,omitempty"` + InitProvider ServerInitParameters `json:"initProvider,omitempty"` } // ServerStatus defines the observed state of Server. type ServerStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider ServerObservation `json:"atProvider,omitempty"` + AtProvider ServerObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -244,12 +253,12 @@ type ServerStatus struct { type Server struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.skuName) || (has(self.initProvider) && has(self.initProvider.skuName))",message="spec.forProvider.skuName is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.sslEnforcementEnabled) || (has(self.initProvider) && has(self.initProvider.sslEnforcementEnabled))",message="spec.forProvider.sslEnforcementEnabled is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.version) || (has(self.initProvider) && has(self.initProvider.version))",message="spec.forProvider.version is a required parameter" - Spec ServerSpec `json:"spec"` - Status ServerStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.skuName) || (has(self.initProvider) && has(self.initProvider.skuName))",message="spec.forProvider.skuName is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.sslEnforcementEnabled) || (has(self.initProvider) && has(self.initProvider.sslEnforcementEnabled))",message="spec.forProvider.sslEnforcementEnabled is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.version) || (has(self.initProvider) && has(self.initProvider.version))",message="spec.forProvider.version is a required parameter" + Spec ServerSpec `json:"spec"` + Status ServerStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/dbformariadb/v1alpha1/zz_virtualnetworkrule_types.go b/apis/dbformariadb/v1alpha1/zz_virtualnetworkrule_types.go index 2725edd..5cd36aa 100755 --- a/apis/dbformariadb/v1alpha1/zz_virtualnetworkrule_types.go +++ b/apis/dbformariadb/v1alpha1/zz_virtualnetworkrule_types.go @@ -15,73 +15,82 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type VirtualNetworkRuleInitParameters struct { + } + type VirtualNetworkRuleObservation struct { - // The ID of the MariaDB Virtual Network Rule. - ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The name of the resource group where the MariaDB server resides. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The ID of the MariaDB Virtual Network Rule. +ID *string `json:"id,omitempty" tf:"id,omitempty"` + +// The name of the resource group where the MariaDB server resides. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // The name of the SQL Server to which this MariaDB virtual network rule will be applied to. Changing this forces a new resource to be created. - ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` +// The name of the SQL Server to which this MariaDB virtual network rule will be applied to. Changing this forces a new resource to be created. +ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` - // The ID of the subnet that the MariaDB server will be connected to. - SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"` +// The ID of the subnet that the MariaDB server will be connected to. +SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"` } + type VirtualNetworkRuleParameters struct { - // The name of the resource group where the MariaDB server resides. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - - // The name of the SQL Server to which this MariaDB virtual network rule will be applied to. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/dbformariadb/v1alpha1.Server - // +kubebuilder:validation:Optional - ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` - - // Reference to a Server in dbformariadb to populate serverName. - // +kubebuilder:validation:Optional - ServerNameRef *v1.Reference `json:"serverNameRef,omitempty" tf:"-"` - - // Selector for a Server in dbformariadb to populate serverName. - // +kubebuilder:validation:Optional - ServerNameSelector *v1.Selector `json:"serverNameSelector,omitempty" tf:"-"` - - // The ID of the subnet that the MariaDB server will be connected to. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/network/v1alpha1.Subnet - // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() - // +kubebuilder:validation:Optional - SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"` - - // Reference to a Subnet in network to populate subnetId. - // +kubebuilder:validation:Optional - SubnetIDRef *v1.Reference `json:"subnetIdRef,omitempty" tf:"-"` - - // Selector for a Subnet in network to populate subnetId. - // +kubebuilder:validation:Optional - SubnetIDSelector *v1.Selector `json:"subnetIdSelector,omitempty" tf:"-"` + +// The name of the resource group where the MariaDB server resides. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` + +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` + +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` + +// The name of the SQL Server to which this MariaDB virtual network rule will be applied to. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/dbformariadb/v1alpha1.Server +// +kubebuilder:validation:Optional +ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` + +// Reference to a Server in dbformariadb to populate serverName. +// +kubebuilder:validation:Optional +ServerNameRef *v1.Reference `json:"serverNameRef,omitempty" tf:"-"` + +// Selector for a Server in dbformariadb to populate serverName. +// +kubebuilder:validation:Optional +ServerNameSelector *v1.Selector `json:"serverNameSelector,omitempty" tf:"-"` + +// The ID of the subnet that the MariaDB server will be connected to. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/network/v1alpha1.Subnet +// +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() +// +kubebuilder:validation:Optional +SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"` + +// Reference to a Subnet in network to populate subnetId. +// +kubebuilder:validation:Optional +SubnetIDRef *v1.Reference `json:"subnetIdRef,omitempty" tf:"-"` + +// Selector for a Subnet in network to populate subnetId. +// +kubebuilder:validation:Optional +SubnetIDSelector *v1.Selector `json:"subnetIdSelector,omitempty" tf:"-"` } // VirtualNetworkRuleSpec defines the desired state of VirtualNetworkRule type VirtualNetworkRuleSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider VirtualNetworkRuleParameters `json:"forProvider"` + ForProvider VirtualNetworkRuleParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -92,13 +101,13 @@ type VirtualNetworkRuleSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider VirtualNetworkRuleInitParameters `json:"initProvider,omitempty"` + InitProvider VirtualNetworkRuleInitParameters `json:"initProvider,omitempty"` } // VirtualNetworkRuleStatus defines the observed state of VirtualNetworkRule. type VirtualNetworkRuleStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider VirtualNetworkRuleObservation `json:"atProvider,omitempty"` + AtProvider VirtualNetworkRuleObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/dbformysql/v1alpha1/zz_activedirectoryadministrator_types.go b/apis/dbformysql/v1alpha1/zz_activedirectoryadministrator_types.go index 74ac0b0..131a00c 100755 --- a/apis/dbformysql/v1alpha1/zz_activedirectoryadministrator_types.go +++ b/apis/dbformysql/v1alpha1/zz_activedirectoryadministrator_types.go @@ -15,86 +15,95 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type ActiveDirectoryAdministratorInitParameters struct { - // The login name of the principal to set as the server administrator - Login *string `json:"login,omitempty" tf:"login,omitempty"` - // The ID of the principal to set as the server administrator. For a managed identity this should be the Client ID of the identity. - ObjectID *string `json:"objectId,omitempty" tf:"object_id,omitempty"` +// The login name of the principal to set as the server administrator +Login *string `json:"login,omitempty" tf:"login,omitempty"` + +// The ID of the principal to set as the server administrator. For a managed identity this should be the Client ID of the identity. +ObjectID *string `json:"objectId,omitempty" tf:"object_id,omitempty"` - // The Azure Tenant ID - TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` +// The Azure Tenant ID +TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` } + type ActiveDirectoryAdministratorObservation struct { - // The ID of the MySQL Active Directory Administrator. - ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The login name of the principal to set as the server administrator - Login *string `json:"login,omitempty" tf:"login,omitempty"` +// The ID of the MySQL Active Directory Administrator. +ID *string `json:"id,omitempty" tf:"id,omitempty"` + +// The login name of the principal to set as the server administrator +Login *string `json:"login,omitempty" tf:"login,omitempty"` - // The ID of the principal to set as the server administrator. For a managed identity this should be the Client ID of the identity. - ObjectID *string `json:"objectId,omitempty" tf:"object_id,omitempty"` +// The ID of the principal to set as the server administrator. For a managed identity this should be the Client ID of the identity. +ObjectID *string `json:"objectId,omitempty" tf:"object_id,omitempty"` - // The name of the resource group for the MySQL server. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group for the MySQL server. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // The name of the MySQL Server on which to set the administrator. Changing this forces a new resource to be created. - ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` +// The name of the MySQL Server on which to set the administrator. Changing this forces a new resource to be created. +ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` - // The Azure Tenant ID - TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` +// The Azure Tenant ID +TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` } + type ActiveDirectoryAdministratorParameters struct { - // The login name of the principal to set as the server administrator - // +kubebuilder:validation:Optional - Login *string `json:"login,omitempty" tf:"login,omitempty"` - // The ID of the principal to set as the server administrator. For a managed identity this should be the Client ID of the identity. - // +kubebuilder:validation:Optional - ObjectID *string `json:"objectId,omitempty" tf:"object_id,omitempty"` +// The login name of the principal to set as the server administrator +// +kubebuilder:validation:Optional +Login *string `json:"login,omitempty" tf:"login,omitempty"` + +// The ID of the principal to set as the server administrator. For a managed identity this should be the Client ID of the identity. +// +kubebuilder:validation:Optional +ObjectID *string `json:"objectId,omitempty" tf:"object_id,omitempty"` - // The name of the resource group for the MySQL server. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group for the MySQL server. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - // The name of the MySQL Server on which to set the administrator. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/dbformysql/v1alpha1.Server - // +kubebuilder:validation:Optional - ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` +// The name of the MySQL Server on which to set the administrator. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/dbformysql/v1alpha1.Server +// +kubebuilder:validation:Optional +ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` - // Reference to a Server in dbformysql to populate serverName. - // +kubebuilder:validation:Optional - ServerNameRef *v1.Reference `json:"serverNameRef,omitempty" tf:"-"` +// Reference to a Server in dbformysql to populate serverName. +// +kubebuilder:validation:Optional +ServerNameRef *v1.Reference `json:"serverNameRef,omitempty" tf:"-"` - // Selector for a Server in dbformysql to populate serverName. - // +kubebuilder:validation:Optional - ServerNameSelector *v1.Selector `json:"serverNameSelector,omitempty" tf:"-"` +// Selector for a Server in dbformysql to populate serverName. +// +kubebuilder:validation:Optional +ServerNameSelector *v1.Selector `json:"serverNameSelector,omitempty" tf:"-"` - // The Azure Tenant ID - // +kubebuilder:validation:Optional - TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` +// The Azure Tenant ID +// +kubebuilder:validation:Optional +TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` } // ActiveDirectoryAdministratorSpec defines the desired state of ActiveDirectoryAdministrator type ActiveDirectoryAdministratorSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider ActiveDirectoryAdministratorParameters `json:"forProvider"` + ForProvider ActiveDirectoryAdministratorParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -105,13 +114,13 @@ type ActiveDirectoryAdministratorSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider ActiveDirectoryAdministratorInitParameters `json:"initProvider,omitempty"` + InitProvider ActiveDirectoryAdministratorInitParameters `json:"initProvider,omitempty"` } // ActiveDirectoryAdministratorStatus defines the observed state of ActiveDirectoryAdministrator. type ActiveDirectoryAdministratorStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider ActiveDirectoryAdministratorObservation `json:"atProvider,omitempty"` + AtProvider ActiveDirectoryAdministratorObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -126,11 +135,11 @@ type ActiveDirectoryAdministratorStatus struct { type ActiveDirectoryAdministrator struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.login) || (has(self.initProvider) && has(self.initProvider.login))",message="spec.forProvider.login is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.objectId) || (has(self.initProvider) && has(self.initProvider.objectId))",message="spec.forProvider.objectId is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.tenantId) || (has(self.initProvider) && has(self.initProvider.tenantId))",message="spec.forProvider.tenantId is a required parameter" - Spec ActiveDirectoryAdministratorSpec `json:"spec"` - Status ActiveDirectoryAdministratorStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.login) || (has(self.initProvider) && has(self.initProvider.login))",message="spec.forProvider.login is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.objectId) || (has(self.initProvider) && has(self.initProvider.objectId))",message="spec.forProvider.objectId is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.tenantId) || (has(self.initProvider) && has(self.initProvider.tenantId))",message="spec.forProvider.tenantId is a required parameter" + Spec ActiveDirectoryAdministratorSpec `json:"spec"` + Status ActiveDirectoryAdministratorStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/dbformysql/v1alpha1/zz_configuration_types.go b/apis/dbformysql/v1alpha1/zz_configuration_types.go index e847ec5..cbc74f6 100755 --- a/apis/dbformysql/v1alpha1/zz_configuration_types.go +++ b/apis/dbformysql/v1alpha1/zz_configuration_types.go @@ -15,76 +15,85 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type ConfigurationInitParameters struct { - // Specifies the name of the MySQL Configuration, which needs to be a valid MySQL configuration name. Changing this forces a new resource to be created. - Name *string `json:"name,omitempty" tf:"name,omitempty"` - // Specifies the value of the MySQL Configuration. See the MySQL documentation for valid values. Changing this forces a new resource to be created. - Value *string `json:"value,omitempty" tf:"value,omitempty"` +// Specifies the name of the MySQL Configuration, which needs to be a valid MySQL configuration name. Changing this forces a new resource to be created. +Name *string `json:"name,omitempty" tf:"name,omitempty"` + +// Specifies the value of the MySQL Configuration. See the MySQL documentation for valid values. Changing this forces a new resource to be created. +Value *string `json:"value,omitempty" tf:"value,omitempty"` } + type ConfigurationObservation struct { - // The ID of the MySQL Configuration. - ID *string `json:"id,omitempty" tf:"id,omitempty"` - // Specifies the name of the MySQL Configuration, which needs to be a valid MySQL configuration name. Changing this forces a new resource to be created. - Name *string `json:"name,omitempty" tf:"name,omitempty"` +// The ID of the MySQL Configuration. +ID *string `json:"id,omitempty" tf:"id,omitempty"` + +// Specifies the name of the MySQL Configuration, which needs to be a valid MySQL configuration name. Changing this forces a new resource to be created. +Name *string `json:"name,omitempty" tf:"name,omitempty"` - // The name of the resource group in which the MySQL Server exists. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group in which the MySQL Server exists. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Specifies the name of the MySQL Server. Changing this forces a new resource to be created. - ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` +// Specifies the name of the MySQL Server. Changing this forces a new resource to be created. +ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` - // Specifies the value of the MySQL Configuration. See the MySQL documentation for valid values. Changing this forces a new resource to be created. - Value *string `json:"value,omitempty" tf:"value,omitempty"` +// Specifies the value of the MySQL Configuration. See the MySQL documentation for valid values. Changing this forces a new resource to be created. +Value *string `json:"value,omitempty" tf:"value,omitempty"` } + type ConfigurationParameters struct { - // Specifies the name of the MySQL Configuration, which needs to be a valid MySQL configuration name. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Name *string `json:"name,omitempty" tf:"name,omitempty"` - // The name of the resource group in which the MySQL Server exists. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// Specifies the name of the MySQL Configuration, which needs to be a valid MySQL configuration name. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Name *string `json:"name,omitempty" tf:"name,omitempty"` + +// The name of the resource group in which the MySQL Server exists. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - // Specifies the name of the MySQL Server. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/dbformysql/v1alpha1.Server - // +kubebuilder:validation:Optional - ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` +// Specifies the name of the MySQL Server. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/dbformysql/v1alpha1.Server +// +kubebuilder:validation:Optional +ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` - // Reference to a Server in dbformysql to populate serverName. - // +kubebuilder:validation:Optional - ServerNameRef *v1.Reference `json:"serverNameRef,omitempty" tf:"-"` +// Reference to a Server in dbformysql to populate serverName. +// +kubebuilder:validation:Optional +ServerNameRef *v1.Reference `json:"serverNameRef,omitempty" tf:"-"` - // Selector for a Server in dbformysql to populate serverName. - // +kubebuilder:validation:Optional - ServerNameSelector *v1.Selector `json:"serverNameSelector,omitempty" tf:"-"` +// Selector for a Server in dbformysql to populate serverName. +// +kubebuilder:validation:Optional +ServerNameSelector *v1.Selector `json:"serverNameSelector,omitempty" tf:"-"` - // Specifies the value of the MySQL Configuration. See the MySQL documentation for valid values. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Value *string `json:"value,omitempty" tf:"value,omitempty"` +// Specifies the value of the MySQL Configuration. See the MySQL documentation for valid values. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Value *string `json:"value,omitempty" tf:"value,omitempty"` } // ConfigurationSpec defines the desired state of Configuration type ConfigurationSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider ConfigurationParameters `json:"forProvider"` + ForProvider ConfigurationParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -95,13 +104,13 @@ type ConfigurationSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider ConfigurationInitParameters `json:"initProvider,omitempty"` + InitProvider ConfigurationInitParameters `json:"initProvider,omitempty"` } // ConfigurationStatus defines the observed state of Configuration. type ConfigurationStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider ConfigurationObservation `json:"atProvider,omitempty"` + AtProvider ConfigurationObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -116,10 +125,10 @@ type ConfigurationStatus struct { type Configuration struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.name) || (has(self.initProvider) && has(self.initProvider.name))",message="spec.forProvider.name is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.value) || (has(self.initProvider) && has(self.initProvider.value))",message="spec.forProvider.value is a required parameter" - Spec ConfigurationSpec `json:"spec"` - Status ConfigurationStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.name) || (has(self.initProvider) && has(self.initProvider.name))",message="spec.forProvider.name is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.value) || (has(self.initProvider) && has(self.initProvider.value))",message="spec.forProvider.value is a required parameter" + Spec ConfigurationSpec `json:"spec"` + Status ConfigurationStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/dbformysql/v1alpha1/zz_database_types.go b/apis/dbformysql/v1alpha1/zz_database_types.go index 1b604c4..81e1052 100755 --- a/apis/dbformysql/v1alpha1/zz_database_types.go +++ b/apis/dbformysql/v1alpha1/zz_database_types.go @@ -15,76 +15,85 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type DatabaseInitParameters struct { - // Specifies the Charset for the MySQL Database, which needs to be a valid MySQL Charset. Changing this forces a new resource to be created. - Charset *string `json:"charset,omitempty" tf:"charset,omitempty"` - // Specifies the Collation for the MySQL Database, which needs to be a valid MySQL Collation. Changing this forces a new resource to be created. - Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` +// Specifies the Charset for the MySQL Database, which needs to be a valid MySQL Charset. Changing this forces a new resource to be created. +Charset *string `json:"charset,omitempty" tf:"charset,omitempty"` + +// Specifies the Collation for the MySQL Database, which needs to be a valid MySQL Collation. Changing this forces a new resource to be created. +Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` } + type DatabaseObservation struct { - // Specifies the Charset for the MySQL Database, which needs to be a valid MySQL Charset. Changing this forces a new resource to be created. - Charset *string `json:"charset,omitempty" tf:"charset,omitempty"` - // Specifies the Collation for the MySQL Database, which needs to be a valid MySQL Collation. Changing this forces a new resource to be created. - Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` +// Specifies the Charset for the MySQL Database, which needs to be a valid MySQL Charset. Changing this forces a new resource to be created. +Charset *string `json:"charset,omitempty" tf:"charset,omitempty"` + +// Specifies the Collation for the MySQL Database, which needs to be a valid MySQL Collation. Changing this forces a new resource to be created. +Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` - // The ID of the MySQL Database. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// The ID of the MySQL Database. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The name of the resource group in which the MySQL Server exists. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group in which the MySQL Server exists. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Specifies the name of the MySQL Server. Changing this forces a new resource to be created. - ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` +// Specifies the name of the MySQL Server. Changing this forces a new resource to be created. +ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` } + type DatabaseParameters struct { - // Specifies the Charset for the MySQL Database, which needs to be a valid MySQL Charset. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Charset *string `json:"charset,omitempty" tf:"charset,omitempty"` - // Specifies the Collation for the MySQL Database, which needs to be a valid MySQL Collation. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` +// Specifies the Charset for the MySQL Database, which needs to be a valid MySQL Charset. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Charset *string `json:"charset,omitempty" tf:"charset,omitempty"` + +// Specifies the Collation for the MySQL Database, which needs to be a valid MySQL Collation. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` - // The name of the resource group in which the MySQL Server exists. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group in which the MySQL Server exists. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - // Specifies the name of the MySQL Server. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/dbformysql/v1alpha1.Server - // +kubebuilder:validation:Optional - ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` +// Specifies the name of the MySQL Server. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/dbformysql/v1alpha1.Server +// +kubebuilder:validation:Optional +ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` - // Reference to a Server in dbformysql to populate serverName. - // +kubebuilder:validation:Optional - ServerNameRef *v1.Reference `json:"serverNameRef,omitempty" tf:"-"` +// Reference to a Server in dbformysql to populate serverName. +// +kubebuilder:validation:Optional +ServerNameRef *v1.Reference `json:"serverNameRef,omitempty" tf:"-"` - // Selector for a Server in dbformysql to populate serverName. - // +kubebuilder:validation:Optional - ServerNameSelector *v1.Selector `json:"serverNameSelector,omitempty" tf:"-"` +// Selector for a Server in dbformysql to populate serverName. +// +kubebuilder:validation:Optional +ServerNameSelector *v1.Selector `json:"serverNameSelector,omitempty" tf:"-"` } // DatabaseSpec defines the desired state of Database type DatabaseSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider DatabaseParameters `json:"forProvider"` + ForProvider DatabaseParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -95,13 +104,13 @@ type DatabaseSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider DatabaseInitParameters `json:"initProvider,omitempty"` + InitProvider DatabaseInitParameters `json:"initProvider,omitempty"` } // DatabaseStatus defines the observed state of Database. type DatabaseStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider DatabaseObservation `json:"atProvider,omitempty"` + AtProvider DatabaseObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -116,10 +125,10 @@ type DatabaseStatus struct { type Database struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.charset) || (has(self.initProvider) && has(self.initProvider.charset))",message="spec.forProvider.charset is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.collation) || (has(self.initProvider) && has(self.initProvider.collation))",message="spec.forProvider.collation is a required parameter" - Spec DatabaseSpec `json:"spec"` - Status DatabaseStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.charset) || (has(self.initProvider) && has(self.initProvider.charset))",message="spec.forProvider.charset is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.collation) || (has(self.initProvider) && has(self.initProvider.collation))",message="spec.forProvider.collation is a required parameter" + Spec DatabaseSpec `json:"spec"` + Status DatabaseStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/dbformysql/v1alpha1/zz_firewallrule_types.go b/apis/dbformysql/v1alpha1/zz_firewallrule_types.go index 1f877fc..baab690 100755 --- a/apis/dbformysql/v1alpha1/zz_firewallrule_types.go +++ b/apis/dbformysql/v1alpha1/zz_firewallrule_types.go @@ -15,76 +15,85 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type FirewallRuleInitParameters struct { - // Specifies the End IP Address associated with this Firewall Rule. - EndIPAddress *string `json:"endIpAddress,omitempty" tf:"end_ip_address,omitempty"` - // Specifies the Start IP Address associated with this Firewall Rule. - StartIPAddress *string `json:"startIpAddress,omitempty" tf:"start_ip_address,omitempty"` +// Specifies the End IP Address associated with this Firewall Rule. +EndIPAddress *string `json:"endIpAddress,omitempty" tf:"end_ip_address,omitempty"` + +// Specifies the Start IP Address associated with this Firewall Rule. +StartIPAddress *string `json:"startIpAddress,omitempty" tf:"start_ip_address,omitempty"` } + type FirewallRuleObservation struct { - // Specifies the End IP Address associated with this Firewall Rule. - EndIPAddress *string `json:"endIpAddress,omitempty" tf:"end_ip_address,omitempty"` - // The ID of the MySQL Firewall Rule. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// Specifies the End IP Address associated with this Firewall Rule. +EndIPAddress *string `json:"endIpAddress,omitempty" tf:"end_ip_address,omitempty"` + +// The ID of the MySQL Firewall Rule. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The name of the resource group in which the MySQL Server exists. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group in which the MySQL Server exists. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Specifies the name of the MySQL Server. Changing this forces a new resource to be created. - ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` +// Specifies the name of the MySQL Server. Changing this forces a new resource to be created. +ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` - // Specifies the Start IP Address associated with this Firewall Rule. - StartIPAddress *string `json:"startIpAddress,omitempty" tf:"start_ip_address,omitempty"` +// Specifies the Start IP Address associated with this Firewall Rule. +StartIPAddress *string `json:"startIpAddress,omitempty" tf:"start_ip_address,omitempty"` } + type FirewallRuleParameters struct { - // Specifies the End IP Address associated with this Firewall Rule. - // +kubebuilder:validation:Optional - EndIPAddress *string `json:"endIpAddress,omitempty" tf:"end_ip_address,omitempty"` - // The name of the resource group in which the MySQL Server exists. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// Specifies the End IP Address associated with this Firewall Rule. +// +kubebuilder:validation:Optional +EndIPAddress *string `json:"endIpAddress,omitempty" tf:"end_ip_address,omitempty"` + +// The name of the resource group in which the MySQL Server exists. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - // Specifies the name of the MySQL Server. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/dbformysql/v1alpha1.Server - // +kubebuilder:validation:Optional - ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` +// Specifies the name of the MySQL Server. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/dbformysql/v1alpha1.Server +// +kubebuilder:validation:Optional +ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` - // Reference to a Server in dbformysql to populate serverName. - // +kubebuilder:validation:Optional - ServerNameRef *v1.Reference `json:"serverNameRef,omitempty" tf:"-"` +// Reference to a Server in dbformysql to populate serverName. +// +kubebuilder:validation:Optional +ServerNameRef *v1.Reference `json:"serverNameRef,omitempty" tf:"-"` - // Selector for a Server in dbformysql to populate serverName. - // +kubebuilder:validation:Optional - ServerNameSelector *v1.Selector `json:"serverNameSelector,omitempty" tf:"-"` +// Selector for a Server in dbformysql to populate serverName. +// +kubebuilder:validation:Optional +ServerNameSelector *v1.Selector `json:"serverNameSelector,omitempty" tf:"-"` - // Specifies the Start IP Address associated with this Firewall Rule. - // +kubebuilder:validation:Optional - StartIPAddress *string `json:"startIpAddress,omitempty" tf:"start_ip_address,omitempty"` +// Specifies the Start IP Address associated with this Firewall Rule. +// +kubebuilder:validation:Optional +StartIPAddress *string `json:"startIpAddress,omitempty" tf:"start_ip_address,omitempty"` } // FirewallRuleSpec defines the desired state of FirewallRule type FirewallRuleSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider FirewallRuleParameters `json:"forProvider"` + ForProvider FirewallRuleParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -95,13 +104,13 @@ type FirewallRuleSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider FirewallRuleInitParameters `json:"initProvider,omitempty"` + InitProvider FirewallRuleInitParameters `json:"initProvider,omitempty"` } // FirewallRuleStatus defines the observed state of FirewallRule. type FirewallRuleStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider FirewallRuleObservation `json:"atProvider,omitempty"` + AtProvider FirewallRuleObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -116,10 +125,10 @@ type FirewallRuleStatus struct { type FirewallRule struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.endIpAddress) || (has(self.initProvider) && has(self.initProvider.endIpAddress))",message="spec.forProvider.endIpAddress is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.startIpAddress) || (has(self.initProvider) && has(self.initProvider.startIpAddress))",message="spec.forProvider.startIpAddress is a required parameter" - Spec FirewallRuleSpec `json:"spec"` - Status FirewallRuleStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.endIpAddress) || (has(self.initProvider) && has(self.initProvider.endIpAddress))",message="spec.forProvider.endIpAddress is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.startIpAddress) || (has(self.initProvider) && has(self.initProvider.startIpAddress))",message="spec.forProvider.startIpAddress is a required parameter" + Spec FirewallRuleSpec `json:"spec"` + Status FirewallRuleStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/dbformysql/v1alpha1/zz_flexibledatabase_types.go b/apis/dbformysql/v1alpha1/zz_flexibledatabase_types.go index 04e2643..0f7b846 100755 --- a/apis/dbformysql/v1alpha1/zz_flexibledatabase_types.go +++ b/apis/dbformysql/v1alpha1/zz_flexibledatabase_types.go @@ -15,76 +15,85 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type FlexibleDatabaseInitParameters struct { - // Specifies the Charset for the MySQL Database, which needs to be a valid MySQL Charset. Changing this forces a new resource to be created. - Charset *string `json:"charset,omitempty" tf:"charset,omitempty"` - // Specifies the Collation for the MySQL Database, which needs to be a valid MySQL Collation. Changing this forces a new resource to be created. - Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` +// Specifies the Charset for the MySQL Database, which needs to be a valid MySQL Charset. Changing this forces a new resource to be created. +Charset *string `json:"charset,omitempty" tf:"charset,omitempty"` + +// Specifies the Collation for the MySQL Database, which needs to be a valid MySQL Collation. Changing this forces a new resource to be created. +Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` } + type FlexibleDatabaseObservation struct { - // Specifies the Charset for the MySQL Database, which needs to be a valid MySQL Charset. Changing this forces a new resource to be created. - Charset *string `json:"charset,omitempty" tf:"charset,omitempty"` - // Specifies the Collation for the MySQL Database, which needs to be a valid MySQL Collation. Changing this forces a new resource to be created. - Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` +// Specifies the Charset for the MySQL Database, which needs to be a valid MySQL Charset. Changing this forces a new resource to be created. +Charset *string `json:"charset,omitempty" tf:"charset,omitempty"` + +// Specifies the Collation for the MySQL Database, which needs to be a valid MySQL Collation. Changing this forces a new resource to be created. +Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` - // The ID of the MySQL Database. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// The ID of the MySQL Database. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The name of the resource group in which the MySQL Server exists. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group in which the MySQL Server exists. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created. - ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` +// Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created. +ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` } + type FlexibleDatabaseParameters struct { - // Specifies the Charset for the MySQL Database, which needs to be a valid MySQL Charset. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Charset *string `json:"charset,omitempty" tf:"charset,omitempty"` - // Specifies the Collation for the MySQL Database, which needs to be a valid MySQL Collation. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` +// Specifies the Charset for the MySQL Database, which needs to be a valid MySQL Charset. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Charset *string `json:"charset,omitempty" tf:"charset,omitempty"` + +// Specifies the Collation for the MySQL Database, which needs to be a valid MySQL Collation. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` - // The name of the resource group in which the MySQL Server exists. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group in which the MySQL Server exists. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - // Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=FlexibleServer - // +kubebuilder:validation:Optional - ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` +// Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=FlexibleServer +// +kubebuilder:validation:Optional +ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` - // Reference to a FlexibleServer to populate serverName. - // +kubebuilder:validation:Optional - ServerNameRef *v1.Reference `json:"serverNameRef,omitempty" tf:"-"` +// Reference to a FlexibleServer to populate serverName. +// +kubebuilder:validation:Optional +ServerNameRef *v1.Reference `json:"serverNameRef,omitempty" tf:"-"` - // Selector for a FlexibleServer to populate serverName. - // +kubebuilder:validation:Optional - ServerNameSelector *v1.Selector `json:"serverNameSelector,omitempty" tf:"-"` +// Selector for a FlexibleServer to populate serverName. +// +kubebuilder:validation:Optional +ServerNameSelector *v1.Selector `json:"serverNameSelector,omitempty" tf:"-"` } // FlexibleDatabaseSpec defines the desired state of FlexibleDatabase type FlexibleDatabaseSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider FlexibleDatabaseParameters `json:"forProvider"` + ForProvider FlexibleDatabaseParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -95,13 +104,13 @@ type FlexibleDatabaseSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider FlexibleDatabaseInitParameters `json:"initProvider,omitempty"` + InitProvider FlexibleDatabaseInitParameters `json:"initProvider,omitempty"` } // FlexibleDatabaseStatus defines the observed state of FlexibleDatabase. type FlexibleDatabaseStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider FlexibleDatabaseObservation `json:"atProvider,omitempty"` + AtProvider FlexibleDatabaseObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -116,10 +125,10 @@ type FlexibleDatabaseStatus struct { type FlexibleDatabase struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.charset) || (has(self.initProvider) && has(self.initProvider.charset))",message="spec.forProvider.charset is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.collation) || (has(self.initProvider) && has(self.initProvider.collation))",message="spec.forProvider.collation is a required parameter" - Spec FlexibleDatabaseSpec `json:"spec"` - Status FlexibleDatabaseStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.charset) || (has(self.initProvider) && has(self.initProvider.charset))",message="spec.forProvider.charset is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.collation) || (has(self.initProvider) && has(self.initProvider.collation))",message="spec.forProvider.collation is a required parameter" + Spec FlexibleDatabaseSpec `json:"spec"` + Status FlexibleDatabaseStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/dbformysql/v1alpha1/zz_flexibleserver_types.go b/apis/dbformysql/v1alpha1/zz_flexibleserver_types.go index 5db1632..e89cf2b 100755 --- a/apis/dbformysql/v1alpha1/zz_flexibleserver_types.go +++ b/apis/dbformysql/v1alpha1/zz_flexibleserver_types.go @@ -15,442 +15,481 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type CustomerManagedKeyInitParameters struct { - // The ID of the geo backup Key Vault Key. It can't cross region and need Customer Managed Key in same region as geo backup. - GeoBackupKeyVaultKeyID *string `json:"geoBackupKeyVaultKeyId,omitempty" tf:"geo_backup_key_vault_key_id,omitempty"` - // The geo backup user managed identity id for a Customer Managed Key. Should be added with identity_ids. It can't cross region and need identity in same region as geo backup. - GeoBackupUserAssignedIdentityID *string `json:"geoBackupUserAssignedIdentityId,omitempty" tf:"geo_backup_user_assigned_identity_id,omitempty"` +// The ID of the geo backup Key Vault Key. It can't cross region and need Customer Managed Key in same region as geo backup. +GeoBackupKeyVaultKeyID *string `json:"geoBackupKeyVaultKeyId,omitempty" tf:"geo_backup_key_vault_key_id,omitempty"` - // The ID of the Key Vault Key. - KeyVaultKeyID *string `json:"keyVaultKeyId,omitempty" tf:"key_vault_key_id,omitempty"` +// The geo backup user managed identity id for a Customer Managed Key. Should be added with identity_ids. It can't cross region and need identity in same region as geo backup. +GeoBackupUserAssignedIdentityID *string `json:"geoBackupUserAssignedIdentityId,omitempty" tf:"geo_backup_user_assigned_identity_id,omitempty"` - // Specifies the primary user managed identity id for a Customer Managed Key. Should be added with identity_ids. - PrimaryUserAssignedIdentityID *string `json:"primaryUserAssignedIdentityId,omitempty" tf:"primary_user_assigned_identity_id,omitempty"` +// The ID of the Key Vault Key. +KeyVaultKeyID *string `json:"keyVaultKeyId,omitempty" tf:"key_vault_key_id,omitempty"` + +// Specifies the primary user managed identity id for a Customer Managed Key. Should be added with identity_ids. +PrimaryUserAssignedIdentityID *string `json:"primaryUserAssignedIdentityId,omitempty" tf:"primary_user_assigned_identity_id,omitempty"` } + type CustomerManagedKeyObservation struct { - // The ID of the geo backup Key Vault Key. It can't cross region and need Customer Managed Key in same region as geo backup. - GeoBackupKeyVaultKeyID *string `json:"geoBackupKeyVaultKeyId,omitempty" tf:"geo_backup_key_vault_key_id,omitempty"` - // The geo backup user managed identity id for a Customer Managed Key. Should be added with identity_ids. It can't cross region and need identity in same region as geo backup. - GeoBackupUserAssignedIdentityID *string `json:"geoBackupUserAssignedIdentityId,omitempty" tf:"geo_backup_user_assigned_identity_id,omitempty"` +// The ID of the geo backup Key Vault Key. It can't cross region and need Customer Managed Key in same region as geo backup. +GeoBackupKeyVaultKeyID *string `json:"geoBackupKeyVaultKeyId,omitempty" tf:"geo_backup_key_vault_key_id,omitempty"` - // The ID of the Key Vault Key. - KeyVaultKeyID *string `json:"keyVaultKeyId,omitempty" tf:"key_vault_key_id,omitempty"` +// The geo backup user managed identity id for a Customer Managed Key. Should be added with identity_ids. It can't cross region and need identity in same region as geo backup. +GeoBackupUserAssignedIdentityID *string `json:"geoBackupUserAssignedIdentityId,omitempty" tf:"geo_backup_user_assigned_identity_id,omitempty"` - // Specifies the primary user managed identity id for a Customer Managed Key. Should be added with identity_ids. - PrimaryUserAssignedIdentityID *string `json:"primaryUserAssignedIdentityId,omitempty" tf:"primary_user_assigned_identity_id,omitempty"` +// The ID of the Key Vault Key. +KeyVaultKeyID *string `json:"keyVaultKeyId,omitempty" tf:"key_vault_key_id,omitempty"` + +// Specifies the primary user managed identity id for a Customer Managed Key. Should be added with identity_ids. +PrimaryUserAssignedIdentityID *string `json:"primaryUserAssignedIdentityId,omitempty" tf:"primary_user_assigned_identity_id,omitempty"` } + type CustomerManagedKeyParameters struct { - // The ID of the geo backup Key Vault Key. It can't cross region and need Customer Managed Key in same region as geo backup. - // +kubebuilder:validation:Optional - GeoBackupKeyVaultKeyID *string `json:"geoBackupKeyVaultKeyId,omitempty" tf:"geo_backup_key_vault_key_id,omitempty"` - // The geo backup user managed identity id for a Customer Managed Key. Should be added with identity_ids. It can't cross region and need identity in same region as geo backup. - // +kubebuilder:validation:Optional - GeoBackupUserAssignedIdentityID *string `json:"geoBackupUserAssignedIdentityId,omitempty" tf:"geo_backup_user_assigned_identity_id,omitempty"` +// The ID of the geo backup Key Vault Key. It can't cross region and need Customer Managed Key in same region as geo backup. +// +kubebuilder:validation:Optional +GeoBackupKeyVaultKeyID *string `json:"geoBackupKeyVaultKeyId,omitempty" tf:"geo_backup_key_vault_key_id,omitempty"` - // The ID of the Key Vault Key. - // +kubebuilder:validation:Optional - KeyVaultKeyID *string `json:"keyVaultKeyId,omitempty" tf:"key_vault_key_id,omitempty"` +// The geo backup user managed identity id for a Customer Managed Key. Should be added with identity_ids. It can't cross region and need identity in same region as geo backup. +// +kubebuilder:validation:Optional +GeoBackupUserAssignedIdentityID *string `json:"geoBackupUserAssignedIdentityId,omitempty" tf:"geo_backup_user_assigned_identity_id,omitempty"` - // Specifies the primary user managed identity id for a Customer Managed Key. Should be added with identity_ids. - // +kubebuilder:validation:Optional - PrimaryUserAssignedIdentityID *string `json:"primaryUserAssignedIdentityId,omitempty" tf:"primary_user_assigned_identity_id,omitempty"` +// The ID of the Key Vault Key. +// +kubebuilder:validation:Optional +KeyVaultKeyID *string `json:"keyVaultKeyId,omitempty" tf:"key_vault_key_id,omitempty"` + +// Specifies the primary user managed identity id for a Customer Managed Key. Should be added with identity_ids. +// +kubebuilder:validation:Optional +PrimaryUserAssignedIdentityID *string `json:"primaryUserAssignedIdentityId,omitempty" tf:"primary_user_assigned_identity_id,omitempty"` } + type FlexibleServerInitParameters struct { - // The Administrator login for the MySQL Flexible Server. Required when create_mode is Default. Changing this forces a new MySQL Flexible Server to be created. - AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` - // The backup retention days for the MySQL Flexible Server. Possible values are between 1 and 35 days. Defaults to 7. - BackupRetentionDays *float64 `json:"backupRetentionDays,omitempty" tf:"backup_retention_days,omitempty"` +// The Administrator login for the MySQL Flexible Server. Required when create_mode is Default. Changing this forces a new MySQL Flexible Server to be created. +AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` - // The creation mode which can be used to restore or replicate existing servers. Possible values are Default, PointInTimeRestore, GeoRestore, and Replica. Changing this forces a new MySQL Flexible Server to be created. - CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` +// The backup retention days for the MySQL Flexible Server. Possible values are between 1 and 35 days. Defaults to 7. +BackupRetentionDays *float64 `json:"backupRetentionDays,omitempty" tf:"backup_retention_days,omitempty"` - // A customer_managed_key block as defined below. - CustomerManagedKey []CustomerManagedKeyInitParameters `json:"customerManagedKey,omitempty" tf:"customer_managed_key,omitempty"` +// The creation mode which can be used to restore or replicate existing servers. Possible values are Default, PointInTimeRestore, GeoRestore, and Replica. Changing this forces a new MySQL Flexible Server to be created. +CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` - // Should geo redundant backup enabled? Defaults to false. Changing this forces a new MySQL Flexible Server to be created. - GeoRedundantBackupEnabled *bool `json:"geoRedundantBackupEnabled,omitempty" tf:"geo_redundant_backup_enabled,omitempty"` +// A customer_managed_key block as defined below. +CustomerManagedKey []CustomerManagedKeyInitParameters `json:"customerManagedKey,omitempty" tf:"customer_managed_key,omitempty"` - // A high_availability block as defined below. - HighAvailability []HighAvailabilityInitParameters `json:"highAvailability,omitempty" tf:"high_availability,omitempty"` +// Should geo redundant backup enabled? Defaults to false. Changing this forces a new MySQL Flexible Server to be created. +GeoRedundantBackupEnabled *bool `json:"geoRedundantBackupEnabled,omitempty" tf:"geo_redundant_backup_enabled,omitempty"` - // An identity block as defined below. - Identity []IdentityInitParameters `json:"identity,omitempty" tf:"identity,omitempty"` +// A high_availability block as defined below. +HighAvailability []HighAvailabilityInitParameters `json:"highAvailability,omitempty" tf:"high_availability,omitempty"` - // The Azure Region where the MySQL Flexible Server should exist. Changing this forces a new MySQL Flexible Server to be created. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// An identity block as defined below. +Identity []IdentityInitParameters `json:"identity,omitempty" tf:"identity,omitempty"` - // A maintenance_window block as defined below. - MaintenanceWindow []MaintenanceWindowInitParameters `json:"maintenanceWindow,omitempty" tf:"maintenance_window,omitempty"` +// The Azure Region where the MySQL Flexible Server should exist. Changing this forces a new MySQL Flexible Server to be created. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // The point in time to restore from creation_source_server_id when create_mode is PointInTimeRestore. Changing this forces a new MySQL Flexible Server to be created. - PointInTimeRestoreTimeInUtc *string `json:"pointInTimeRestoreTimeInUtc,omitempty" tf:"point_in_time_restore_time_in_utc,omitempty"` +// A maintenance_window block as defined below. +MaintenanceWindow []MaintenanceWindowInitParameters `json:"maintenanceWindow,omitempty" tf:"maintenance_window,omitempty"` - // The replication role. Possible value is None. - ReplicationRole *string `json:"replicationRole,omitempty" tf:"replication_role,omitempty"` +// The point in time to restore from creation_source_server_id when create_mode is PointInTimeRestore. Changing this forces a new MySQL Flexible Server to be created. +PointInTimeRestoreTimeInUtc *string `json:"pointInTimeRestoreTimeInUtc,omitempty" tf:"point_in_time_restore_time_in_utc,omitempty"` - // The SKU Name for the MySQL Flexible Server. - SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` +// The replication role. Possible value is None. +ReplicationRole *string `json:"replicationRole,omitempty" tf:"replication_role,omitempty"` - // The resource ID of the source MySQL Flexible Server to be restored. Required when create_mode is PointInTimeRestore, GeoRestore, and Replica. Changing this forces a new MySQL Flexible Server to be created. - SourceServerID *string `json:"sourceServerId,omitempty" tf:"source_server_id,omitempty"` +// The SKU Name for the MySQL Flexible Server. +SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` - // A storage block as defined below. - Storage []StorageInitParameters `json:"storage,omitempty" tf:"storage,omitempty"` +// The resource ID of the source MySQL Flexible Server to be restored. Required when create_mode is PointInTimeRestore, GeoRestore, and Replica. Changing this forces a new MySQL Flexible Server to be created. +SourceServerID *string `json:"sourceServerId,omitempty" tf:"source_server_id,omitempty"` - // A mapping of tags which should be assigned to the MySQL Flexible Server. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A storage block as defined below. +Storage []StorageInitParameters `json:"storage,omitempty" tf:"storage,omitempty"` - // The version of the MySQL Flexible Server to use. Possible values are 5.7, and 8.0.21. Changing this forces a new MySQL Flexible Server to be created. - Version *string `json:"version,omitempty" tf:"version,omitempty"` +// A mapping of tags which should be assigned to the MySQL Flexible Server. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - // Specifies the Availability Zone in which this MySQL Flexible Server should be located. Possible values are 1, 2 and 3. - Zone *string `json:"zone,omitempty" tf:"zone,omitempty"` +// The version of the MySQL Flexible Server to use. Possible values are 5.7, and 8.0.21. Changing this forces a new MySQL Flexible Server to be created. +Version *string `json:"version,omitempty" tf:"version,omitempty"` + +// Specifies the Availability Zone in which this MySQL Flexible Server should be located. Possible values are 1, 2 and 3. +Zone *string `json:"zone,omitempty" tf:"zone,omitempty"` } + type FlexibleServerObservation struct { - // The Administrator login for the MySQL Flexible Server. Required when create_mode is Default. Changing this forces a new MySQL Flexible Server to be created. - AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` - // The backup retention days for the MySQL Flexible Server. Possible values are between 1 and 35 days. Defaults to 7. - BackupRetentionDays *float64 `json:"backupRetentionDays,omitempty" tf:"backup_retention_days,omitempty"` +// The Administrator login for the MySQL Flexible Server. Required when create_mode is Default. Changing this forces a new MySQL Flexible Server to be created. +AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` - // The creation mode which can be used to restore or replicate existing servers. Possible values are Default, PointInTimeRestore, GeoRestore, and Replica. Changing this forces a new MySQL Flexible Server to be created. - CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` +// The backup retention days for the MySQL Flexible Server. Possible values are between 1 and 35 days. Defaults to 7. +BackupRetentionDays *float64 `json:"backupRetentionDays,omitempty" tf:"backup_retention_days,omitempty"` - // A customer_managed_key block as defined below. - CustomerManagedKey []CustomerManagedKeyObservation `json:"customerManagedKey,omitempty" tf:"customer_managed_key,omitempty"` +// The creation mode which can be used to restore or replicate existing servers. Possible values are Default, PointInTimeRestore, GeoRestore, and Replica. Changing this forces a new MySQL Flexible Server to be created. +CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` - // The ID of the virtual network subnet to create the MySQL Flexible Server. Changing this forces a new MySQL Flexible Server to be created. - DelegatedSubnetID *string `json:"delegatedSubnetId,omitempty" tf:"delegated_subnet_id,omitempty"` +// A customer_managed_key block as defined below. +CustomerManagedKey []CustomerManagedKeyObservation `json:"customerManagedKey,omitempty" tf:"customer_managed_key,omitempty"` - // The fully qualified domain name of the MySQL Flexible Server. - Fqdn *string `json:"fqdn,omitempty" tf:"fqdn,omitempty"` +// The ID of the virtual network subnet to create the MySQL Flexible Server. Changing this forces a new MySQL Flexible Server to be created. +DelegatedSubnetID *string `json:"delegatedSubnetId,omitempty" tf:"delegated_subnet_id,omitempty"` - // Should geo redundant backup enabled? Defaults to false. Changing this forces a new MySQL Flexible Server to be created. - GeoRedundantBackupEnabled *bool `json:"geoRedundantBackupEnabled,omitempty" tf:"geo_redundant_backup_enabled,omitempty"` +// The fully qualified domain name of the MySQL Flexible Server. +Fqdn *string `json:"fqdn,omitempty" tf:"fqdn,omitempty"` - // A high_availability block as defined below. - HighAvailability []HighAvailabilityObservation `json:"highAvailability,omitempty" tf:"high_availability,omitempty"` +// Should geo redundant backup enabled? Defaults to false. Changing this forces a new MySQL Flexible Server to be created. +GeoRedundantBackupEnabled *bool `json:"geoRedundantBackupEnabled,omitempty" tf:"geo_redundant_backup_enabled,omitempty"` - // The ID of the MySQL Flexible Server. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// A high_availability block as defined below. +HighAvailability []HighAvailabilityObservation `json:"highAvailability,omitempty" tf:"high_availability,omitempty"` - // An identity block as defined below. - Identity []IdentityObservation `json:"identity,omitempty" tf:"identity,omitempty"` +// The ID of the MySQL Flexible Server. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The Azure Region where the MySQL Flexible Server should exist. Changing this forces a new MySQL Flexible Server to be created. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// An identity block as defined below. +Identity []IdentityObservation `json:"identity,omitempty" tf:"identity,omitempty"` - // A maintenance_window block as defined below. - MaintenanceWindow []MaintenanceWindowObservation `json:"maintenanceWindow,omitempty" tf:"maintenance_window,omitempty"` +// The Azure Region where the MySQL Flexible Server should exist. Changing this forces a new MySQL Flexible Server to be created. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // The point in time to restore from creation_source_server_id when create_mode is PointInTimeRestore. Changing this forces a new MySQL Flexible Server to be created. - PointInTimeRestoreTimeInUtc *string `json:"pointInTimeRestoreTimeInUtc,omitempty" tf:"point_in_time_restore_time_in_utc,omitempty"` +// A maintenance_window block as defined below. +MaintenanceWindow []MaintenanceWindowObservation `json:"maintenanceWindow,omitempty" tf:"maintenance_window,omitempty"` - // The ID of the private DNS zone to create the MySQL Flexible Server. Changing this forces a new MySQL Flexible Server to be created. - PrivateDNSZoneID *string `json:"privateDnsZoneId,omitempty" tf:"private_dns_zone_id,omitempty"` +// The point in time to restore from creation_source_server_id when create_mode is PointInTimeRestore. Changing this forces a new MySQL Flexible Server to be created. +PointInTimeRestoreTimeInUtc *string `json:"pointInTimeRestoreTimeInUtc,omitempty" tf:"point_in_time_restore_time_in_utc,omitempty"` - // Is the public network access enabled? - PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` +// The ID of the private DNS zone to create the MySQL Flexible Server. Changing this forces a new MySQL Flexible Server to be created. +PrivateDNSZoneID *string `json:"privateDnsZoneId,omitempty" tf:"private_dns_zone_id,omitempty"` - // The maximum number of replicas that a primary MySQL Flexible Server can have. - ReplicaCapacity *float64 `json:"replicaCapacity,omitempty" tf:"replica_capacity,omitempty"` +// Is the public network access enabled? +PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` - // The replication role. Possible value is None. - ReplicationRole *string `json:"replicationRole,omitempty" tf:"replication_role,omitempty"` +// The maximum number of replicas that a primary MySQL Flexible Server can have. +ReplicaCapacity *float64 `json:"replicaCapacity,omitempty" tf:"replica_capacity,omitempty"` - // The name of the Resource Group where the MySQL Flexible Server should exist. Changing this forces a new MySQL Flexible Server to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The replication role. Possible value is None. +ReplicationRole *string `json:"replicationRole,omitempty" tf:"replication_role,omitempty"` - // The SKU Name for the MySQL Flexible Server. - SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` +// The name of the Resource Group where the MySQL Flexible Server should exist. Changing this forces a new MySQL Flexible Server to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // The resource ID of the source MySQL Flexible Server to be restored. Required when create_mode is PointInTimeRestore, GeoRestore, and Replica. Changing this forces a new MySQL Flexible Server to be created. - SourceServerID *string `json:"sourceServerId,omitempty" tf:"source_server_id,omitempty"` +// The SKU Name for the MySQL Flexible Server. +SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` - // A storage block as defined below. - Storage []StorageObservation `json:"storage,omitempty" tf:"storage,omitempty"` +// The resource ID of the source MySQL Flexible Server to be restored. Required when create_mode is PointInTimeRestore, GeoRestore, and Replica. Changing this forces a new MySQL Flexible Server to be created. +SourceServerID *string `json:"sourceServerId,omitempty" tf:"source_server_id,omitempty"` - // A mapping of tags which should be assigned to the MySQL Flexible Server. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A storage block as defined below. +Storage []StorageObservation `json:"storage,omitempty" tf:"storage,omitempty"` - // The version of the MySQL Flexible Server to use. Possible values are 5.7, and 8.0.21. Changing this forces a new MySQL Flexible Server to be created. - Version *string `json:"version,omitempty" tf:"version,omitempty"` +// A mapping of tags which should be assigned to the MySQL Flexible Server. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - // Specifies the Availability Zone in which this MySQL Flexible Server should be located. Possible values are 1, 2 and 3. - Zone *string `json:"zone,omitempty" tf:"zone,omitempty"` +// The version of the MySQL Flexible Server to use. Possible values are 5.7, and 8.0.21. Changing this forces a new MySQL Flexible Server to be created. +Version *string `json:"version,omitempty" tf:"version,omitempty"` + +// Specifies the Availability Zone in which this MySQL Flexible Server should be located. Possible values are 1, 2 and 3. +Zone *string `json:"zone,omitempty" tf:"zone,omitempty"` } + type FlexibleServerParameters struct { - // The Administrator login for the MySQL Flexible Server. Required when create_mode is Default. Changing this forces a new MySQL Flexible Server to be created. - // +kubebuilder:validation:Optional - AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` - - // The Password associated with the administrator_login for the MySQL Flexible Server. Required when create_mode is Default. - // +kubebuilder:validation:Optional - AdministratorPasswordSecretRef *v1.SecretKeySelector `json:"administratorPasswordSecretRef,omitempty" tf:"-"` - - // The backup retention days for the MySQL Flexible Server. Possible values are between 1 and 35 days. Defaults to 7. - // +kubebuilder:validation:Optional - BackupRetentionDays *float64 `json:"backupRetentionDays,omitempty" tf:"backup_retention_days,omitempty"` - - // The creation mode which can be used to restore or replicate existing servers. Possible values are Default, PointInTimeRestore, GeoRestore, and Replica. Changing this forces a new MySQL Flexible Server to be created. - // +kubebuilder:validation:Optional - CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` - - // A customer_managed_key block as defined below. - // +kubebuilder:validation:Optional - CustomerManagedKey []CustomerManagedKeyParameters `json:"customerManagedKey,omitempty" tf:"customer_managed_key,omitempty"` - - // The ID of the virtual network subnet to create the MySQL Flexible Server. Changing this forces a new MySQL Flexible Server to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/network/v1alpha1.Subnet - // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() - // +kubebuilder:validation:Optional - DelegatedSubnetID *string `json:"delegatedSubnetId,omitempty" tf:"delegated_subnet_id,omitempty"` - - // Reference to a Subnet in network to populate delegatedSubnetId. - // +kubebuilder:validation:Optional - DelegatedSubnetIDRef *v1.Reference `json:"delegatedSubnetIdRef,omitempty" tf:"-"` - - // Selector for a Subnet in network to populate delegatedSubnetId. - // +kubebuilder:validation:Optional - DelegatedSubnetIDSelector *v1.Selector `json:"delegatedSubnetIdSelector,omitempty" tf:"-"` - - // Should geo redundant backup enabled? Defaults to false. Changing this forces a new MySQL Flexible Server to be created. - // +kubebuilder:validation:Optional - GeoRedundantBackupEnabled *bool `json:"geoRedundantBackupEnabled,omitempty" tf:"geo_redundant_backup_enabled,omitempty"` - - // A high_availability block as defined below. - // +kubebuilder:validation:Optional - HighAvailability []HighAvailabilityParameters `json:"highAvailability,omitempty" tf:"high_availability,omitempty"` - - // An identity block as defined below. - // +kubebuilder:validation:Optional - Identity []IdentityParameters `json:"identity,omitempty" tf:"identity,omitempty"` - - // The Azure Region where the MySQL Flexible Server should exist. Changing this forces a new MySQL Flexible Server to be created. - // +kubebuilder:validation:Optional - Location *string `json:"location,omitempty" tf:"location,omitempty"` - - // A maintenance_window block as defined below. - // +kubebuilder:validation:Optional - MaintenanceWindow []MaintenanceWindowParameters `json:"maintenanceWindow,omitempty" tf:"maintenance_window,omitempty"` - - // The point in time to restore from creation_source_server_id when create_mode is PointInTimeRestore. Changing this forces a new MySQL Flexible Server to be created. - // +kubebuilder:validation:Optional - PointInTimeRestoreTimeInUtc *string `json:"pointInTimeRestoreTimeInUtc,omitempty" tf:"point_in_time_restore_time_in_utc,omitempty"` - - // The ID of the private DNS zone to create the MySQL Flexible Server. Changing this forces a new MySQL Flexible Server to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/network/v1alpha1.PrivateDNSZone - // +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() - // +kubebuilder:validation:Optional - PrivateDNSZoneID *string `json:"privateDnsZoneId,omitempty" tf:"private_dns_zone_id,omitempty"` - - // Reference to a PrivateDNSZone in network to populate privateDnsZoneId. - // +kubebuilder:validation:Optional - PrivateDNSZoneIDRef *v1.Reference `json:"privateDnsZoneIdRef,omitempty" tf:"-"` - - // Selector for a PrivateDNSZone in network to populate privateDnsZoneId. - // +kubebuilder:validation:Optional - PrivateDNSZoneIDSelector *v1.Selector `json:"privateDnsZoneIdSelector,omitempty" tf:"-"` - - // The replication role. Possible value is None. - // +kubebuilder:validation:Optional - ReplicationRole *string `json:"replicationRole,omitempty" tf:"replication_role,omitempty"` - - // The name of the Resource Group where the MySQL Flexible Server should exist. Changing this forces a new MySQL Flexible Server to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - - // The SKU Name for the MySQL Flexible Server. - // +kubebuilder:validation:Optional - SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` - - // The resource ID of the source MySQL Flexible Server to be restored. Required when create_mode is PointInTimeRestore, GeoRestore, and Replica. Changing this forces a new MySQL Flexible Server to be created. - // +kubebuilder:validation:Optional - SourceServerID *string `json:"sourceServerId,omitempty" tf:"source_server_id,omitempty"` - - // A storage block as defined below. - // +kubebuilder:validation:Optional - Storage []StorageParameters `json:"storage,omitempty" tf:"storage,omitempty"` - - // A mapping of tags which should be assigned to the MySQL Flexible Server. - // +kubebuilder:validation:Optional - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - - // The version of the MySQL Flexible Server to use. Possible values are 5.7, and 8.0.21. Changing this forces a new MySQL Flexible Server to be created. - // +kubebuilder:validation:Optional - Version *string `json:"version,omitempty" tf:"version,omitempty"` - - // Specifies the Availability Zone in which this MySQL Flexible Server should be located. Possible values are 1, 2 and 3. - // +kubebuilder:validation:Optional - Zone *string `json:"zone,omitempty" tf:"zone,omitempty"` + +// The Administrator login for the MySQL Flexible Server. Required when create_mode is Default. Changing this forces a new MySQL Flexible Server to be created. +// +kubebuilder:validation:Optional +AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` + +// The Password associated with the administrator_login for the MySQL Flexible Server. Required when create_mode is Default. +// +kubebuilder:validation:Optional +AdministratorPasswordSecretRef *v1.SecretKeySelector `json:"administratorPasswordSecretRef,omitempty" tf:"-"` + +// The backup retention days for the MySQL Flexible Server. Possible values are between 1 and 35 days. Defaults to 7. +// +kubebuilder:validation:Optional +BackupRetentionDays *float64 `json:"backupRetentionDays,omitempty" tf:"backup_retention_days,omitempty"` + +// The creation mode which can be used to restore or replicate existing servers. Possible values are Default, PointInTimeRestore, GeoRestore, and Replica. Changing this forces a new MySQL Flexible Server to be created. +// +kubebuilder:validation:Optional +CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` + +// A customer_managed_key block as defined below. +// +kubebuilder:validation:Optional +CustomerManagedKey []CustomerManagedKeyParameters `json:"customerManagedKey,omitempty" tf:"customer_managed_key,omitempty"` + +// The ID of the virtual network subnet to create the MySQL Flexible Server. Changing this forces a new MySQL Flexible Server to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/network/v1alpha1.Subnet +// +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() +// +kubebuilder:validation:Optional +DelegatedSubnetID *string `json:"delegatedSubnetId,omitempty" tf:"delegated_subnet_id,omitempty"` + +// Reference to a Subnet in network to populate delegatedSubnetId. +// +kubebuilder:validation:Optional +DelegatedSubnetIDRef *v1.Reference `json:"delegatedSubnetIdRef,omitempty" tf:"-"` + +// Selector for a Subnet in network to populate delegatedSubnetId. +// +kubebuilder:validation:Optional +DelegatedSubnetIDSelector *v1.Selector `json:"delegatedSubnetIdSelector,omitempty" tf:"-"` + +// Should geo redundant backup enabled? Defaults to false. Changing this forces a new MySQL Flexible Server to be created. +// +kubebuilder:validation:Optional +GeoRedundantBackupEnabled *bool `json:"geoRedundantBackupEnabled,omitempty" tf:"geo_redundant_backup_enabled,omitempty"` + +// A high_availability block as defined below. +// +kubebuilder:validation:Optional +HighAvailability []HighAvailabilityParameters `json:"highAvailability,omitempty" tf:"high_availability,omitempty"` + +// An identity block as defined below. +// +kubebuilder:validation:Optional +Identity []IdentityParameters `json:"identity,omitempty" tf:"identity,omitempty"` + +// The Azure Region where the MySQL Flexible Server should exist. Changing this forces a new MySQL Flexible Server to be created. +// +kubebuilder:validation:Optional +Location *string `json:"location,omitempty" tf:"location,omitempty"` + +// A maintenance_window block as defined below. +// +kubebuilder:validation:Optional +MaintenanceWindow []MaintenanceWindowParameters `json:"maintenanceWindow,omitempty" tf:"maintenance_window,omitempty"` + +// The point in time to restore from creation_source_server_id when create_mode is PointInTimeRestore. Changing this forces a new MySQL Flexible Server to be created. +// +kubebuilder:validation:Optional +PointInTimeRestoreTimeInUtc *string `json:"pointInTimeRestoreTimeInUtc,omitempty" tf:"point_in_time_restore_time_in_utc,omitempty"` + +// The ID of the private DNS zone to create the MySQL Flexible Server. Changing this forces a new MySQL Flexible Server to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/network/v1alpha1.PrivateDNSZone +// +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() +// +kubebuilder:validation:Optional +PrivateDNSZoneID *string `json:"privateDnsZoneId,omitempty" tf:"private_dns_zone_id,omitempty"` + +// Reference to a PrivateDNSZone in network to populate privateDnsZoneId. +// +kubebuilder:validation:Optional +PrivateDNSZoneIDRef *v1.Reference `json:"privateDnsZoneIdRef,omitempty" tf:"-"` + +// Selector for a PrivateDNSZone in network to populate privateDnsZoneId. +// +kubebuilder:validation:Optional +PrivateDNSZoneIDSelector *v1.Selector `json:"privateDnsZoneIdSelector,omitempty" tf:"-"` + +// The replication role. Possible value is None. +// +kubebuilder:validation:Optional +ReplicationRole *string `json:"replicationRole,omitempty" tf:"replication_role,omitempty"` + +// The name of the Resource Group where the MySQL Flexible Server should exist. Changing this forces a new MySQL Flexible Server to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` + +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` + +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` + +// The SKU Name for the MySQL Flexible Server. +// +kubebuilder:validation:Optional +SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` + +// The resource ID of the source MySQL Flexible Server to be restored. Required when create_mode is PointInTimeRestore, GeoRestore, and Replica. Changing this forces a new MySQL Flexible Server to be created. +// +kubebuilder:validation:Optional +SourceServerID *string `json:"sourceServerId,omitempty" tf:"source_server_id,omitempty"` + +// A storage block as defined below. +// +kubebuilder:validation:Optional +Storage []StorageParameters `json:"storage,omitempty" tf:"storage,omitempty"` + +// A mapping of tags which should be assigned to the MySQL Flexible Server. +// +kubebuilder:validation:Optional +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + +// The version of the MySQL Flexible Server to use. Possible values are 5.7, and 8.0.21. Changing this forces a new MySQL Flexible Server to be created. +// +kubebuilder:validation:Optional +Version *string `json:"version,omitempty" tf:"version,omitempty"` + +// Specifies the Availability Zone in which this MySQL Flexible Server should be located. Possible values are 1, 2 and 3. +// +kubebuilder:validation:Optional +Zone *string `json:"zone,omitempty" tf:"zone,omitempty"` } + type HighAvailabilityInitParameters struct { - // The high availability mode for the MySQL Flexible Server. Possibles values are SameZone and ZoneRedundant. - Mode *string `json:"mode,omitempty" tf:"mode,omitempty"` - // Specifies the Availability Zone in which the standby Flexible Server should be located. Possible values are 1, 2 and 3. - StandbyAvailabilityZone *string `json:"standbyAvailabilityZone,omitempty" tf:"standby_availability_zone,omitempty"` +// The high availability mode for the MySQL Flexible Server. Possibles values are SameZone and ZoneRedundant. +Mode *string `json:"mode,omitempty" tf:"mode,omitempty"` + +// Specifies the Availability Zone in which the standby Flexible Server should be located. Possible values are 1, 2 and 3. +StandbyAvailabilityZone *string `json:"standbyAvailabilityZone,omitempty" tf:"standby_availability_zone,omitempty"` } + type HighAvailabilityObservation struct { - // The high availability mode for the MySQL Flexible Server. Possibles values are SameZone and ZoneRedundant. - Mode *string `json:"mode,omitempty" tf:"mode,omitempty"` - // Specifies the Availability Zone in which the standby Flexible Server should be located. Possible values are 1, 2 and 3. - StandbyAvailabilityZone *string `json:"standbyAvailabilityZone,omitempty" tf:"standby_availability_zone,omitempty"` +// The high availability mode for the MySQL Flexible Server. Possibles values are SameZone and ZoneRedundant. +Mode *string `json:"mode,omitempty" tf:"mode,omitempty"` + +// Specifies the Availability Zone in which the standby Flexible Server should be located. Possible values are 1, 2 and 3. +StandbyAvailabilityZone *string `json:"standbyAvailabilityZone,omitempty" tf:"standby_availability_zone,omitempty"` } + type HighAvailabilityParameters struct { - // The high availability mode for the MySQL Flexible Server. Possibles values are SameZone and ZoneRedundant. - // +kubebuilder:validation:Optional - Mode *string `json:"mode" tf:"mode,omitempty"` - // Specifies the Availability Zone in which the standby Flexible Server should be located. Possible values are 1, 2 and 3. - // +kubebuilder:validation:Optional - StandbyAvailabilityZone *string `json:"standbyAvailabilityZone,omitempty" tf:"standby_availability_zone,omitempty"` +// The high availability mode for the MySQL Flexible Server. Possibles values are SameZone and ZoneRedundant. +// +kubebuilder:validation:Optional +Mode *string `json:"mode" tf:"mode,omitempty"` + +// Specifies the Availability Zone in which the standby Flexible Server should be located. Possible values are 1, 2 and 3. +// +kubebuilder:validation:Optional +StandbyAvailabilityZone *string `json:"standbyAvailabilityZone,omitempty" tf:"standby_availability_zone,omitempty"` } + type IdentityInitParameters struct { - // A list of User Assigned Managed Identity IDs to be assigned to this MySQL Flexible Server. - IdentityIds []*string `json:"identityIds,omitempty" tf:"identity_ids,omitempty"` - // Specifies the type of Managed Service Identity that should be configured on this MySQL Flexible Server. The only possible value is UserAssigned. - Type *string `json:"type,omitempty" tf:"type,omitempty"` +// A list of User Assigned Managed Identity IDs to be assigned to this MySQL Flexible Server. +IdentityIds []*string `json:"identityIds,omitempty" tf:"identity_ids,omitempty"` + +// Specifies the type of Managed Service Identity that should be configured on this MySQL Flexible Server. The only possible value is UserAssigned. +Type *string `json:"type,omitempty" tf:"type,omitempty"` } + type IdentityObservation struct { - // A list of User Assigned Managed Identity IDs to be assigned to this MySQL Flexible Server. - IdentityIds []*string `json:"identityIds,omitempty" tf:"identity_ids,omitempty"` - // Specifies the type of Managed Service Identity that should be configured on this MySQL Flexible Server. The only possible value is UserAssigned. - Type *string `json:"type,omitempty" tf:"type,omitempty"` +// A list of User Assigned Managed Identity IDs to be assigned to this MySQL Flexible Server. +IdentityIds []*string `json:"identityIds,omitempty" tf:"identity_ids,omitempty"` + +// Specifies the type of Managed Service Identity that should be configured on this MySQL Flexible Server. The only possible value is UserAssigned. +Type *string `json:"type,omitempty" tf:"type,omitempty"` } + type IdentityParameters struct { - // A list of User Assigned Managed Identity IDs to be assigned to this MySQL Flexible Server. - // +kubebuilder:validation:Optional - IdentityIds []*string `json:"identityIds" tf:"identity_ids,omitempty"` - // Specifies the type of Managed Service Identity that should be configured on this MySQL Flexible Server. The only possible value is UserAssigned. - // +kubebuilder:validation:Optional - Type *string `json:"type" tf:"type,omitempty"` +// A list of User Assigned Managed Identity IDs to be assigned to this MySQL Flexible Server. +// +kubebuilder:validation:Optional +IdentityIds []*string `json:"identityIds" tf:"identity_ids,omitempty"` + +// Specifies the type of Managed Service Identity that should be configured on this MySQL Flexible Server. The only possible value is UserAssigned. +// +kubebuilder:validation:Optional +Type *string `json:"type" tf:"type,omitempty"` } + type MaintenanceWindowInitParameters struct { - // The day of week for maintenance window. Defaults to 0. - DayOfWeek *float64 `json:"dayOfWeek,omitempty" tf:"day_of_week,omitempty"` - // The start hour for maintenance window. Defaults to 0. - StartHour *float64 `json:"startHour,omitempty" tf:"start_hour,omitempty"` +// The day of week for maintenance window. Defaults to 0. +DayOfWeek *float64 `json:"dayOfWeek,omitempty" tf:"day_of_week,omitempty"` - // The start minute for maintenance window. Defaults to 0. - StartMinute *float64 `json:"startMinute,omitempty" tf:"start_minute,omitempty"` +// The start hour for maintenance window. Defaults to 0. +StartHour *float64 `json:"startHour,omitempty" tf:"start_hour,omitempty"` + +// The start minute for maintenance window. Defaults to 0. +StartMinute *float64 `json:"startMinute,omitempty" tf:"start_minute,omitempty"` } + type MaintenanceWindowObservation struct { - // The day of week for maintenance window. Defaults to 0. - DayOfWeek *float64 `json:"dayOfWeek,omitempty" tf:"day_of_week,omitempty"` - // The start hour for maintenance window. Defaults to 0. - StartHour *float64 `json:"startHour,omitempty" tf:"start_hour,omitempty"` +// The day of week for maintenance window. Defaults to 0. +DayOfWeek *float64 `json:"dayOfWeek,omitempty" tf:"day_of_week,omitempty"` - // The start minute for maintenance window. Defaults to 0. - StartMinute *float64 `json:"startMinute,omitempty" tf:"start_minute,omitempty"` +// The start hour for maintenance window. Defaults to 0. +StartHour *float64 `json:"startHour,omitempty" tf:"start_hour,omitempty"` + +// The start minute for maintenance window. Defaults to 0. +StartMinute *float64 `json:"startMinute,omitempty" tf:"start_minute,omitempty"` } + type MaintenanceWindowParameters struct { - // The day of week for maintenance window. Defaults to 0. - // +kubebuilder:validation:Optional - DayOfWeek *float64 `json:"dayOfWeek,omitempty" tf:"day_of_week,omitempty"` - // The start hour for maintenance window. Defaults to 0. - // +kubebuilder:validation:Optional - StartHour *float64 `json:"startHour,omitempty" tf:"start_hour,omitempty"` +// The day of week for maintenance window. Defaults to 0. +// +kubebuilder:validation:Optional +DayOfWeek *float64 `json:"dayOfWeek,omitempty" tf:"day_of_week,omitempty"` - // The start minute for maintenance window. Defaults to 0. - // +kubebuilder:validation:Optional - StartMinute *float64 `json:"startMinute,omitempty" tf:"start_minute,omitempty"` +// The start hour for maintenance window. Defaults to 0. +// +kubebuilder:validation:Optional +StartHour *float64 `json:"startHour,omitempty" tf:"start_hour,omitempty"` + +// The start minute for maintenance window. Defaults to 0. +// +kubebuilder:validation:Optional +StartMinute *float64 `json:"startMinute,omitempty" tf:"start_minute,omitempty"` } + type StorageInitParameters struct { - // Should Storage Auto Grow be enabled? Defaults to true. - AutoGrowEnabled *bool `json:"autoGrowEnabled,omitempty" tf:"auto_grow_enabled,omitempty"` - // The storage IOPS for the MySQL Flexible Server. Possible values are between 360 and 20000. - Iops *float64 `json:"iops,omitempty" tf:"iops,omitempty"` +// Should Storage Auto Grow be enabled? Defaults to true. +AutoGrowEnabled *bool `json:"autoGrowEnabled,omitempty" tf:"auto_grow_enabled,omitempty"` - // The max storage allowed for the MySQL Flexible Server. Possible values are between 20 and 16384. - SizeGb *float64 `json:"sizeGb,omitempty" tf:"size_gb,omitempty"` +// The storage IOPS for the MySQL Flexible Server. Possible values are between 360 and 20000. +Iops *float64 `json:"iops,omitempty" tf:"iops,omitempty"` + +// The max storage allowed for the MySQL Flexible Server. Possible values are between 20 and 16384. +SizeGb *float64 `json:"sizeGb,omitempty" tf:"size_gb,omitempty"` } + type StorageObservation struct { - // Should Storage Auto Grow be enabled? Defaults to true. - AutoGrowEnabled *bool `json:"autoGrowEnabled,omitempty" tf:"auto_grow_enabled,omitempty"` - // The storage IOPS for the MySQL Flexible Server. Possible values are between 360 and 20000. - Iops *float64 `json:"iops,omitempty" tf:"iops,omitempty"` +// Should Storage Auto Grow be enabled? Defaults to true. +AutoGrowEnabled *bool `json:"autoGrowEnabled,omitempty" tf:"auto_grow_enabled,omitempty"` - // The max storage allowed for the MySQL Flexible Server. Possible values are between 20 and 16384. - SizeGb *float64 `json:"sizeGb,omitempty" tf:"size_gb,omitempty"` +// The storage IOPS for the MySQL Flexible Server. Possible values are between 360 and 20000. +Iops *float64 `json:"iops,omitempty" tf:"iops,omitempty"` + +// The max storage allowed for the MySQL Flexible Server. Possible values are between 20 and 16384. +SizeGb *float64 `json:"sizeGb,omitempty" tf:"size_gb,omitempty"` } + type StorageParameters struct { - // Should Storage Auto Grow be enabled? Defaults to true. - // +kubebuilder:validation:Optional - AutoGrowEnabled *bool `json:"autoGrowEnabled,omitempty" tf:"auto_grow_enabled,omitempty"` - // The storage IOPS for the MySQL Flexible Server. Possible values are between 360 and 20000. - // +kubebuilder:validation:Optional - Iops *float64 `json:"iops,omitempty" tf:"iops,omitempty"` +// Should Storage Auto Grow be enabled? Defaults to true. +// +kubebuilder:validation:Optional +AutoGrowEnabled *bool `json:"autoGrowEnabled,omitempty" tf:"auto_grow_enabled,omitempty"` + +// The storage IOPS for the MySQL Flexible Server. Possible values are between 360 and 20000. +// +kubebuilder:validation:Optional +Iops *float64 `json:"iops,omitempty" tf:"iops,omitempty"` - // The max storage allowed for the MySQL Flexible Server. Possible values are between 20 and 16384. - // +kubebuilder:validation:Optional - SizeGb *float64 `json:"sizeGb,omitempty" tf:"size_gb,omitempty"` +// The max storage allowed for the MySQL Flexible Server. Possible values are between 20 and 16384. +// +kubebuilder:validation:Optional +SizeGb *float64 `json:"sizeGb,omitempty" tf:"size_gb,omitempty"` } // FlexibleServerSpec defines the desired state of FlexibleServer type FlexibleServerSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider FlexibleServerParameters `json:"forProvider"` + ForProvider FlexibleServerParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -461,13 +500,13 @@ type FlexibleServerSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider FlexibleServerInitParameters `json:"initProvider,omitempty"` + InitProvider FlexibleServerInitParameters `json:"initProvider,omitempty"` } // FlexibleServerStatus defines the observed state of FlexibleServer. type FlexibleServerStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider FlexibleServerObservation `json:"atProvider,omitempty"` + AtProvider FlexibleServerObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -482,9 +521,9 @@ type FlexibleServerStatus struct { type FlexibleServer struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" - Spec FlexibleServerSpec `json:"spec"` - Status FlexibleServerStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" + Spec FlexibleServerSpec `json:"spec"` + Status FlexibleServerStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/dbformysql/v1alpha1/zz_flexibleserverconfiguration_types.go b/apis/dbformysql/v1alpha1/zz_flexibleserverconfiguration_types.go index fc6882b..43db0a1 100755 --- a/apis/dbformysql/v1alpha1/zz_flexibleserverconfiguration_types.go +++ b/apis/dbformysql/v1alpha1/zz_flexibleserverconfiguration_types.go @@ -15,66 +15,75 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type FlexibleServerConfigurationInitParameters struct { - // Specifies the value of the MySQL Flexible Server Configuration. See the MySQL documentation for valid values. Changing this forces a new resource to be created. - Value *string `json:"value,omitempty" tf:"value,omitempty"` + +// Specifies the value of the MySQL Flexible Server Configuration. See the MySQL documentation for valid values. Changing this forces a new resource to be created. +Value *string `json:"value,omitempty" tf:"value,omitempty"` } + type FlexibleServerConfigurationObservation struct { - // The ID of the MySQL Flexible Server Configuration. - ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The name of the resource group in which the MySQL Flexible Server exists. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The ID of the MySQL Flexible Server Configuration. +ID *string `json:"id,omitempty" tf:"id,omitempty"` + +// The name of the resource group in which the MySQL Flexible Server exists. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created. - ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` +// Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created. +ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` - // Specifies the value of the MySQL Flexible Server Configuration. See the MySQL documentation for valid values. Changing this forces a new resource to be created. - Value *string `json:"value,omitempty" tf:"value,omitempty"` +// Specifies the value of the MySQL Flexible Server Configuration. See the MySQL documentation for valid values. Changing this forces a new resource to be created. +Value *string `json:"value,omitempty" tf:"value,omitempty"` } + type FlexibleServerConfigurationParameters struct { - // The name of the resource group in which the MySQL Flexible Server exists. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` +// The name of the resource group in which the MySQL Flexible Server exists. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` + +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - // Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=FlexibleServer - // +kubebuilder:validation:Optional - ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` +// Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=FlexibleServer +// +kubebuilder:validation:Optional +ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` - // Reference to a FlexibleServer to populate serverName. - // +kubebuilder:validation:Optional - ServerNameRef *v1.Reference `json:"serverNameRef,omitempty" tf:"-"` +// Reference to a FlexibleServer to populate serverName. +// +kubebuilder:validation:Optional +ServerNameRef *v1.Reference `json:"serverNameRef,omitempty" tf:"-"` - // Selector for a FlexibleServer to populate serverName. - // +kubebuilder:validation:Optional - ServerNameSelector *v1.Selector `json:"serverNameSelector,omitempty" tf:"-"` +// Selector for a FlexibleServer to populate serverName. +// +kubebuilder:validation:Optional +ServerNameSelector *v1.Selector `json:"serverNameSelector,omitempty" tf:"-"` - // Specifies the value of the MySQL Flexible Server Configuration. See the MySQL documentation for valid values. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Value *string `json:"value,omitempty" tf:"value,omitempty"` +// Specifies the value of the MySQL Flexible Server Configuration. See the MySQL documentation for valid values. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Value *string `json:"value,omitempty" tf:"value,omitempty"` } // FlexibleServerConfigurationSpec defines the desired state of FlexibleServerConfiguration type FlexibleServerConfigurationSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider FlexibleServerConfigurationParameters `json:"forProvider"` + ForProvider FlexibleServerConfigurationParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -85,13 +94,13 @@ type FlexibleServerConfigurationSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider FlexibleServerConfigurationInitParameters `json:"initProvider,omitempty"` + InitProvider FlexibleServerConfigurationInitParameters `json:"initProvider,omitempty"` } // FlexibleServerConfigurationStatus defines the observed state of FlexibleServerConfiguration. type FlexibleServerConfigurationStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider FlexibleServerConfigurationObservation `json:"atProvider,omitempty"` + AtProvider FlexibleServerConfigurationObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -106,9 +115,9 @@ type FlexibleServerConfigurationStatus struct { type FlexibleServerConfiguration struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.value) || (has(self.initProvider) && has(self.initProvider.value))",message="spec.forProvider.value is a required parameter" - Spec FlexibleServerConfigurationSpec `json:"spec"` - Status FlexibleServerConfigurationStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.value) || (has(self.initProvider) && has(self.initProvider.value))",message="spec.forProvider.value is a required parameter" + Spec FlexibleServerConfigurationSpec `json:"spec"` + Status FlexibleServerConfigurationStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/dbformysql/v1alpha1/zz_flexibleserverfirewallrule_types.go b/apis/dbformysql/v1alpha1/zz_flexibleserverfirewallrule_types.go index 9df30c9..9255f35 100755 --- a/apis/dbformysql/v1alpha1/zz_flexibleserverfirewallrule_types.go +++ b/apis/dbformysql/v1alpha1/zz_flexibleserverfirewallrule_types.go @@ -15,76 +15,85 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type FlexibleServerFirewallRuleInitParameters struct { - // Specifies the End IP Address associated with this Firewall Rule. - EndIPAddress *string `json:"endIpAddress,omitempty" tf:"end_ip_address,omitempty"` - // Specifies the Start IP Address associated with this Firewall Rule. - StartIPAddress *string `json:"startIpAddress,omitempty" tf:"start_ip_address,omitempty"` +// Specifies the End IP Address associated with this Firewall Rule. +EndIPAddress *string `json:"endIpAddress,omitempty" tf:"end_ip_address,omitempty"` + +// Specifies the Start IP Address associated with this Firewall Rule. +StartIPAddress *string `json:"startIpAddress,omitempty" tf:"start_ip_address,omitempty"` } + type FlexibleServerFirewallRuleObservation struct { - // Specifies the End IP Address associated with this Firewall Rule. - EndIPAddress *string `json:"endIpAddress,omitempty" tf:"end_ip_address,omitempty"` - // The ID of the MySQL Firewall Rule. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// Specifies the End IP Address associated with this Firewall Rule. +EndIPAddress *string `json:"endIpAddress,omitempty" tf:"end_ip_address,omitempty"` + +// The ID of the MySQL Firewall Rule. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The name of the resource group in which the MySQL Flexible Server exists. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group in which the MySQL Flexible Server exists. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created. - ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` +// Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created. +ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` - // Specifies the Start IP Address associated with this Firewall Rule. - StartIPAddress *string `json:"startIpAddress,omitempty" tf:"start_ip_address,omitempty"` +// Specifies the Start IP Address associated with this Firewall Rule. +StartIPAddress *string `json:"startIpAddress,omitempty" tf:"start_ip_address,omitempty"` } + type FlexibleServerFirewallRuleParameters struct { - // Specifies the End IP Address associated with this Firewall Rule. - // +kubebuilder:validation:Optional - EndIPAddress *string `json:"endIpAddress,omitempty" tf:"end_ip_address,omitempty"` - // The name of the resource group in which the MySQL Flexible Server exists. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// Specifies the End IP Address associated with this Firewall Rule. +// +kubebuilder:validation:Optional +EndIPAddress *string `json:"endIpAddress,omitempty" tf:"end_ip_address,omitempty"` + +// The name of the resource group in which the MySQL Flexible Server exists. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - // Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=FlexibleServer - // +kubebuilder:validation:Optional - ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` +// Specifies the name of the MySQL Flexible Server. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=FlexibleServer +// +kubebuilder:validation:Optional +ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` - // Reference to a FlexibleServer to populate serverName. - // +kubebuilder:validation:Optional - ServerNameRef *v1.Reference `json:"serverNameRef,omitempty" tf:"-"` +// Reference to a FlexibleServer to populate serverName. +// +kubebuilder:validation:Optional +ServerNameRef *v1.Reference `json:"serverNameRef,omitempty" tf:"-"` - // Selector for a FlexibleServer to populate serverName. - // +kubebuilder:validation:Optional - ServerNameSelector *v1.Selector `json:"serverNameSelector,omitempty" tf:"-"` +// Selector for a FlexibleServer to populate serverName. +// +kubebuilder:validation:Optional +ServerNameSelector *v1.Selector `json:"serverNameSelector,omitempty" tf:"-"` - // Specifies the Start IP Address associated with this Firewall Rule. - // +kubebuilder:validation:Optional - StartIPAddress *string `json:"startIpAddress,omitempty" tf:"start_ip_address,omitempty"` +// Specifies the Start IP Address associated with this Firewall Rule. +// +kubebuilder:validation:Optional +StartIPAddress *string `json:"startIpAddress,omitempty" tf:"start_ip_address,omitempty"` } // FlexibleServerFirewallRuleSpec defines the desired state of FlexibleServerFirewallRule type FlexibleServerFirewallRuleSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider FlexibleServerFirewallRuleParameters `json:"forProvider"` + ForProvider FlexibleServerFirewallRuleParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -95,13 +104,13 @@ type FlexibleServerFirewallRuleSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider FlexibleServerFirewallRuleInitParameters `json:"initProvider,omitempty"` + InitProvider FlexibleServerFirewallRuleInitParameters `json:"initProvider,omitempty"` } // FlexibleServerFirewallRuleStatus defines the observed state of FlexibleServerFirewallRule. type FlexibleServerFirewallRuleStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider FlexibleServerFirewallRuleObservation `json:"atProvider,omitempty"` + AtProvider FlexibleServerFirewallRuleObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -116,10 +125,10 @@ type FlexibleServerFirewallRuleStatus struct { type FlexibleServerFirewallRule struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.endIpAddress) || (has(self.initProvider) && has(self.initProvider.endIpAddress))",message="spec.forProvider.endIpAddress is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.startIpAddress) || (has(self.initProvider) && has(self.initProvider.startIpAddress))",message="spec.forProvider.startIpAddress is a required parameter" - Spec FlexibleServerFirewallRuleSpec `json:"spec"` - Status FlexibleServerFirewallRuleStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.endIpAddress) || (has(self.initProvider) && has(self.initProvider.endIpAddress))",message="spec.forProvider.endIpAddress is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.startIpAddress) || (has(self.initProvider) && has(self.initProvider.startIpAddress))",message="spec.forProvider.startIpAddress is a required parameter" + Spec FlexibleServerFirewallRuleSpec `json:"spec"` + Status FlexibleServerFirewallRuleStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/dbformysql/v1alpha1/zz_generated_terraformed.go b/apis/dbformysql/v1alpha1/zz_generated_terraformed.go index ff91503..5013d92 100755 --- a/apis/dbformysql/v1alpha1/zz_generated_terraformed.go +++ b/apis/dbformysql/v1alpha1/zz_generated_terraformed.go @@ -11,6 +11,7 @@ Copyright 2022 Upbound Inc. package v1alpha1 import ( + "dario.cat/mergo" "github.com/pkg/errors" "github.com/crossplane/upjet/pkg/resource" @@ -83,6 +84,36 @@ func (tr *ActiveDirectoryAdministrator) GetInitParameters() (map[string]any, err return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this ActiveDirectoryAdministrator +func (tr *ActiveDirectoryAdministrator) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this ActiveDirectoryAdministrator using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *ActiveDirectoryAdministrator) LateInitialize(attrs []byte) (bool, error) { @@ -167,6 +198,36 @@ func (tr *Configuration) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this Configuration +func (tr *Configuration) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Configuration using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Configuration) LateInitialize(attrs []byte) (bool, error) { @@ -251,6 +312,36 @@ func (tr *Database) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this Database +func (tr *Database) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Database using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Database) LateInitialize(attrs []byte) (bool, error) { @@ -335,6 +426,36 @@ func (tr *FirewallRule) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this FirewallRule +func (tr *FirewallRule) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this FirewallRule using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *FirewallRule) LateInitialize(attrs []byte) (bool, error) { @@ -419,6 +540,36 @@ func (tr *FlexibleDatabase) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this FlexibleDatabase +func (tr *FlexibleDatabase) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this FlexibleDatabase using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *FlexibleDatabase) LateInitialize(attrs []byte) (bool, error) { @@ -503,6 +654,36 @@ func (tr *FlexibleServer) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this FlexibleServer +func (tr *FlexibleServer) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this FlexibleServer using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *FlexibleServer) LateInitialize(attrs []byte) (bool, error) { @@ -587,6 +768,36 @@ func (tr *FlexibleServerConfiguration) GetInitParameters() (map[string]any, erro return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this FlexibleServerConfiguration +func (tr *FlexibleServerConfiguration) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this FlexibleServerConfiguration using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *FlexibleServerConfiguration) LateInitialize(attrs []byte) (bool, error) { @@ -671,6 +882,36 @@ func (tr *FlexibleServerFirewallRule) GetInitParameters() (map[string]any, error return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this FlexibleServerFirewallRule +func (tr *FlexibleServerFirewallRule) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this FlexibleServerFirewallRule using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *FlexibleServerFirewallRule) LateInitialize(attrs []byte) (bool, error) { @@ -755,6 +996,36 @@ func (tr *Server) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this Server +func (tr *Server) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Server using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Server) LateInitialize(attrs []byte) (bool, error) { @@ -839,6 +1110,36 @@ func (tr *VirtualNetworkRule) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this VirtualNetworkRule +func (tr *VirtualNetworkRule) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this VirtualNetworkRule using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *VirtualNetworkRule) LateInitialize(attrs []byte) (bool, error) { diff --git a/apis/dbformysql/v1alpha1/zz_server_types.go b/apis/dbformysql/v1alpha1/zz_server_types.go index 9954f01..39616d2 100755 --- a/apis/dbformysql/v1alpha1/zz_server_types.go +++ b/apis/dbformysql/v1alpha1/zz_server_types.go @@ -15,325 +15,346 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type ServerIdentityInitParameters struct { - // Specifies the type of Managed Service Identity that should be configured on this MySQL Server. The only possible value is SystemAssigned. - Type *string `json:"type,omitempty" tf:"type,omitempty"` + +// Specifies the type of Managed Service Identity that should be configured on this MySQL Server. The only possible value is SystemAssigned. +Type *string `json:"type,omitempty" tf:"type,omitempty"` } + type ServerIdentityObservation struct { - // The Principal ID associated with this Managed Service Identity. - PrincipalID *string `json:"principalId,omitempty" tf:"principal_id,omitempty"` - // The Tenant ID associated with this Managed Service Identity. - TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` +// The Principal ID associated with this Managed Service Identity. +PrincipalID *string `json:"principalId,omitempty" tf:"principal_id,omitempty"` - // Specifies the type of Managed Service Identity that should be configured on this MySQL Server. The only possible value is SystemAssigned. - Type *string `json:"type,omitempty" tf:"type,omitempty"` +// The Tenant ID associated with this Managed Service Identity. +TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` + +// Specifies the type of Managed Service Identity that should be configured on this MySQL Server. The only possible value is SystemAssigned. +Type *string `json:"type,omitempty" tf:"type,omitempty"` } + type ServerIdentityParameters struct { - // Specifies the type of Managed Service Identity that should be configured on this MySQL Server. The only possible value is SystemAssigned. - // +kubebuilder:validation:Optional - Type *string `json:"type" tf:"type,omitempty"` + +// Specifies the type of Managed Service Identity that should be configured on this MySQL Server. The only possible value is SystemAssigned. +// +kubebuilder:validation:Optional +Type *string `json:"type" tf:"type,omitempty"` } + type ServerInitParameters struct { - // The Administrator login for the MySQL Server. Required when create_mode is Default. Changing this forces a new resource to be created. - AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` - // Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is true. - AutoGrowEnabled *bool `json:"autoGrowEnabled,omitempty" tf:"auto_grow_enabled,omitempty"` +// The Administrator login for the MySQL Server. Required when create_mode is Default. Changing this forces a new resource to be created. +AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` + +// Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is true. +AutoGrowEnabled *bool `json:"autoGrowEnabled,omitempty" tf:"auto_grow_enabled,omitempty"` - // Backup retention days for the server, supported values are between 7 and 35 days. - BackupRetentionDays *float64 `json:"backupRetentionDays,omitempty" tf:"backup_retention_days,omitempty"` +// Backup retention days for the server, supported values are between 7 and 35 days. +BackupRetentionDays *float64 `json:"backupRetentionDays,omitempty" tf:"backup_retention_days,omitempty"` - // The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default. - CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` +// The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default. +CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` - // For creation modes other than Default, the source server ID to use. - CreationSourceServerID *string `json:"creationSourceServerId,omitempty" tf:"creation_source_server_id,omitempty"` +// For creation modes other than Default, the source server ID to use. +CreationSourceServerID *string `json:"creationSourceServerId,omitempty" tf:"creation_source_server_id,omitempty"` - // Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not supported for the Basic tier. - GeoRedundantBackupEnabled *bool `json:"geoRedundantBackupEnabled,omitempty" tf:"geo_redundant_backup_enabled,omitempty"` +// Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not supported for the Basic tier. +GeoRedundantBackupEnabled *bool `json:"geoRedundantBackupEnabled,omitempty" tf:"geo_redundant_backup_enabled,omitempty"` - // An identity block as defined below. - Identity []ServerIdentityInitParameters `json:"identity,omitempty" tf:"identity,omitempty"` +// An identity block as defined below. +Identity []ServerIdentityInitParameters `json:"identity,omitempty" tf:"identity,omitempty"` - // Whether or not infrastructure is encrypted for this server. Changing this forces a new resource to be created. - InfrastructureEncryptionEnabled *bool `json:"infrastructureEncryptionEnabled,omitempty" tf:"infrastructure_encryption_enabled,omitempty"` +// Whether or not infrastructure is encrypted for this server. Changing this forces a new resource to be created. +InfrastructureEncryptionEnabled *bool `json:"infrastructureEncryptionEnabled,omitempty" tf:"infrastructure_encryption_enabled,omitempty"` - // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // Whether or not public network access is allowed for this server. Defaults to true. - PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` +// Whether or not public network access is allowed for this server. Defaults to true. +PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` - // When create_mode is PointInTimeRestore, specifies the point in time to restore from creation_source_server_id. It should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z. - RestorePointInTime *string `json:"restorePointInTime,omitempty" tf:"restore_point_in_time,omitempty"` +// When create_mode is PointInTimeRestore, specifies the point in time to restore from creation_source_server_id. It should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z. +RestorePointInTime *string `json:"restorePointInTime,omitempty" tf:"restore_point_in_time,omitempty"` - // Specifies if SSL should be enforced on connections. Possible values are true and false. - SSLEnforcementEnabled *bool `json:"sslEnforcementEnabled,omitempty" tf:"ssl_enforcement_enabled,omitempty"` +// Specifies if SSL should be enforced on connections. Possible values are true and false. +SSLEnforcementEnabled *bool `json:"sslEnforcementEnabled,omitempty" tf:"ssl_enforcement_enabled,omitempty"` - // The minimum TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLS1_2. - SSLMinimalTLSVersionEnforced *string `json:"sslMinimalTlsVersionEnforced,omitempty" tf:"ssl_minimal_tls_version_enforced,omitempty"` +// The minimum TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLS1_2. +SSLMinimalTLSVersionEnforced *string `json:"sslMinimalTlsVersionEnforced,omitempty" tf:"ssl_minimal_tls_version_enforced,omitempty"` - // Specifies the SKU Name for this MySQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation. Possible values are B_Gen4_1, B_Gen4_2, B_Gen5_1, B_Gen5_2, GP_Gen4_2, GP_Gen4_4, GP_Gen4_8, GP_Gen4_16, GP_Gen4_32, GP_Gen5_2, GP_Gen5_4, GP_Gen5_8, GP_Gen5_16, GP_Gen5_32, GP_Gen5_64, MO_Gen5_2, MO_Gen5_4, MO_Gen5_8, MO_Gen5_16 and MO_Gen5_32. - SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` +// Specifies the SKU Name for this MySQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation. Possible values are B_Gen4_1, B_Gen4_2, B_Gen5_1, B_Gen5_2, GP_Gen4_2, GP_Gen4_4, GP_Gen4_8, GP_Gen4_16, GP_Gen4_32, GP_Gen5_2, GP_Gen5_4, GP_Gen5_8, GP_Gen5_16, GP_Gen5_32, GP_Gen5_64, MO_Gen5_2, MO_Gen5_4, MO_Gen5_8, MO_Gen5_16 and MO_Gen5_32. +SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` - // Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation. - StorageMb *float64 `json:"storageMb,omitempty" tf:"storage_mb,omitempty"` +// Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation. +StorageMb *float64 `json:"storageMb,omitempty" tf:"storage_mb,omitempty"` - // A mapping of tags to assign to the resource. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A mapping of tags to assign to the resource. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - // Threat detection policy configuration, known in the API as Server Security Alerts Policy. The threat_detection_policy block supports fields documented below. - ThreatDetectionPolicy []ThreatDetectionPolicyInitParameters `json:"threatDetectionPolicy,omitempty" tf:"threat_detection_policy,omitempty"` +// Threat detection policy configuration, known in the API as Server Security Alerts Policy. The threat_detection_policy block supports fields documented below. +ThreatDetectionPolicy []ThreatDetectionPolicyInitParameters `json:"threatDetectionPolicy,omitempty" tf:"threat_detection_policy,omitempty"` - // Specifies the version of MySQL to use. Valid values are 5.7, or 8.0. Changing this forces a new resource to be created. - Version *string `json:"version,omitempty" tf:"version,omitempty"` +// Specifies the version of MySQL to use. Valid values are 5.7, or 8.0. Changing this forces a new resource to be created. +Version *string `json:"version,omitempty" tf:"version,omitempty"` } + type ServerObservation struct { - // The Administrator login for the MySQL Server. Required when create_mode is Default. Changing this forces a new resource to be created. - AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` - // Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is true. - AutoGrowEnabled *bool `json:"autoGrowEnabled,omitempty" tf:"auto_grow_enabled,omitempty"` +// The Administrator login for the MySQL Server. Required when create_mode is Default. Changing this forces a new resource to be created. +AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` + +// Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is true. +AutoGrowEnabled *bool `json:"autoGrowEnabled,omitempty" tf:"auto_grow_enabled,omitempty"` - // Backup retention days for the server, supported values are between 7 and 35 days. - BackupRetentionDays *float64 `json:"backupRetentionDays,omitempty" tf:"backup_retention_days,omitempty"` +// Backup retention days for the server, supported values are between 7 and 35 days. +BackupRetentionDays *float64 `json:"backupRetentionDays,omitempty" tf:"backup_retention_days,omitempty"` - // The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default. - CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` +// The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default. +CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` - // For creation modes other than Default, the source server ID to use. - CreationSourceServerID *string `json:"creationSourceServerId,omitempty" tf:"creation_source_server_id,omitempty"` +// For creation modes other than Default, the source server ID to use. +CreationSourceServerID *string `json:"creationSourceServerId,omitempty" tf:"creation_source_server_id,omitempty"` - // The FQDN of the MySQL Server. - Fqdn *string `json:"fqdn,omitempty" tf:"fqdn,omitempty"` +// The FQDN of the MySQL Server. +Fqdn *string `json:"fqdn,omitempty" tf:"fqdn,omitempty"` - // Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not supported for the Basic tier. - GeoRedundantBackupEnabled *bool `json:"geoRedundantBackupEnabled,omitempty" tf:"geo_redundant_backup_enabled,omitempty"` +// Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not supported for the Basic tier. +GeoRedundantBackupEnabled *bool `json:"geoRedundantBackupEnabled,omitempty" tf:"geo_redundant_backup_enabled,omitempty"` - // The ID of the MySQL Server. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// The ID of the MySQL Server. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // An identity block as defined below. - Identity []ServerIdentityObservation `json:"identity,omitempty" tf:"identity,omitempty"` +// An identity block as defined below. +Identity []ServerIdentityObservation `json:"identity,omitempty" tf:"identity,omitempty"` - // Whether or not infrastructure is encrypted for this server. Changing this forces a new resource to be created. - InfrastructureEncryptionEnabled *bool `json:"infrastructureEncryptionEnabled,omitempty" tf:"infrastructure_encryption_enabled,omitempty"` +// Whether or not infrastructure is encrypted for this server. Changing this forces a new resource to be created. +InfrastructureEncryptionEnabled *bool `json:"infrastructureEncryptionEnabled,omitempty" tf:"infrastructure_encryption_enabled,omitempty"` - // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // Whether or not public network access is allowed for this server. Defaults to true. - PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` +// Whether or not public network access is allowed for this server. Defaults to true. +PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` - // The name of the resource group in which to create the MySQL Server. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group in which to create the MySQL Server. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // When create_mode is PointInTimeRestore, specifies the point in time to restore from creation_source_server_id. It should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z. - RestorePointInTime *string `json:"restorePointInTime,omitempty" tf:"restore_point_in_time,omitempty"` +// When create_mode is PointInTimeRestore, specifies the point in time to restore from creation_source_server_id. It should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z. +RestorePointInTime *string `json:"restorePointInTime,omitempty" tf:"restore_point_in_time,omitempty"` - // Specifies if SSL should be enforced on connections. Possible values are true and false. - SSLEnforcementEnabled *bool `json:"sslEnforcementEnabled,omitempty" tf:"ssl_enforcement_enabled,omitempty"` +// Specifies if SSL should be enforced on connections. Possible values are true and false. +SSLEnforcementEnabled *bool `json:"sslEnforcementEnabled,omitempty" tf:"ssl_enforcement_enabled,omitempty"` - // The minimum TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLS1_2. - SSLMinimalTLSVersionEnforced *string `json:"sslMinimalTlsVersionEnforced,omitempty" tf:"ssl_minimal_tls_version_enforced,omitempty"` +// The minimum TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLS1_2. +SSLMinimalTLSVersionEnforced *string `json:"sslMinimalTlsVersionEnforced,omitempty" tf:"ssl_minimal_tls_version_enforced,omitempty"` - // Specifies the SKU Name for this MySQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation. Possible values are B_Gen4_1, B_Gen4_2, B_Gen5_1, B_Gen5_2, GP_Gen4_2, GP_Gen4_4, GP_Gen4_8, GP_Gen4_16, GP_Gen4_32, GP_Gen5_2, GP_Gen5_4, GP_Gen5_8, GP_Gen5_16, GP_Gen5_32, GP_Gen5_64, MO_Gen5_2, MO_Gen5_4, MO_Gen5_8, MO_Gen5_16 and MO_Gen5_32. - SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` +// Specifies the SKU Name for this MySQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation. Possible values are B_Gen4_1, B_Gen4_2, B_Gen5_1, B_Gen5_2, GP_Gen4_2, GP_Gen4_4, GP_Gen4_8, GP_Gen4_16, GP_Gen4_32, GP_Gen5_2, GP_Gen5_4, GP_Gen5_8, GP_Gen5_16, GP_Gen5_32, GP_Gen5_64, MO_Gen5_2, MO_Gen5_4, MO_Gen5_8, MO_Gen5_16 and MO_Gen5_32. +SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` - // Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation. - StorageMb *float64 `json:"storageMb,omitempty" tf:"storage_mb,omitempty"` +// Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation. +StorageMb *float64 `json:"storageMb,omitempty" tf:"storage_mb,omitempty"` - // A mapping of tags to assign to the resource. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A mapping of tags to assign to the resource. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - // Threat detection policy configuration, known in the API as Server Security Alerts Policy. The threat_detection_policy block supports fields documented below. - ThreatDetectionPolicy []ThreatDetectionPolicyObservation `json:"threatDetectionPolicy,omitempty" tf:"threat_detection_policy,omitempty"` +// Threat detection policy configuration, known in the API as Server Security Alerts Policy. The threat_detection_policy block supports fields documented below. +ThreatDetectionPolicy []ThreatDetectionPolicyObservation `json:"threatDetectionPolicy,omitempty" tf:"threat_detection_policy,omitempty"` - // Specifies the version of MySQL to use. Valid values are 5.7, or 8.0. Changing this forces a new resource to be created. - Version *string `json:"version,omitempty" tf:"version,omitempty"` +// Specifies the version of MySQL to use. Valid values are 5.7, or 8.0. Changing this forces a new resource to be created. +Version *string `json:"version,omitempty" tf:"version,omitempty"` } + type ServerParameters struct { - // The Administrator login for the MySQL Server. Required when create_mode is Default. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` - // The Password associated with the administrator_login for the MySQL Server. Required when create_mode is Default. - // +kubebuilder:validation:Optional - AdministratorLoginPasswordSecretRef *v1.SecretKeySelector `json:"administratorLoginPasswordSecretRef,omitempty" tf:"-"` +// The Administrator login for the MySQL Server. Required when create_mode is Default. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` - // Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is true. - // +kubebuilder:validation:Optional - AutoGrowEnabled *bool `json:"autoGrowEnabled,omitempty" tf:"auto_grow_enabled,omitempty"` +// The Password associated with the administrator_login for the MySQL Server. Required when create_mode is Default. +// +kubebuilder:validation:Optional +AdministratorLoginPasswordSecretRef *v1.SecretKeySelector `json:"administratorLoginPasswordSecretRef,omitempty" tf:"-"` - // Backup retention days for the server, supported values are between 7 and 35 days. - // +kubebuilder:validation:Optional - BackupRetentionDays *float64 `json:"backupRetentionDays,omitempty" tf:"backup_retention_days,omitempty"` +// Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is true. +// +kubebuilder:validation:Optional +AutoGrowEnabled *bool `json:"autoGrowEnabled,omitempty" tf:"auto_grow_enabled,omitempty"` - // The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default. - // +kubebuilder:validation:Optional - CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` +// Backup retention days for the server, supported values are between 7 and 35 days. +// +kubebuilder:validation:Optional +BackupRetentionDays *float64 `json:"backupRetentionDays,omitempty" tf:"backup_retention_days,omitempty"` - // For creation modes other than Default, the source server ID to use. - // +kubebuilder:validation:Optional - CreationSourceServerID *string `json:"creationSourceServerId,omitempty" tf:"creation_source_server_id,omitempty"` +// The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default. +// +kubebuilder:validation:Optional +CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` - // Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not supported for the Basic tier. - // +kubebuilder:validation:Optional - GeoRedundantBackupEnabled *bool `json:"geoRedundantBackupEnabled,omitempty" tf:"geo_redundant_backup_enabled,omitempty"` +// For creation modes other than Default, the source server ID to use. +// +kubebuilder:validation:Optional +CreationSourceServerID *string `json:"creationSourceServerId,omitempty" tf:"creation_source_server_id,omitempty"` - // An identity block as defined below. - // +kubebuilder:validation:Optional - Identity []ServerIdentityParameters `json:"identity,omitempty" tf:"identity,omitempty"` +// Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not supported for the Basic tier. +// +kubebuilder:validation:Optional +GeoRedundantBackupEnabled *bool `json:"geoRedundantBackupEnabled,omitempty" tf:"geo_redundant_backup_enabled,omitempty"` - // Whether or not infrastructure is encrypted for this server. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - InfrastructureEncryptionEnabled *bool `json:"infrastructureEncryptionEnabled,omitempty" tf:"infrastructure_encryption_enabled,omitempty"` +// An identity block as defined below. +// +kubebuilder:validation:Optional +Identity []ServerIdentityParameters `json:"identity,omitempty" tf:"identity,omitempty"` - // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// Whether or not infrastructure is encrypted for this server. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +InfrastructureEncryptionEnabled *bool `json:"infrastructureEncryptionEnabled,omitempty" tf:"infrastructure_encryption_enabled,omitempty"` - // Whether or not public network access is allowed for this server. Defaults to true. - // +kubebuilder:validation:Optional - PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` +// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // The name of the resource group in which to create the MySQL Server. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// Whether or not public network access is allowed for this server. Defaults to true. +// +kubebuilder:validation:Optional +PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` +// The name of the resource group in which to create the MySQL Server. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - // When create_mode is PointInTimeRestore, specifies the point in time to restore from creation_source_server_id. It should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z. - // +kubebuilder:validation:Optional - RestorePointInTime *string `json:"restorePointInTime,omitempty" tf:"restore_point_in_time,omitempty"` +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - // Specifies if SSL should be enforced on connections. Possible values are true and false. - // +kubebuilder:validation:Optional - SSLEnforcementEnabled *bool `json:"sslEnforcementEnabled,omitempty" tf:"ssl_enforcement_enabled,omitempty"` +// When create_mode is PointInTimeRestore, specifies the point in time to restore from creation_source_server_id. It should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z. +// +kubebuilder:validation:Optional +RestorePointInTime *string `json:"restorePointInTime,omitempty" tf:"restore_point_in_time,omitempty"` - // The minimum TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLS1_2. - // +kubebuilder:validation:Optional - SSLMinimalTLSVersionEnforced *string `json:"sslMinimalTlsVersionEnforced,omitempty" tf:"ssl_minimal_tls_version_enforced,omitempty"` +// Specifies if SSL should be enforced on connections. Possible values are true and false. +// +kubebuilder:validation:Optional +SSLEnforcementEnabled *bool `json:"sslEnforcementEnabled,omitempty" tf:"ssl_enforcement_enabled,omitempty"` - // Specifies the SKU Name for this MySQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation. Possible values are B_Gen4_1, B_Gen4_2, B_Gen5_1, B_Gen5_2, GP_Gen4_2, GP_Gen4_4, GP_Gen4_8, GP_Gen4_16, GP_Gen4_32, GP_Gen5_2, GP_Gen5_4, GP_Gen5_8, GP_Gen5_16, GP_Gen5_32, GP_Gen5_64, MO_Gen5_2, MO_Gen5_4, MO_Gen5_8, MO_Gen5_16 and MO_Gen5_32. - // +kubebuilder:validation:Optional - SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` +// The minimum TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLS1_2. +// +kubebuilder:validation:Optional +SSLMinimalTLSVersionEnforced *string `json:"sslMinimalTlsVersionEnforced,omitempty" tf:"ssl_minimal_tls_version_enforced,omitempty"` - // Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation. - // +kubebuilder:validation:Optional - StorageMb *float64 `json:"storageMb,omitempty" tf:"storage_mb,omitempty"` +// Specifies the SKU Name for this MySQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation. Possible values are B_Gen4_1, B_Gen4_2, B_Gen5_1, B_Gen5_2, GP_Gen4_2, GP_Gen4_4, GP_Gen4_8, GP_Gen4_16, GP_Gen4_32, GP_Gen5_2, GP_Gen5_4, GP_Gen5_8, GP_Gen5_16, GP_Gen5_32, GP_Gen5_64, MO_Gen5_2, MO_Gen5_4, MO_Gen5_8, MO_Gen5_16 and MO_Gen5_32. +// +kubebuilder:validation:Optional +SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` - // A mapping of tags to assign to the resource. - // +kubebuilder:validation:Optional - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation. +// +kubebuilder:validation:Optional +StorageMb *float64 `json:"storageMb,omitempty" tf:"storage_mb,omitempty"` - // Threat detection policy configuration, known in the API as Server Security Alerts Policy. The threat_detection_policy block supports fields documented below. - // +kubebuilder:validation:Optional - ThreatDetectionPolicy []ThreatDetectionPolicyParameters `json:"threatDetectionPolicy,omitempty" tf:"threat_detection_policy,omitempty"` +// A mapping of tags to assign to the resource. +// +kubebuilder:validation:Optional +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - // Specifies the version of MySQL to use. Valid values are 5.7, or 8.0. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Version *string `json:"version,omitempty" tf:"version,omitempty"` +// Threat detection policy configuration, known in the API as Server Security Alerts Policy. The threat_detection_policy block supports fields documented below. +// +kubebuilder:validation:Optional +ThreatDetectionPolicy []ThreatDetectionPolicyParameters `json:"threatDetectionPolicy,omitempty" tf:"threat_detection_policy,omitempty"` + +// Specifies the version of MySQL to use. Valid values are 5.7, or 8.0. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Version *string `json:"version,omitempty" tf:"version,omitempty"` } + type ThreatDetectionPolicyInitParameters struct { - // Specifies a list of alerts which should be disabled. Possible values are Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration and Unsafe_Action. - DisabledAlerts []*string `json:"disabledAlerts,omitempty" tf:"disabled_alerts,omitempty"` - // Should the account administrators be emailed when this alert is triggered? - EmailAccountAdmins *bool `json:"emailAccountAdmins,omitempty" tf:"email_account_admins,omitempty"` +// Specifies a list of alerts which should be disabled. Possible values are Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration and Unsafe_Action. +DisabledAlerts []*string `json:"disabledAlerts,omitempty" tf:"disabled_alerts,omitempty"` - // A list of email addresses which alerts should be sent to. - EmailAddresses []*string `json:"emailAddresses,omitempty" tf:"email_addresses,omitempty"` +// Should the account administrators be emailed when this alert is triggered? +EmailAccountAdmins *bool `json:"emailAccountAdmins,omitempty" tf:"email_account_admins,omitempty"` - // Is the policy enabled? - Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` +// A list of email addresses which alerts should be sent to. +EmailAddresses []*string `json:"emailAddresses,omitempty" tf:"email_addresses,omitempty"` - // Specifies the number of days to keep in the Threat Detection audit logs. - RetentionDays *float64 `json:"retentionDays,omitempty" tf:"retention_days,omitempty"` +// Is the policy enabled? +Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` - // Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. - StorageEndpoint *string `json:"storageEndpoint,omitempty" tf:"storage_endpoint,omitempty"` +// Specifies the number of days to keep in the Threat Detection audit logs. +RetentionDays *float64 `json:"retentionDays,omitempty" tf:"retention_days,omitempty"` + +// Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. +StorageEndpoint *string `json:"storageEndpoint,omitempty" tf:"storage_endpoint,omitempty"` } + type ThreatDetectionPolicyObservation struct { - // Specifies a list of alerts which should be disabled. Possible values are Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration and Unsafe_Action. - DisabledAlerts []*string `json:"disabledAlerts,omitempty" tf:"disabled_alerts,omitempty"` - // Should the account administrators be emailed when this alert is triggered? - EmailAccountAdmins *bool `json:"emailAccountAdmins,omitempty" tf:"email_account_admins,omitempty"` +// Specifies a list of alerts which should be disabled. Possible values are Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration and Unsafe_Action. +DisabledAlerts []*string `json:"disabledAlerts,omitempty" tf:"disabled_alerts,omitempty"` + +// Should the account administrators be emailed when this alert is triggered? +EmailAccountAdmins *bool `json:"emailAccountAdmins,omitempty" tf:"email_account_admins,omitempty"` - // A list of email addresses which alerts should be sent to. - EmailAddresses []*string `json:"emailAddresses,omitempty" tf:"email_addresses,omitempty"` +// A list of email addresses which alerts should be sent to. +EmailAddresses []*string `json:"emailAddresses,omitempty" tf:"email_addresses,omitempty"` - // Is the policy enabled? - Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` +// Is the policy enabled? +Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` - // Specifies the number of days to keep in the Threat Detection audit logs. - RetentionDays *float64 `json:"retentionDays,omitempty" tf:"retention_days,omitempty"` +// Specifies the number of days to keep in the Threat Detection audit logs. +RetentionDays *float64 `json:"retentionDays,omitempty" tf:"retention_days,omitempty"` - // Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. - StorageEndpoint *string `json:"storageEndpoint,omitempty" tf:"storage_endpoint,omitempty"` +// Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. +StorageEndpoint *string `json:"storageEndpoint,omitempty" tf:"storage_endpoint,omitempty"` } + type ThreatDetectionPolicyParameters struct { - // Specifies a list of alerts which should be disabled. Possible values are Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration and Unsafe_Action. - // +kubebuilder:validation:Optional - DisabledAlerts []*string `json:"disabledAlerts,omitempty" tf:"disabled_alerts,omitempty"` - // Should the account administrators be emailed when this alert is triggered? - // +kubebuilder:validation:Optional - EmailAccountAdmins *bool `json:"emailAccountAdmins,omitempty" tf:"email_account_admins,omitempty"` +// Specifies a list of alerts which should be disabled. Possible values are Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration and Unsafe_Action. +// +kubebuilder:validation:Optional +DisabledAlerts []*string `json:"disabledAlerts,omitempty" tf:"disabled_alerts,omitempty"` + +// Should the account administrators be emailed when this alert is triggered? +// +kubebuilder:validation:Optional +EmailAccountAdmins *bool `json:"emailAccountAdmins,omitempty" tf:"email_account_admins,omitempty"` - // A list of email addresses which alerts should be sent to. - // +kubebuilder:validation:Optional - EmailAddresses []*string `json:"emailAddresses,omitempty" tf:"email_addresses,omitempty"` +// A list of email addresses which alerts should be sent to. +// +kubebuilder:validation:Optional +EmailAddresses []*string `json:"emailAddresses,omitempty" tf:"email_addresses,omitempty"` - // Is the policy enabled? - // +kubebuilder:validation:Optional - Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` +// Is the policy enabled? +// +kubebuilder:validation:Optional +Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` - // Specifies the number of days to keep in the Threat Detection audit logs. - // +kubebuilder:validation:Optional - RetentionDays *float64 `json:"retentionDays,omitempty" tf:"retention_days,omitempty"` +// Specifies the number of days to keep in the Threat Detection audit logs. +// +kubebuilder:validation:Optional +RetentionDays *float64 `json:"retentionDays,omitempty" tf:"retention_days,omitempty"` - // Specifies the identifier key of the Threat Detection audit storage account. - // +kubebuilder:validation:Optional - StorageAccountAccessKeySecretRef *v1.SecretKeySelector `json:"storageAccountAccessKeySecretRef,omitempty" tf:"-"` +// Specifies the identifier key of the Threat Detection audit storage account. +// +kubebuilder:validation:Optional +StorageAccountAccessKeySecretRef *v1.SecretKeySelector `json:"storageAccountAccessKeySecretRef,omitempty" tf:"-"` - // Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. - // +kubebuilder:validation:Optional - StorageEndpoint *string `json:"storageEndpoint,omitempty" tf:"storage_endpoint,omitempty"` +// Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. +// +kubebuilder:validation:Optional +StorageEndpoint *string `json:"storageEndpoint,omitempty" tf:"storage_endpoint,omitempty"` } // ServerSpec defines the desired state of Server type ServerSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider ServerParameters `json:"forProvider"` + ForProvider ServerParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -344,13 +365,13 @@ type ServerSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider ServerInitParameters `json:"initProvider,omitempty"` + InitProvider ServerInitParameters `json:"initProvider,omitempty"` } // ServerStatus defines the observed state of Server. type ServerStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider ServerObservation `json:"atProvider,omitempty"` + AtProvider ServerObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -365,12 +386,12 @@ type ServerStatus struct { type Server struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.skuName) || (has(self.initProvider) && has(self.initProvider.skuName))",message="spec.forProvider.skuName is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.sslEnforcementEnabled) || (has(self.initProvider) && has(self.initProvider.sslEnforcementEnabled))",message="spec.forProvider.sslEnforcementEnabled is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.version) || (has(self.initProvider) && has(self.initProvider.version))",message="spec.forProvider.version is a required parameter" - Spec ServerSpec `json:"spec"` - Status ServerStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.skuName) || (has(self.initProvider) && has(self.initProvider.skuName))",message="spec.forProvider.skuName is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.sslEnforcementEnabled) || (has(self.initProvider) && has(self.initProvider.sslEnforcementEnabled))",message="spec.forProvider.sslEnforcementEnabled is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.version) || (has(self.initProvider) && has(self.initProvider.version))",message="spec.forProvider.version is a required parameter" + Spec ServerSpec `json:"spec"` + Status ServerStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/dbformysql/v1alpha1/zz_virtualnetworkrule_types.go b/apis/dbformysql/v1alpha1/zz_virtualnetworkrule_types.go index 00cf108..5eab401 100755 --- a/apis/dbformysql/v1alpha1/zz_virtualnetworkrule_types.go +++ b/apis/dbformysql/v1alpha1/zz_virtualnetworkrule_types.go @@ -15,73 +15,82 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type VirtualNetworkRuleInitParameters struct { + } + type VirtualNetworkRuleObservation struct { - // The ID of the MySQL Virtual Network Rule. - ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The name of the resource group where the MySQL server resides. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The ID of the MySQL Virtual Network Rule. +ID *string `json:"id,omitempty" tf:"id,omitempty"` + +// The name of the resource group where the MySQL server resides. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // The name of the SQL Server to which this MySQL virtual network rule will be applied to. Changing this forces a new resource to be created. - ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` +// The name of the SQL Server to which this MySQL virtual network rule will be applied to. Changing this forces a new resource to be created. +ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` - // The ID of the subnet that the MySQL server will be connected to. - SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"` +// The ID of the subnet that the MySQL server will be connected to. +SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"` } + type VirtualNetworkRuleParameters struct { - // The name of the resource group where the MySQL server resides. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - - // The name of the SQL Server to which this MySQL virtual network rule will be applied to. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/dbformysql/v1alpha1.Server - // +kubebuilder:validation:Optional - ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` - - // Reference to a Server in dbformysql to populate serverName. - // +kubebuilder:validation:Optional - ServerNameRef *v1.Reference `json:"serverNameRef,omitempty" tf:"-"` - - // Selector for a Server in dbformysql to populate serverName. - // +kubebuilder:validation:Optional - ServerNameSelector *v1.Selector `json:"serverNameSelector,omitempty" tf:"-"` - - // The ID of the subnet that the MySQL server will be connected to. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/network/v1alpha1.Subnet - // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() - // +kubebuilder:validation:Optional - SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"` - - // Reference to a Subnet in network to populate subnetId. - // +kubebuilder:validation:Optional - SubnetIDRef *v1.Reference `json:"subnetIdRef,omitempty" tf:"-"` - - // Selector for a Subnet in network to populate subnetId. - // +kubebuilder:validation:Optional - SubnetIDSelector *v1.Selector `json:"subnetIdSelector,omitempty" tf:"-"` + +// The name of the resource group where the MySQL server resides. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` + +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` + +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` + +// The name of the SQL Server to which this MySQL virtual network rule will be applied to. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/dbformysql/v1alpha1.Server +// +kubebuilder:validation:Optional +ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` + +// Reference to a Server in dbformysql to populate serverName. +// +kubebuilder:validation:Optional +ServerNameRef *v1.Reference `json:"serverNameRef,omitempty" tf:"-"` + +// Selector for a Server in dbformysql to populate serverName. +// +kubebuilder:validation:Optional +ServerNameSelector *v1.Selector `json:"serverNameSelector,omitempty" tf:"-"` + +// The ID of the subnet that the MySQL server will be connected to. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/network/v1alpha1.Subnet +// +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() +// +kubebuilder:validation:Optional +SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"` + +// Reference to a Subnet in network to populate subnetId. +// +kubebuilder:validation:Optional +SubnetIDRef *v1.Reference `json:"subnetIdRef,omitempty" tf:"-"` + +// Selector for a Subnet in network to populate subnetId. +// +kubebuilder:validation:Optional +SubnetIDSelector *v1.Selector `json:"subnetIdSelector,omitempty" tf:"-"` } // VirtualNetworkRuleSpec defines the desired state of VirtualNetworkRule type VirtualNetworkRuleSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider VirtualNetworkRuleParameters `json:"forProvider"` + ForProvider VirtualNetworkRuleParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -92,13 +101,13 @@ type VirtualNetworkRuleSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider VirtualNetworkRuleInitParameters `json:"initProvider,omitempty"` + InitProvider VirtualNetworkRuleInitParameters `json:"initProvider,omitempty"` } // VirtualNetworkRuleStatus defines the observed state of VirtualNetworkRule. type VirtualNetworkRuleStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider VirtualNetworkRuleObservation `json:"atProvider,omitempty"` + AtProvider VirtualNetworkRuleObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/dbforpostgresql/v1alpha1/zz_activedirectoryadministrator_types.go b/apis/dbforpostgresql/v1alpha1/zz_activedirectoryadministrator_types.go index 5edc5b4..cfa6dc4 100755 --- a/apis/dbforpostgresql/v1alpha1/zz_activedirectoryadministrator_types.go +++ b/apis/dbforpostgresql/v1alpha1/zz_activedirectoryadministrator_types.go @@ -15,86 +15,95 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type ActiveDirectoryAdministratorInitParameters struct { - // The login name of the principal to set as the server administrator - Login *string `json:"login,omitempty" tf:"login,omitempty"` - // The ID of the principal to set as the server administrator. For a managed identity this should be the Client ID of the identity. - ObjectID *string `json:"objectId,omitempty" tf:"object_id,omitempty"` +// The login name of the principal to set as the server administrator +Login *string `json:"login,omitempty" tf:"login,omitempty"` + +// The ID of the principal to set as the server administrator. For a managed identity this should be the Client ID of the identity. +ObjectID *string `json:"objectId,omitempty" tf:"object_id,omitempty"` - // The Azure Tenant ID - TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` +// The Azure Tenant ID +TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` } + type ActiveDirectoryAdministratorObservation struct { - // The ID of the PostgreSQL Active Directory Administrator. - ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The login name of the principal to set as the server administrator - Login *string `json:"login,omitempty" tf:"login,omitempty"` +// The ID of the PostgreSQL Active Directory Administrator. +ID *string `json:"id,omitempty" tf:"id,omitempty"` + +// The login name of the principal to set as the server administrator +Login *string `json:"login,omitempty" tf:"login,omitempty"` - // The ID of the principal to set as the server administrator. For a managed identity this should be the Client ID of the identity. - ObjectID *string `json:"objectId,omitempty" tf:"object_id,omitempty"` +// The ID of the principal to set as the server administrator. For a managed identity this should be the Client ID of the identity. +ObjectID *string `json:"objectId,omitempty" tf:"object_id,omitempty"` - // The name of the resource group for the PostgreSQL server. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group for the PostgreSQL server. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // The name of the PostgreSQL Server on which to set the administrator. Changing this forces a new resource to be created. - ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` +// The name of the PostgreSQL Server on which to set the administrator. Changing this forces a new resource to be created. +ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` - // The Azure Tenant ID - TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` +// The Azure Tenant ID +TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` } + type ActiveDirectoryAdministratorParameters struct { - // The login name of the principal to set as the server administrator - // +kubebuilder:validation:Optional - Login *string `json:"login,omitempty" tf:"login,omitempty"` - // The ID of the principal to set as the server administrator. For a managed identity this should be the Client ID of the identity. - // +kubebuilder:validation:Optional - ObjectID *string `json:"objectId,omitempty" tf:"object_id,omitempty"` +// The login name of the principal to set as the server administrator +// +kubebuilder:validation:Optional +Login *string `json:"login,omitempty" tf:"login,omitempty"` + +// The ID of the principal to set as the server administrator. For a managed identity this should be the Client ID of the identity. +// +kubebuilder:validation:Optional +ObjectID *string `json:"objectId,omitempty" tf:"object_id,omitempty"` - // The name of the resource group for the PostgreSQL server. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group for the PostgreSQL server. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - // The name of the PostgreSQL Server on which to set the administrator. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=Server - // +kubebuilder:validation:Optional - ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` +// The name of the PostgreSQL Server on which to set the administrator. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=Server +// +kubebuilder:validation:Optional +ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` - // Reference to a Server to populate serverName. - // +kubebuilder:validation:Optional - ServerNameRef *v1.Reference `json:"serverNameRef,omitempty" tf:"-"` +// Reference to a Server to populate serverName. +// +kubebuilder:validation:Optional +ServerNameRef *v1.Reference `json:"serverNameRef,omitempty" tf:"-"` - // Selector for a Server to populate serverName. - // +kubebuilder:validation:Optional - ServerNameSelector *v1.Selector `json:"serverNameSelector,omitempty" tf:"-"` +// Selector for a Server to populate serverName. +// +kubebuilder:validation:Optional +ServerNameSelector *v1.Selector `json:"serverNameSelector,omitempty" tf:"-"` - // The Azure Tenant ID - // +kubebuilder:validation:Optional - TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` +// The Azure Tenant ID +// +kubebuilder:validation:Optional +TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` } // ActiveDirectoryAdministratorSpec defines the desired state of ActiveDirectoryAdministrator type ActiveDirectoryAdministratorSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider ActiveDirectoryAdministratorParameters `json:"forProvider"` + ForProvider ActiveDirectoryAdministratorParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -105,13 +114,13 @@ type ActiveDirectoryAdministratorSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider ActiveDirectoryAdministratorInitParameters `json:"initProvider,omitempty"` + InitProvider ActiveDirectoryAdministratorInitParameters `json:"initProvider,omitempty"` } // ActiveDirectoryAdministratorStatus defines the observed state of ActiveDirectoryAdministrator. type ActiveDirectoryAdministratorStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider ActiveDirectoryAdministratorObservation `json:"atProvider,omitempty"` + AtProvider ActiveDirectoryAdministratorObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -126,11 +135,11 @@ type ActiveDirectoryAdministratorStatus struct { type ActiveDirectoryAdministrator struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.login) || (has(self.initProvider) && has(self.initProvider.login))",message="spec.forProvider.login is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.objectId) || (has(self.initProvider) && has(self.initProvider.objectId))",message="spec.forProvider.objectId is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.tenantId) || (has(self.initProvider) && has(self.initProvider.tenantId))",message="spec.forProvider.tenantId is a required parameter" - Spec ActiveDirectoryAdministratorSpec `json:"spec"` - Status ActiveDirectoryAdministratorStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.login) || (has(self.initProvider) && has(self.initProvider.login))",message="spec.forProvider.login is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.objectId) || (has(self.initProvider) && has(self.initProvider.objectId))",message="spec.forProvider.objectId is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.tenantId) || (has(self.initProvider) && has(self.initProvider.tenantId))",message="spec.forProvider.tenantId is a required parameter" + Spec ActiveDirectoryAdministratorSpec `json:"spec"` + Status ActiveDirectoryAdministratorStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/dbforpostgresql/v1alpha1/zz_configuration_types.go b/apis/dbforpostgresql/v1alpha1/zz_configuration_types.go index eac34e3..fba6a5c 100755 --- a/apis/dbforpostgresql/v1alpha1/zz_configuration_types.go +++ b/apis/dbforpostgresql/v1alpha1/zz_configuration_types.go @@ -15,76 +15,85 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type ConfigurationInitParameters struct { - // Specifies the name of the PostgreSQL Configuration, which needs to be a valid PostgreSQL configuration name. Changing this forces a new resource to be created. - Name *string `json:"name,omitempty" tf:"name,omitempty"` - // Specifies the value of the PostgreSQL Configuration. See the PostgreSQL documentation for valid values. Changing this forces a new resource to be created. - Value *string `json:"value,omitempty" tf:"value,omitempty"` +// Specifies the name of the PostgreSQL Configuration, which needs to be a valid PostgreSQL configuration name. Changing this forces a new resource to be created. +Name *string `json:"name,omitempty" tf:"name,omitempty"` + +// Specifies the value of the PostgreSQL Configuration. See the PostgreSQL documentation for valid values. Changing this forces a new resource to be created. +Value *string `json:"value,omitempty" tf:"value,omitempty"` } + type ConfigurationObservation struct { - // The ID of the PostgreSQL Configuration. - ID *string `json:"id,omitempty" tf:"id,omitempty"` - // Specifies the name of the PostgreSQL Configuration, which needs to be a valid PostgreSQL configuration name. Changing this forces a new resource to be created. - Name *string `json:"name,omitempty" tf:"name,omitempty"` +// The ID of the PostgreSQL Configuration. +ID *string `json:"id,omitempty" tf:"id,omitempty"` + +// Specifies the name of the PostgreSQL Configuration, which needs to be a valid PostgreSQL configuration name. Changing this forces a new resource to be created. +Name *string `json:"name,omitempty" tf:"name,omitempty"` - // The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created. - ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` +// Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created. +ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` - // Specifies the value of the PostgreSQL Configuration. See the PostgreSQL documentation for valid values. Changing this forces a new resource to be created. - Value *string `json:"value,omitempty" tf:"value,omitempty"` +// Specifies the value of the PostgreSQL Configuration. See the PostgreSQL documentation for valid values. Changing this forces a new resource to be created. +Value *string `json:"value,omitempty" tf:"value,omitempty"` } + type ConfigurationParameters struct { - // Specifies the name of the PostgreSQL Configuration, which needs to be a valid PostgreSQL configuration name. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Name *string `json:"name,omitempty" tf:"name,omitempty"` - // The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// Specifies the name of the PostgreSQL Configuration, which needs to be a valid PostgreSQL configuration name. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Name *string `json:"name,omitempty" tf:"name,omitempty"` + +// The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - // Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=Server - // +kubebuilder:validation:Optional - ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` +// Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=Server +// +kubebuilder:validation:Optional +ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` - // Reference to a Server to populate serverName. - // +kubebuilder:validation:Optional - ServerNameRef *v1.Reference `json:"serverNameRef,omitempty" tf:"-"` +// Reference to a Server to populate serverName. +// +kubebuilder:validation:Optional +ServerNameRef *v1.Reference `json:"serverNameRef,omitempty" tf:"-"` - // Selector for a Server to populate serverName. - // +kubebuilder:validation:Optional - ServerNameSelector *v1.Selector `json:"serverNameSelector,omitempty" tf:"-"` +// Selector for a Server to populate serverName. +// +kubebuilder:validation:Optional +ServerNameSelector *v1.Selector `json:"serverNameSelector,omitempty" tf:"-"` - // Specifies the value of the PostgreSQL Configuration. See the PostgreSQL documentation for valid values. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Value *string `json:"value,omitempty" tf:"value,omitempty"` +// Specifies the value of the PostgreSQL Configuration. See the PostgreSQL documentation for valid values. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Value *string `json:"value,omitempty" tf:"value,omitempty"` } // ConfigurationSpec defines the desired state of Configuration type ConfigurationSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider ConfigurationParameters `json:"forProvider"` + ForProvider ConfigurationParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -95,13 +104,13 @@ type ConfigurationSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider ConfigurationInitParameters `json:"initProvider,omitempty"` + InitProvider ConfigurationInitParameters `json:"initProvider,omitempty"` } // ConfigurationStatus defines the observed state of Configuration. type ConfigurationStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider ConfigurationObservation `json:"atProvider,omitempty"` + AtProvider ConfigurationObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -116,10 +125,10 @@ type ConfigurationStatus struct { type Configuration struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.name) || (has(self.initProvider) && has(self.initProvider.name))",message="spec.forProvider.name is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.value) || (has(self.initProvider) && has(self.initProvider.value))",message="spec.forProvider.value is a required parameter" - Spec ConfigurationSpec `json:"spec"` - Status ConfigurationStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.name) || (has(self.initProvider) && has(self.initProvider.name))",message="spec.forProvider.name is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.value) || (has(self.initProvider) && has(self.initProvider.value))",message="spec.forProvider.value is a required parameter" + Spec ConfigurationSpec `json:"spec"` + Status ConfigurationStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/dbforpostgresql/v1alpha1/zz_database_types.go b/apis/dbforpostgresql/v1alpha1/zz_database_types.go index 159370f..926db4f 100755 --- a/apis/dbforpostgresql/v1alpha1/zz_database_types.go +++ b/apis/dbforpostgresql/v1alpha1/zz_database_types.go @@ -15,76 +15,85 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type DatabaseInitParameters struct { - // Specifies the Charset for the PostgreSQL Database, which needs to be a valid PostgreSQL Charset. Changing this forces a new resource to be created. - Charset *string `json:"charset,omitempty" tf:"charset,omitempty"` - // Specifies the Collation for the PostgreSQL Database, which needs to be a valid PostgreSQL Collation. Note that Microsoft uses different notation - en-US instead of en_US. Changing this forces a new resource to be created. - Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` +// Specifies the Charset for the PostgreSQL Database, which needs to be a valid PostgreSQL Charset. Changing this forces a new resource to be created. +Charset *string `json:"charset,omitempty" tf:"charset,omitempty"` + +// Specifies the Collation for the PostgreSQL Database, which needs to be a valid PostgreSQL Collation. Note that Microsoft uses different notation - en-US instead of en_US. Changing this forces a new resource to be created. +Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` } + type DatabaseObservation struct { - // Specifies the Charset for the PostgreSQL Database, which needs to be a valid PostgreSQL Charset. Changing this forces a new resource to be created. - Charset *string `json:"charset,omitempty" tf:"charset,omitempty"` - // Specifies the Collation for the PostgreSQL Database, which needs to be a valid PostgreSQL Collation. Note that Microsoft uses different notation - en-US instead of en_US. Changing this forces a new resource to be created. - Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` +// Specifies the Charset for the PostgreSQL Database, which needs to be a valid PostgreSQL Charset. Changing this forces a new resource to be created. +Charset *string `json:"charset,omitempty" tf:"charset,omitempty"` + +// Specifies the Collation for the PostgreSQL Database, which needs to be a valid PostgreSQL Collation. Note that Microsoft uses different notation - en-US instead of en_US. Changing this forces a new resource to be created. +Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` - // The ID of the PostgreSQL Database. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// The ID of the PostgreSQL Database. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created. - ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` +// Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created. +ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` } + type DatabaseParameters struct { - // Specifies the Charset for the PostgreSQL Database, which needs to be a valid PostgreSQL Charset. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Charset *string `json:"charset,omitempty" tf:"charset,omitempty"` - // Specifies the Collation for the PostgreSQL Database, which needs to be a valid PostgreSQL Collation. Note that Microsoft uses different notation - en-US instead of en_US. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` +// Specifies the Charset for the PostgreSQL Database, which needs to be a valid PostgreSQL Charset. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Charset *string `json:"charset,omitempty" tf:"charset,omitempty"` + +// Specifies the Collation for the PostgreSQL Database, which needs to be a valid PostgreSQL Collation. Note that Microsoft uses different notation - en-US instead of en_US. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` - // The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - // Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=Server - // +kubebuilder:validation:Optional - ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` +// Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=Server +// +kubebuilder:validation:Optional +ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` - // Reference to a Server to populate serverName. - // +kubebuilder:validation:Optional - ServerNameRef *v1.Reference `json:"serverNameRef,omitempty" tf:"-"` +// Reference to a Server to populate serverName. +// +kubebuilder:validation:Optional +ServerNameRef *v1.Reference `json:"serverNameRef,omitempty" tf:"-"` - // Selector for a Server to populate serverName. - // +kubebuilder:validation:Optional - ServerNameSelector *v1.Selector `json:"serverNameSelector,omitempty" tf:"-"` +// Selector for a Server to populate serverName. +// +kubebuilder:validation:Optional +ServerNameSelector *v1.Selector `json:"serverNameSelector,omitempty" tf:"-"` } // DatabaseSpec defines the desired state of Database type DatabaseSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider DatabaseParameters `json:"forProvider"` + ForProvider DatabaseParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -95,13 +104,13 @@ type DatabaseSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider DatabaseInitParameters `json:"initProvider,omitempty"` + InitProvider DatabaseInitParameters `json:"initProvider,omitempty"` } // DatabaseStatus defines the observed state of Database. type DatabaseStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider DatabaseObservation `json:"atProvider,omitempty"` + AtProvider DatabaseObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -116,10 +125,10 @@ type DatabaseStatus struct { type Database struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.charset) || (has(self.initProvider) && has(self.initProvider.charset))",message="spec.forProvider.charset is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.collation) || (has(self.initProvider) && has(self.initProvider.collation))",message="spec.forProvider.collation is a required parameter" - Spec DatabaseSpec `json:"spec"` - Status DatabaseStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.charset) || (has(self.initProvider) && has(self.initProvider.charset))",message="spec.forProvider.charset is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.collation) || (has(self.initProvider) && has(self.initProvider.collation))",message="spec.forProvider.collation is a required parameter" + Spec DatabaseSpec `json:"spec"` + Status DatabaseStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/dbforpostgresql/v1alpha1/zz_firewallrule_types.go b/apis/dbforpostgresql/v1alpha1/zz_firewallrule_types.go index ecb3131..47a7835 100755 --- a/apis/dbforpostgresql/v1alpha1/zz_firewallrule_types.go +++ b/apis/dbforpostgresql/v1alpha1/zz_firewallrule_types.go @@ -15,76 +15,85 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type FirewallRuleInitParameters struct { - // Specifies the End IP Address associated with this Firewall Rule. Changing this forces a new resource to be created. - EndIPAddress *string `json:"endIpAddress,omitempty" tf:"end_ip_address,omitempty"` - // Specifies the Start IP Address associated with this Firewall Rule. Changing this forces a new resource to be created. - StartIPAddress *string `json:"startIpAddress,omitempty" tf:"start_ip_address,omitempty"` +// Specifies the End IP Address associated with this Firewall Rule. Changing this forces a new resource to be created. +EndIPAddress *string `json:"endIpAddress,omitempty" tf:"end_ip_address,omitempty"` + +// Specifies the Start IP Address associated with this Firewall Rule. Changing this forces a new resource to be created. +StartIPAddress *string `json:"startIpAddress,omitempty" tf:"start_ip_address,omitempty"` } + type FirewallRuleObservation struct { - // Specifies the End IP Address associated with this Firewall Rule. Changing this forces a new resource to be created. - EndIPAddress *string `json:"endIpAddress,omitempty" tf:"end_ip_address,omitempty"` - // The ID of the PostgreSQL Firewall Rule. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// Specifies the End IP Address associated with this Firewall Rule. Changing this forces a new resource to be created. +EndIPAddress *string `json:"endIpAddress,omitempty" tf:"end_ip_address,omitempty"` + +// The ID of the PostgreSQL Firewall Rule. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created. - ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` +// Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created. +ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` - // Specifies the Start IP Address associated with this Firewall Rule. Changing this forces a new resource to be created. - StartIPAddress *string `json:"startIpAddress,omitempty" tf:"start_ip_address,omitempty"` +// Specifies the Start IP Address associated with this Firewall Rule. Changing this forces a new resource to be created. +StartIPAddress *string `json:"startIpAddress,omitempty" tf:"start_ip_address,omitempty"` } + type FirewallRuleParameters struct { - // Specifies the End IP Address associated with this Firewall Rule. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - EndIPAddress *string `json:"endIpAddress,omitempty" tf:"end_ip_address,omitempty"` - // The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// Specifies the End IP Address associated with this Firewall Rule. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +EndIPAddress *string `json:"endIpAddress,omitempty" tf:"end_ip_address,omitempty"` + +// The name of the resource group in which the PostgreSQL Server exists. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - // Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=Server - // +kubebuilder:validation:Optional - ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` +// Specifies the name of the PostgreSQL Server. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=Server +// +kubebuilder:validation:Optional +ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` - // Reference to a Server to populate serverName. - // +kubebuilder:validation:Optional - ServerNameRef *v1.Reference `json:"serverNameRef,omitempty" tf:"-"` +// Reference to a Server to populate serverName. +// +kubebuilder:validation:Optional +ServerNameRef *v1.Reference `json:"serverNameRef,omitempty" tf:"-"` - // Selector for a Server to populate serverName. - // +kubebuilder:validation:Optional - ServerNameSelector *v1.Selector `json:"serverNameSelector,omitempty" tf:"-"` +// Selector for a Server to populate serverName. +// +kubebuilder:validation:Optional +ServerNameSelector *v1.Selector `json:"serverNameSelector,omitempty" tf:"-"` - // Specifies the Start IP Address associated with this Firewall Rule. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - StartIPAddress *string `json:"startIpAddress,omitempty" tf:"start_ip_address,omitempty"` +// Specifies the Start IP Address associated with this Firewall Rule. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +StartIPAddress *string `json:"startIpAddress,omitempty" tf:"start_ip_address,omitempty"` } // FirewallRuleSpec defines the desired state of FirewallRule type FirewallRuleSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider FirewallRuleParameters `json:"forProvider"` + ForProvider FirewallRuleParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -95,13 +104,13 @@ type FirewallRuleSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider FirewallRuleInitParameters `json:"initProvider,omitempty"` + InitProvider FirewallRuleInitParameters `json:"initProvider,omitempty"` } // FirewallRuleStatus defines the observed state of FirewallRule. type FirewallRuleStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider FirewallRuleObservation `json:"atProvider,omitempty"` + AtProvider FirewallRuleObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -116,10 +125,10 @@ type FirewallRuleStatus struct { type FirewallRule struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.endIpAddress) || (has(self.initProvider) && has(self.initProvider.endIpAddress))",message="spec.forProvider.endIpAddress is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.startIpAddress) || (has(self.initProvider) && has(self.initProvider.startIpAddress))",message="spec.forProvider.startIpAddress is a required parameter" - Spec FirewallRuleSpec `json:"spec"` - Status FirewallRuleStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.endIpAddress) || (has(self.initProvider) && has(self.initProvider.endIpAddress))",message="spec.forProvider.endIpAddress is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.startIpAddress) || (has(self.initProvider) && has(self.initProvider.startIpAddress))",message="spec.forProvider.startIpAddress is a required parameter" + Spec FirewallRuleSpec `json:"spec"` + Status FirewallRuleStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/dbforpostgresql/v1alpha1/zz_flexibleserver_types.go b/apis/dbforpostgresql/v1alpha1/zz_flexibleserver_types.go index db6b6c9..fcd1f56 100755 --- a/apis/dbforpostgresql/v1alpha1/zz_flexibleserver_types.go +++ b/apis/dbforpostgresql/v1alpha1/zz_flexibleserver_types.go @@ -15,429 +15,468 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type AuthenticationInitParameters struct { - // Whether or not Active Directory authentication is allowed to access the PostgreSQL Flexible Server. Defaults to false. - ActiveDirectoryAuthEnabled *bool `json:"activeDirectoryAuthEnabled,omitempty" tf:"active_directory_auth_enabled,omitempty"` - // Whether or not password authentication is allowed to access the PostgreSQL Flexible Server. Defaults to true. - PasswordAuthEnabled *bool `json:"passwordAuthEnabled,omitempty" tf:"password_auth_enabled,omitempty"` +// Whether or not Active Directory authentication is allowed to access the PostgreSQL Flexible Server. Defaults to false. +ActiveDirectoryAuthEnabled *bool `json:"activeDirectoryAuthEnabled,omitempty" tf:"active_directory_auth_enabled,omitempty"` - // The Tenant ID of the Azure Active Directory which is used by the Active Directory authentication. active_directory_auth_enabled must be set to true. - TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` +// Whether or not password authentication is allowed to access the PostgreSQL Flexible Server. Defaults to true. +PasswordAuthEnabled *bool `json:"passwordAuthEnabled,omitempty" tf:"password_auth_enabled,omitempty"` + +// The Tenant ID of the Azure Active Directory which is used by the Active Directory authentication. active_directory_auth_enabled must be set to true. +TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` } + type AuthenticationObservation struct { - // Whether or not Active Directory authentication is allowed to access the PostgreSQL Flexible Server. Defaults to false. - ActiveDirectoryAuthEnabled *bool `json:"activeDirectoryAuthEnabled,omitempty" tf:"active_directory_auth_enabled,omitempty"` - // Whether or not password authentication is allowed to access the PostgreSQL Flexible Server. Defaults to true. - PasswordAuthEnabled *bool `json:"passwordAuthEnabled,omitempty" tf:"password_auth_enabled,omitempty"` +// Whether or not Active Directory authentication is allowed to access the PostgreSQL Flexible Server. Defaults to false. +ActiveDirectoryAuthEnabled *bool `json:"activeDirectoryAuthEnabled,omitempty" tf:"active_directory_auth_enabled,omitempty"` - // The Tenant ID of the Azure Active Directory which is used by the Active Directory authentication. active_directory_auth_enabled must be set to true. - TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` +// Whether or not password authentication is allowed to access the PostgreSQL Flexible Server. Defaults to true. +PasswordAuthEnabled *bool `json:"passwordAuthEnabled,omitempty" tf:"password_auth_enabled,omitempty"` + +// The Tenant ID of the Azure Active Directory which is used by the Active Directory authentication. active_directory_auth_enabled must be set to true. +TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` } + type AuthenticationParameters struct { - // Whether or not Active Directory authentication is allowed to access the PostgreSQL Flexible Server. Defaults to false. - // +kubebuilder:validation:Optional - ActiveDirectoryAuthEnabled *bool `json:"activeDirectoryAuthEnabled,omitempty" tf:"active_directory_auth_enabled,omitempty"` - // Whether or not password authentication is allowed to access the PostgreSQL Flexible Server. Defaults to true. - // +kubebuilder:validation:Optional - PasswordAuthEnabled *bool `json:"passwordAuthEnabled,omitempty" tf:"password_auth_enabled,omitempty"` +// Whether or not Active Directory authentication is allowed to access the PostgreSQL Flexible Server. Defaults to false. +// +kubebuilder:validation:Optional +ActiveDirectoryAuthEnabled *bool `json:"activeDirectoryAuthEnabled,omitempty" tf:"active_directory_auth_enabled,omitempty"` - // The Tenant ID of the Azure Active Directory which is used by the Active Directory authentication. active_directory_auth_enabled must be set to true. - // +kubebuilder:validation:Optional - TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` +// Whether or not password authentication is allowed to access the PostgreSQL Flexible Server. Defaults to true. +// +kubebuilder:validation:Optional +PasswordAuthEnabled *bool `json:"passwordAuthEnabled,omitempty" tf:"password_auth_enabled,omitempty"` + +// The Tenant ID of the Azure Active Directory which is used by the Active Directory authentication. active_directory_auth_enabled must be set to true. +// +kubebuilder:validation:Optional +TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` } + type CustomerManagedKeyInitParameters struct { - // The ID of the Key Vault Key. - KeyVaultKeyID *string `json:"keyVaultKeyId,omitempty" tf:"key_vault_key_id,omitempty"` - // Specifies the primary user managed identity id for a Customer Managed Key. Should be added with identity_ids. - PrimaryUserAssignedIdentityID *string `json:"primaryUserAssignedIdentityId,omitempty" tf:"primary_user_assigned_identity_id,omitempty"` +// The ID of the Key Vault Key. +KeyVaultKeyID *string `json:"keyVaultKeyId,omitempty" tf:"key_vault_key_id,omitempty"` + +// Specifies the primary user managed identity id for a Customer Managed Key. Should be added with identity_ids. +PrimaryUserAssignedIdentityID *string `json:"primaryUserAssignedIdentityId,omitempty" tf:"primary_user_assigned_identity_id,omitempty"` } + type CustomerManagedKeyObservation struct { - // The ID of the Key Vault Key. - KeyVaultKeyID *string `json:"keyVaultKeyId,omitempty" tf:"key_vault_key_id,omitempty"` - // Specifies the primary user managed identity id for a Customer Managed Key. Should be added with identity_ids. - PrimaryUserAssignedIdentityID *string `json:"primaryUserAssignedIdentityId,omitempty" tf:"primary_user_assigned_identity_id,omitempty"` +// The ID of the Key Vault Key. +KeyVaultKeyID *string `json:"keyVaultKeyId,omitempty" tf:"key_vault_key_id,omitempty"` + +// Specifies the primary user managed identity id for a Customer Managed Key. Should be added with identity_ids. +PrimaryUserAssignedIdentityID *string `json:"primaryUserAssignedIdentityId,omitempty" tf:"primary_user_assigned_identity_id,omitempty"` } + type CustomerManagedKeyParameters struct { - // The ID of the Key Vault Key. - // +kubebuilder:validation:Optional - KeyVaultKeyID *string `json:"keyVaultKeyId,omitempty" tf:"key_vault_key_id,omitempty"` - // Specifies the primary user managed identity id for a Customer Managed Key. Should be added with identity_ids. - // +kubebuilder:validation:Optional - PrimaryUserAssignedIdentityID *string `json:"primaryUserAssignedIdentityId,omitempty" tf:"primary_user_assigned_identity_id,omitempty"` +// The ID of the Key Vault Key. +// +kubebuilder:validation:Optional +KeyVaultKeyID *string `json:"keyVaultKeyId,omitempty" tf:"key_vault_key_id,omitempty"` + +// Specifies the primary user managed identity id for a Customer Managed Key. Should be added with identity_ids. +// +kubebuilder:validation:Optional +PrimaryUserAssignedIdentityID *string `json:"primaryUserAssignedIdentityId,omitempty" tf:"primary_user_assigned_identity_id,omitempty"` } + type FlexibleServerInitParameters struct { - // The Administrator login for the PostgreSQL Flexible Server. Required when create_mode is Default and authentication.password_auth_enabled is true. - AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` - // An authentication block as defined below. - Authentication []AuthenticationInitParameters `json:"authentication,omitempty" tf:"authentication,omitempty"` +// The Administrator login for the PostgreSQL Flexible Server. Required when create_mode is Default and authentication.password_auth_enabled is true. +AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` - // The backup retention days for the PostgreSQL Flexible Server. Possible values are between 7 and 35 days. - BackupRetentionDays *float64 `json:"backupRetentionDays,omitempty" tf:"backup_retention_days,omitempty"` +// An authentication block as defined below. +Authentication []AuthenticationInitParameters `json:"authentication,omitempty" tf:"authentication,omitempty"` - // The creation mode which can be used to restore or replicate existing servers. Possible values are Default, PointInTimeRestore, Replica and Update. Changing this forces a new PostgreSQL Flexible Server to be created. - CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` +// The backup retention days for the PostgreSQL Flexible Server. Possible values are between 7 and 35 days. +BackupRetentionDays *float64 `json:"backupRetentionDays,omitempty" tf:"backup_retention_days,omitempty"` - // A customer_managed_key block as defined below. Changing this forces a new resource to be created. - CustomerManagedKey []CustomerManagedKeyInitParameters `json:"customerManagedKey,omitempty" tf:"customer_managed_key,omitempty"` +// The creation mode which can be used to restore or replicate existing servers. Possible values are Default, PointInTimeRestore, Replica and Update. Changing this forces a new PostgreSQL Flexible Server to be created. +CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` - // Is Geo-Redundant backup enabled on the PostgreSQL Flexible Server. Defaults to false. Changing this forces a new PostgreSQL Flexible Server to be created. - GeoRedundantBackupEnabled *bool `json:"geoRedundantBackupEnabled,omitempty" tf:"geo_redundant_backup_enabled,omitempty"` +// A customer_managed_key block as defined below. Changing this forces a new resource to be created. +CustomerManagedKey []CustomerManagedKeyInitParameters `json:"customerManagedKey,omitempty" tf:"customer_managed_key,omitempty"` - // A high_availability block as defined below. - HighAvailability []HighAvailabilityInitParameters `json:"highAvailability,omitempty" tf:"high_availability,omitempty"` +// Is Geo-Redundant backup enabled on the PostgreSQL Flexible Server. Defaults to false. Changing this forces a new PostgreSQL Flexible Server to be created. +GeoRedundantBackupEnabled *bool `json:"geoRedundantBackupEnabled,omitempty" tf:"geo_redundant_backup_enabled,omitempty"` - // An identity block as defined below. - Identity []IdentityInitParameters `json:"identity,omitempty" tf:"identity,omitempty"` +// A high_availability block as defined below. +HighAvailability []HighAvailabilityInitParameters `json:"highAvailability,omitempty" tf:"high_availability,omitempty"` - // The Azure Region where the PostgreSQL Flexible Server should exist. Changing this forces a new PostgreSQL Flexible Server to be created. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// An identity block as defined below. +Identity []IdentityInitParameters `json:"identity,omitempty" tf:"identity,omitempty"` - // A maintenance_window block as defined below. - MaintenanceWindow []MaintenanceWindowInitParameters `json:"maintenanceWindow,omitempty" tf:"maintenance_window,omitempty"` +// The Azure Region where the PostgreSQL Flexible Server should exist. Changing this forces a new PostgreSQL Flexible Server to be created. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // The point in time to restore from source_server_id when create_mode is PointInTimeRestore. Changing this forces a new PostgreSQL Flexible Server to be created. - PointInTimeRestoreTimeInUtc *string `json:"pointInTimeRestoreTimeInUtc,omitempty" tf:"point_in_time_restore_time_in_utc,omitempty"` +// A maintenance_window block as defined below. +MaintenanceWindow []MaintenanceWindowInitParameters `json:"maintenanceWindow,omitempty" tf:"maintenance_window,omitempty"` - // The replication role for the PostgreSQL Flexible Server. Possible value is None. - ReplicationRole *string `json:"replicationRole,omitempty" tf:"replication_role,omitempty"` +// The point in time to restore from source_server_id when create_mode is PointInTimeRestore. Changing this forces a new PostgreSQL Flexible Server to be created. +PointInTimeRestoreTimeInUtc *string `json:"pointInTimeRestoreTimeInUtc,omitempty" tf:"point_in_time_restore_time_in_utc,omitempty"` - // The SKU Name for the PostgreSQL Flexible Server. The name of the SKU, follows the tier + name pattern (e.g. B_Standard_B1ms, GP_Standard_D2s_v3, MO_Standard_E4s_v3). - SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` +// The replication role for the PostgreSQL Flexible Server. Possible value is None. +ReplicationRole *string `json:"replicationRole,omitempty" tf:"replication_role,omitempty"` - // The resource ID of the source PostgreSQL Flexible Server to be restored. Required when create_mode is PointInTimeRestore or Replica. Changing this forces a new PostgreSQL Flexible Server to be created. - SourceServerID *string `json:"sourceServerId,omitempty" tf:"source_server_id,omitempty"` +// The SKU Name for the PostgreSQL Flexible Server. The name of the SKU, follows the tier + name pattern (e.g. B_Standard_B1ms, GP_Standard_D2s_v3, MO_Standard_E4s_v3). +SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` - // The max storage allowed for the PostgreSQL Flexible Server. Possible values are 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, and 16777216. - StorageMb *float64 `json:"storageMb,omitempty" tf:"storage_mb,omitempty"` +// The resource ID of the source PostgreSQL Flexible Server to be restored. Required when create_mode is PointInTimeRestore or Replica. Changing this forces a new PostgreSQL Flexible Server to be created. +SourceServerID *string `json:"sourceServerId,omitempty" tf:"source_server_id,omitempty"` - // A mapping of tags which should be assigned to the PostgreSQL Flexible Server. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// The max storage allowed for the PostgreSQL Flexible Server. Possible values are 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, and 16777216. +StorageMb *float64 `json:"storageMb,omitempty" tf:"storage_mb,omitempty"` - // The version of PostgreSQL Flexible Server to use. Possible values are 11,12, 13, 14 and 15. Required when create_mode is Default. Changing this forces a new PostgreSQL Flexible Server to be created. - Version *string `json:"version,omitempty" tf:"version,omitempty"` +// A mapping of tags which should be assigned to the PostgreSQL Flexible Server. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - // Specifies the Availability Zone in which the PostgreSQL Flexible Server should be located. - Zone *string `json:"zone,omitempty" tf:"zone,omitempty"` +// The version of PostgreSQL Flexible Server to use. Possible values are 11,12, 13, 14 and 15. Required when create_mode is Default. Changing this forces a new PostgreSQL Flexible Server to be created. +Version *string `json:"version,omitempty" tf:"version,omitempty"` + +// Specifies the Availability Zone in which the PostgreSQL Flexible Server should be located. +Zone *string `json:"zone,omitempty" tf:"zone,omitempty"` } + type FlexibleServerObservation struct { - // The Administrator login for the PostgreSQL Flexible Server. Required when create_mode is Default and authentication.password_auth_enabled is true. - AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` - // An authentication block as defined below. - Authentication []AuthenticationObservation `json:"authentication,omitempty" tf:"authentication,omitempty"` +// The Administrator login for the PostgreSQL Flexible Server. Required when create_mode is Default and authentication.password_auth_enabled is true. +AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` - // The backup retention days for the PostgreSQL Flexible Server. Possible values are between 7 and 35 days. - BackupRetentionDays *float64 `json:"backupRetentionDays,omitempty" tf:"backup_retention_days,omitempty"` +// An authentication block as defined below. +Authentication []AuthenticationObservation `json:"authentication,omitempty" tf:"authentication,omitempty"` - // The creation mode which can be used to restore or replicate existing servers. Possible values are Default, PointInTimeRestore, Replica and Update. Changing this forces a new PostgreSQL Flexible Server to be created. - CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` +// The backup retention days for the PostgreSQL Flexible Server. Possible values are between 7 and 35 days. +BackupRetentionDays *float64 `json:"backupRetentionDays,omitempty" tf:"backup_retention_days,omitempty"` - // A customer_managed_key block as defined below. Changing this forces a new resource to be created. - CustomerManagedKey []CustomerManagedKeyObservation `json:"customerManagedKey,omitempty" tf:"customer_managed_key,omitempty"` +// The creation mode which can be used to restore or replicate existing servers. Possible values are Default, PointInTimeRestore, Replica and Update. Changing this forces a new PostgreSQL Flexible Server to be created. +CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` - // The ID of the virtual network subnet to create the PostgreSQL Flexible Server. The provided subnet should not have any other resource deployed in it and this subnet will be delegated to the PostgreSQL Flexible Server, if not already delegated. Changing this forces a new PostgreSQL Flexible Server to be created. - DelegatedSubnetID *string `json:"delegatedSubnetId,omitempty" tf:"delegated_subnet_id,omitempty"` +// A customer_managed_key block as defined below. Changing this forces a new resource to be created. +CustomerManagedKey []CustomerManagedKeyObservation `json:"customerManagedKey,omitempty" tf:"customer_managed_key,omitempty"` - // The FQDN of the PostgreSQL Flexible Server. - Fqdn *string `json:"fqdn,omitempty" tf:"fqdn,omitempty"` +// The ID of the virtual network subnet to create the PostgreSQL Flexible Server. The provided subnet should not have any other resource deployed in it and this subnet will be delegated to the PostgreSQL Flexible Server, if not already delegated. Changing this forces a new PostgreSQL Flexible Server to be created. +DelegatedSubnetID *string `json:"delegatedSubnetId,omitempty" tf:"delegated_subnet_id,omitempty"` - // Is Geo-Redundant backup enabled on the PostgreSQL Flexible Server. Defaults to false. Changing this forces a new PostgreSQL Flexible Server to be created. - GeoRedundantBackupEnabled *bool `json:"geoRedundantBackupEnabled,omitempty" tf:"geo_redundant_backup_enabled,omitempty"` +// The FQDN of the PostgreSQL Flexible Server. +Fqdn *string `json:"fqdn,omitempty" tf:"fqdn,omitempty"` - // A high_availability block as defined below. - HighAvailability []HighAvailabilityObservation `json:"highAvailability,omitempty" tf:"high_availability,omitempty"` +// Is Geo-Redundant backup enabled on the PostgreSQL Flexible Server. Defaults to false. Changing this forces a new PostgreSQL Flexible Server to be created. +GeoRedundantBackupEnabled *bool `json:"geoRedundantBackupEnabled,omitempty" tf:"geo_redundant_backup_enabled,omitempty"` - // The ID of the PostgreSQL Flexible Server. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// A high_availability block as defined below. +HighAvailability []HighAvailabilityObservation `json:"highAvailability,omitempty" tf:"high_availability,omitempty"` - // An identity block as defined below. - Identity []IdentityObservation `json:"identity,omitempty" tf:"identity,omitempty"` +// The ID of the PostgreSQL Flexible Server. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The Azure Region where the PostgreSQL Flexible Server should exist. Changing this forces a new PostgreSQL Flexible Server to be created. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// An identity block as defined below. +Identity []IdentityObservation `json:"identity,omitempty" tf:"identity,omitempty"` - // A maintenance_window block as defined below. - MaintenanceWindow []MaintenanceWindowObservation `json:"maintenanceWindow,omitempty" tf:"maintenance_window,omitempty"` +// The Azure Region where the PostgreSQL Flexible Server should exist. Changing this forces a new PostgreSQL Flexible Server to be created. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // The point in time to restore from source_server_id when create_mode is PointInTimeRestore. Changing this forces a new PostgreSQL Flexible Server to be created. - PointInTimeRestoreTimeInUtc *string `json:"pointInTimeRestoreTimeInUtc,omitempty" tf:"point_in_time_restore_time_in_utc,omitempty"` +// A maintenance_window block as defined below. +MaintenanceWindow []MaintenanceWindowObservation `json:"maintenanceWindow,omitempty" tf:"maintenance_window,omitempty"` - // The ID of the private DNS zone to create the PostgreSQL Flexible Server. Changing this forces a new PostgreSQL Flexible Server to be created. - PrivateDNSZoneID *string `json:"privateDnsZoneId,omitempty" tf:"private_dns_zone_id,omitempty"` +// The point in time to restore from source_server_id when create_mode is PointInTimeRestore. Changing this forces a new PostgreSQL Flexible Server to be created. +PointInTimeRestoreTimeInUtc *string `json:"pointInTimeRestoreTimeInUtc,omitempty" tf:"point_in_time_restore_time_in_utc,omitempty"` - // Is public network access enabled? - PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` +// The ID of the private DNS zone to create the PostgreSQL Flexible Server. Changing this forces a new PostgreSQL Flexible Server to be created. +PrivateDNSZoneID *string `json:"privateDnsZoneId,omitempty" tf:"private_dns_zone_id,omitempty"` - // The replication role for the PostgreSQL Flexible Server. Possible value is None. - ReplicationRole *string `json:"replicationRole,omitempty" tf:"replication_role,omitempty"` +// Is public network access enabled? +PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` - // The name of the Resource Group where the PostgreSQL Flexible Server should exist. Changing this forces a new PostgreSQL Flexible Server to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The replication role for the PostgreSQL Flexible Server. Possible value is None. +ReplicationRole *string `json:"replicationRole,omitempty" tf:"replication_role,omitempty"` - // The SKU Name for the PostgreSQL Flexible Server. The name of the SKU, follows the tier + name pattern (e.g. B_Standard_B1ms, GP_Standard_D2s_v3, MO_Standard_E4s_v3). - SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` +// The name of the Resource Group where the PostgreSQL Flexible Server should exist. Changing this forces a new PostgreSQL Flexible Server to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // The resource ID of the source PostgreSQL Flexible Server to be restored. Required when create_mode is PointInTimeRestore or Replica. Changing this forces a new PostgreSQL Flexible Server to be created. - SourceServerID *string `json:"sourceServerId,omitempty" tf:"source_server_id,omitempty"` +// The SKU Name for the PostgreSQL Flexible Server. The name of the SKU, follows the tier + name pattern (e.g. B_Standard_B1ms, GP_Standard_D2s_v3, MO_Standard_E4s_v3). +SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` - // The max storage allowed for the PostgreSQL Flexible Server. Possible values are 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, and 16777216. - StorageMb *float64 `json:"storageMb,omitempty" tf:"storage_mb,omitempty"` +// The resource ID of the source PostgreSQL Flexible Server to be restored. Required when create_mode is PointInTimeRestore or Replica. Changing this forces a new PostgreSQL Flexible Server to be created. +SourceServerID *string `json:"sourceServerId,omitempty" tf:"source_server_id,omitempty"` - // A mapping of tags which should be assigned to the PostgreSQL Flexible Server. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// The max storage allowed for the PostgreSQL Flexible Server. Possible values are 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, and 16777216. +StorageMb *float64 `json:"storageMb,omitempty" tf:"storage_mb,omitempty"` - // The version of PostgreSQL Flexible Server to use. Possible values are 11,12, 13, 14 and 15. Required when create_mode is Default. Changing this forces a new PostgreSQL Flexible Server to be created. - Version *string `json:"version,omitempty" tf:"version,omitempty"` +// A mapping of tags which should be assigned to the PostgreSQL Flexible Server. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - // Specifies the Availability Zone in which the PostgreSQL Flexible Server should be located. - Zone *string `json:"zone,omitempty" tf:"zone,omitempty"` +// The version of PostgreSQL Flexible Server to use. Possible values are 11,12, 13, 14 and 15. Required when create_mode is Default. Changing this forces a new PostgreSQL Flexible Server to be created. +Version *string `json:"version,omitempty" tf:"version,omitempty"` + +// Specifies the Availability Zone in which the PostgreSQL Flexible Server should be located. +Zone *string `json:"zone,omitempty" tf:"zone,omitempty"` } + type FlexibleServerParameters struct { - // The Administrator login for the PostgreSQL Flexible Server. Required when create_mode is Default and authentication.password_auth_enabled is true. - // +kubebuilder:validation:Optional - AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` - - // The Password associated with the administrator_login for the PostgreSQL Flexible Server. Required when create_mode is Default and authentication.password_auth_enabled is true. - // +kubebuilder:validation:Optional - AdministratorPasswordSecretRef *v1.SecretKeySelector `json:"administratorPasswordSecretRef,omitempty" tf:"-"` - - // An authentication block as defined below. - // +kubebuilder:validation:Optional - Authentication []AuthenticationParameters `json:"authentication,omitempty" tf:"authentication,omitempty"` - - // The backup retention days for the PostgreSQL Flexible Server. Possible values are between 7 and 35 days. - // +kubebuilder:validation:Optional - BackupRetentionDays *float64 `json:"backupRetentionDays,omitempty" tf:"backup_retention_days,omitempty"` - - // The creation mode which can be used to restore or replicate existing servers. Possible values are Default, PointInTimeRestore, Replica and Update. Changing this forces a new PostgreSQL Flexible Server to be created. - // +kubebuilder:validation:Optional - CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` - - // A customer_managed_key block as defined below. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - CustomerManagedKey []CustomerManagedKeyParameters `json:"customerManagedKey,omitempty" tf:"customer_managed_key,omitempty"` - - // The ID of the virtual network subnet to create the PostgreSQL Flexible Server. The provided subnet should not have any other resource deployed in it and this subnet will be delegated to the PostgreSQL Flexible Server, if not already delegated. Changing this forces a new PostgreSQL Flexible Server to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/network/v1alpha1.Subnet - // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() - // +kubebuilder:validation:Optional - DelegatedSubnetID *string `json:"delegatedSubnetId,omitempty" tf:"delegated_subnet_id,omitempty"` - - // Reference to a Subnet in network to populate delegatedSubnetId. - // +kubebuilder:validation:Optional - DelegatedSubnetIDRef *v1.Reference `json:"delegatedSubnetIdRef,omitempty" tf:"-"` - - // Selector for a Subnet in network to populate delegatedSubnetId. - // +kubebuilder:validation:Optional - DelegatedSubnetIDSelector *v1.Selector `json:"delegatedSubnetIdSelector,omitempty" tf:"-"` - - // Is Geo-Redundant backup enabled on the PostgreSQL Flexible Server. Defaults to false. Changing this forces a new PostgreSQL Flexible Server to be created. - // +kubebuilder:validation:Optional - GeoRedundantBackupEnabled *bool `json:"geoRedundantBackupEnabled,omitempty" tf:"geo_redundant_backup_enabled,omitempty"` - - // A high_availability block as defined below. - // +kubebuilder:validation:Optional - HighAvailability []HighAvailabilityParameters `json:"highAvailability,omitempty" tf:"high_availability,omitempty"` - - // An identity block as defined below. - // +kubebuilder:validation:Optional - Identity []IdentityParameters `json:"identity,omitempty" tf:"identity,omitempty"` - - // The Azure Region where the PostgreSQL Flexible Server should exist. Changing this forces a new PostgreSQL Flexible Server to be created. - // +kubebuilder:validation:Optional - Location *string `json:"location,omitempty" tf:"location,omitempty"` - - // A maintenance_window block as defined below. - // +kubebuilder:validation:Optional - MaintenanceWindow []MaintenanceWindowParameters `json:"maintenanceWindow,omitempty" tf:"maintenance_window,omitempty"` - - // The point in time to restore from source_server_id when create_mode is PointInTimeRestore. Changing this forces a new PostgreSQL Flexible Server to be created. - // +kubebuilder:validation:Optional - PointInTimeRestoreTimeInUtc *string `json:"pointInTimeRestoreTimeInUtc,omitempty" tf:"point_in_time_restore_time_in_utc,omitempty"` - - // The ID of the private DNS zone to create the PostgreSQL Flexible Server. Changing this forces a new PostgreSQL Flexible Server to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/network/v1alpha1.PrivateDNSZone - // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() - // +kubebuilder:validation:Optional - PrivateDNSZoneID *string `json:"privateDnsZoneId,omitempty" tf:"private_dns_zone_id,omitempty"` - - // Reference to a PrivateDNSZone in network to populate privateDnsZoneId. - // +kubebuilder:validation:Optional - PrivateDNSZoneIDRef *v1.Reference `json:"privateDnsZoneIdRef,omitempty" tf:"-"` - - // Selector for a PrivateDNSZone in network to populate privateDnsZoneId. - // +kubebuilder:validation:Optional - PrivateDNSZoneIDSelector *v1.Selector `json:"privateDnsZoneIdSelector,omitempty" tf:"-"` - - // The replication role for the PostgreSQL Flexible Server. Possible value is None. - // +kubebuilder:validation:Optional - ReplicationRole *string `json:"replicationRole,omitempty" tf:"replication_role,omitempty"` - - // The name of the Resource Group where the PostgreSQL Flexible Server should exist. Changing this forces a new PostgreSQL Flexible Server to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - - // The SKU Name for the PostgreSQL Flexible Server. The name of the SKU, follows the tier + name pattern (e.g. B_Standard_B1ms, GP_Standard_D2s_v3, MO_Standard_E4s_v3). - // +kubebuilder:validation:Optional - SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` - - // The resource ID of the source PostgreSQL Flexible Server to be restored. Required when create_mode is PointInTimeRestore or Replica. Changing this forces a new PostgreSQL Flexible Server to be created. - // +kubebuilder:validation:Optional - SourceServerID *string `json:"sourceServerId,omitempty" tf:"source_server_id,omitempty"` - - // The max storage allowed for the PostgreSQL Flexible Server. Possible values are 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, and 16777216. - // +kubebuilder:validation:Optional - StorageMb *float64 `json:"storageMb,omitempty" tf:"storage_mb,omitempty"` - - // A mapping of tags which should be assigned to the PostgreSQL Flexible Server. - // +kubebuilder:validation:Optional - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - - // The version of PostgreSQL Flexible Server to use. Possible values are 11,12, 13, 14 and 15. Required when create_mode is Default. Changing this forces a new PostgreSQL Flexible Server to be created. - // +kubebuilder:validation:Optional - Version *string `json:"version,omitempty" tf:"version,omitempty"` - - // Specifies the Availability Zone in which the PostgreSQL Flexible Server should be located. - // +kubebuilder:validation:Optional - Zone *string `json:"zone,omitempty" tf:"zone,omitempty"` + +// The Administrator login for the PostgreSQL Flexible Server. Required when create_mode is Default and authentication.password_auth_enabled is true. +// +kubebuilder:validation:Optional +AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` + +// The Password associated with the administrator_login for the PostgreSQL Flexible Server. Required when create_mode is Default and authentication.password_auth_enabled is true. +// +kubebuilder:validation:Optional +AdministratorPasswordSecretRef *v1.SecretKeySelector `json:"administratorPasswordSecretRef,omitempty" tf:"-"` + +// An authentication block as defined below. +// +kubebuilder:validation:Optional +Authentication []AuthenticationParameters `json:"authentication,omitempty" tf:"authentication,omitempty"` + +// The backup retention days for the PostgreSQL Flexible Server. Possible values are between 7 and 35 days. +// +kubebuilder:validation:Optional +BackupRetentionDays *float64 `json:"backupRetentionDays,omitempty" tf:"backup_retention_days,omitempty"` + +// The creation mode which can be used to restore or replicate existing servers. Possible values are Default, PointInTimeRestore, Replica and Update. Changing this forces a new PostgreSQL Flexible Server to be created. +// +kubebuilder:validation:Optional +CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` + +// A customer_managed_key block as defined below. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +CustomerManagedKey []CustomerManagedKeyParameters `json:"customerManagedKey,omitempty" tf:"customer_managed_key,omitempty"` + +// The ID of the virtual network subnet to create the PostgreSQL Flexible Server. The provided subnet should not have any other resource deployed in it and this subnet will be delegated to the PostgreSQL Flexible Server, if not already delegated. Changing this forces a new PostgreSQL Flexible Server to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/network/v1alpha1.Subnet +// +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() +// +kubebuilder:validation:Optional +DelegatedSubnetID *string `json:"delegatedSubnetId,omitempty" tf:"delegated_subnet_id,omitempty"` + +// Reference to a Subnet in network to populate delegatedSubnetId. +// +kubebuilder:validation:Optional +DelegatedSubnetIDRef *v1.Reference `json:"delegatedSubnetIdRef,omitempty" tf:"-"` + +// Selector for a Subnet in network to populate delegatedSubnetId. +// +kubebuilder:validation:Optional +DelegatedSubnetIDSelector *v1.Selector `json:"delegatedSubnetIdSelector,omitempty" tf:"-"` + +// Is Geo-Redundant backup enabled on the PostgreSQL Flexible Server. Defaults to false. Changing this forces a new PostgreSQL Flexible Server to be created. +// +kubebuilder:validation:Optional +GeoRedundantBackupEnabled *bool `json:"geoRedundantBackupEnabled,omitempty" tf:"geo_redundant_backup_enabled,omitempty"` + +// A high_availability block as defined below. +// +kubebuilder:validation:Optional +HighAvailability []HighAvailabilityParameters `json:"highAvailability,omitempty" tf:"high_availability,omitempty"` + +// An identity block as defined below. +// +kubebuilder:validation:Optional +Identity []IdentityParameters `json:"identity,omitempty" tf:"identity,omitempty"` + +// The Azure Region where the PostgreSQL Flexible Server should exist. Changing this forces a new PostgreSQL Flexible Server to be created. +// +kubebuilder:validation:Optional +Location *string `json:"location,omitempty" tf:"location,omitempty"` + +// A maintenance_window block as defined below. +// +kubebuilder:validation:Optional +MaintenanceWindow []MaintenanceWindowParameters `json:"maintenanceWindow,omitempty" tf:"maintenance_window,omitempty"` + +// The point in time to restore from source_server_id when create_mode is PointInTimeRestore. Changing this forces a new PostgreSQL Flexible Server to be created. +// +kubebuilder:validation:Optional +PointInTimeRestoreTimeInUtc *string `json:"pointInTimeRestoreTimeInUtc,omitempty" tf:"point_in_time_restore_time_in_utc,omitempty"` + +// The ID of the private DNS zone to create the PostgreSQL Flexible Server. Changing this forces a new PostgreSQL Flexible Server to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/network/v1alpha1.PrivateDNSZone +// +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() +// +kubebuilder:validation:Optional +PrivateDNSZoneID *string `json:"privateDnsZoneId,omitempty" tf:"private_dns_zone_id,omitempty"` + +// Reference to a PrivateDNSZone in network to populate privateDnsZoneId. +// +kubebuilder:validation:Optional +PrivateDNSZoneIDRef *v1.Reference `json:"privateDnsZoneIdRef,omitempty" tf:"-"` + +// Selector for a PrivateDNSZone in network to populate privateDnsZoneId. +// +kubebuilder:validation:Optional +PrivateDNSZoneIDSelector *v1.Selector `json:"privateDnsZoneIdSelector,omitempty" tf:"-"` + +// The replication role for the PostgreSQL Flexible Server. Possible value is None. +// +kubebuilder:validation:Optional +ReplicationRole *string `json:"replicationRole,omitempty" tf:"replication_role,omitempty"` + +// The name of the Resource Group where the PostgreSQL Flexible Server should exist. Changing this forces a new PostgreSQL Flexible Server to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` + +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` + +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` + +// The SKU Name for the PostgreSQL Flexible Server. The name of the SKU, follows the tier + name pattern (e.g. B_Standard_B1ms, GP_Standard_D2s_v3, MO_Standard_E4s_v3). +// +kubebuilder:validation:Optional +SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` + +// The resource ID of the source PostgreSQL Flexible Server to be restored. Required when create_mode is PointInTimeRestore or Replica. Changing this forces a new PostgreSQL Flexible Server to be created. +// +kubebuilder:validation:Optional +SourceServerID *string `json:"sourceServerId,omitempty" tf:"source_server_id,omitempty"` + +// The max storage allowed for the PostgreSQL Flexible Server. Possible values are 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, and 16777216. +// +kubebuilder:validation:Optional +StorageMb *float64 `json:"storageMb,omitempty" tf:"storage_mb,omitempty"` + +// A mapping of tags which should be assigned to the PostgreSQL Flexible Server. +// +kubebuilder:validation:Optional +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + +// The version of PostgreSQL Flexible Server to use. Possible values are 11,12, 13, 14 and 15. Required when create_mode is Default. Changing this forces a new PostgreSQL Flexible Server to be created. +// +kubebuilder:validation:Optional +Version *string `json:"version,omitempty" tf:"version,omitempty"` + +// Specifies the Availability Zone in which the PostgreSQL Flexible Server should be located. +// +kubebuilder:validation:Optional +Zone *string `json:"zone,omitempty" tf:"zone,omitempty"` } + type HighAvailabilityInitParameters struct { - // The high availability mode for the PostgreSQL Flexible Server. Possible value are SameZone or ZoneRedundant. - Mode *string `json:"mode,omitempty" tf:"mode,omitempty"` - // Specifies the Availability Zone in which the standby Flexible Server should be located. - StandbyAvailabilityZone *string `json:"standbyAvailabilityZone,omitempty" tf:"standby_availability_zone,omitempty"` +// The high availability mode for the PostgreSQL Flexible Server. Possible value are SameZone or ZoneRedundant. +Mode *string `json:"mode,omitempty" tf:"mode,omitempty"` + +// Specifies the Availability Zone in which the standby Flexible Server should be located. +StandbyAvailabilityZone *string `json:"standbyAvailabilityZone,omitempty" tf:"standby_availability_zone,omitempty"` } + type HighAvailabilityObservation struct { - // The high availability mode for the PostgreSQL Flexible Server. Possible value are SameZone or ZoneRedundant. - Mode *string `json:"mode,omitempty" tf:"mode,omitempty"` - // Specifies the Availability Zone in which the standby Flexible Server should be located. - StandbyAvailabilityZone *string `json:"standbyAvailabilityZone,omitempty" tf:"standby_availability_zone,omitempty"` +// The high availability mode for the PostgreSQL Flexible Server. Possible value are SameZone or ZoneRedundant. +Mode *string `json:"mode,omitempty" tf:"mode,omitempty"` + +// Specifies the Availability Zone in which the standby Flexible Server should be located. +StandbyAvailabilityZone *string `json:"standbyAvailabilityZone,omitempty" tf:"standby_availability_zone,omitempty"` } + type HighAvailabilityParameters struct { - // The high availability mode for the PostgreSQL Flexible Server. Possible value are SameZone or ZoneRedundant. - // +kubebuilder:validation:Optional - Mode *string `json:"mode" tf:"mode,omitempty"` - // Specifies the Availability Zone in which the standby Flexible Server should be located. - // +kubebuilder:validation:Optional - StandbyAvailabilityZone *string `json:"standbyAvailabilityZone,omitempty" tf:"standby_availability_zone,omitempty"` +// The high availability mode for the PostgreSQL Flexible Server. Possible value are SameZone or ZoneRedundant. +// +kubebuilder:validation:Optional +Mode *string `json:"mode" tf:"mode,omitempty"` + +// Specifies the Availability Zone in which the standby Flexible Server should be located. +// +kubebuilder:validation:Optional +StandbyAvailabilityZone *string `json:"standbyAvailabilityZone,omitempty" tf:"standby_availability_zone,omitempty"` } + type IdentityInitParameters struct { - // A list of User Assigned Managed Identity IDs to be assigned to this PostgreSQL Flexible Server. Required if used together with customer_managed_key block. - IdentityIds []*string `json:"identityIds,omitempty" tf:"identity_ids,omitempty"` - // Specifies the type of Managed Service Identity that should be configured on this PostgreSQL Flexible Server. The only possible value is UserAssigned. - Type *string `json:"type,omitempty" tf:"type,omitempty"` +// A list of User Assigned Managed Identity IDs to be assigned to this PostgreSQL Flexible Server. Required if used together with customer_managed_key block. +IdentityIds []*string `json:"identityIds,omitempty" tf:"identity_ids,omitempty"` + +// Specifies the type of Managed Service Identity that should be configured on this PostgreSQL Flexible Server. The only possible value is UserAssigned. +Type *string `json:"type,omitempty" tf:"type,omitempty"` } + type IdentityObservation struct { - // A list of User Assigned Managed Identity IDs to be assigned to this PostgreSQL Flexible Server. Required if used together with customer_managed_key block. - IdentityIds []*string `json:"identityIds,omitempty" tf:"identity_ids,omitempty"` - // Specifies the type of Managed Service Identity that should be configured on this PostgreSQL Flexible Server. The only possible value is UserAssigned. - Type *string `json:"type,omitempty" tf:"type,omitempty"` +// A list of User Assigned Managed Identity IDs to be assigned to this PostgreSQL Flexible Server. Required if used together with customer_managed_key block. +IdentityIds []*string `json:"identityIds,omitempty" tf:"identity_ids,omitempty"` + +// Specifies the type of Managed Service Identity that should be configured on this PostgreSQL Flexible Server. The only possible value is UserAssigned. +Type *string `json:"type,omitempty" tf:"type,omitempty"` } + type IdentityParameters struct { - // A list of User Assigned Managed Identity IDs to be assigned to this PostgreSQL Flexible Server. Required if used together with customer_managed_key block. - // +kubebuilder:validation:Optional - IdentityIds []*string `json:"identityIds" tf:"identity_ids,omitempty"` - // Specifies the type of Managed Service Identity that should be configured on this PostgreSQL Flexible Server. The only possible value is UserAssigned. - // +kubebuilder:validation:Optional - Type *string `json:"type" tf:"type,omitempty"` +// A list of User Assigned Managed Identity IDs to be assigned to this PostgreSQL Flexible Server. Required if used together with customer_managed_key block. +// +kubebuilder:validation:Optional +IdentityIds []*string `json:"identityIds" tf:"identity_ids,omitempty"` + +// Specifies the type of Managed Service Identity that should be configured on this PostgreSQL Flexible Server. The only possible value is UserAssigned. +// +kubebuilder:validation:Optional +Type *string `json:"type" tf:"type,omitempty"` } + type MaintenanceWindowInitParameters struct { - // The day of week for maintenance window, where the week starts on a Sunday, i.e. Sunday = 0, Monday = 1. Defaults to 0. - DayOfWeek *float64 `json:"dayOfWeek,omitempty" tf:"day_of_week,omitempty"` - // The start hour for maintenance window. Defaults to 0. - StartHour *float64 `json:"startHour,omitempty" tf:"start_hour,omitempty"` +// The day of week for maintenance window, where the week starts on a Sunday, i.e. Sunday = 0, Monday = 1. Defaults to 0. +DayOfWeek *float64 `json:"dayOfWeek,omitempty" tf:"day_of_week,omitempty"` - // The start minute for maintenance window. Defaults to 0. - StartMinute *float64 `json:"startMinute,omitempty" tf:"start_minute,omitempty"` +// The start hour for maintenance window. Defaults to 0. +StartHour *float64 `json:"startHour,omitempty" tf:"start_hour,omitempty"` + +// The start minute for maintenance window. Defaults to 0. +StartMinute *float64 `json:"startMinute,omitempty" tf:"start_minute,omitempty"` } + type MaintenanceWindowObservation struct { - // The day of week for maintenance window, where the week starts on a Sunday, i.e. Sunday = 0, Monday = 1. Defaults to 0. - DayOfWeek *float64 `json:"dayOfWeek,omitempty" tf:"day_of_week,omitempty"` - // The start hour for maintenance window. Defaults to 0. - StartHour *float64 `json:"startHour,omitempty" tf:"start_hour,omitempty"` +// The day of week for maintenance window, where the week starts on a Sunday, i.e. Sunday = 0, Monday = 1. Defaults to 0. +DayOfWeek *float64 `json:"dayOfWeek,omitempty" tf:"day_of_week,omitempty"` - // The start minute for maintenance window. Defaults to 0. - StartMinute *float64 `json:"startMinute,omitempty" tf:"start_minute,omitempty"` +// The start hour for maintenance window. Defaults to 0. +StartHour *float64 `json:"startHour,omitempty" tf:"start_hour,omitempty"` + +// The start minute for maintenance window. Defaults to 0. +StartMinute *float64 `json:"startMinute,omitempty" tf:"start_minute,omitempty"` } + type MaintenanceWindowParameters struct { - // The day of week for maintenance window, where the week starts on a Sunday, i.e. Sunday = 0, Monday = 1. Defaults to 0. - // +kubebuilder:validation:Optional - DayOfWeek *float64 `json:"dayOfWeek,omitempty" tf:"day_of_week,omitempty"` - // The start hour for maintenance window. Defaults to 0. - // +kubebuilder:validation:Optional - StartHour *float64 `json:"startHour,omitempty" tf:"start_hour,omitempty"` +// The day of week for maintenance window, where the week starts on a Sunday, i.e. Sunday = 0, Monday = 1. Defaults to 0. +// +kubebuilder:validation:Optional +DayOfWeek *float64 `json:"dayOfWeek,omitempty" tf:"day_of_week,omitempty"` + +// The start hour for maintenance window. Defaults to 0. +// +kubebuilder:validation:Optional +StartHour *float64 `json:"startHour,omitempty" tf:"start_hour,omitempty"` - // The start minute for maintenance window. Defaults to 0. - // +kubebuilder:validation:Optional - StartMinute *float64 `json:"startMinute,omitempty" tf:"start_minute,omitempty"` +// The start minute for maintenance window. Defaults to 0. +// +kubebuilder:validation:Optional +StartMinute *float64 `json:"startMinute,omitempty" tf:"start_minute,omitempty"` } // FlexibleServerSpec defines the desired state of FlexibleServer type FlexibleServerSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider FlexibleServerParameters `json:"forProvider"` + ForProvider FlexibleServerParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -448,13 +487,13 @@ type FlexibleServerSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider FlexibleServerInitParameters `json:"initProvider,omitempty"` + InitProvider FlexibleServerInitParameters `json:"initProvider,omitempty"` } // FlexibleServerStatus defines the observed state of FlexibleServer. type FlexibleServerStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider FlexibleServerObservation `json:"atProvider,omitempty"` + AtProvider FlexibleServerObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -469,9 +508,9 @@ type FlexibleServerStatus struct { type FlexibleServer struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" - Spec FlexibleServerSpec `json:"spec"` - Status FlexibleServerStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" + Spec FlexibleServerSpec `json:"spec"` + Status FlexibleServerStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/dbforpostgresql/v1alpha1/zz_flexibleserverconfiguration_types.go b/apis/dbforpostgresql/v1alpha1/zz_flexibleserverconfiguration_types.go index fa2d1ec..3d40ae9 100755 --- a/apis/dbforpostgresql/v1alpha1/zz_flexibleserverconfiguration_types.go +++ b/apis/dbforpostgresql/v1alpha1/zz_flexibleserverconfiguration_types.go @@ -15,61 +15,70 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type FlexibleServerConfigurationInitParameters struct { - // Specifies the name of the PostgreSQL Configuration, which needs to be a valid PostgreSQL configuration name. Changing this forces a new resource to be created. - Name *string `json:"name,omitempty" tf:"name,omitempty"` - // Specifies the value of the PostgreSQL Configuration. See the PostgreSQL documentation for valid values. - Value *string `json:"value,omitempty" tf:"value,omitempty"` +// Specifies the name of the PostgreSQL Configuration, which needs to be a valid PostgreSQL configuration name. Changing this forces a new resource to be created. +Name *string `json:"name,omitempty" tf:"name,omitempty"` + +// Specifies the value of the PostgreSQL Configuration. See the PostgreSQL documentation for valid values. +Value *string `json:"value,omitempty" tf:"value,omitempty"` } + type FlexibleServerConfigurationObservation struct { - // The ID of the PostgreSQL Configuration. - ID *string `json:"id,omitempty" tf:"id,omitempty"` - // Specifies the name of the PostgreSQL Configuration, which needs to be a valid PostgreSQL configuration name. Changing this forces a new resource to be created. - Name *string `json:"name,omitempty" tf:"name,omitempty"` +// The ID of the PostgreSQL Configuration. +ID *string `json:"id,omitempty" tf:"id,omitempty"` + +// Specifies the name of the PostgreSQL Configuration, which needs to be a valid PostgreSQL configuration name. Changing this forces a new resource to be created. +Name *string `json:"name,omitempty" tf:"name,omitempty"` - // The ID of the PostgreSQL Flexible Server where we want to change configuration. Changing this forces a new PostgreSQL Flexible Server Configuration resource. - ServerID *string `json:"serverId,omitempty" tf:"server_id,omitempty"` +// The ID of the PostgreSQL Flexible Server where we want to change configuration. Changing this forces a new PostgreSQL Flexible Server Configuration resource. +ServerID *string `json:"serverId,omitempty" tf:"server_id,omitempty"` - // Specifies the value of the PostgreSQL Configuration. See the PostgreSQL documentation for valid values. - Value *string `json:"value,omitempty" tf:"value,omitempty"` +// Specifies the value of the PostgreSQL Configuration. See the PostgreSQL documentation for valid values. +Value *string `json:"value,omitempty" tf:"value,omitempty"` } + type FlexibleServerConfigurationParameters struct { - // Specifies the name of the PostgreSQL Configuration, which needs to be a valid PostgreSQL configuration name. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Name *string `json:"name,omitempty" tf:"name,omitempty"` - // The ID of the PostgreSQL Flexible Server where we want to change configuration. Changing this forces a new PostgreSQL Flexible Server Configuration resource. - // +crossplane:generate:reference:type=FlexibleServer - // +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() - // +kubebuilder:validation:Optional - ServerID *string `json:"serverId,omitempty" tf:"server_id,omitempty"` +// Specifies the name of the PostgreSQL Configuration, which needs to be a valid PostgreSQL configuration name. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Name *string `json:"name,omitempty" tf:"name,omitempty"` + +// The ID of the PostgreSQL Flexible Server where we want to change configuration. Changing this forces a new PostgreSQL Flexible Server Configuration resource. +// +crossplane:generate:reference:type=FlexibleServer +// +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() +// +kubebuilder:validation:Optional +ServerID *string `json:"serverId,omitempty" tf:"server_id,omitempty"` - // Reference to a FlexibleServer to populate serverId. - // +kubebuilder:validation:Optional - ServerIDRef *v1.Reference `json:"serverIdRef,omitempty" tf:"-"` +// Reference to a FlexibleServer to populate serverId. +// +kubebuilder:validation:Optional +ServerIDRef *v1.Reference `json:"serverIdRef,omitempty" tf:"-"` - // Selector for a FlexibleServer to populate serverId. - // +kubebuilder:validation:Optional - ServerIDSelector *v1.Selector `json:"serverIdSelector,omitempty" tf:"-"` +// Selector for a FlexibleServer to populate serverId. +// +kubebuilder:validation:Optional +ServerIDSelector *v1.Selector `json:"serverIdSelector,omitempty" tf:"-"` - // Specifies the value of the PostgreSQL Configuration. See the PostgreSQL documentation for valid values. - // +kubebuilder:validation:Optional - Value *string `json:"value,omitempty" tf:"value,omitempty"` +// Specifies the value of the PostgreSQL Configuration. See the PostgreSQL documentation for valid values. +// +kubebuilder:validation:Optional +Value *string `json:"value,omitempty" tf:"value,omitempty"` } // FlexibleServerConfigurationSpec defines the desired state of FlexibleServerConfiguration type FlexibleServerConfigurationSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider FlexibleServerConfigurationParameters `json:"forProvider"` + ForProvider FlexibleServerConfigurationParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -80,13 +89,13 @@ type FlexibleServerConfigurationSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider FlexibleServerConfigurationInitParameters `json:"initProvider,omitempty"` + InitProvider FlexibleServerConfigurationInitParameters `json:"initProvider,omitempty"` } // FlexibleServerConfigurationStatus defines the observed state of FlexibleServerConfiguration. type FlexibleServerConfigurationStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider FlexibleServerConfigurationObservation `json:"atProvider,omitempty"` + AtProvider FlexibleServerConfigurationObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -101,10 +110,10 @@ type FlexibleServerConfigurationStatus struct { type FlexibleServerConfiguration struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.name) || (has(self.initProvider) && has(self.initProvider.name))",message="spec.forProvider.name is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.value) || (has(self.initProvider) && has(self.initProvider.value))",message="spec.forProvider.value is a required parameter" - Spec FlexibleServerConfigurationSpec `json:"spec"` - Status FlexibleServerConfigurationStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.name) || (has(self.initProvider) && has(self.initProvider.name))",message="spec.forProvider.name is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.value) || (has(self.initProvider) && has(self.initProvider.value))",message="spec.forProvider.value is a required parameter" + Spec FlexibleServerConfigurationSpec `json:"spec"` + Status FlexibleServerConfigurationStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/dbforpostgresql/v1alpha1/zz_flexibleserverdatabase_types.go b/apis/dbforpostgresql/v1alpha1/zz_flexibleserverdatabase_types.go index 692edf9..dbf5a9a 100755 --- a/apis/dbforpostgresql/v1alpha1/zz_flexibleserverdatabase_types.go +++ b/apis/dbforpostgresql/v1alpha1/zz_flexibleserverdatabase_types.go @@ -15,61 +15,70 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type FlexibleServerDatabaseInitParameters struct { - // Specifies the Charset for the Azure PostgreSQL Flexible Server Database, which needs to be a valid PostgreSQL Charset. Defaults to UTF8. Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. - Charset *string `json:"charset,omitempty" tf:"charset,omitempty"` - // Specifies the Collation for the Azure PostgreSQL Flexible Server Database, which needs to be a valid PostgreSQL Collation. Defaults to en_US.utf8. Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. - Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` +// Specifies the Charset for the Azure PostgreSQL Flexible Server Database, which needs to be a valid PostgreSQL Charset. Defaults to UTF8. Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. +Charset *string `json:"charset,omitempty" tf:"charset,omitempty"` + +// Specifies the Collation for the Azure PostgreSQL Flexible Server Database, which needs to be a valid PostgreSQL Collation. Defaults to en_US.utf8. Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. +Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` } + type FlexibleServerDatabaseObservation struct { - // Specifies the Charset for the Azure PostgreSQL Flexible Server Database, which needs to be a valid PostgreSQL Charset. Defaults to UTF8. Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. - Charset *string `json:"charset,omitempty" tf:"charset,omitempty"` - // Specifies the Collation for the Azure PostgreSQL Flexible Server Database, which needs to be a valid PostgreSQL Collation. Defaults to en_US.utf8. Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. - Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` +// Specifies the Charset for the Azure PostgreSQL Flexible Server Database, which needs to be a valid PostgreSQL Charset. Defaults to UTF8. Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. +Charset *string `json:"charset,omitempty" tf:"charset,omitempty"` + +// Specifies the Collation for the Azure PostgreSQL Flexible Server Database, which needs to be a valid PostgreSQL Collation. Defaults to en_US.utf8. Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. +Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` - // The ID of the Azure PostgreSQL Flexible Server Database. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// The ID of the Azure PostgreSQL Flexible Server Database. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The ID of the Azure PostgreSQL Flexible Server from which to create this PostgreSQL Flexible Server Database. Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. - ServerID *string `json:"serverId,omitempty" tf:"server_id,omitempty"` +// The ID of the Azure PostgreSQL Flexible Server from which to create this PostgreSQL Flexible Server Database. Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. +ServerID *string `json:"serverId,omitempty" tf:"server_id,omitempty"` } + type FlexibleServerDatabaseParameters struct { - // Specifies the Charset for the Azure PostgreSQL Flexible Server Database, which needs to be a valid PostgreSQL Charset. Defaults to UTF8. Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. - // +kubebuilder:validation:Optional - Charset *string `json:"charset,omitempty" tf:"charset,omitempty"` - // Specifies the Collation for the Azure PostgreSQL Flexible Server Database, which needs to be a valid PostgreSQL Collation. Defaults to en_US.utf8. Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. - // +kubebuilder:validation:Optional - Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` +// Specifies the Charset for the Azure PostgreSQL Flexible Server Database, which needs to be a valid PostgreSQL Charset. Defaults to UTF8. Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. +// +kubebuilder:validation:Optional +Charset *string `json:"charset,omitempty" tf:"charset,omitempty"` + +// Specifies the Collation for the Azure PostgreSQL Flexible Server Database, which needs to be a valid PostgreSQL Collation. Defaults to en_US.utf8. Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. +// +kubebuilder:validation:Optional +Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` - // The ID of the Azure PostgreSQL Flexible Server from which to create this PostgreSQL Flexible Server Database. Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. - // +crossplane:generate:reference:type=FlexibleServer - // +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() - // +kubebuilder:validation:Optional - ServerID *string `json:"serverId,omitempty" tf:"server_id,omitempty"` +// The ID of the Azure PostgreSQL Flexible Server from which to create this PostgreSQL Flexible Server Database. Changing this forces a new Azure PostgreSQL Flexible Server Database to be created. +// +crossplane:generate:reference:type=FlexibleServer +// +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() +// +kubebuilder:validation:Optional +ServerID *string `json:"serverId,omitempty" tf:"server_id,omitempty"` - // Reference to a FlexibleServer to populate serverId. - // +kubebuilder:validation:Optional - ServerIDRef *v1.Reference `json:"serverIdRef,omitempty" tf:"-"` +// Reference to a FlexibleServer to populate serverId. +// +kubebuilder:validation:Optional +ServerIDRef *v1.Reference `json:"serverIdRef,omitempty" tf:"-"` - // Selector for a FlexibleServer to populate serverId. - // +kubebuilder:validation:Optional - ServerIDSelector *v1.Selector `json:"serverIdSelector,omitempty" tf:"-"` +// Selector for a FlexibleServer to populate serverId. +// +kubebuilder:validation:Optional +ServerIDSelector *v1.Selector `json:"serverIdSelector,omitempty" tf:"-"` } // FlexibleServerDatabaseSpec defines the desired state of FlexibleServerDatabase type FlexibleServerDatabaseSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider FlexibleServerDatabaseParameters `json:"forProvider"` + ForProvider FlexibleServerDatabaseParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -80,13 +89,13 @@ type FlexibleServerDatabaseSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider FlexibleServerDatabaseInitParameters `json:"initProvider,omitempty"` + InitProvider FlexibleServerDatabaseInitParameters `json:"initProvider,omitempty"` } // FlexibleServerDatabaseStatus defines the observed state of FlexibleServerDatabase. type FlexibleServerDatabaseStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider FlexibleServerDatabaseObservation `json:"atProvider,omitempty"` + AtProvider FlexibleServerDatabaseObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/dbforpostgresql/v1alpha1/zz_flexibleserverfirewallrule_types.go b/apis/dbforpostgresql/v1alpha1/zz_flexibleserverfirewallrule_types.go index 5cde75e..e51a0a6 100755 --- a/apis/dbforpostgresql/v1alpha1/zz_flexibleserverfirewallrule_types.go +++ b/apis/dbforpostgresql/v1alpha1/zz_flexibleserverfirewallrule_types.go @@ -15,61 +15,70 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type FlexibleServerFirewallRuleInitParameters struct { - // The End IP Address associated with this PostgreSQL Flexible Server Firewall Rule. - EndIPAddress *string `json:"endIpAddress,omitempty" tf:"end_ip_address,omitempty"` - // The Start IP Address associated with this PostgreSQL Flexible Server Firewall Rule. - StartIPAddress *string `json:"startIpAddress,omitempty" tf:"start_ip_address,omitempty"` +// The End IP Address associated with this PostgreSQL Flexible Server Firewall Rule. +EndIPAddress *string `json:"endIpAddress,omitempty" tf:"end_ip_address,omitempty"` + +// The Start IP Address associated with this PostgreSQL Flexible Server Firewall Rule. +StartIPAddress *string `json:"startIpAddress,omitempty" tf:"start_ip_address,omitempty"` } + type FlexibleServerFirewallRuleObservation struct { - // The End IP Address associated with this PostgreSQL Flexible Server Firewall Rule. - EndIPAddress *string `json:"endIpAddress,omitempty" tf:"end_ip_address,omitempty"` - // The ID of the PostgreSQL Flexible Server Firewall Rule. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// The End IP Address associated with this PostgreSQL Flexible Server Firewall Rule. +EndIPAddress *string `json:"endIpAddress,omitempty" tf:"end_ip_address,omitempty"` + +// The ID of the PostgreSQL Flexible Server Firewall Rule. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The ID of the PostgreSQL Flexible Server from which to create this PostgreSQL Flexible Server Firewall Rule. Changing this forces a new PostgreSQL Flexible Server Firewall Rule to be created. - ServerID *string `json:"serverId,omitempty" tf:"server_id,omitempty"` +// The ID of the PostgreSQL Flexible Server from which to create this PostgreSQL Flexible Server Firewall Rule. Changing this forces a new PostgreSQL Flexible Server Firewall Rule to be created. +ServerID *string `json:"serverId,omitempty" tf:"server_id,omitempty"` - // The Start IP Address associated with this PostgreSQL Flexible Server Firewall Rule. - StartIPAddress *string `json:"startIpAddress,omitempty" tf:"start_ip_address,omitempty"` +// The Start IP Address associated with this PostgreSQL Flexible Server Firewall Rule. +StartIPAddress *string `json:"startIpAddress,omitempty" tf:"start_ip_address,omitempty"` } + type FlexibleServerFirewallRuleParameters struct { - // The End IP Address associated with this PostgreSQL Flexible Server Firewall Rule. - // +kubebuilder:validation:Optional - EndIPAddress *string `json:"endIpAddress,omitempty" tf:"end_ip_address,omitempty"` - // The ID of the PostgreSQL Flexible Server from which to create this PostgreSQL Flexible Server Firewall Rule. Changing this forces a new PostgreSQL Flexible Server Firewall Rule to be created. - // +crossplane:generate:reference:type=FlexibleServer - // +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() - // +kubebuilder:validation:Optional - ServerID *string `json:"serverId,omitempty" tf:"server_id,omitempty"` +// The End IP Address associated with this PostgreSQL Flexible Server Firewall Rule. +// +kubebuilder:validation:Optional +EndIPAddress *string `json:"endIpAddress,omitempty" tf:"end_ip_address,omitempty"` + +// The ID of the PostgreSQL Flexible Server from which to create this PostgreSQL Flexible Server Firewall Rule. Changing this forces a new PostgreSQL Flexible Server Firewall Rule to be created. +// +crossplane:generate:reference:type=FlexibleServer +// +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() +// +kubebuilder:validation:Optional +ServerID *string `json:"serverId,omitempty" tf:"server_id,omitempty"` - // Reference to a FlexibleServer to populate serverId. - // +kubebuilder:validation:Optional - ServerIDRef *v1.Reference `json:"serverIdRef,omitempty" tf:"-"` +// Reference to a FlexibleServer to populate serverId. +// +kubebuilder:validation:Optional +ServerIDRef *v1.Reference `json:"serverIdRef,omitempty" tf:"-"` - // Selector for a FlexibleServer to populate serverId. - // +kubebuilder:validation:Optional - ServerIDSelector *v1.Selector `json:"serverIdSelector,omitempty" tf:"-"` +// Selector for a FlexibleServer to populate serverId. +// +kubebuilder:validation:Optional +ServerIDSelector *v1.Selector `json:"serverIdSelector,omitempty" tf:"-"` - // The Start IP Address associated with this PostgreSQL Flexible Server Firewall Rule. - // +kubebuilder:validation:Optional - StartIPAddress *string `json:"startIpAddress,omitempty" tf:"start_ip_address,omitempty"` +// The Start IP Address associated with this PostgreSQL Flexible Server Firewall Rule. +// +kubebuilder:validation:Optional +StartIPAddress *string `json:"startIpAddress,omitempty" tf:"start_ip_address,omitempty"` } // FlexibleServerFirewallRuleSpec defines the desired state of FlexibleServerFirewallRule type FlexibleServerFirewallRuleSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider FlexibleServerFirewallRuleParameters `json:"forProvider"` + ForProvider FlexibleServerFirewallRuleParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -80,13 +89,13 @@ type FlexibleServerFirewallRuleSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider FlexibleServerFirewallRuleInitParameters `json:"initProvider,omitempty"` + InitProvider FlexibleServerFirewallRuleInitParameters `json:"initProvider,omitempty"` } // FlexibleServerFirewallRuleStatus defines the observed state of FlexibleServerFirewallRule. type FlexibleServerFirewallRuleStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider FlexibleServerFirewallRuleObservation `json:"atProvider,omitempty"` + AtProvider FlexibleServerFirewallRuleObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -101,10 +110,10 @@ type FlexibleServerFirewallRuleStatus struct { type FlexibleServerFirewallRule struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.endIpAddress) || (has(self.initProvider) && has(self.initProvider.endIpAddress))",message="spec.forProvider.endIpAddress is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.startIpAddress) || (has(self.initProvider) && has(self.initProvider.startIpAddress))",message="spec.forProvider.startIpAddress is a required parameter" - Spec FlexibleServerFirewallRuleSpec `json:"spec"` - Status FlexibleServerFirewallRuleStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.endIpAddress) || (has(self.initProvider) && has(self.initProvider.endIpAddress))",message="spec.forProvider.endIpAddress is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.startIpAddress) || (has(self.initProvider) && has(self.initProvider.startIpAddress))",message="spec.forProvider.startIpAddress is a required parameter" + Spec FlexibleServerFirewallRuleSpec `json:"spec"` + Status FlexibleServerFirewallRuleStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/dbforpostgresql/v1alpha1/zz_generated_terraformed.go b/apis/dbforpostgresql/v1alpha1/zz_generated_terraformed.go index 8395931..e0a5c1e 100755 --- a/apis/dbforpostgresql/v1alpha1/zz_generated_terraformed.go +++ b/apis/dbforpostgresql/v1alpha1/zz_generated_terraformed.go @@ -11,6 +11,7 @@ Copyright 2022 Upbound Inc. package v1alpha1 import ( + "dario.cat/mergo" "github.com/pkg/errors" "github.com/crossplane/upjet/pkg/resource" @@ -83,6 +84,36 @@ func (tr *ActiveDirectoryAdministrator) GetInitParameters() (map[string]any, err return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this ActiveDirectoryAdministrator +func (tr *ActiveDirectoryAdministrator) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this ActiveDirectoryAdministrator using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *ActiveDirectoryAdministrator) LateInitialize(attrs []byte) (bool, error) { @@ -167,6 +198,36 @@ func (tr *Configuration) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this Configuration +func (tr *Configuration) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Configuration using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Configuration) LateInitialize(attrs []byte) (bool, error) { @@ -251,6 +312,36 @@ func (tr *Database) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this Database +func (tr *Database) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Database using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Database) LateInitialize(attrs []byte) (bool, error) { @@ -335,6 +426,36 @@ func (tr *FirewallRule) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this FirewallRule +func (tr *FirewallRule) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this FirewallRule using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *FirewallRule) LateInitialize(attrs []byte) (bool, error) { @@ -419,6 +540,36 @@ func (tr *FlexibleServer) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this FlexibleServer +func (tr *FlexibleServer) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this FlexibleServer using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *FlexibleServer) LateInitialize(attrs []byte) (bool, error) { @@ -503,6 +654,36 @@ func (tr *FlexibleServerConfiguration) GetInitParameters() (map[string]any, erro return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this FlexibleServerConfiguration +func (tr *FlexibleServerConfiguration) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this FlexibleServerConfiguration using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *FlexibleServerConfiguration) LateInitialize(attrs []byte) (bool, error) { @@ -587,6 +768,36 @@ func (tr *FlexibleServerDatabase) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this FlexibleServerDatabase +func (tr *FlexibleServerDatabase) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this FlexibleServerDatabase using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *FlexibleServerDatabase) LateInitialize(attrs []byte) (bool, error) { @@ -671,6 +882,36 @@ func (tr *FlexibleServerFirewallRule) GetInitParameters() (map[string]any, error return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this FlexibleServerFirewallRule +func (tr *FlexibleServerFirewallRule) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this FlexibleServerFirewallRule using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *FlexibleServerFirewallRule) LateInitialize(attrs []byte) (bool, error) { @@ -755,6 +996,36 @@ func (tr *Server) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this Server +func (tr *Server) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Server using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Server) LateInitialize(attrs []byte) (bool, error) { @@ -839,6 +1110,36 @@ func (tr *ServerKey) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this ServerKey +func (tr *ServerKey) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this ServerKey using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *ServerKey) LateInitialize(attrs []byte) (bool, error) { @@ -923,6 +1224,36 @@ func (tr *VirtualNetworkRule) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this VirtualNetworkRule +func (tr *VirtualNetworkRule) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this VirtualNetworkRule using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *VirtualNetworkRule) LateInitialize(attrs []byte) (bool, error) { diff --git a/apis/dbforpostgresql/v1alpha1/zz_server_types.go b/apis/dbforpostgresql/v1alpha1/zz_server_types.go index 8cd44d8..9235d7b 100755 --- a/apis/dbforpostgresql/v1alpha1/zz_server_types.go +++ b/apis/dbforpostgresql/v1alpha1/zz_server_types.go @@ -15,325 +15,346 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type ServerIdentityInitParameters struct { - // Specifies the type of Managed Service Identity that should be configured on this PostgreSQL Server. The only possible value is SystemAssigned. - Type *string `json:"type,omitempty" tf:"type,omitempty"` + +// Specifies the type of Managed Service Identity that should be configured on this PostgreSQL Server. The only possible value is SystemAssigned. +Type *string `json:"type,omitempty" tf:"type,omitempty"` } + type ServerIdentityObservation struct { - // The Principal ID associated with this Managed Service Identity. - PrincipalID *string `json:"principalId,omitempty" tf:"principal_id,omitempty"` - // The Tenant ID associated with this Managed Service Identity. - TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` +// The Principal ID associated with this Managed Service Identity. +PrincipalID *string `json:"principalId,omitempty" tf:"principal_id,omitempty"` - // Specifies the type of Managed Service Identity that should be configured on this PostgreSQL Server. The only possible value is SystemAssigned. - Type *string `json:"type,omitempty" tf:"type,omitempty"` +// The Tenant ID associated with this Managed Service Identity. +TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` + +// Specifies the type of Managed Service Identity that should be configured on this PostgreSQL Server. The only possible value is SystemAssigned. +Type *string `json:"type,omitempty" tf:"type,omitempty"` } + type ServerIdentityParameters struct { - // Specifies the type of Managed Service Identity that should be configured on this PostgreSQL Server. The only possible value is SystemAssigned. - // +kubebuilder:validation:Optional - Type *string `json:"type" tf:"type,omitempty"` + +// Specifies the type of Managed Service Identity that should be configured on this PostgreSQL Server. The only possible value is SystemAssigned. +// +kubebuilder:validation:Optional +Type *string `json:"type" tf:"type,omitempty"` } + type ServerInitParameters struct { - // The Administrator login for the PostgreSQL Server. Required when create_mode is Default. Changing this forces a new resource to be created. - AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` - // Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is true. - AutoGrowEnabled *bool `json:"autoGrowEnabled,omitempty" tf:"auto_grow_enabled,omitempty"` +// The Administrator login for the PostgreSQL Server. Required when create_mode is Default. Changing this forces a new resource to be created. +AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` + +// Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is true. +AutoGrowEnabled *bool `json:"autoGrowEnabled,omitempty" tf:"auto_grow_enabled,omitempty"` - // Backup retention days for the server, supported values are between 7 and 35 days. - BackupRetentionDays *float64 `json:"backupRetentionDays,omitempty" tf:"backup_retention_days,omitempty"` +// Backup retention days for the server, supported values are between 7 and 35 days. +BackupRetentionDays *float64 `json:"backupRetentionDays,omitempty" tf:"backup_retention_days,omitempty"` - // The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default. - CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` +// The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default. +CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` - // For creation modes other than Default, the source server ID to use. - CreationSourceServerID *string `json:"creationSourceServerId,omitempty" tf:"creation_source_server_id,omitempty"` +// For creation modes other than Default, the source server ID to use. +CreationSourceServerID *string `json:"creationSourceServerId,omitempty" tf:"creation_source_server_id,omitempty"` - // Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not support for the Basic tier. Changing this forces a new resource to be created. - GeoRedundantBackupEnabled *bool `json:"geoRedundantBackupEnabled,omitempty" tf:"geo_redundant_backup_enabled,omitempty"` +// Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not support for the Basic tier. Changing this forces a new resource to be created. +GeoRedundantBackupEnabled *bool `json:"geoRedundantBackupEnabled,omitempty" tf:"geo_redundant_backup_enabled,omitempty"` - // An identity block as defined below. - Identity []ServerIdentityInitParameters `json:"identity,omitempty" tf:"identity,omitempty"` +// An identity block as defined below. +Identity []ServerIdentityInitParameters `json:"identity,omitempty" tf:"identity,omitempty"` - // Whether or not infrastructure is encrypted for this server. Changing this forces a new resource to be created. - InfrastructureEncryptionEnabled *bool `json:"infrastructureEncryptionEnabled,omitempty" tf:"infrastructure_encryption_enabled,omitempty"` +// Whether or not infrastructure is encrypted for this server. Changing this forces a new resource to be created. +InfrastructureEncryptionEnabled *bool `json:"infrastructureEncryptionEnabled,omitempty" tf:"infrastructure_encryption_enabled,omitempty"` - // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // Whether or not public network access is allowed for this server. Defaults to true. - PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` +// Whether or not public network access is allowed for this server. Defaults to true. +PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` - // When create_mode is PointInTimeRestore the point in time to restore from creation_source_server_id. It should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z. - RestorePointInTime *string `json:"restorePointInTime,omitempty" tf:"restore_point_in_time,omitempty"` +// When create_mode is PointInTimeRestore the point in time to restore from creation_source_server_id. It should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z. +RestorePointInTime *string `json:"restorePointInTime,omitempty" tf:"restore_point_in_time,omitempty"` - // Specifies if SSL should be enforced on connections. Possible values are true and false. - SSLEnforcementEnabled *bool `json:"sslEnforcementEnabled,omitempty" tf:"ssl_enforcement_enabled,omitempty"` +// Specifies if SSL should be enforced on connections. Possible values are true and false. +SSLEnforcementEnabled *bool `json:"sslEnforcementEnabled,omitempty" tf:"ssl_enforcement_enabled,omitempty"` - // The minimum TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLS1_2. - SSLMinimalTLSVersionEnforced *string `json:"sslMinimalTlsVersionEnforced,omitempty" tf:"ssl_minimal_tls_version_enforced,omitempty"` +// The minimum TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLS1_2. +SSLMinimalTLSVersionEnforced *string `json:"sslMinimalTlsVersionEnforced,omitempty" tf:"ssl_minimal_tls_version_enforced,omitempty"` - // Specifies the SKU Name for this PostgreSQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation. Possible values are B_Gen4_1, B_Gen4_2, B_Gen5_1, B_Gen5_2, GP_Gen4_2, GP_Gen4_4, GP_Gen4_8, GP_Gen4_16, GP_Gen4_32, GP_Gen5_2, GP_Gen5_4, GP_Gen5_8, GP_Gen5_16, GP_Gen5_32, GP_Gen5_64, MO_Gen5_2, MO_Gen5_4, MO_Gen5_8, MO_Gen5_16 and MO_Gen5_32. - SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` +// Specifies the SKU Name for this PostgreSQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation. Possible values are B_Gen4_1, B_Gen4_2, B_Gen5_1, B_Gen5_2, GP_Gen4_2, GP_Gen4_4, GP_Gen4_8, GP_Gen4_16, GP_Gen4_32, GP_Gen5_2, GP_Gen5_4, GP_Gen5_8, GP_Gen5_16, GP_Gen5_32, GP_Gen5_64, MO_Gen5_2, MO_Gen5_4, MO_Gen5_8, MO_Gen5_16 and MO_Gen5_32. +SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` - // Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation. - StorageMb *float64 `json:"storageMb,omitempty" tf:"storage_mb,omitempty"` +// Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation. +StorageMb *float64 `json:"storageMb,omitempty" tf:"storage_mb,omitempty"` - // A mapping of tags to assign to the resource. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A mapping of tags to assign to the resource. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - // Threat detection policy configuration, known in the API as Server Security Alerts Policy. The threat_detection_policy block supports fields documented below. - ThreatDetectionPolicy []ThreatDetectionPolicyInitParameters `json:"threatDetectionPolicy,omitempty" tf:"threat_detection_policy,omitempty"` +// Threat detection policy configuration, known in the API as Server Security Alerts Policy. The threat_detection_policy block supports fields documented below. +ThreatDetectionPolicy []ThreatDetectionPolicyInitParameters `json:"threatDetectionPolicy,omitempty" tf:"threat_detection_policy,omitempty"` - // Specifies the version of PostgreSQL to use. Valid values are 9.5, 9.6, 10, 10.0, 10.2 and 11. Changing this forces a new resource to be created. - Version *string `json:"version,omitempty" tf:"version,omitempty"` +// Specifies the version of PostgreSQL to use. Valid values are 9.5, 9.6, 10, 10.0, 10.2 and 11. Changing this forces a new resource to be created. +Version *string `json:"version,omitempty" tf:"version,omitempty"` } + type ServerObservation struct { - // The Administrator login for the PostgreSQL Server. Required when create_mode is Default. Changing this forces a new resource to be created. - AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` - // Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is true. - AutoGrowEnabled *bool `json:"autoGrowEnabled,omitempty" tf:"auto_grow_enabled,omitempty"` +// The Administrator login for the PostgreSQL Server. Required when create_mode is Default. Changing this forces a new resource to be created. +AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` + +// Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is true. +AutoGrowEnabled *bool `json:"autoGrowEnabled,omitempty" tf:"auto_grow_enabled,omitempty"` - // Backup retention days for the server, supported values are between 7 and 35 days. - BackupRetentionDays *float64 `json:"backupRetentionDays,omitempty" tf:"backup_retention_days,omitempty"` +// Backup retention days for the server, supported values are between 7 and 35 days. +BackupRetentionDays *float64 `json:"backupRetentionDays,omitempty" tf:"backup_retention_days,omitempty"` - // The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default. - CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` +// The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default. +CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` - // For creation modes other than Default, the source server ID to use. - CreationSourceServerID *string `json:"creationSourceServerId,omitempty" tf:"creation_source_server_id,omitempty"` +// For creation modes other than Default, the source server ID to use. +CreationSourceServerID *string `json:"creationSourceServerId,omitempty" tf:"creation_source_server_id,omitempty"` - // The FQDN of the PostgreSQL Server. - Fqdn *string `json:"fqdn,omitempty" tf:"fqdn,omitempty"` +// The FQDN of the PostgreSQL Server. +Fqdn *string `json:"fqdn,omitempty" tf:"fqdn,omitempty"` - // Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not support for the Basic tier. Changing this forces a new resource to be created. - GeoRedundantBackupEnabled *bool `json:"geoRedundantBackupEnabled,omitempty" tf:"geo_redundant_backup_enabled,omitempty"` +// Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not support for the Basic tier. Changing this forces a new resource to be created. +GeoRedundantBackupEnabled *bool `json:"geoRedundantBackupEnabled,omitempty" tf:"geo_redundant_backup_enabled,omitempty"` - // The ID of the PostgreSQL Server. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// The ID of the PostgreSQL Server. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // An identity block as defined below. - Identity []ServerIdentityObservation `json:"identity,omitempty" tf:"identity,omitempty"` +// An identity block as defined below. +Identity []ServerIdentityObservation `json:"identity,omitempty" tf:"identity,omitempty"` - // Whether or not infrastructure is encrypted for this server. Changing this forces a new resource to be created. - InfrastructureEncryptionEnabled *bool `json:"infrastructureEncryptionEnabled,omitempty" tf:"infrastructure_encryption_enabled,omitempty"` +// Whether or not infrastructure is encrypted for this server. Changing this forces a new resource to be created. +InfrastructureEncryptionEnabled *bool `json:"infrastructureEncryptionEnabled,omitempty" tf:"infrastructure_encryption_enabled,omitempty"` - // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // Whether or not public network access is allowed for this server. Defaults to true. - PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` +// Whether or not public network access is allowed for this server. Defaults to true. +PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` - // The name of the resource group in which to create the PostgreSQL Server. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group in which to create the PostgreSQL Server. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // When create_mode is PointInTimeRestore the point in time to restore from creation_source_server_id. It should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z. - RestorePointInTime *string `json:"restorePointInTime,omitempty" tf:"restore_point_in_time,omitempty"` +// When create_mode is PointInTimeRestore the point in time to restore from creation_source_server_id. It should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z. +RestorePointInTime *string `json:"restorePointInTime,omitempty" tf:"restore_point_in_time,omitempty"` - // Specifies if SSL should be enforced on connections. Possible values are true and false. - SSLEnforcementEnabled *bool `json:"sslEnforcementEnabled,omitempty" tf:"ssl_enforcement_enabled,omitempty"` +// Specifies if SSL should be enforced on connections. Possible values are true and false. +SSLEnforcementEnabled *bool `json:"sslEnforcementEnabled,omitempty" tf:"ssl_enforcement_enabled,omitempty"` - // The minimum TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLS1_2. - SSLMinimalTLSVersionEnforced *string `json:"sslMinimalTlsVersionEnforced,omitempty" tf:"ssl_minimal_tls_version_enforced,omitempty"` +// The minimum TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLS1_2. +SSLMinimalTLSVersionEnforced *string `json:"sslMinimalTlsVersionEnforced,omitempty" tf:"ssl_minimal_tls_version_enforced,omitempty"` - // Specifies the SKU Name for this PostgreSQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation. Possible values are B_Gen4_1, B_Gen4_2, B_Gen5_1, B_Gen5_2, GP_Gen4_2, GP_Gen4_4, GP_Gen4_8, GP_Gen4_16, GP_Gen4_32, GP_Gen5_2, GP_Gen5_4, GP_Gen5_8, GP_Gen5_16, GP_Gen5_32, GP_Gen5_64, MO_Gen5_2, MO_Gen5_4, MO_Gen5_8, MO_Gen5_16 and MO_Gen5_32. - SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` +// Specifies the SKU Name for this PostgreSQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation. Possible values are B_Gen4_1, B_Gen4_2, B_Gen5_1, B_Gen5_2, GP_Gen4_2, GP_Gen4_4, GP_Gen4_8, GP_Gen4_16, GP_Gen4_32, GP_Gen5_2, GP_Gen5_4, GP_Gen5_8, GP_Gen5_16, GP_Gen5_32, GP_Gen5_64, MO_Gen5_2, MO_Gen5_4, MO_Gen5_8, MO_Gen5_16 and MO_Gen5_32. +SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` - // Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation. - StorageMb *float64 `json:"storageMb,omitempty" tf:"storage_mb,omitempty"` +// Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation. +StorageMb *float64 `json:"storageMb,omitempty" tf:"storage_mb,omitempty"` - // A mapping of tags to assign to the resource. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A mapping of tags to assign to the resource. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - // Threat detection policy configuration, known in the API as Server Security Alerts Policy. The threat_detection_policy block supports fields documented below. - ThreatDetectionPolicy []ThreatDetectionPolicyObservation `json:"threatDetectionPolicy,omitempty" tf:"threat_detection_policy,omitempty"` +// Threat detection policy configuration, known in the API as Server Security Alerts Policy. The threat_detection_policy block supports fields documented below. +ThreatDetectionPolicy []ThreatDetectionPolicyObservation `json:"threatDetectionPolicy,omitempty" tf:"threat_detection_policy,omitempty"` - // Specifies the version of PostgreSQL to use. Valid values are 9.5, 9.6, 10, 10.0, 10.2 and 11. Changing this forces a new resource to be created. - Version *string `json:"version,omitempty" tf:"version,omitempty"` +// Specifies the version of PostgreSQL to use. Valid values are 9.5, 9.6, 10, 10.0, 10.2 and 11. Changing this forces a new resource to be created. +Version *string `json:"version,omitempty" tf:"version,omitempty"` } + type ServerParameters struct { - // The Administrator login for the PostgreSQL Server. Required when create_mode is Default. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` - // The Password associated with the administrator_login for the PostgreSQL Server. Required when create_mode is Default. - // +kubebuilder:validation:Optional - AdministratorLoginPasswordSecretRef *v1.SecretKeySelector `json:"administratorLoginPasswordSecretRef,omitempty" tf:"-"` +// The Administrator login for the PostgreSQL Server. Required when create_mode is Default. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` - // Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is true. - // +kubebuilder:validation:Optional - AutoGrowEnabled *bool `json:"autoGrowEnabled,omitempty" tf:"auto_grow_enabled,omitempty"` +// The Password associated with the administrator_login for the PostgreSQL Server. Required when create_mode is Default. +// +kubebuilder:validation:Optional +AdministratorLoginPasswordSecretRef *v1.SecretKeySelector `json:"administratorLoginPasswordSecretRef,omitempty" tf:"-"` - // Backup retention days for the server, supported values are between 7 and 35 days. - // +kubebuilder:validation:Optional - BackupRetentionDays *float64 `json:"backupRetentionDays,omitempty" tf:"backup_retention_days,omitempty"` +// Enable/Disable auto-growing of the storage. Storage auto-grow prevents your server from running out of storage and becoming read-only. If storage auto grow is enabled, the storage automatically grows without impacting the workload. The default value if not explicitly specified is true. +// +kubebuilder:validation:Optional +AutoGrowEnabled *bool `json:"autoGrowEnabled,omitempty" tf:"auto_grow_enabled,omitempty"` - // The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default. - // +kubebuilder:validation:Optional - CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` +// Backup retention days for the server, supported values are between 7 and 35 days. +// +kubebuilder:validation:Optional +BackupRetentionDays *float64 `json:"backupRetentionDays,omitempty" tf:"backup_retention_days,omitempty"` - // For creation modes other than Default, the source server ID to use. - // +kubebuilder:validation:Optional - CreationSourceServerID *string `json:"creationSourceServerId,omitempty" tf:"creation_source_server_id,omitempty"` +// The creation mode. Can be used to restore or replicate existing servers. Possible values are Default, Replica, GeoRestore, and PointInTimeRestore. Defaults to Default. +// +kubebuilder:validation:Optional +CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` - // Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not support for the Basic tier. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - GeoRedundantBackupEnabled *bool `json:"geoRedundantBackupEnabled,omitempty" tf:"geo_redundant_backup_enabled,omitempty"` +// For creation modes other than Default, the source server ID to use. +// +kubebuilder:validation:Optional +CreationSourceServerID *string `json:"creationSourceServerId,omitempty" tf:"creation_source_server_id,omitempty"` - // An identity block as defined below. - // +kubebuilder:validation:Optional - Identity []ServerIdentityParameters `json:"identity,omitempty" tf:"identity,omitempty"` +// Turn Geo-redundant server backups on/off. This allows you to choose between locally redundant or geo-redundant backup storage in the General Purpose and Memory Optimized tiers. When the backups are stored in geo-redundant backup storage, they are not only stored within the region in which your server is hosted, but are also replicated to a paired data center. This provides better protection and ability to restore your server in a different region in the event of a disaster. This is not support for the Basic tier. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +GeoRedundantBackupEnabled *bool `json:"geoRedundantBackupEnabled,omitempty" tf:"geo_redundant_backup_enabled,omitempty"` - // Whether or not infrastructure is encrypted for this server. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - InfrastructureEncryptionEnabled *bool `json:"infrastructureEncryptionEnabled,omitempty" tf:"infrastructure_encryption_enabled,omitempty"` +// An identity block as defined below. +// +kubebuilder:validation:Optional +Identity []ServerIdentityParameters `json:"identity,omitempty" tf:"identity,omitempty"` - // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// Whether or not infrastructure is encrypted for this server. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +InfrastructureEncryptionEnabled *bool `json:"infrastructureEncryptionEnabled,omitempty" tf:"infrastructure_encryption_enabled,omitempty"` - // Whether or not public network access is allowed for this server. Defaults to true. - // +kubebuilder:validation:Optional - PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` +// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // The name of the resource group in which to create the PostgreSQL Server. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// Whether or not public network access is allowed for this server. Defaults to true. +// +kubebuilder:validation:Optional +PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` +// The name of the resource group in which to create the PostgreSQL Server. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - // When create_mode is PointInTimeRestore the point in time to restore from creation_source_server_id. It should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z. - // +kubebuilder:validation:Optional - RestorePointInTime *string `json:"restorePointInTime,omitempty" tf:"restore_point_in_time,omitempty"` +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - // Specifies if SSL should be enforced on connections. Possible values are true and false. - // +kubebuilder:validation:Optional - SSLEnforcementEnabled *bool `json:"sslEnforcementEnabled,omitempty" tf:"ssl_enforcement_enabled,omitempty"` +// When create_mode is PointInTimeRestore the point in time to restore from creation_source_server_id. It should be provided in RFC3339 format, e.g. 2013-11-08T22:00:40Z. +// +kubebuilder:validation:Optional +RestorePointInTime *string `json:"restorePointInTime,omitempty" tf:"restore_point_in_time,omitempty"` - // The minimum TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLS1_2. - // +kubebuilder:validation:Optional - SSLMinimalTLSVersionEnforced *string `json:"sslMinimalTlsVersionEnforced,omitempty" tf:"ssl_minimal_tls_version_enforced,omitempty"` +// Specifies if SSL should be enforced on connections. Possible values are true and false. +// +kubebuilder:validation:Optional +SSLEnforcementEnabled *bool `json:"sslEnforcementEnabled,omitempty" tf:"ssl_enforcement_enabled,omitempty"` - // Specifies the SKU Name for this PostgreSQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation. Possible values are B_Gen4_1, B_Gen4_2, B_Gen5_1, B_Gen5_2, GP_Gen4_2, GP_Gen4_4, GP_Gen4_8, GP_Gen4_16, GP_Gen4_32, GP_Gen5_2, GP_Gen5_4, GP_Gen5_8, GP_Gen5_16, GP_Gen5_32, GP_Gen5_64, MO_Gen5_2, MO_Gen5_4, MO_Gen5_8, MO_Gen5_16 and MO_Gen5_32. - // +kubebuilder:validation:Optional - SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` +// The minimum TLS version to support on the sever. Possible values are TLSEnforcementDisabled, TLS1_0, TLS1_1, and TLS1_2. Defaults to TLS1_2. +// +kubebuilder:validation:Optional +SSLMinimalTLSVersionEnforced *string `json:"sslMinimalTlsVersionEnforced,omitempty" tf:"ssl_minimal_tls_version_enforced,omitempty"` - // Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation. - // +kubebuilder:validation:Optional - StorageMb *float64 `json:"storageMb,omitempty" tf:"storage_mb,omitempty"` +// Specifies the SKU Name for this PostgreSQL Server. The name of the SKU, follows the tier + family + cores pattern (e.g. B_Gen4_1, GP_Gen5_8). For more information see the product documentation. Possible values are B_Gen4_1, B_Gen4_2, B_Gen5_1, B_Gen5_2, GP_Gen4_2, GP_Gen4_4, GP_Gen4_8, GP_Gen4_16, GP_Gen4_32, GP_Gen5_2, GP_Gen5_4, GP_Gen5_8, GP_Gen5_16, GP_Gen5_32, GP_Gen5_64, MO_Gen5_2, MO_Gen5_4, MO_Gen5_8, MO_Gen5_16 and MO_Gen5_32. +// +kubebuilder:validation:Optional +SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` - // A mapping of tags to assign to the resource. - // +kubebuilder:validation:Optional - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// Max storage allowed for a server. Possible values are between 5120 MB(5GB) and 1048576 MB(1TB) for the Basic SKU and between 5120 MB(5GB) and 16777216 MB(16TB) for General Purpose/Memory Optimized SKUs. For more information see the product documentation. +// +kubebuilder:validation:Optional +StorageMb *float64 `json:"storageMb,omitempty" tf:"storage_mb,omitempty"` - // Threat detection policy configuration, known in the API as Server Security Alerts Policy. The threat_detection_policy block supports fields documented below. - // +kubebuilder:validation:Optional - ThreatDetectionPolicy []ThreatDetectionPolicyParameters `json:"threatDetectionPolicy,omitempty" tf:"threat_detection_policy,omitempty"` +// A mapping of tags to assign to the resource. +// +kubebuilder:validation:Optional +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - // Specifies the version of PostgreSQL to use. Valid values are 9.5, 9.6, 10, 10.0, 10.2 and 11. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Version *string `json:"version,omitempty" tf:"version,omitempty"` +// Threat detection policy configuration, known in the API as Server Security Alerts Policy. The threat_detection_policy block supports fields documented below. +// +kubebuilder:validation:Optional +ThreatDetectionPolicy []ThreatDetectionPolicyParameters `json:"threatDetectionPolicy,omitempty" tf:"threat_detection_policy,omitempty"` + +// Specifies the version of PostgreSQL to use. Valid values are 9.5, 9.6, 10, 10.0, 10.2 and 11. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Version *string `json:"version,omitempty" tf:"version,omitempty"` } + type ThreatDetectionPolicyInitParameters struct { - // Specifies a list of alerts which should be disabled. Possible values are Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration and Unsafe_Action. - DisabledAlerts []*string `json:"disabledAlerts,omitempty" tf:"disabled_alerts,omitempty"` - // Should the account administrators be emailed when this alert is triggered? - EmailAccountAdmins *bool `json:"emailAccountAdmins,omitempty" tf:"email_account_admins,omitempty"` +// Specifies a list of alerts which should be disabled. Possible values are Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration and Unsafe_Action. +DisabledAlerts []*string `json:"disabledAlerts,omitempty" tf:"disabled_alerts,omitempty"` - // A list of email addresses which alerts should be sent to. - EmailAddresses []*string `json:"emailAddresses,omitempty" tf:"email_addresses,omitempty"` +// Should the account administrators be emailed when this alert is triggered? +EmailAccountAdmins *bool `json:"emailAccountAdmins,omitempty" tf:"email_account_admins,omitempty"` - // Is the policy enabled? - Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` +// A list of email addresses which alerts should be sent to. +EmailAddresses []*string `json:"emailAddresses,omitempty" tf:"email_addresses,omitempty"` - // Specifies the number of days to keep in the Threat Detection audit logs. - RetentionDays *float64 `json:"retentionDays,omitempty" tf:"retention_days,omitempty"` +// Is the policy enabled? +Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` - // Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. - StorageEndpoint *string `json:"storageEndpoint,omitempty" tf:"storage_endpoint,omitempty"` +// Specifies the number of days to keep in the Threat Detection audit logs. +RetentionDays *float64 `json:"retentionDays,omitempty" tf:"retention_days,omitempty"` + +// Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. +StorageEndpoint *string `json:"storageEndpoint,omitempty" tf:"storage_endpoint,omitempty"` } + type ThreatDetectionPolicyObservation struct { - // Specifies a list of alerts which should be disabled. Possible values are Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration and Unsafe_Action. - DisabledAlerts []*string `json:"disabledAlerts,omitempty" tf:"disabled_alerts,omitempty"` - // Should the account administrators be emailed when this alert is triggered? - EmailAccountAdmins *bool `json:"emailAccountAdmins,omitempty" tf:"email_account_admins,omitempty"` +// Specifies a list of alerts which should be disabled. Possible values are Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration and Unsafe_Action. +DisabledAlerts []*string `json:"disabledAlerts,omitempty" tf:"disabled_alerts,omitempty"` + +// Should the account administrators be emailed when this alert is triggered? +EmailAccountAdmins *bool `json:"emailAccountAdmins,omitempty" tf:"email_account_admins,omitempty"` - // A list of email addresses which alerts should be sent to. - EmailAddresses []*string `json:"emailAddresses,omitempty" tf:"email_addresses,omitempty"` +// A list of email addresses which alerts should be sent to. +EmailAddresses []*string `json:"emailAddresses,omitempty" tf:"email_addresses,omitempty"` - // Is the policy enabled? - Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` +// Is the policy enabled? +Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` - // Specifies the number of days to keep in the Threat Detection audit logs. - RetentionDays *float64 `json:"retentionDays,omitempty" tf:"retention_days,omitempty"` +// Specifies the number of days to keep in the Threat Detection audit logs. +RetentionDays *float64 `json:"retentionDays,omitempty" tf:"retention_days,omitempty"` - // Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. - StorageEndpoint *string `json:"storageEndpoint,omitempty" tf:"storage_endpoint,omitempty"` +// Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. +StorageEndpoint *string `json:"storageEndpoint,omitempty" tf:"storage_endpoint,omitempty"` } + type ThreatDetectionPolicyParameters struct { - // Specifies a list of alerts which should be disabled. Possible values are Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration and Unsafe_Action. - // +kubebuilder:validation:Optional - DisabledAlerts []*string `json:"disabledAlerts,omitempty" tf:"disabled_alerts,omitempty"` - // Should the account administrators be emailed when this alert is triggered? - // +kubebuilder:validation:Optional - EmailAccountAdmins *bool `json:"emailAccountAdmins,omitempty" tf:"email_account_admins,omitempty"` +// Specifies a list of alerts which should be disabled. Possible values are Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration and Unsafe_Action. +// +kubebuilder:validation:Optional +DisabledAlerts []*string `json:"disabledAlerts,omitempty" tf:"disabled_alerts,omitempty"` + +// Should the account administrators be emailed when this alert is triggered? +// +kubebuilder:validation:Optional +EmailAccountAdmins *bool `json:"emailAccountAdmins,omitempty" tf:"email_account_admins,omitempty"` - // A list of email addresses which alerts should be sent to. - // +kubebuilder:validation:Optional - EmailAddresses []*string `json:"emailAddresses,omitempty" tf:"email_addresses,omitempty"` +// A list of email addresses which alerts should be sent to. +// +kubebuilder:validation:Optional +EmailAddresses []*string `json:"emailAddresses,omitempty" tf:"email_addresses,omitempty"` - // Is the policy enabled? - // +kubebuilder:validation:Optional - Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` +// Is the policy enabled? +// +kubebuilder:validation:Optional +Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` - // Specifies the number of days to keep in the Threat Detection audit logs. - // +kubebuilder:validation:Optional - RetentionDays *float64 `json:"retentionDays,omitempty" tf:"retention_days,omitempty"` +// Specifies the number of days to keep in the Threat Detection audit logs. +// +kubebuilder:validation:Optional +RetentionDays *float64 `json:"retentionDays,omitempty" tf:"retention_days,omitempty"` - // Specifies the identifier key of the Threat Detection audit storage account. - // +kubebuilder:validation:Optional - StorageAccountAccessKeySecretRef *v1.SecretKeySelector `json:"storageAccountAccessKeySecretRef,omitempty" tf:"-"` +// Specifies the identifier key of the Threat Detection audit storage account. +// +kubebuilder:validation:Optional +StorageAccountAccessKeySecretRef *v1.SecretKeySelector `json:"storageAccountAccessKeySecretRef,omitempty" tf:"-"` - // Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. - // +kubebuilder:validation:Optional - StorageEndpoint *string `json:"storageEndpoint,omitempty" tf:"storage_endpoint,omitempty"` +// Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. +// +kubebuilder:validation:Optional +StorageEndpoint *string `json:"storageEndpoint,omitempty" tf:"storage_endpoint,omitempty"` } // ServerSpec defines the desired state of Server type ServerSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider ServerParameters `json:"forProvider"` + ForProvider ServerParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -344,13 +365,13 @@ type ServerSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider ServerInitParameters `json:"initProvider,omitempty"` + InitProvider ServerInitParameters `json:"initProvider,omitempty"` } // ServerStatus defines the observed state of Server. type ServerStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider ServerObservation `json:"atProvider,omitempty"` + AtProvider ServerObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -365,12 +386,12 @@ type ServerStatus struct { type Server struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.skuName) || (has(self.initProvider) && has(self.initProvider.skuName))",message="spec.forProvider.skuName is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.sslEnforcementEnabled) || (has(self.initProvider) && has(self.initProvider.sslEnforcementEnabled))",message="spec.forProvider.sslEnforcementEnabled is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.version) || (has(self.initProvider) && has(self.initProvider.version))",message="spec.forProvider.version is a required parameter" - Spec ServerSpec `json:"spec"` - Status ServerStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.skuName) || (has(self.initProvider) && has(self.initProvider.skuName))",message="spec.forProvider.skuName is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.sslEnforcementEnabled) || (has(self.initProvider) && has(self.initProvider.sslEnforcementEnabled))",message="spec.forProvider.sslEnforcementEnabled is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.version) || (has(self.initProvider) && has(self.initProvider.version))",message="spec.forProvider.version is a required parameter" + Spec ServerSpec `json:"spec"` + Status ServerStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/dbforpostgresql/v1alpha1/zz_serverkey_types.go b/apis/dbforpostgresql/v1alpha1/zz_serverkey_types.go index 712aabd..0d5e91f 100755 --- a/apis/dbforpostgresql/v1alpha1/zz_serverkey_types.go +++ b/apis/dbforpostgresql/v1alpha1/zz_serverkey_types.go @@ -15,58 +15,67 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type ServerKeyInitParameters struct { + } + type ServerKeyObservation struct { - // The ID of the PostgreSQL Server Key. - ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The URL to a Key Vault Key. - KeyVaultKeyID *string `json:"keyVaultKeyId,omitempty" tf:"key_vault_key_id,omitempty"` +// The ID of the PostgreSQL Server Key. +ID *string `json:"id,omitempty" tf:"id,omitempty"` + +// The URL to a Key Vault Key. +KeyVaultKeyID *string `json:"keyVaultKeyId,omitempty" tf:"key_vault_key_id,omitempty"` - // The ID of the PostgreSQL Server. Changing this forces a new resource to be created. - ServerID *string `json:"serverId,omitempty" tf:"server_id,omitempty"` +// The ID of the PostgreSQL Server. Changing this forces a new resource to be created. +ServerID *string `json:"serverId,omitempty" tf:"server_id,omitempty"` } + type ServerKeyParameters struct { - // The URL to a Key Vault Key. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/keyvault/v1alpha1.Key - // +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() - // +kubebuilder:validation:Optional - KeyVaultKeyID *string `json:"keyVaultKeyId,omitempty" tf:"key_vault_key_id,omitempty"` - - // Reference to a Key in keyvault to populate keyVaultKeyId. - // +kubebuilder:validation:Optional - KeyVaultKeyIDRef *v1.Reference `json:"keyVaultKeyIdRef,omitempty" tf:"-"` - - // Selector for a Key in keyvault to populate keyVaultKeyId. - // +kubebuilder:validation:Optional - KeyVaultKeyIDSelector *v1.Selector `json:"keyVaultKeyIdSelector,omitempty" tf:"-"` - - // The ID of the PostgreSQL Server. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=Server - // +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() - // +kubebuilder:validation:Optional - ServerID *string `json:"serverId,omitempty" tf:"server_id,omitempty"` - - // Reference to a Server to populate serverId. - // +kubebuilder:validation:Optional - ServerIDRef *v1.Reference `json:"serverIdRef,omitempty" tf:"-"` - - // Selector for a Server to populate serverId. - // +kubebuilder:validation:Optional - ServerIDSelector *v1.Selector `json:"serverIdSelector,omitempty" tf:"-"` + +// The URL to a Key Vault Key. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/keyvault/v1alpha1.Key +// +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() +// +kubebuilder:validation:Optional +KeyVaultKeyID *string `json:"keyVaultKeyId,omitempty" tf:"key_vault_key_id,omitempty"` + +// Reference to a Key in keyvault to populate keyVaultKeyId. +// +kubebuilder:validation:Optional +KeyVaultKeyIDRef *v1.Reference `json:"keyVaultKeyIdRef,omitempty" tf:"-"` + +// Selector for a Key in keyvault to populate keyVaultKeyId. +// +kubebuilder:validation:Optional +KeyVaultKeyIDSelector *v1.Selector `json:"keyVaultKeyIdSelector,omitempty" tf:"-"` + +// The ID of the PostgreSQL Server. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=Server +// +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() +// +kubebuilder:validation:Optional +ServerID *string `json:"serverId,omitempty" tf:"server_id,omitempty"` + +// Reference to a Server to populate serverId. +// +kubebuilder:validation:Optional +ServerIDRef *v1.Reference `json:"serverIdRef,omitempty" tf:"-"` + +// Selector for a Server to populate serverId. +// +kubebuilder:validation:Optional +ServerIDSelector *v1.Selector `json:"serverIdSelector,omitempty" tf:"-"` } // ServerKeySpec defines the desired state of ServerKey type ServerKeySpec struct { v1.ResourceSpec `json:",inline"` - ForProvider ServerKeyParameters `json:"forProvider"` + ForProvider ServerKeyParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -77,13 +86,13 @@ type ServerKeySpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider ServerKeyInitParameters `json:"initProvider,omitempty"` + InitProvider ServerKeyInitParameters `json:"initProvider,omitempty"` } // ServerKeyStatus defines the observed state of ServerKey. type ServerKeyStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider ServerKeyObservation `json:"atProvider,omitempty"` + AtProvider ServerKeyObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/dbforpostgresql/v1alpha1/zz_virtualnetworkrule_types.go b/apis/dbforpostgresql/v1alpha1/zz_virtualnetworkrule_types.go index 0671934..6059b0b 100755 --- a/apis/dbforpostgresql/v1alpha1/zz_virtualnetworkrule_types.go +++ b/apis/dbforpostgresql/v1alpha1/zz_virtualnetworkrule_types.go @@ -15,83 +15,92 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type VirtualNetworkRuleInitParameters struct { - // Should the Virtual Network Rule be created before the Subnet has the Virtual Network Service Endpoint enabled? - IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty" tf:"ignore_missing_vnet_service_endpoint,omitempty"` + +// Should the Virtual Network Rule be created before the Subnet has the Virtual Network Service Endpoint enabled? +IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty" tf:"ignore_missing_vnet_service_endpoint,omitempty"` } + type VirtualNetworkRuleObservation struct { - // The ID of the PostgreSQL Virtual Network Rule. - ID *string `json:"id,omitempty" tf:"id,omitempty"` - // Should the Virtual Network Rule be created before the Subnet has the Virtual Network Service Endpoint enabled? - IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty" tf:"ignore_missing_vnet_service_endpoint,omitempty"` +// The ID of the PostgreSQL Virtual Network Rule. +ID *string `json:"id,omitempty" tf:"id,omitempty"` + +// Should the Virtual Network Rule be created before the Subnet has the Virtual Network Service Endpoint enabled? +IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty" tf:"ignore_missing_vnet_service_endpoint,omitempty"` - // The name of the resource group where the PostgreSQL server resides. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group where the PostgreSQL server resides. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // The name of the SQL Server to which this PostgreSQL virtual network rule will be applied to. Changing this forces a new resource to be created. - ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` +// The name of the SQL Server to which this PostgreSQL virtual network rule will be applied to. Changing this forces a new resource to be created. +ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` - // The ID of the subnet that the PostgreSQL server will be connected to. - SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"` +// The ID of the subnet that the PostgreSQL server will be connected to. +SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"` } + type VirtualNetworkRuleParameters struct { - // Should the Virtual Network Rule be created before the Subnet has the Virtual Network Service Endpoint enabled? - // +kubebuilder:validation:Optional - IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty" tf:"ignore_missing_vnet_service_endpoint,omitempty"` - - // The name of the resource group where the PostgreSQL server resides. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - - // The name of the SQL Server to which this PostgreSQL virtual network rule will be applied to. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=Server - // +kubebuilder:validation:Optional - ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` - - // Reference to a Server to populate serverName. - // +kubebuilder:validation:Optional - ServerNameRef *v1.Reference `json:"serverNameRef,omitempty" tf:"-"` - - // Selector for a Server to populate serverName. - // +kubebuilder:validation:Optional - ServerNameSelector *v1.Selector `json:"serverNameSelector,omitempty" tf:"-"` - - // The ID of the subnet that the PostgreSQL server will be connected to. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/network/v1alpha1.Subnet - // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() - // +kubebuilder:validation:Optional - SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"` - - // Reference to a Subnet in network to populate subnetId. - // +kubebuilder:validation:Optional - SubnetIDRef *v1.Reference `json:"subnetIdRef,omitempty" tf:"-"` - - // Selector for a Subnet in network to populate subnetId. - // +kubebuilder:validation:Optional - SubnetIDSelector *v1.Selector `json:"subnetIdSelector,omitempty" tf:"-"` + +// Should the Virtual Network Rule be created before the Subnet has the Virtual Network Service Endpoint enabled? +// +kubebuilder:validation:Optional +IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty" tf:"ignore_missing_vnet_service_endpoint,omitempty"` + +// The name of the resource group where the PostgreSQL server resides. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` + +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` + +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` + +// The name of the SQL Server to which this PostgreSQL virtual network rule will be applied to. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=Server +// +kubebuilder:validation:Optional +ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` + +// Reference to a Server to populate serverName. +// +kubebuilder:validation:Optional +ServerNameRef *v1.Reference `json:"serverNameRef,omitempty" tf:"-"` + +// Selector for a Server to populate serverName. +// +kubebuilder:validation:Optional +ServerNameSelector *v1.Selector `json:"serverNameSelector,omitempty" tf:"-"` + +// The ID of the subnet that the PostgreSQL server will be connected to. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/network/v1alpha1.Subnet +// +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() +// +kubebuilder:validation:Optional +SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"` + +// Reference to a Subnet in network to populate subnetId. +// +kubebuilder:validation:Optional +SubnetIDRef *v1.Reference `json:"subnetIdRef,omitempty" tf:"-"` + +// Selector for a Subnet in network to populate subnetId. +// +kubebuilder:validation:Optional +SubnetIDSelector *v1.Selector `json:"subnetIdSelector,omitempty" tf:"-"` } // VirtualNetworkRuleSpec defines the desired state of VirtualNetworkRule type VirtualNetworkRuleSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider VirtualNetworkRuleParameters `json:"forProvider"` + ForProvider VirtualNetworkRuleParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -102,13 +111,13 @@ type VirtualNetworkRuleSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider VirtualNetworkRuleInitParameters `json:"initProvider,omitempty"` + InitProvider VirtualNetworkRuleInitParameters `json:"initProvider,omitempty"` } // VirtualNetworkRuleStatus defines the observed state of VirtualNetworkRule. type VirtualNetworkRuleStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider VirtualNetworkRuleObservation `json:"atProvider,omitempty"` + AtProvider VirtualNetworkRuleObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/keyvault/v1alpha1/zz_generated_terraformed.go b/apis/keyvault/v1alpha1/zz_generated_terraformed.go index 4280515..a9f56e0 100755 --- a/apis/keyvault/v1alpha1/zz_generated_terraformed.go +++ b/apis/keyvault/v1alpha1/zz_generated_terraformed.go @@ -11,6 +11,7 @@ Copyright 2022 Upbound Inc. package v1alpha1 import ( + "dario.cat/mergo" "github.com/pkg/errors" "github.com/crossplane/upjet/pkg/resource" @@ -83,6 +84,36 @@ func (tr *Vault) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this Vault +func (tr *Vault) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Vault using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Vault) LateInitialize(attrs []byte) (bool, error) { @@ -167,6 +198,36 @@ func (tr *Key) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this Key +func (tr *Key) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Key using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Key) LateInitialize(attrs []byte) (bool, error) { diff --git a/apis/keyvault/v1alpha1/zz_key_types.go b/apis/keyvault/v1alpha1/zz_key_types.go index 6f79bcd..44d490f 100755 --- a/apis/keyvault/v1alpha1/zz_key_types.go +++ b/apis/keyvault/v1alpha1/zz_key_types.go @@ -15,219 +15,240 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type AutomaticInitParameters struct { - // Rotate automatically at a duration after create as an ISO 8601 duration. - TimeAfterCreation *string `json:"timeAfterCreation,omitempty" tf:"time_after_creation,omitempty"` - // Rotate automatically at a duration before expiry as an ISO 8601 duration. - TimeBeforeExpiry *string `json:"timeBeforeExpiry,omitempty" tf:"time_before_expiry,omitempty"` +// Rotate automatically at a duration after create as an ISO 8601 duration. +TimeAfterCreation *string `json:"timeAfterCreation,omitempty" tf:"time_after_creation,omitempty"` + +// Rotate automatically at a duration before expiry as an ISO 8601 duration. +TimeBeforeExpiry *string `json:"timeBeforeExpiry,omitempty" tf:"time_before_expiry,omitempty"` } + type AutomaticObservation struct { - // Rotate automatically at a duration after create as an ISO 8601 duration. - TimeAfterCreation *string `json:"timeAfterCreation,omitempty" tf:"time_after_creation,omitempty"` - // Rotate automatically at a duration before expiry as an ISO 8601 duration. - TimeBeforeExpiry *string `json:"timeBeforeExpiry,omitempty" tf:"time_before_expiry,omitempty"` +// Rotate automatically at a duration after create as an ISO 8601 duration. +TimeAfterCreation *string `json:"timeAfterCreation,omitempty" tf:"time_after_creation,omitempty"` + +// Rotate automatically at a duration before expiry as an ISO 8601 duration. +TimeBeforeExpiry *string `json:"timeBeforeExpiry,omitempty" tf:"time_before_expiry,omitempty"` } + type AutomaticParameters struct { - // Rotate automatically at a duration after create as an ISO 8601 duration. - // +kubebuilder:validation:Optional - TimeAfterCreation *string `json:"timeAfterCreation,omitempty" tf:"time_after_creation,omitempty"` - // Rotate automatically at a duration before expiry as an ISO 8601 duration. - // +kubebuilder:validation:Optional - TimeBeforeExpiry *string `json:"timeBeforeExpiry,omitempty" tf:"time_before_expiry,omitempty"` +// Rotate automatically at a duration after create as an ISO 8601 duration. +// +kubebuilder:validation:Optional +TimeAfterCreation *string `json:"timeAfterCreation,omitempty" tf:"time_after_creation,omitempty"` + +// Rotate automatically at a duration before expiry as an ISO 8601 duration. +// +kubebuilder:validation:Optional +TimeBeforeExpiry *string `json:"timeBeforeExpiry,omitempty" tf:"time_before_expiry,omitempty"` } + type KeyInitParameters struct { - // Specifies the curve to use when creating an EC key. Possible values are P-256, P-256K, P-384, and P-521. This field will be required in a future release if key_type is EC or EC-HSM. The API will default to P-256 if nothing is specified. Changing this forces a new resource to be created. - Curve *string `json:"curve,omitempty" tf:"curve,omitempty"` - // Expiration UTC datetime (Y-m-d'T'H:M:S'Z'). - ExpirationDate *string `json:"expirationDate,omitempty" tf:"expiration_date,omitempty"` +// Specifies the curve to use when creating an EC key. Possible values are P-256, P-256K, P-384, and P-521. This field will be required in a future release if key_type is EC or EC-HSM. The API will default to P-256 if nothing is specified. Changing this forces a new resource to be created. +Curve *string `json:"curve,omitempty" tf:"curve,omitempty"` + +// Expiration UTC datetime (Y-m-d'T'H:M:S'Z'). +ExpirationDate *string `json:"expirationDate,omitempty" tf:"expiration_date,omitempty"` - // A list of JSON web key operations. Possible values include: decrypt, encrypt, sign, unwrapKey, verify and wrapKey. Please note these values are case sensitive. - KeyOpts []*string `json:"keyOpts,omitempty" tf:"key_opts,omitempty"` +// A list of JSON web key operations. Possible values include: decrypt, encrypt, sign, unwrapKey, verify and wrapKey. Please note these values are case sensitive. +KeyOpts []*string `json:"keyOpts,omitempty" tf:"key_opts,omitempty"` - // Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. Note: This field is required if key_type is RSA or RSA-HSM. Changing this forces a new resource to be created. - KeySize *float64 `json:"keySize,omitempty" tf:"key_size,omitempty"` +// Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. Note: This field is required if key_type is RSA or RSA-HSM. Changing this forces a new resource to be created. +KeySize *float64 `json:"keySize,omitempty" tf:"key_size,omitempty"` - // Specifies the Key Type to use for this Key Vault Key. Possible values are EC (Elliptic Curve), EC-HSM, RSA and RSA-HSM. Changing this forces a new resource to be created. - KeyType *string `json:"keyType,omitempty" tf:"key_type,omitempty"` +// Specifies the Key Type to use for this Key Vault Key. Possible values are EC (Elliptic Curve), EC-HSM, RSA and RSA-HSM. Changing this forces a new resource to be created. +KeyType *string `json:"keyType,omitempty" tf:"key_type,omitempty"` - // Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z'). - NotBeforeDate *string `json:"notBeforeDate,omitempty" tf:"not_before_date,omitempty"` +// Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z'). +NotBeforeDate *string `json:"notBeforeDate,omitempty" tf:"not_before_date,omitempty"` - // A rotation_policy block as defined below. - RotationPolicy []RotationPolicyInitParameters `json:"rotationPolicy,omitempty" tf:"rotation_policy,omitempty"` +// A rotation_policy block as defined below. +RotationPolicy []RotationPolicyInitParameters `json:"rotationPolicy,omitempty" tf:"rotation_policy,omitempty"` - // A mapping of tags to assign to the resource. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A mapping of tags to assign to the resource. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` } + type KeyObservation struct { - // Specifies the curve to use when creating an EC key. Possible values are P-256, P-256K, P-384, and P-521. This field will be required in a future release if key_type is EC or EC-HSM. The API will default to P-256 if nothing is specified. Changing this forces a new resource to be created. - Curve *string `json:"curve,omitempty" tf:"curve,omitempty"` - // The RSA public exponent of this Key Vault Key. - E *string `json:"e,omitempty" tf:"e,omitempty"` +// Specifies the curve to use when creating an EC key. Possible values are P-256, P-256K, P-384, and P-521. This field will be required in a future release if key_type is EC or EC-HSM. The API will default to P-256 if nothing is specified. Changing this forces a new resource to be created. +Curve *string `json:"curve,omitempty" tf:"curve,omitempty"` + +// The RSA public exponent of this Key Vault Key. +E *string `json:"e,omitempty" tf:"e,omitempty"` - // Expiration UTC datetime (Y-m-d'T'H:M:S'Z'). - ExpirationDate *string `json:"expirationDate,omitempty" tf:"expiration_date,omitempty"` +// Expiration UTC datetime (Y-m-d'T'H:M:S'Z'). +ExpirationDate *string `json:"expirationDate,omitempty" tf:"expiration_date,omitempty"` - // The Key Vault Key ID. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// The Key Vault Key ID. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // A list of JSON web key operations. Possible values include: decrypt, encrypt, sign, unwrapKey, verify and wrapKey. Please note these values are case sensitive. - KeyOpts []*string `json:"keyOpts,omitempty" tf:"key_opts,omitempty"` +// A list of JSON web key operations. Possible values include: decrypt, encrypt, sign, unwrapKey, verify and wrapKey. Please note these values are case sensitive. +KeyOpts []*string `json:"keyOpts,omitempty" tf:"key_opts,omitempty"` - // Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. Note: This field is required if key_type is RSA or RSA-HSM. Changing this forces a new resource to be created. - KeySize *float64 `json:"keySize,omitempty" tf:"key_size,omitempty"` +// Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. Note: This field is required if key_type is RSA or RSA-HSM. Changing this forces a new resource to be created. +KeySize *float64 `json:"keySize,omitempty" tf:"key_size,omitempty"` - // Specifies the Key Type to use for this Key Vault Key. Possible values are EC (Elliptic Curve), EC-HSM, RSA and RSA-HSM. Changing this forces a new resource to be created. - KeyType *string `json:"keyType,omitempty" tf:"key_type,omitempty"` +// Specifies the Key Type to use for this Key Vault Key. Possible values are EC (Elliptic Curve), EC-HSM, RSA and RSA-HSM. Changing this forces a new resource to be created. +KeyType *string `json:"keyType,omitempty" tf:"key_type,omitempty"` - // The ID of the Key Vault where the Key should be created. Changing this forces a new resource to be created. - KeyVaultID *string `json:"keyVaultId,omitempty" tf:"key_vault_id,omitempty"` +// The ID of the Key Vault where the Key should be created. Changing this forces a new resource to be created. +KeyVaultID *string `json:"keyVaultId,omitempty" tf:"key_vault_id,omitempty"` - // The RSA modulus of this Key Vault Key. - N *string `json:"n,omitempty" tf:"n,omitempty"` +// The RSA modulus of this Key Vault Key. +N *string `json:"n,omitempty" tf:"n,omitempty"` - // Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z'). - NotBeforeDate *string `json:"notBeforeDate,omitempty" tf:"not_before_date,omitempty"` +// Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z'). +NotBeforeDate *string `json:"notBeforeDate,omitempty" tf:"not_before_date,omitempty"` - // The OpenSSH encoded public key of this Key Vault Key. - PublicKeyOpenssh *string `json:"publicKeyOpenssh,omitempty" tf:"public_key_openssh,omitempty"` +// The OpenSSH encoded public key of this Key Vault Key. +PublicKeyOpenssh *string `json:"publicKeyOpenssh,omitempty" tf:"public_key_openssh,omitempty"` - // The PEM encoded public key of this Key Vault Key. - PublicKeyPem *string `json:"publicKeyPem,omitempty" tf:"public_key_pem,omitempty"` +// The PEM encoded public key of this Key Vault Key. +PublicKeyPem *string `json:"publicKeyPem,omitempty" tf:"public_key_pem,omitempty"` - // The (Versioned) ID for this Key Vault Key. This property points to a specific version of a Key Vault Key, as such using this won't auto-rotate values if used in other Azure Services. - ResourceID *string `json:"resourceId,omitempty" tf:"resource_id,omitempty"` +// The (Versioned) ID for this Key Vault Key. This property points to a specific version of a Key Vault Key, as such using this won't auto-rotate values if used in other Azure Services. +ResourceID *string `json:"resourceId,omitempty" tf:"resource_id,omitempty"` - // The Versionless ID of the Key Vault Key. This property allows other Azure Services (that support it) to auto-rotate their value when the Key Vault Key is updated. - ResourceVersionlessID *string `json:"resourceVersionlessId,omitempty" tf:"resource_versionless_id,omitempty"` +// The Versionless ID of the Key Vault Key. This property allows other Azure Services (that support it) to auto-rotate their value when the Key Vault Key is updated. +ResourceVersionlessID *string `json:"resourceVersionlessId,omitempty" tf:"resource_versionless_id,omitempty"` - // A rotation_policy block as defined below. - RotationPolicy []RotationPolicyObservation `json:"rotationPolicy,omitempty" tf:"rotation_policy,omitempty"` +// A rotation_policy block as defined below. +RotationPolicy []RotationPolicyObservation `json:"rotationPolicy,omitempty" tf:"rotation_policy,omitempty"` - // A mapping of tags to assign to the resource. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A mapping of tags to assign to the resource. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - // The current version of the Key Vault Key. - Version *string `json:"version,omitempty" tf:"version,omitempty"` +// The current version of the Key Vault Key. +Version *string `json:"version,omitempty" tf:"version,omitempty"` - // The Base ID of the Key Vault Key. - VersionlessID *string `json:"versionlessId,omitempty" tf:"versionless_id,omitempty"` +// The Base ID of the Key Vault Key. +VersionlessID *string `json:"versionlessId,omitempty" tf:"versionless_id,omitempty"` - // The EC X component of this Key Vault Key. - X *string `json:"x,omitempty" tf:"x,omitempty"` +// The EC X component of this Key Vault Key. +X *string `json:"x,omitempty" tf:"x,omitempty"` - // The EC Y component of this Key Vault Key. - Y *string `json:"y,omitempty" tf:"y,omitempty"` +// The EC Y component of this Key Vault Key. +Y *string `json:"y,omitempty" tf:"y,omitempty"` } + type KeyParameters struct { - // Specifies the curve to use when creating an EC key. Possible values are P-256, P-256K, P-384, and P-521. This field will be required in a future release if key_type is EC or EC-HSM. The API will default to P-256 if nothing is specified. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Curve *string `json:"curve,omitempty" tf:"curve,omitempty"` - // Expiration UTC datetime (Y-m-d'T'H:M:S'Z'). - // +kubebuilder:validation:Optional - ExpirationDate *string `json:"expirationDate,omitempty" tf:"expiration_date,omitempty"` +// Specifies the curve to use when creating an EC key. Possible values are P-256, P-256K, P-384, and P-521. This field will be required in a future release if key_type is EC or EC-HSM. The API will default to P-256 if nothing is specified. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Curve *string `json:"curve,omitempty" tf:"curve,omitempty"` - // A list of JSON web key operations. Possible values include: decrypt, encrypt, sign, unwrapKey, verify and wrapKey. Please note these values are case sensitive. - // +kubebuilder:validation:Optional - KeyOpts []*string `json:"keyOpts,omitempty" tf:"key_opts,omitempty"` +// Expiration UTC datetime (Y-m-d'T'H:M:S'Z'). +// +kubebuilder:validation:Optional +ExpirationDate *string `json:"expirationDate,omitempty" tf:"expiration_date,omitempty"` - // Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. Note: This field is required if key_type is RSA or RSA-HSM. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - KeySize *float64 `json:"keySize,omitempty" tf:"key_size,omitempty"` +// A list of JSON web key operations. Possible values include: decrypt, encrypt, sign, unwrapKey, verify and wrapKey. Please note these values are case sensitive. +// +kubebuilder:validation:Optional +KeyOpts []*string `json:"keyOpts,omitempty" tf:"key_opts,omitempty"` - // Specifies the Key Type to use for this Key Vault Key. Possible values are EC (Elliptic Curve), EC-HSM, RSA and RSA-HSM. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - KeyType *string `json:"keyType,omitempty" tf:"key_type,omitempty"` +// Specifies the Size of the RSA key to create in bytes. For example, 1024 or 2048. Note: This field is required if key_type is RSA or RSA-HSM. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +KeySize *float64 `json:"keySize,omitempty" tf:"key_size,omitempty"` - // The ID of the Key Vault where the Key should be created. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=Vault - // +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() - // +kubebuilder:validation:Optional - KeyVaultID *string `json:"keyVaultId,omitempty" tf:"key_vault_id,omitempty"` +// Specifies the Key Type to use for this Key Vault Key. Possible values are EC (Elliptic Curve), EC-HSM, RSA and RSA-HSM. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +KeyType *string `json:"keyType,omitempty" tf:"key_type,omitempty"` - // Reference to a Vault to populate keyVaultId. - // +kubebuilder:validation:Optional - KeyVaultIDRef *v1.Reference `json:"keyVaultIdRef,omitempty" tf:"-"` +// The ID of the Key Vault where the Key should be created. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=Vault +// +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() +// +kubebuilder:validation:Optional +KeyVaultID *string `json:"keyVaultId,omitempty" tf:"key_vault_id,omitempty"` - // Selector for a Vault to populate keyVaultId. - // +kubebuilder:validation:Optional - KeyVaultIDSelector *v1.Selector `json:"keyVaultIdSelector,omitempty" tf:"-"` +// Reference to a Vault to populate keyVaultId. +// +kubebuilder:validation:Optional +KeyVaultIDRef *v1.Reference `json:"keyVaultIdRef,omitempty" tf:"-"` - // Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z'). - // +kubebuilder:validation:Optional - NotBeforeDate *string `json:"notBeforeDate,omitempty" tf:"not_before_date,omitempty"` +// Selector for a Vault to populate keyVaultId. +// +kubebuilder:validation:Optional +KeyVaultIDSelector *v1.Selector `json:"keyVaultIdSelector,omitempty" tf:"-"` - // A rotation_policy block as defined below. - // +kubebuilder:validation:Optional - RotationPolicy []RotationPolicyParameters `json:"rotationPolicy,omitempty" tf:"rotation_policy,omitempty"` +// Key not usable before the provided UTC datetime (Y-m-d'T'H:M:S'Z'). +// +kubebuilder:validation:Optional +NotBeforeDate *string `json:"notBeforeDate,omitempty" tf:"not_before_date,omitempty"` - // A mapping of tags to assign to the resource. - // +kubebuilder:validation:Optional - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A rotation_policy block as defined below. +// +kubebuilder:validation:Optional +RotationPolicy []RotationPolicyParameters `json:"rotationPolicy,omitempty" tf:"rotation_policy,omitempty"` + +// A mapping of tags to assign to the resource. +// +kubebuilder:validation:Optional +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` } + type RotationPolicyInitParameters struct { - // An automatic block as defined below. - Automatic []AutomaticInitParameters `json:"automatic,omitempty" tf:"automatic,omitempty"` - // Expire a Key Vault Key after given duration as an ISO 8601 duration. - ExpireAfter *string `json:"expireAfter,omitempty" tf:"expire_after,omitempty"` +// An automatic block as defined below. +Automatic []AutomaticInitParameters `json:"automatic,omitempty" tf:"automatic,omitempty"` - // Notify at a given duration before expiry as an ISO 8601 duration. Default is P30D. - NotifyBeforeExpiry *string `json:"notifyBeforeExpiry,omitempty" tf:"notify_before_expiry,omitempty"` +// Expire a Key Vault Key after given duration as an ISO 8601 duration. +ExpireAfter *string `json:"expireAfter,omitempty" tf:"expire_after,omitempty"` + +// Notify at a given duration before expiry as an ISO 8601 duration. Default is P30D. +NotifyBeforeExpiry *string `json:"notifyBeforeExpiry,omitempty" tf:"notify_before_expiry,omitempty"` } + type RotationPolicyObservation struct { - // An automatic block as defined below. - Automatic []AutomaticObservation `json:"automatic,omitempty" tf:"automatic,omitempty"` - // Expire a Key Vault Key after given duration as an ISO 8601 duration. - ExpireAfter *string `json:"expireAfter,omitempty" tf:"expire_after,omitempty"` +// An automatic block as defined below. +Automatic []AutomaticObservation `json:"automatic,omitempty" tf:"automatic,omitempty"` + +// Expire a Key Vault Key after given duration as an ISO 8601 duration. +ExpireAfter *string `json:"expireAfter,omitempty" tf:"expire_after,omitempty"` - // Notify at a given duration before expiry as an ISO 8601 duration. Default is P30D. - NotifyBeforeExpiry *string `json:"notifyBeforeExpiry,omitempty" tf:"notify_before_expiry,omitempty"` +// Notify at a given duration before expiry as an ISO 8601 duration. Default is P30D. +NotifyBeforeExpiry *string `json:"notifyBeforeExpiry,omitempty" tf:"notify_before_expiry,omitempty"` } + type RotationPolicyParameters struct { - // An automatic block as defined below. - // +kubebuilder:validation:Optional - Automatic []AutomaticParameters `json:"automatic,omitempty" tf:"automatic,omitempty"` - // Expire a Key Vault Key after given duration as an ISO 8601 duration. - // +kubebuilder:validation:Optional - ExpireAfter *string `json:"expireAfter,omitempty" tf:"expire_after,omitempty"` +// An automatic block as defined below. +// +kubebuilder:validation:Optional +Automatic []AutomaticParameters `json:"automatic,omitempty" tf:"automatic,omitempty"` + +// Expire a Key Vault Key after given duration as an ISO 8601 duration. +// +kubebuilder:validation:Optional +ExpireAfter *string `json:"expireAfter,omitempty" tf:"expire_after,omitempty"` - // Notify at a given duration before expiry as an ISO 8601 duration. Default is P30D. - // +kubebuilder:validation:Optional - NotifyBeforeExpiry *string `json:"notifyBeforeExpiry,omitempty" tf:"notify_before_expiry,omitempty"` +// Notify at a given duration before expiry as an ISO 8601 duration. Default is P30D. +// +kubebuilder:validation:Optional +NotifyBeforeExpiry *string `json:"notifyBeforeExpiry,omitempty" tf:"notify_before_expiry,omitempty"` } // KeySpec defines the desired state of Key type KeySpec struct { v1.ResourceSpec `json:",inline"` - ForProvider KeyParameters `json:"forProvider"` + ForProvider KeyParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -238,13 +259,13 @@ type KeySpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider KeyInitParameters `json:"initProvider,omitempty"` + InitProvider KeyInitParameters `json:"initProvider,omitempty"` } // KeyStatus defines the observed state of Key. type KeyStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider KeyObservation `json:"atProvider,omitempty"` + AtProvider KeyObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -259,10 +280,10 @@ type KeyStatus struct { type Key struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.keyOpts) || (has(self.initProvider) && has(self.initProvider.keyOpts))",message="spec.forProvider.keyOpts is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.keyType) || (has(self.initProvider) && has(self.initProvider.keyType))",message="spec.forProvider.keyType is a required parameter" - Spec KeySpec `json:"spec"` - Status KeyStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.keyOpts) || (has(self.initProvider) && has(self.initProvider.keyOpts))",message="spec.forProvider.keyOpts is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.keyType) || (has(self.initProvider) && has(self.initProvider.keyType))",message="spec.forProvider.keyType is a required parameter" + Spec KeySpec `json:"spec"` + Status KeyStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/keyvault/v1alpha1/zz_vault_types.go b/apis/keyvault/v1alpha1/zz_vault_types.go index 5cb99c2..0ffda55 100755 --- a/apis/keyvault/v1alpha1/zz_vault_types.go +++ b/apis/keyvault/v1alpha1/zz_vault_types.go @@ -15,294 +15,321 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type AccessPolicyInitParameters struct { + } + type AccessPolicyObservation struct { - // The object ID of an Application in Azure Active Directory. - ApplicationID *string `json:"applicationId,omitempty" tf:"application_id,omitempty"` - // List of certificate permissions, must be one or more from the following: Backup, Create, Delete, DeleteIssuers, Get, GetIssuers, Import, List, ListIssuers, ManageContacts, ManageIssuers, Purge, Recover, Restore, SetIssuers and Update. - CertificatePermissions []*string `json:"certificatePermissions,omitempty" tf:"certificate_permissions,omitempty"` +// The object ID of an Application in Azure Active Directory. +ApplicationID *string `json:"applicationId,omitempty" tf:"application_id,omitempty"` + +// List of certificate permissions, must be one or more from the following: Backup, Create, Delete, DeleteIssuers, Get, GetIssuers, Import, List, ListIssuers, ManageContacts, ManageIssuers, Purge, Recover, Restore, SetIssuers and Update. +CertificatePermissions []*string `json:"certificatePermissions,omitempty" tf:"certificate_permissions,omitempty"` - // List of key permissions. Possible values are Backup, Create, Decrypt, Delete, Encrypt, Get, Import, List, Purge, Recover, Restore, Sign, UnwrapKey, Update, Verify, WrapKey, Release, Rotate, GetRotationPolicy and SetRotationPolicy. - KeyPermissions []*string `json:"keyPermissions,omitempty" tf:"key_permissions,omitempty"` +// List of key permissions. Possible values are Backup, Create, Decrypt, Delete, Encrypt, Get, Import, List, Purge, Recover, Restore, Sign, UnwrapKey, Update, Verify, WrapKey, Release, Rotate, GetRotationPolicy and SetRotationPolicy. +KeyPermissions []*string `json:"keyPermissions,omitempty" tf:"key_permissions,omitempty"` - // The object ID of a user, service principal or security group in the Azure Active Directory tenant for the vault. The object ID must be unique for the list of access policies. - ObjectID *string `json:"objectId,omitempty" tf:"object_id,omitempty"` +// The object ID of a user, service principal or security group in the Azure Active Directory tenant for the vault. The object ID must be unique for the list of access policies. +ObjectID *string `json:"objectId,omitempty" tf:"object_id,omitempty"` - // List of secret permissions, must be one or more from the following: Backup, Delete, Get, List, Purge, Recover, Restore and Set. - SecretPermissions []*string `json:"secretPermissions,omitempty" tf:"secret_permissions,omitempty"` +// List of secret permissions, must be one or more from the following: Backup, Delete, Get, List, Purge, Recover, Restore and Set. +SecretPermissions []*string `json:"secretPermissions,omitempty" tf:"secret_permissions,omitempty"` - // List of storage permissions, must be one or more from the following: Backup, Delete, DeleteSAS, Get, GetSAS, List, ListSAS, Purge, Recover, RegenerateKey, Restore, Set, SetSAS and Update. - StoragePermissions []*string `json:"storagePermissions,omitempty" tf:"storage_permissions,omitempty"` +// List of storage permissions, must be one or more from the following: Backup, Delete, DeleteSAS, Get, GetSAS, List, ListSAS, Purge, Recover, RegenerateKey, Restore, Set, SetSAS and Update. +StoragePermissions []*string `json:"storagePermissions,omitempty" tf:"storage_permissions,omitempty"` - // The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. Must match the tenant_id used above. - TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` +// The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. Must match the tenant_id used above. +TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` } + type AccessPolicyParameters struct { + } + type ContactInitParameters struct { - // E-mail address of the contact. - Email *string `json:"email,omitempty" tf:"email,omitempty"` - // Name of the contact. - Name *string `json:"name,omitempty" tf:"name,omitempty"` +// E-mail address of the contact. +Email *string `json:"email,omitempty" tf:"email,omitempty"` + +// Name of the contact. +Name *string `json:"name,omitempty" tf:"name,omitempty"` - // Phone number of the contact. - Phone *string `json:"phone,omitempty" tf:"phone,omitempty"` +// Phone number of the contact. +Phone *string `json:"phone,omitempty" tf:"phone,omitempty"` } + type ContactObservation struct { - // E-mail address of the contact. - Email *string `json:"email,omitempty" tf:"email,omitempty"` - // Name of the contact. - Name *string `json:"name,omitempty" tf:"name,omitempty"` +// E-mail address of the contact. +Email *string `json:"email,omitempty" tf:"email,omitempty"` + +// Name of the contact. +Name *string `json:"name,omitempty" tf:"name,omitempty"` - // Phone number of the contact. - Phone *string `json:"phone,omitempty" tf:"phone,omitempty"` +// Phone number of the contact. +Phone *string `json:"phone,omitempty" tf:"phone,omitempty"` } + type ContactParameters struct { - // E-mail address of the contact. - // +kubebuilder:validation:Optional - Email *string `json:"email" tf:"email,omitempty"` - // Name of the contact. - // +kubebuilder:validation:Optional - Name *string `json:"name,omitempty" tf:"name,omitempty"` +// E-mail address of the contact. +// +kubebuilder:validation:Optional +Email *string `json:"email" tf:"email,omitempty"` - // Phone number of the contact. - // +kubebuilder:validation:Optional - Phone *string `json:"phone,omitempty" tf:"phone,omitempty"` +// Name of the contact. +// +kubebuilder:validation:Optional +Name *string `json:"name,omitempty" tf:"name,omitempty"` + +// Phone number of the contact. +// +kubebuilder:validation:Optional +Phone *string `json:"phone,omitempty" tf:"phone,omitempty"` } + type NetworkAclsInitParameters struct { - // Specifies which traffic can bypass the network rules. Possible values are AzureServices and None. - Bypass *string `json:"bypass,omitempty" tf:"bypass,omitempty"` - // The Default Action to use when no rules match from ip_rules / virtual_network_subnet_ids. Possible values are Allow and Deny. - DefaultAction *string `json:"defaultAction,omitempty" tf:"default_action,omitempty"` +// Specifies which traffic can bypass the network rules. Possible values are AzureServices and None. +Bypass *string `json:"bypass,omitempty" tf:"bypass,omitempty"` - // One or more IP Addresses, or CIDR Blocks which should be able to access the Key Vault. - IPRules []*string `json:"ipRules,omitempty" tf:"ip_rules,omitempty"` +// The Default Action to use when no rules match from ip_rules / virtual_network_subnet_ids. Possible values are Allow and Deny. +DefaultAction *string `json:"defaultAction,omitempty" tf:"default_action,omitempty"` - // One or more Subnet IDs which should be able to access this Key Vault. - VirtualNetworkSubnetIds []*string `json:"virtualNetworkSubnetIds,omitempty" tf:"virtual_network_subnet_ids,omitempty"` +// One or more IP Addresses, or CIDR Blocks which should be able to access the Key Vault. +IPRules []*string `json:"ipRules,omitempty" tf:"ip_rules,omitempty"` + +// One or more Subnet IDs which should be able to access this Key Vault. +VirtualNetworkSubnetIds []*string `json:"virtualNetworkSubnetIds,omitempty" tf:"virtual_network_subnet_ids,omitempty"` } + type NetworkAclsObservation struct { - // Specifies which traffic can bypass the network rules. Possible values are AzureServices and None. - Bypass *string `json:"bypass,omitempty" tf:"bypass,omitempty"` - // The Default Action to use when no rules match from ip_rules / virtual_network_subnet_ids. Possible values are Allow and Deny. - DefaultAction *string `json:"defaultAction,omitempty" tf:"default_action,omitempty"` +// Specifies which traffic can bypass the network rules. Possible values are AzureServices and None. +Bypass *string `json:"bypass,omitempty" tf:"bypass,omitempty"` - // One or more IP Addresses, or CIDR Blocks which should be able to access the Key Vault. - IPRules []*string `json:"ipRules,omitempty" tf:"ip_rules,omitempty"` +// The Default Action to use when no rules match from ip_rules / virtual_network_subnet_ids. Possible values are Allow and Deny. +DefaultAction *string `json:"defaultAction,omitempty" tf:"default_action,omitempty"` - // One or more Subnet IDs which should be able to access this Key Vault. - VirtualNetworkSubnetIds []*string `json:"virtualNetworkSubnetIds,omitempty" tf:"virtual_network_subnet_ids,omitempty"` +// One or more IP Addresses, or CIDR Blocks which should be able to access the Key Vault. +IPRules []*string `json:"ipRules,omitempty" tf:"ip_rules,omitempty"` + +// One or more Subnet IDs which should be able to access this Key Vault. +VirtualNetworkSubnetIds []*string `json:"virtualNetworkSubnetIds,omitempty" tf:"virtual_network_subnet_ids,omitempty"` } + type NetworkAclsParameters struct { - // Specifies which traffic can bypass the network rules. Possible values are AzureServices and None. - // +kubebuilder:validation:Optional - Bypass *string `json:"bypass" tf:"bypass,omitempty"` - // The Default Action to use when no rules match from ip_rules / virtual_network_subnet_ids. Possible values are Allow and Deny. - // +kubebuilder:validation:Optional - DefaultAction *string `json:"defaultAction" tf:"default_action,omitempty"` +// Specifies which traffic can bypass the network rules. Possible values are AzureServices and None. +// +kubebuilder:validation:Optional +Bypass *string `json:"bypass" tf:"bypass,omitempty"` + +// The Default Action to use when no rules match from ip_rules / virtual_network_subnet_ids. Possible values are Allow and Deny. +// +kubebuilder:validation:Optional +DefaultAction *string `json:"defaultAction" tf:"default_action,omitempty"` - // One or more IP Addresses, or CIDR Blocks which should be able to access the Key Vault. - // +kubebuilder:validation:Optional - IPRules []*string `json:"ipRules,omitempty" tf:"ip_rules,omitempty"` +// One or more IP Addresses, or CIDR Blocks which should be able to access the Key Vault. +// +kubebuilder:validation:Optional +IPRules []*string `json:"ipRules,omitempty" tf:"ip_rules,omitempty"` - // One or more Subnet IDs which should be able to access this Key Vault. - // +kubebuilder:validation:Optional - VirtualNetworkSubnetIds []*string `json:"virtualNetworkSubnetIds,omitempty" tf:"virtual_network_subnet_ids,omitempty"` +// One or more Subnet IDs which should be able to access this Key Vault. +// +kubebuilder:validation:Optional +VirtualNetworkSubnetIds []*string `json:"virtualNetworkSubnetIds,omitempty" tf:"virtual_network_subnet_ids,omitempty"` } + type VaultInitParameters struct { - // One or more contact block as defined below. - Contact []ContactInitParameters `json:"contact,omitempty" tf:"contact,omitempty"` - // Boolean flag to specify whether Azure Key Vault uses Role Based Access Control (RBAC) for authorization of data actions. - EnableRbacAuthorization *bool `json:"enableRbacAuthorization,omitempty" tf:"enable_rbac_authorization,omitempty"` +// One or more contact block as defined below. +Contact []ContactInitParameters `json:"contact,omitempty" tf:"contact,omitempty"` + +// Boolean flag to specify whether Azure Key Vault uses Role Based Access Control (RBAC) for authorization of data actions. +EnableRbacAuthorization *bool `json:"enableRbacAuthorization,omitempty" tf:"enable_rbac_authorization,omitempty"` - // Boolean flag to specify whether Azure Virtual Machines are permitted to retrieve certificates stored as secrets from the key vault. - EnabledForDeployment *bool `json:"enabledForDeployment,omitempty" tf:"enabled_for_deployment,omitempty"` +// Boolean flag to specify whether Azure Virtual Machines are permitted to retrieve certificates stored as secrets from the key vault. +EnabledForDeployment *bool `json:"enabledForDeployment,omitempty" tf:"enabled_for_deployment,omitempty"` - // Boolean flag to specify whether Azure Disk Encryption is permitted to retrieve secrets from the vault and unwrap keys. - EnabledForDiskEncryption *bool `json:"enabledForDiskEncryption,omitempty" tf:"enabled_for_disk_encryption,omitempty"` +// Boolean flag to specify whether Azure Disk Encryption is permitted to retrieve secrets from the vault and unwrap keys. +EnabledForDiskEncryption *bool `json:"enabledForDiskEncryption,omitempty" tf:"enabled_for_disk_encryption,omitempty"` - // Boolean flag to specify whether Azure Resource Manager is permitted to retrieve secrets from the key vault. - EnabledForTemplateDeployment *bool `json:"enabledForTemplateDeployment,omitempty" tf:"enabled_for_template_deployment,omitempty"` +// Boolean flag to specify whether Azure Resource Manager is permitted to retrieve secrets from the key vault. +EnabledForTemplateDeployment *bool `json:"enabledForTemplateDeployment,omitempty" tf:"enabled_for_template_deployment,omitempty"` - // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // A network_acls block as defined below. - NetworkAcls []NetworkAclsInitParameters `json:"networkAcls,omitempty" tf:"network_acls,omitempty"` +// A network_acls block as defined below. +NetworkAcls []NetworkAclsInitParameters `json:"networkAcls,omitempty" tf:"network_acls,omitempty"` - // Whether public network access is allowed for this Key Vault. Defaults to true. - PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` +// Whether public network access is allowed for this Key Vault. Defaults to true. +PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` - // Is Purge Protection enabled for this Key Vault? - PurgeProtectionEnabled *bool `json:"purgeProtectionEnabled,omitempty" tf:"purge_protection_enabled,omitempty"` +// Is Purge Protection enabled for this Key Vault? +PurgeProtectionEnabled *bool `json:"purgeProtectionEnabled,omitempty" tf:"purge_protection_enabled,omitempty"` - // The Name of the SKU used for this Key Vault. Possible values are standard and premium. - SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` +// The Name of the SKU used for this Key Vault. Possible values are standard and premium. +SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` - // The number of days that items should be retained for once soft-deleted. This value can be between 7 and 90 (the default) days. - SoftDeleteRetentionDays *float64 `json:"softDeleteRetentionDays,omitempty" tf:"soft_delete_retention_days,omitempty"` +// The number of days that items should be retained for once soft-deleted. This value can be between 7 and 90 (the default) days. +SoftDeleteRetentionDays *float64 `json:"softDeleteRetentionDays,omitempty" tf:"soft_delete_retention_days,omitempty"` - // A mapping of tags to assign to the resource. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A mapping of tags to assign to the resource. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - // The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. - TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` +// The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. +TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` } + type VaultObservation struct { - // A list of up to 1024 objects describing access policies, as described below. - AccessPolicy []AccessPolicyObservation `json:"accessPolicy,omitempty" tf:"access_policy,omitempty"` - // One or more contact block as defined below. - Contact []ContactObservation `json:"contact,omitempty" tf:"contact,omitempty"` +// A list of up to 1024 objects describing access policies, as described below. +AccessPolicy []AccessPolicyObservation `json:"accessPolicy,omitempty" tf:"access_policy,omitempty"` - // Boolean flag to specify whether Azure Key Vault uses Role Based Access Control (RBAC) for authorization of data actions. - EnableRbacAuthorization *bool `json:"enableRbacAuthorization,omitempty" tf:"enable_rbac_authorization,omitempty"` +// One or more contact block as defined below. +Contact []ContactObservation `json:"contact,omitempty" tf:"contact,omitempty"` - // Boolean flag to specify whether Azure Virtual Machines are permitted to retrieve certificates stored as secrets from the key vault. - EnabledForDeployment *bool `json:"enabledForDeployment,omitempty" tf:"enabled_for_deployment,omitempty"` +// Boolean flag to specify whether Azure Key Vault uses Role Based Access Control (RBAC) for authorization of data actions. +EnableRbacAuthorization *bool `json:"enableRbacAuthorization,omitempty" tf:"enable_rbac_authorization,omitempty"` - // Boolean flag to specify whether Azure Disk Encryption is permitted to retrieve secrets from the vault and unwrap keys. - EnabledForDiskEncryption *bool `json:"enabledForDiskEncryption,omitempty" tf:"enabled_for_disk_encryption,omitempty"` +// Boolean flag to specify whether Azure Virtual Machines are permitted to retrieve certificates stored as secrets from the key vault. +EnabledForDeployment *bool `json:"enabledForDeployment,omitempty" tf:"enabled_for_deployment,omitempty"` - // Boolean flag to specify whether Azure Resource Manager is permitted to retrieve secrets from the key vault. - EnabledForTemplateDeployment *bool `json:"enabledForTemplateDeployment,omitempty" tf:"enabled_for_template_deployment,omitempty"` +// Boolean flag to specify whether Azure Disk Encryption is permitted to retrieve secrets from the vault and unwrap keys. +EnabledForDiskEncryption *bool `json:"enabledForDiskEncryption,omitempty" tf:"enabled_for_disk_encryption,omitempty"` - // The ID of the Key Vault. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// Boolean flag to specify whether Azure Resource Manager is permitted to retrieve secrets from the key vault. +EnabledForTemplateDeployment *bool `json:"enabledForTemplateDeployment,omitempty" tf:"enabled_for_template_deployment,omitempty"` - // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// The ID of the Key Vault. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // A network_acls block as defined below. - NetworkAcls []NetworkAclsObservation `json:"networkAcls,omitempty" tf:"network_acls,omitempty"` +// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // Whether public network access is allowed for this Key Vault. Defaults to true. - PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` +// A network_acls block as defined below. +NetworkAcls []NetworkAclsObservation `json:"networkAcls,omitempty" tf:"network_acls,omitempty"` - // Is Purge Protection enabled for this Key Vault? - PurgeProtectionEnabled *bool `json:"purgeProtectionEnabled,omitempty" tf:"purge_protection_enabled,omitempty"` +// Whether public network access is allowed for this Key Vault. Defaults to true. +PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` - // The name of the resource group in which to create the Key Vault. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// Is Purge Protection enabled for this Key Vault? +PurgeProtectionEnabled *bool `json:"purgeProtectionEnabled,omitempty" tf:"purge_protection_enabled,omitempty"` - // The Name of the SKU used for this Key Vault. Possible values are standard and premium. - SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` +// The name of the resource group in which to create the Key Vault. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // The number of days that items should be retained for once soft-deleted. This value can be between 7 and 90 (the default) days. - SoftDeleteRetentionDays *float64 `json:"softDeleteRetentionDays,omitempty" tf:"soft_delete_retention_days,omitempty"` +// The Name of the SKU used for this Key Vault. Possible values are standard and premium. +SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` - // A mapping of tags to assign to the resource. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// The number of days that items should be retained for once soft-deleted. This value can be between 7 and 90 (the default) days. +SoftDeleteRetentionDays *float64 `json:"softDeleteRetentionDays,omitempty" tf:"soft_delete_retention_days,omitempty"` - // The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. - TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` +// A mapping of tags to assign to the resource. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - // The URI of the Key Vault, used for performing operations on keys and secrets. - VaultURI *string `json:"vaultUri,omitempty" tf:"vault_uri,omitempty"` +// The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. +TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` + +// The URI of the Key Vault, used for performing operations on keys and secrets. +VaultURI *string `json:"vaultUri,omitempty" tf:"vault_uri,omitempty"` } + type VaultParameters struct { - // One or more contact block as defined below. - // +kubebuilder:validation:Optional - Contact []ContactParameters `json:"contact,omitempty" tf:"contact,omitempty"` - // Boolean flag to specify whether Azure Key Vault uses Role Based Access Control (RBAC) for authorization of data actions. - // +kubebuilder:validation:Optional - EnableRbacAuthorization *bool `json:"enableRbacAuthorization,omitempty" tf:"enable_rbac_authorization,omitempty"` +// One or more contact block as defined below. +// +kubebuilder:validation:Optional +Contact []ContactParameters `json:"contact,omitempty" tf:"contact,omitempty"` + +// Boolean flag to specify whether Azure Key Vault uses Role Based Access Control (RBAC) for authorization of data actions. +// +kubebuilder:validation:Optional +EnableRbacAuthorization *bool `json:"enableRbacAuthorization,omitempty" tf:"enable_rbac_authorization,omitempty"` - // Boolean flag to specify whether Azure Virtual Machines are permitted to retrieve certificates stored as secrets from the key vault. - // +kubebuilder:validation:Optional - EnabledForDeployment *bool `json:"enabledForDeployment,omitempty" tf:"enabled_for_deployment,omitempty"` +// Boolean flag to specify whether Azure Virtual Machines are permitted to retrieve certificates stored as secrets from the key vault. +// +kubebuilder:validation:Optional +EnabledForDeployment *bool `json:"enabledForDeployment,omitempty" tf:"enabled_for_deployment,omitempty"` - // Boolean flag to specify whether Azure Disk Encryption is permitted to retrieve secrets from the vault and unwrap keys. - // +kubebuilder:validation:Optional - EnabledForDiskEncryption *bool `json:"enabledForDiskEncryption,omitempty" tf:"enabled_for_disk_encryption,omitempty"` +// Boolean flag to specify whether Azure Disk Encryption is permitted to retrieve secrets from the vault and unwrap keys. +// +kubebuilder:validation:Optional +EnabledForDiskEncryption *bool `json:"enabledForDiskEncryption,omitempty" tf:"enabled_for_disk_encryption,omitempty"` - // Boolean flag to specify whether Azure Resource Manager is permitted to retrieve secrets from the key vault. - // +kubebuilder:validation:Optional - EnabledForTemplateDeployment *bool `json:"enabledForTemplateDeployment,omitempty" tf:"enabled_for_template_deployment,omitempty"` +// Boolean flag to specify whether Azure Resource Manager is permitted to retrieve secrets from the key vault. +// +kubebuilder:validation:Optional +EnabledForTemplateDeployment *bool `json:"enabledForTemplateDeployment,omitempty" tf:"enabled_for_template_deployment,omitempty"` - // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // A network_acls block as defined below. - // +kubebuilder:validation:Optional - NetworkAcls []NetworkAclsParameters `json:"networkAcls,omitempty" tf:"network_acls,omitempty"` +// A network_acls block as defined below. +// +kubebuilder:validation:Optional +NetworkAcls []NetworkAclsParameters `json:"networkAcls,omitempty" tf:"network_acls,omitempty"` - // Whether public network access is allowed for this Key Vault. Defaults to true. - // +kubebuilder:validation:Optional - PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` +// Whether public network access is allowed for this Key Vault. Defaults to true. +// +kubebuilder:validation:Optional +PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` - // Is Purge Protection enabled for this Key Vault? - // +kubebuilder:validation:Optional - PurgeProtectionEnabled *bool `json:"purgeProtectionEnabled,omitempty" tf:"purge_protection_enabled,omitempty"` +// Is Purge Protection enabled for this Key Vault? +// +kubebuilder:validation:Optional +PurgeProtectionEnabled *bool `json:"purgeProtectionEnabled,omitempty" tf:"purge_protection_enabled,omitempty"` - // The name of the resource group in which to create the Key Vault. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group in which to create the Key Vault. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - // The Name of the SKU used for this Key Vault. Possible values are standard and premium. - // +kubebuilder:validation:Optional - SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` +// The Name of the SKU used for this Key Vault. Possible values are standard and premium. +// +kubebuilder:validation:Optional +SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` - // The number of days that items should be retained for once soft-deleted. This value can be between 7 and 90 (the default) days. - // +kubebuilder:validation:Optional - SoftDeleteRetentionDays *float64 `json:"softDeleteRetentionDays,omitempty" tf:"soft_delete_retention_days,omitempty"` +// The number of days that items should be retained for once soft-deleted. This value can be between 7 and 90 (the default) days. +// +kubebuilder:validation:Optional +SoftDeleteRetentionDays *float64 `json:"softDeleteRetentionDays,omitempty" tf:"soft_delete_retention_days,omitempty"` - // A mapping of tags to assign to the resource. - // +kubebuilder:validation:Optional - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A mapping of tags to assign to the resource. +// +kubebuilder:validation:Optional +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - // The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. - // +kubebuilder:validation:Optional - TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` +// The Azure Active Directory tenant ID that should be used for authenticating requests to the key vault. +// +kubebuilder:validation:Optional +TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` } // VaultSpec defines the desired state of Vault type VaultSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider VaultParameters `json:"forProvider"` + ForProvider VaultParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -313,13 +340,13 @@ type VaultSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider VaultInitParameters `json:"initProvider,omitempty"` + InitProvider VaultInitParameters `json:"initProvider,omitempty"` } // VaultStatus defines the observed state of Vault. type VaultStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider VaultObservation `json:"atProvider,omitempty"` + AtProvider VaultObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -334,11 +361,11 @@ type VaultStatus struct { type Vault struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.skuName) || (has(self.initProvider) && has(self.initProvider.skuName))",message="spec.forProvider.skuName is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.tenantId) || (has(self.initProvider) && has(self.initProvider.tenantId))",message="spec.forProvider.tenantId is a required parameter" - Spec VaultSpec `json:"spec"` - Status VaultStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.skuName) || (has(self.initProvider) && has(self.initProvider.skuName))",message="spec.forProvider.skuName is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.tenantId) || (has(self.initProvider) && has(self.initProvider.tenantId))",message="spec.forProvider.tenantId is a required parameter" + Spec VaultSpec `json:"spec"` + Status VaultStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/network/v1alpha1/zz_generated_terraformed.go b/apis/network/v1alpha1/zz_generated_terraformed.go index 0261cc6..4350248 100755 --- a/apis/network/v1alpha1/zz_generated_terraformed.go +++ b/apis/network/v1alpha1/zz_generated_terraformed.go @@ -11,6 +11,7 @@ Copyright 2022 Upbound Inc. package v1alpha1 import ( + "dario.cat/mergo" "github.com/pkg/errors" "github.com/crossplane/upjet/pkg/resource" @@ -83,6 +84,36 @@ func (tr *SecurityGroup) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this SecurityGroup +func (tr *SecurityGroup) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this SecurityGroup using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *SecurityGroup) LateInitialize(attrs []byte) (bool, error) { @@ -167,6 +198,36 @@ func (tr *PrivateDNSZone) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this PrivateDNSZone +func (tr *PrivateDNSZone) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this PrivateDNSZone using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *PrivateDNSZone) LateInitialize(attrs []byte) (bool, error) { @@ -251,6 +312,36 @@ func (tr *PrivateDNSZoneVirtualNetworkLink) GetInitParameters() (map[string]any, return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this PrivateDNSZoneVirtualNetworkLink +func (tr *PrivateDNSZoneVirtualNetworkLink) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this PrivateDNSZoneVirtualNetworkLink using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *PrivateDNSZoneVirtualNetworkLink) LateInitialize(attrs []byte) (bool, error) { @@ -335,6 +426,36 @@ func (tr *RouteTable) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this RouteTable +func (tr *RouteTable) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this RouteTable using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *RouteTable) LateInitialize(attrs []byte) (bool, error) { @@ -419,6 +540,36 @@ func (tr *Subnet) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this Subnet +func (tr *Subnet) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Subnet using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Subnet) LateInitialize(attrs []byte) (bool, error) { @@ -503,6 +654,36 @@ func (tr *SubnetNetworkSecurityGroupAssociation) GetInitParameters() (map[string return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this SubnetNetworkSecurityGroupAssociation +func (tr *SubnetNetworkSecurityGroupAssociation) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this SubnetNetworkSecurityGroupAssociation using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *SubnetNetworkSecurityGroupAssociation) LateInitialize(attrs []byte) (bool, error) { @@ -587,6 +768,36 @@ func (tr *SubnetRouteTableAssociation) GetInitParameters() (map[string]any, erro return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this SubnetRouteTableAssociation +func (tr *SubnetRouteTableAssociation) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this SubnetRouteTableAssociation using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *SubnetRouteTableAssociation) LateInitialize(attrs []byte) (bool, error) { @@ -671,6 +882,36 @@ func (tr *VirtualNetwork) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this VirtualNetwork +func (tr *VirtualNetwork) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this VirtualNetwork using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *VirtualNetwork) LateInitialize(attrs []byte) (bool, error) { @@ -756,6 +997,36 @@ func (tr *VirtualNetworkPeering) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this VirtualNetworkPeering +func (tr *VirtualNetworkPeering) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this VirtualNetworkPeering using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *VirtualNetworkPeering) LateInitialize(attrs []byte) (bool, error) { diff --git a/apis/network/v1alpha1/zz_privatednszone_types.go b/apis/network/v1alpha1/zz_privatednszone_types.go index a9688b6..427b68b 100755 --- a/apis/network/v1alpha1/zz_privatednszone_types.go +++ b/apis/network/v1alpha1/zz_privatednszone_types.go @@ -15,160 +15,175 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type PrivateDNSZoneInitParameters struct { - // An soa_record block as defined below. Changing this forces a new resource to be created. - SoaRecord []SoaRecordInitParameters `json:"soaRecord,omitempty" tf:"soa_record,omitempty"` - // A mapping of tags to assign to the resource. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// An soa_record block as defined below. Changing this forces a new resource to be created. +SoaRecord []SoaRecordInitParameters `json:"soaRecord,omitempty" tf:"soa_record,omitempty"` + +// A mapping of tags to assign to the resource. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` } + type PrivateDNSZoneObservation struct { - // The Private DNS Zone ID. - ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The maximum number of record sets that can be created in this Private DNS zone. - MaxNumberOfRecordSets *float64 `json:"maxNumberOfRecordSets,omitempty" tf:"max_number_of_record_sets,omitempty"` +// The Private DNS Zone ID. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The maximum number of virtual networks that can be linked to this Private DNS zone. - MaxNumberOfVirtualNetworkLinks *float64 `json:"maxNumberOfVirtualNetworkLinks,omitempty" tf:"max_number_of_virtual_network_links,omitempty"` +// The maximum number of record sets that can be created in this Private DNS zone. +MaxNumberOfRecordSets *float64 `json:"maxNumberOfRecordSets,omitempty" tf:"max_number_of_record_sets,omitempty"` - // The maximum number of virtual networks that can be linked to this Private DNS zone with registration enabled. - MaxNumberOfVirtualNetworkLinksWithRegistration *float64 `json:"maxNumberOfVirtualNetworkLinksWithRegistration,omitempty" tf:"max_number_of_virtual_network_links_with_registration,omitempty"` +// The maximum number of virtual networks that can be linked to this Private DNS zone. +MaxNumberOfVirtualNetworkLinks *float64 `json:"maxNumberOfVirtualNetworkLinks,omitempty" tf:"max_number_of_virtual_network_links,omitempty"` - // The current number of record sets in this Private DNS zone. - NumberOfRecordSets *float64 `json:"numberOfRecordSets,omitempty" tf:"number_of_record_sets,omitempty"` +// The maximum number of virtual networks that can be linked to this Private DNS zone with registration enabled. +MaxNumberOfVirtualNetworkLinksWithRegistration *float64 `json:"maxNumberOfVirtualNetworkLinksWithRegistration,omitempty" tf:"max_number_of_virtual_network_links_with_registration,omitempty"` - // Specifies the resource group where the resource exists. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The current number of record sets in this Private DNS zone. +NumberOfRecordSets *float64 `json:"numberOfRecordSets,omitempty" tf:"number_of_record_sets,omitempty"` - // An soa_record block as defined below. Changing this forces a new resource to be created. - SoaRecord []SoaRecordObservation `json:"soaRecord,omitempty" tf:"soa_record,omitempty"` +// Specifies the resource group where the resource exists. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // A mapping of tags to assign to the resource. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// An soa_record block as defined below. Changing this forces a new resource to be created. +SoaRecord []SoaRecordObservation `json:"soaRecord,omitempty" tf:"soa_record,omitempty"` + +// A mapping of tags to assign to the resource. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` } + type PrivateDNSZoneParameters struct { - // Specifies the resource group where the resource exists. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` +// Specifies the resource group where the resource exists. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - // An soa_record block as defined below. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - SoaRecord []SoaRecordParameters `json:"soaRecord,omitempty" tf:"soa_record,omitempty"` +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - // A mapping of tags to assign to the resource. - // +kubebuilder:validation:Optional - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// An soa_record block as defined below. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +SoaRecord []SoaRecordParameters `json:"soaRecord,omitempty" tf:"soa_record,omitempty"` + +// A mapping of tags to assign to the resource. +// +kubebuilder:validation:Optional +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` } + type SoaRecordInitParameters struct { - // The email contact for the SOA record. - Email *string `json:"email,omitempty" tf:"email,omitempty"` - // The expire time for the SOA record. Defaults to 2419200. - ExpireTime *float64 `json:"expireTime,omitempty" tf:"expire_time,omitempty"` +// The email contact for the SOA record. +Email *string `json:"email,omitempty" tf:"email,omitempty"` - // The minimum Time To Live for the SOA record. By convention, it is used to determine the negative caching duration. Defaults to 10. - MinimumTTL *float64 `json:"minimumTtl,omitempty" tf:"minimum_ttl,omitempty"` +// The expire time for the SOA record. Defaults to 2419200. +ExpireTime *float64 `json:"expireTime,omitempty" tf:"expire_time,omitempty"` - // The refresh time for the SOA record. Defaults to 3600. - RefreshTime *float64 `json:"refreshTime,omitempty" tf:"refresh_time,omitempty"` +// The minimum Time To Live for the SOA record. By convention, it is used to determine the negative caching duration. Defaults to 10. +MinimumTTL *float64 `json:"minimumTtl,omitempty" tf:"minimum_ttl,omitempty"` - // The retry time for the SOA record. Defaults to 300. - RetryTime *float64 `json:"retryTime,omitempty" tf:"retry_time,omitempty"` +// The refresh time for the SOA record. Defaults to 3600. +RefreshTime *float64 `json:"refreshTime,omitempty" tf:"refresh_time,omitempty"` - // The Time To Live of the SOA Record in seconds. Defaults to 3600. - TTL *float64 `json:"ttl,omitempty" tf:"ttl,omitempty"` +// The retry time for the SOA record. Defaults to 300. +RetryTime *float64 `json:"retryTime,omitempty" tf:"retry_time,omitempty"` - // A mapping of tags to assign to the Record Set. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// The Time To Live of the SOA Record in seconds. Defaults to 3600. +TTL *float64 `json:"ttl,omitempty" tf:"ttl,omitempty"` + +// A mapping of tags to assign to the Record Set. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` } + type SoaRecordObservation struct { - // The email contact for the SOA record. - Email *string `json:"email,omitempty" tf:"email,omitempty"` - // The expire time for the SOA record. Defaults to 2419200. - ExpireTime *float64 `json:"expireTime,omitempty" tf:"expire_time,omitempty"` +// The email contact for the SOA record. +Email *string `json:"email,omitempty" tf:"email,omitempty"` - // The fully qualified domain name of the Record Set. - Fqdn *string `json:"fqdn,omitempty" tf:"fqdn,omitempty"` +// The expire time for the SOA record. Defaults to 2419200. +ExpireTime *float64 `json:"expireTime,omitempty" tf:"expire_time,omitempty"` - // The domain name of the authoritative name server for the SOA record. - HostName *string `json:"hostName,omitempty" tf:"host_name,omitempty"` +// The fully qualified domain name of the Record Set. +Fqdn *string `json:"fqdn,omitempty" tf:"fqdn,omitempty"` - // The minimum Time To Live for the SOA record. By convention, it is used to determine the negative caching duration. Defaults to 10. - MinimumTTL *float64 `json:"minimumTtl,omitempty" tf:"minimum_ttl,omitempty"` +// The domain name of the authoritative name server for the SOA record. +HostName *string `json:"hostName,omitempty" tf:"host_name,omitempty"` - // The refresh time for the SOA record. Defaults to 3600. - RefreshTime *float64 `json:"refreshTime,omitempty" tf:"refresh_time,omitempty"` +// The minimum Time To Live for the SOA record. By convention, it is used to determine the negative caching duration. Defaults to 10. +MinimumTTL *float64 `json:"minimumTtl,omitempty" tf:"minimum_ttl,omitempty"` - // The retry time for the SOA record. Defaults to 300. - RetryTime *float64 `json:"retryTime,omitempty" tf:"retry_time,omitempty"` +// The refresh time for the SOA record. Defaults to 3600. +RefreshTime *float64 `json:"refreshTime,omitempty" tf:"refresh_time,omitempty"` - // The serial number for the SOA record. - SerialNumber *float64 `json:"serialNumber,omitempty" tf:"serial_number,omitempty"` +// The retry time for the SOA record. Defaults to 300. +RetryTime *float64 `json:"retryTime,omitempty" tf:"retry_time,omitempty"` - // The Time To Live of the SOA Record in seconds. Defaults to 3600. - TTL *float64 `json:"ttl,omitempty" tf:"ttl,omitempty"` +// The serial number for the SOA record. +SerialNumber *float64 `json:"serialNumber,omitempty" tf:"serial_number,omitempty"` - // A mapping of tags to assign to the Record Set. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// The Time To Live of the SOA Record in seconds. Defaults to 3600. +TTL *float64 `json:"ttl,omitempty" tf:"ttl,omitempty"` + +// A mapping of tags to assign to the Record Set. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` } + type SoaRecordParameters struct { - // The email contact for the SOA record. - // +kubebuilder:validation:Optional - Email *string `json:"email" tf:"email,omitempty"` - // The expire time for the SOA record. Defaults to 2419200. - // +kubebuilder:validation:Optional - ExpireTime *float64 `json:"expireTime,omitempty" tf:"expire_time,omitempty"` +// The email contact for the SOA record. +// +kubebuilder:validation:Optional +Email *string `json:"email" tf:"email,omitempty"` + +// The expire time for the SOA record. Defaults to 2419200. +// +kubebuilder:validation:Optional +ExpireTime *float64 `json:"expireTime,omitempty" tf:"expire_time,omitempty"` - // The minimum Time To Live for the SOA record. By convention, it is used to determine the negative caching duration. Defaults to 10. - // +kubebuilder:validation:Optional - MinimumTTL *float64 `json:"minimumTtl,omitempty" tf:"minimum_ttl,omitempty"` +// The minimum Time To Live for the SOA record. By convention, it is used to determine the negative caching duration. Defaults to 10. +// +kubebuilder:validation:Optional +MinimumTTL *float64 `json:"minimumTtl,omitempty" tf:"minimum_ttl,omitempty"` - // The refresh time for the SOA record. Defaults to 3600. - // +kubebuilder:validation:Optional - RefreshTime *float64 `json:"refreshTime,omitempty" tf:"refresh_time,omitempty"` +// The refresh time for the SOA record. Defaults to 3600. +// +kubebuilder:validation:Optional +RefreshTime *float64 `json:"refreshTime,omitempty" tf:"refresh_time,omitempty"` - // The retry time for the SOA record. Defaults to 300. - // +kubebuilder:validation:Optional - RetryTime *float64 `json:"retryTime,omitempty" tf:"retry_time,omitempty"` +// The retry time for the SOA record. Defaults to 300. +// +kubebuilder:validation:Optional +RetryTime *float64 `json:"retryTime,omitempty" tf:"retry_time,omitempty"` - // The Time To Live of the SOA Record in seconds. Defaults to 3600. - // +kubebuilder:validation:Optional - TTL *float64 `json:"ttl,omitempty" tf:"ttl,omitempty"` +// The Time To Live of the SOA Record in seconds. Defaults to 3600. +// +kubebuilder:validation:Optional +TTL *float64 `json:"ttl,omitempty" tf:"ttl,omitempty"` - // A mapping of tags to assign to the Record Set. - // +kubebuilder:validation:Optional - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A mapping of tags to assign to the Record Set. +// +kubebuilder:validation:Optional +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` } // PrivateDNSZoneSpec defines the desired state of PrivateDNSZone type PrivateDNSZoneSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider PrivateDNSZoneParameters `json:"forProvider"` + ForProvider PrivateDNSZoneParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -179,13 +194,13 @@ type PrivateDNSZoneSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider PrivateDNSZoneInitParameters `json:"initProvider,omitempty"` + InitProvider PrivateDNSZoneInitParameters `json:"initProvider,omitempty"` } // PrivateDNSZoneStatus defines the observed state of PrivateDNSZone. type PrivateDNSZoneStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider PrivateDNSZoneObservation `json:"atProvider,omitempty"` + AtProvider PrivateDNSZoneObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/network/v1alpha1/zz_privatednszonevirtualnetworklink_types.go b/apis/network/v1alpha1/zz_privatednszonevirtualnetworklink_types.go index 84f6978..8837943 100755 --- a/apis/network/v1alpha1/zz_privatednszonevirtualnetworklink_types.go +++ b/apis/network/v1alpha1/zz_privatednszonevirtualnetworklink_types.go @@ -15,93 +15,102 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type PrivateDNSZoneVirtualNetworkLinkInitParameters struct { - // Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled? Defaults to false. - RegistrationEnabled *bool `json:"registrationEnabled,omitempty" tf:"registration_enabled,omitempty"` - // A mapping of tags to assign to the resource. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled? Defaults to false. +RegistrationEnabled *bool `json:"registrationEnabled,omitempty" tf:"registration_enabled,omitempty"` + +// A mapping of tags to assign to the resource. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` } + type PrivateDNSZoneVirtualNetworkLinkObservation struct { - // The ID of the Private DNS Zone Virtual Network Link. - ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The name of the Private DNS zone (without a terminating dot). Changing this forces a new resource to be created. - PrivateDNSZoneName *string `json:"privateDnsZoneName,omitempty" tf:"private_dns_zone_name,omitempty"` +// The ID of the Private DNS Zone Virtual Network Link. +ID *string `json:"id,omitempty" tf:"id,omitempty"` + +// The name of the Private DNS zone (without a terminating dot). Changing this forces a new resource to be created. +PrivateDNSZoneName *string `json:"privateDnsZoneName,omitempty" tf:"private_dns_zone_name,omitempty"` - // Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled? Defaults to false. - RegistrationEnabled *bool `json:"registrationEnabled,omitempty" tf:"registration_enabled,omitempty"` +// Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled? Defaults to false. +RegistrationEnabled *bool `json:"registrationEnabled,omitempty" tf:"registration_enabled,omitempty"` - // Specifies the resource group where the Private DNS Zone exists. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// Specifies the resource group where the Private DNS Zone exists. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // A mapping of tags to assign to the resource. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A mapping of tags to assign to the resource. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - // The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created. - VirtualNetworkID *string `json:"virtualNetworkId,omitempty" tf:"virtual_network_id,omitempty"` +// The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created. +VirtualNetworkID *string `json:"virtualNetworkId,omitempty" tf:"virtual_network_id,omitempty"` } + type PrivateDNSZoneVirtualNetworkLinkParameters struct { - // The name of the Private DNS zone (without a terminating dot). Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/network/v1alpha1.PrivateDNSZone - // +kubebuilder:validation:Optional - PrivateDNSZoneName *string `json:"privateDnsZoneName,omitempty" tf:"private_dns_zone_name,omitempty"` - - // Reference to a PrivateDNSZone in network to populate privateDnsZoneName. - // +kubebuilder:validation:Optional - PrivateDNSZoneNameRef *v1.Reference `json:"privateDnsZoneNameRef,omitempty" tf:"-"` - - // Selector for a PrivateDNSZone in network to populate privateDnsZoneName. - // +kubebuilder:validation:Optional - PrivateDNSZoneNameSelector *v1.Selector `json:"privateDnsZoneNameSelector,omitempty" tf:"-"` - - // Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled? Defaults to false. - // +kubebuilder:validation:Optional - RegistrationEnabled *bool `json:"registrationEnabled,omitempty" tf:"registration_enabled,omitempty"` - - // Specifies the resource group where the Private DNS Zone exists. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - - // A mapping of tags to assign to the resource. - // +kubebuilder:validation:Optional - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - - // The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/network/v1alpha1.VirtualNetwork - // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() - // +kubebuilder:validation:Optional - VirtualNetworkID *string `json:"virtualNetworkId,omitempty" tf:"virtual_network_id,omitempty"` - - // Reference to a VirtualNetwork in network to populate virtualNetworkId. - // +kubebuilder:validation:Optional - VirtualNetworkIDRef *v1.Reference `json:"virtualNetworkIdRef,omitempty" tf:"-"` - - // Selector for a VirtualNetwork in network to populate virtualNetworkId. - // +kubebuilder:validation:Optional - VirtualNetworkIDSelector *v1.Selector `json:"virtualNetworkIdSelector,omitempty" tf:"-"` + +// The name of the Private DNS zone (without a terminating dot). Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/network/v1alpha1.PrivateDNSZone +// +kubebuilder:validation:Optional +PrivateDNSZoneName *string `json:"privateDnsZoneName,omitempty" tf:"private_dns_zone_name,omitempty"` + +// Reference to a PrivateDNSZone in network to populate privateDnsZoneName. +// +kubebuilder:validation:Optional +PrivateDNSZoneNameRef *v1.Reference `json:"privateDnsZoneNameRef,omitempty" tf:"-"` + +// Selector for a PrivateDNSZone in network to populate privateDnsZoneName. +// +kubebuilder:validation:Optional +PrivateDNSZoneNameSelector *v1.Selector `json:"privateDnsZoneNameSelector,omitempty" tf:"-"` + +// Is auto-registration of virtual machine records in the virtual network in the Private DNS zone enabled? Defaults to false. +// +kubebuilder:validation:Optional +RegistrationEnabled *bool `json:"registrationEnabled,omitempty" tf:"registration_enabled,omitempty"` + +// Specifies the resource group where the Private DNS Zone exists. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` + +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` + +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` + +// A mapping of tags to assign to the resource. +// +kubebuilder:validation:Optional +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + +// The ID of the Virtual Network that should be linked to the DNS Zone. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/network/v1alpha1.VirtualNetwork +// +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() +// +kubebuilder:validation:Optional +VirtualNetworkID *string `json:"virtualNetworkId,omitempty" tf:"virtual_network_id,omitempty"` + +// Reference to a VirtualNetwork in network to populate virtualNetworkId. +// +kubebuilder:validation:Optional +VirtualNetworkIDRef *v1.Reference `json:"virtualNetworkIdRef,omitempty" tf:"-"` + +// Selector for a VirtualNetwork in network to populate virtualNetworkId. +// +kubebuilder:validation:Optional +VirtualNetworkIDSelector *v1.Selector `json:"virtualNetworkIdSelector,omitempty" tf:"-"` } // PrivateDNSZoneVirtualNetworkLinkSpec defines the desired state of PrivateDNSZoneVirtualNetworkLink type PrivateDNSZoneVirtualNetworkLinkSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider PrivateDNSZoneVirtualNetworkLinkParameters `json:"forProvider"` + ForProvider PrivateDNSZoneVirtualNetworkLinkParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -112,13 +121,13 @@ type PrivateDNSZoneVirtualNetworkLinkSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider PrivateDNSZoneVirtualNetworkLinkInitParameters `json:"initProvider,omitempty"` + InitProvider PrivateDNSZoneVirtualNetworkLinkInitParameters `json:"initProvider,omitempty"` } // PrivateDNSZoneVirtualNetworkLinkStatus defines the observed state of PrivateDNSZoneVirtualNetworkLink. type PrivateDNSZoneVirtualNetworkLinkStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider PrivateDNSZoneVirtualNetworkLinkObservation `json:"atProvider,omitempty"` + AtProvider PrivateDNSZoneVirtualNetworkLinkObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/network/v1alpha1/zz_routetable_types.go b/apis/network/v1alpha1/zz_routetable_types.go index 1aa7f28..d26ea49 100755 --- a/apis/network/v1alpha1/zz_routetable_types.go +++ b/apis/network/v1alpha1/zz_routetable_types.go @@ -15,132 +15,147 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type RouteInitParameters struct { - // The destination to which the route applies. Can be CIDR (such as 10.1.0.0/16) or Azure Service Tag (such as ApiManagement, AzureBackup or AzureMonitor) format. - AddressPrefix *string `json:"addressPrefix,omitempty" tf:"address_prefix"` - // The name of the route. - Name *string `json:"name,omitempty" tf:"name"` +// The destination to which the route applies. Can be CIDR (such as 10.1.0.0/16) or Azure Service Tag (such as ApiManagement, AzureBackup or AzureMonitor) format. +AddressPrefix *string `json:"addressPrefix,omitempty" tf:"address_prefix"` - // Contains the IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance. - NextHopInIPAddress *string `json:"nextHopInIpAddress,omitempty" tf:"next_hop_in_ip_address"` +// The name of the route. +Name *string `json:"name,omitempty" tf:"name"` - // The type of Azure hop the packet should be sent to. Possible values are VirtualNetworkGateway, VnetLocal, Internet, VirtualAppliance and None. - NextHopType *string `json:"nextHopType,omitempty" tf:"next_hop_type"` +// Contains the IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance. +NextHopInIPAddress *string `json:"nextHopInIpAddress,omitempty" tf:"next_hop_in_ip_address"` + +// The type of Azure hop the packet should be sent to. Possible values are VirtualNetworkGateway, VnetLocal, Internet, VirtualAppliance and None. +NextHopType *string `json:"nextHopType,omitempty" tf:"next_hop_type"` } + type RouteObservation struct { - // The destination to which the route applies. Can be CIDR (such as 10.1.0.0/16) or Azure Service Tag (such as ApiManagement, AzureBackup or AzureMonitor) format. - AddressPrefix *string `json:"addressPrefix,omitempty" tf:"address_prefix,omitempty"` - // The name of the route. - Name *string `json:"name,omitempty" tf:"name,omitempty"` +// The destination to which the route applies. Can be CIDR (such as 10.1.0.0/16) or Azure Service Tag (such as ApiManagement, AzureBackup or AzureMonitor) format. +AddressPrefix *string `json:"addressPrefix,omitempty" tf:"address_prefix,omitempty"` - // Contains the IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance. - NextHopInIPAddress *string `json:"nextHopInIpAddress,omitempty" tf:"next_hop_in_ip_address,omitempty"` +// The name of the route. +Name *string `json:"name,omitempty" tf:"name,omitempty"` - // The type of Azure hop the packet should be sent to. Possible values are VirtualNetworkGateway, VnetLocal, Internet, VirtualAppliance and None. - NextHopType *string `json:"nextHopType,omitempty" tf:"next_hop_type,omitempty"` +// Contains the IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance. +NextHopInIPAddress *string `json:"nextHopInIpAddress,omitempty" tf:"next_hop_in_ip_address,omitempty"` + +// The type of Azure hop the packet should be sent to. Possible values are VirtualNetworkGateway, VnetLocal, Internet, VirtualAppliance and None. +NextHopType *string `json:"nextHopType,omitempty" tf:"next_hop_type,omitempty"` } + type RouteParameters struct { - // The destination to which the route applies. Can be CIDR (such as 10.1.0.0/16) or Azure Service Tag (such as ApiManagement, AzureBackup or AzureMonitor) format. - // +kubebuilder:validation:Optional - AddressPrefix *string `json:"addressPrefix,omitempty" tf:"address_prefix"` - // The name of the route. - // +kubebuilder:validation:Optional - Name *string `json:"name,omitempty" tf:"name"` +// The destination to which the route applies. Can be CIDR (such as 10.1.0.0/16) or Azure Service Tag (such as ApiManagement, AzureBackup or AzureMonitor) format. +// +kubebuilder:validation:Optional +AddressPrefix *string `json:"addressPrefix,omitempty" tf:"address_prefix"` - // Contains the IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance. - // +kubebuilder:validation:Optional - NextHopInIPAddress *string `json:"nextHopInIpAddress,omitempty" tf:"next_hop_in_ip_address"` +// The name of the route. +// +kubebuilder:validation:Optional +Name *string `json:"name,omitempty" tf:"name"` - // The type of Azure hop the packet should be sent to. Possible values are VirtualNetworkGateway, VnetLocal, Internet, VirtualAppliance and None. - // +kubebuilder:validation:Optional - NextHopType *string `json:"nextHopType,omitempty" tf:"next_hop_type"` +// Contains the IP address packets should be forwarded to. Next hop values are only allowed in routes where the next hop type is VirtualAppliance. +// +kubebuilder:validation:Optional +NextHopInIPAddress *string `json:"nextHopInIpAddress,omitempty" tf:"next_hop_in_ip_address"` + +// The type of Azure hop the packet should be sent to. Possible values are VirtualNetworkGateway, VnetLocal, Internet, VirtualAppliance and None. +// +kubebuilder:validation:Optional +NextHopType *string `json:"nextHopType,omitempty" tf:"next_hop_type"` } + type RouteTableInitParameters struct { - // Boolean flag which controls propagation of routes learned by BGP on that route table. True means disable. - DisableBGPRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty" tf:"disable_bgp_route_propagation,omitempty"` - // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// Boolean flag which controls propagation of routes learned by BGP on that route table. True means disable. +DisableBGPRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty" tf:"disable_bgp_route_propagation,omitempty"` - // List of objects representing routes. Each object accepts the arguments documented below. - Route []RouteInitParameters `json:"route,omitempty" tf:"route,omitempty"` +// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // A mapping of tags to assign to the resource. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// List of objects representing routes. Each object accepts the arguments documented below. +Route []RouteInitParameters `json:"route,omitempty" tf:"route,omitempty"` + +// A mapping of tags to assign to the resource. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` } + type RouteTableObservation struct { - // Boolean flag which controls propagation of routes learned by BGP on that route table. True means disable. - DisableBGPRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty" tf:"disable_bgp_route_propagation,omitempty"` - // The Route Table ID. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// Boolean flag which controls propagation of routes learned by BGP on that route table. True means disable. +DisableBGPRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty" tf:"disable_bgp_route_propagation,omitempty"` - // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// The Route Table ID. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The name of the resource group in which to create the route table. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // List of objects representing routes. Each object accepts the arguments documented below. - Route []RouteObservation `json:"route,omitempty" tf:"route,omitempty"` +// The name of the resource group in which to create the route table. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // The collection of Subnets associated with this route table. - Subnets []*string `json:"subnets,omitempty" tf:"subnets,omitempty"` +// List of objects representing routes. Each object accepts the arguments documented below. +Route []RouteObservation `json:"route,omitempty" tf:"route,omitempty"` - // A mapping of tags to assign to the resource. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// The collection of Subnets associated with this route table. +Subnets []*string `json:"subnets,omitempty" tf:"subnets,omitempty"` + +// A mapping of tags to assign to the resource. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` } + type RouteTableParameters struct { - // Boolean flag which controls propagation of routes learned by BGP on that route table. True means disable. - // +kubebuilder:validation:Optional - DisableBGPRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty" tf:"disable_bgp_route_propagation,omitempty"` - // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// Boolean flag which controls propagation of routes learned by BGP on that route table. True means disable. +// +kubebuilder:validation:Optional +DisableBGPRoutePropagation *bool `json:"disableBgpRoutePropagation,omitempty" tf:"disable_bgp_route_propagation,omitempty"` + +// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // The name of the resource group in which to create the route table. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group in which to create the route table. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - // List of objects representing routes. Each object accepts the arguments documented below. - // +kubebuilder:validation:Optional - Route []RouteParameters `json:"route,omitempty" tf:"route,omitempty"` +// List of objects representing routes. Each object accepts the arguments documented below. +// +kubebuilder:validation:Optional +Route []RouteParameters `json:"route,omitempty" tf:"route,omitempty"` - // A mapping of tags to assign to the resource. - // +kubebuilder:validation:Optional - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A mapping of tags to assign to the resource. +// +kubebuilder:validation:Optional +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` } // RouteTableSpec defines the desired state of RouteTable type RouteTableSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider RouteTableParameters `json:"forProvider"` + ForProvider RouteTableParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -151,13 +166,13 @@ type RouteTableSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider RouteTableInitParameters `json:"initProvider,omitempty"` + InitProvider RouteTableInitParameters `json:"initProvider,omitempty"` } // RouteTableStatus defines the observed state of RouteTable. type RouteTableStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider RouteTableObservation `json:"atProvider,omitempty"` + AtProvider RouteTableObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -172,9 +187,9 @@ type RouteTableStatus struct { type RouteTable struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" - Spec RouteTableSpec `json:"spec"` - Status RouteTableStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" + Spec RouteTableSpec `json:"spec"` + Status RouteTableStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/network/v1alpha1/zz_securitygroup_types.go b/apis/network/v1alpha1/zz_securitygroup_types.go index b980371..097a5de 100755 --- a/apis/network/v1alpha1/zz_securitygroup_types.go +++ b/apis/network/v1alpha1/zz_securitygroup_types.go @@ -15,239 +15,254 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type SecurityGroupInitParameters struct { - // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - Location *string `json:"location,omitempty" tf:"location,omitempty"` - // List of objects representing security rules, as defined below. - SecurityRule []SecurityRuleInitParameters `json:"securityRule,omitempty" tf:"security_rule,omitempty"` +// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // A mapping of tags to assign to the resource. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// List of objects representing security rules, as defined below. +SecurityRule []SecurityRuleInitParameters `json:"securityRule,omitempty" tf:"security_rule,omitempty"` + +// A mapping of tags to assign to the resource. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` } + type SecurityGroupObservation struct { - // The ID of the Network Security Group. - ID *string `json:"id,omitempty" tf:"id,omitempty"` - // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// The ID of the Network Security Group. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The name of the resource group in which to create the network security group. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // List of objects representing security rules, as defined below. - SecurityRule []SecurityRuleObservation `json:"securityRule,omitempty" tf:"security_rule,omitempty"` +// The name of the resource group in which to create the network security group. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // A mapping of tags to assign to the resource. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// List of objects representing security rules, as defined below. +SecurityRule []SecurityRuleObservation `json:"securityRule,omitempty" tf:"security_rule,omitempty"` + +// A mapping of tags to assign to the resource. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` } + type SecurityGroupParameters struct { - // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Location *string `json:"location,omitempty" tf:"location,omitempty"` - // The name of the resource group in which to create the network security group. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` +// The name of the resource group in which to create the network security group. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - // List of objects representing security rules, as defined below. - // +kubebuilder:validation:Optional - SecurityRule []SecurityRuleParameters `json:"securityRule,omitempty" tf:"security_rule,omitempty"` +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - // A mapping of tags to assign to the resource. - // +kubebuilder:validation:Optional - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// List of objects representing security rules, as defined below. +// +kubebuilder:validation:Optional +SecurityRule []SecurityRuleParameters `json:"securityRule,omitempty" tf:"security_rule,omitempty"` + +// A mapping of tags to assign to the resource. +// +kubebuilder:validation:Optional +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` } + type SecurityRuleInitParameters struct { - // Specifies whether network traffic is allowed or denied. Possible values are Allow and Deny. - Access *string `json:"access,omitempty" tf:"access"` - // A description for this rule. Restricted to 140 characters. - Description *string `json:"description,omitempty" tf:"description"` +// Specifies whether network traffic is allowed or denied. Possible values are Allow and Deny. +Access *string `json:"access,omitempty" tf:"access"` - // CIDR or destination IP range or * to match any IP. Tags such as VirtualNetwork, AzureLoadBalancer and Internet can also be used. This is required if destination_address_prefixes is not specified. - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty" tf:"destination_address_prefix"` +// A description for this rule. Restricted to 140 characters. +Description *string `json:"description,omitempty" tf:"description"` - // List of destination address prefixes. Tags may not be used. This is required if destination_address_prefix is not specified. - DestinationAddressPrefixes []*string `json:"destinationAddressPrefixes,omitempty" tf:"destination_address_prefixes"` +// CIDR or destination IP range or * to match any IP. Tags such as VirtualNetwork, AzureLoadBalancer and Internet can also be used. This is required if destination_address_prefixes is not specified. +DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty" tf:"destination_address_prefix"` - // A List of destination Application Security Group IDs - DestinationApplicationSecurityGroupIds []*string `json:"destinationApplicationSecurityGroupIds,omitempty" tf:"destination_application_security_group_ids"` +// List of destination address prefixes. Tags may not be used. This is required if destination_address_prefix is not specified. +DestinationAddressPrefixes []*string `json:"destinationAddressPrefixes,omitempty" tf:"destination_address_prefixes"` - // Destination Port or Range. Integer or range between 0 and 65535 or * to match any. This is required if destination_port_ranges is not specified. - DestinationPortRange *string `json:"destinationPortRange,omitempty" tf:"destination_port_range"` +// A List of destination Application Security Group IDs +DestinationApplicationSecurityGroupIds []*string `json:"destinationApplicationSecurityGroupIds,omitempty" tf:"destination_application_security_group_ids"` - // List of destination ports or port ranges. This is required if destination_port_range is not specified. - DestinationPortRanges []*string `json:"destinationPortRanges,omitempty" tf:"destination_port_ranges"` +// Destination Port or Range. Integer or range between 0 and 65535 or * to match any. This is required if destination_port_ranges is not specified. +DestinationPortRange *string `json:"destinationPortRange,omitempty" tf:"destination_port_range"` - // The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values are Inbound and Outbound. - Direction *string `json:"direction,omitempty" tf:"direction"` +// List of destination ports or port ranges. This is required if destination_port_range is not specified. +DestinationPortRanges []*string `json:"destinationPortRanges,omitempty" tf:"destination_port_ranges"` - // The name of the security rule. - Name *string `json:"name,omitempty" tf:"name"` +// The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values are Inbound and Outbound. +Direction *string `json:"direction,omitempty" tf:"direction"` - // Specifies the priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. - Priority *float64 `json:"priority,omitempty" tf:"priority"` +// The name of the security rule. +Name *string `json:"name,omitempty" tf:"name"` - // Network protocol this rule applies to. Possible values include Tcp, Udp, Icmp, Esp, Ah or * (which matches all). - Protocol *string `json:"protocol,omitempty" tf:"protocol"` +// Specifies the priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. +Priority *float64 `json:"priority,omitempty" tf:"priority"` - // CIDR or source IP range or * to match any IP. Tags such as VirtualNetwork, AzureLoadBalancer and Internet can also be used. This is required if source_address_prefixes is not specified. - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty" tf:"source_address_prefix"` +// Network protocol this rule applies to. Possible values include Tcp, Udp, Icmp, Esp, Ah or * (which matches all). +Protocol *string `json:"protocol,omitempty" tf:"protocol"` - // List of source address prefixes. Tags may not be used. This is required if source_address_prefix is not specified. - SourceAddressPrefixes []*string `json:"sourceAddressPrefixes,omitempty" tf:"source_address_prefixes"` +// CIDR or source IP range or * to match any IP. Tags such as VirtualNetwork, AzureLoadBalancer and Internet can also be used. This is required if source_address_prefixes is not specified. +SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty" tf:"source_address_prefix"` - // A List of source Application Security Group IDs - SourceApplicationSecurityGroupIds []*string `json:"sourceApplicationSecurityGroupIds,omitempty" tf:"source_application_security_group_ids"` +// List of source address prefixes. Tags may not be used. This is required if source_address_prefix is not specified. +SourceAddressPrefixes []*string `json:"sourceAddressPrefixes,omitempty" tf:"source_address_prefixes"` - // Source Port or Range. Integer or range between 0 and 65535 or * to match any. This is required if source_port_ranges is not specified. - SourcePortRange *string `json:"sourcePortRange,omitempty" tf:"source_port_range"` +// A List of source Application Security Group IDs +SourceApplicationSecurityGroupIds []*string `json:"sourceApplicationSecurityGroupIds,omitempty" tf:"source_application_security_group_ids"` - // List of source ports or port ranges. This is required if source_port_range is not specified. - SourcePortRanges []*string `json:"sourcePortRanges,omitempty" tf:"source_port_ranges"` +// Source Port or Range. Integer or range between 0 and 65535 or * to match any. This is required if source_port_ranges is not specified. +SourcePortRange *string `json:"sourcePortRange,omitempty" tf:"source_port_range"` + +// List of source ports or port ranges. This is required if source_port_range is not specified. +SourcePortRanges []*string `json:"sourcePortRanges,omitempty" tf:"source_port_ranges"` } + type SecurityRuleObservation struct { - // Specifies whether network traffic is allowed or denied. Possible values are Allow and Deny. - Access *string `json:"access,omitempty" tf:"access,omitempty"` - // A description for this rule. Restricted to 140 characters. - Description *string `json:"description,omitempty" tf:"description,omitempty"` +// Specifies whether network traffic is allowed or denied. Possible values are Allow and Deny. +Access *string `json:"access,omitempty" tf:"access,omitempty"` - // CIDR or destination IP range or * to match any IP. Tags such as VirtualNetwork, AzureLoadBalancer and Internet can also be used. This is required if destination_address_prefixes is not specified. - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty" tf:"destination_address_prefix,omitempty"` +// A description for this rule. Restricted to 140 characters. +Description *string `json:"description,omitempty" tf:"description,omitempty"` - // List of destination address prefixes. Tags may not be used. This is required if destination_address_prefix is not specified. - DestinationAddressPrefixes []*string `json:"destinationAddressPrefixes,omitempty" tf:"destination_address_prefixes,omitempty"` +// CIDR or destination IP range or * to match any IP. Tags such as VirtualNetwork, AzureLoadBalancer and Internet can also be used. This is required if destination_address_prefixes is not specified. +DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty" tf:"destination_address_prefix,omitempty"` - // A List of destination Application Security Group IDs - DestinationApplicationSecurityGroupIds []*string `json:"destinationApplicationSecurityGroupIds,omitempty" tf:"destination_application_security_group_ids,omitempty"` +// List of destination address prefixes. Tags may not be used. This is required if destination_address_prefix is not specified. +DestinationAddressPrefixes []*string `json:"destinationAddressPrefixes,omitempty" tf:"destination_address_prefixes,omitempty"` - // Destination Port or Range. Integer or range between 0 and 65535 or * to match any. This is required if destination_port_ranges is not specified. - DestinationPortRange *string `json:"destinationPortRange,omitempty" tf:"destination_port_range,omitempty"` +// A List of destination Application Security Group IDs +DestinationApplicationSecurityGroupIds []*string `json:"destinationApplicationSecurityGroupIds,omitempty" tf:"destination_application_security_group_ids,omitempty"` - // List of destination ports or port ranges. This is required if destination_port_range is not specified. - DestinationPortRanges []*string `json:"destinationPortRanges,omitempty" tf:"destination_port_ranges,omitempty"` +// Destination Port or Range. Integer or range between 0 and 65535 or * to match any. This is required if destination_port_ranges is not specified. +DestinationPortRange *string `json:"destinationPortRange,omitempty" tf:"destination_port_range,omitempty"` - // The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values are Inbound and Outbound. - Direction *string `json:"direction,omitempty" tf:"direction,omitempty"` +// List of destination ports or port ranges. This is required if destination_port_range is not specified. +DestinationPortRanges []*string `json:"destinationPortRanges,omitempty" tf:"destination_port_ranges,omitempty"` - // The name of the security rule. - Name *string `json:"name,omitempty" tf:"name,omitempty"` +// The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values are Inbound and Outbound. +Direction *string `json:"direction,omitempty" tf:"direction,omitempty"` - // Specifies the priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. - Priority *float64 `json:"priority,omitempty" tf:"priority,omitempty"` +// The name of the security rule. +Name *string `json:"name,omitempty" tf:"name,omitempty"` - // Network protocol this rule applies to. Possible values include Tcp, Udp, Icmp, Esp, Ah or * (which matches all). - Protocol *string `json:"protocol,omitempty" tf:"protocol,omitempty"` +// Specifies the priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. +Priority *float64 `json:"priority,omitempty" tf:"priority,omitempty"` - // CIDR or source IP range or * to match any IP. Tags such as VirtualNetwork, AzureLoadBalancer and Internet can also be used. This is required if source_address_prefixes is not specified. - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty" tf:"source_address_prefix,omitempty"` +// Network protocol this rule applies to. Possible values include Tcp, Udp, Icmp, Esp, Ah or * (which matches all). +Protocol *string `json:"protocol,omitempty" tf:"protocol,omitempty"` - // List of source address prefixes. Tags may not be used. This is required if source_address_prefix is not specified. - SourceAddressPrefixes []*string `json:"sourceAddressPrefixes,omitempty" tf:"source_address_prefixes,omitempty"` +// CIDR or source IP range or * to match any IP. Tags such as VirtualNetwork, AzureLoadBalancer and Internet can also be used. This is required if source_address_prefixes is not specified. +SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty" tf:"source_address_prefix,omitempty"` - // A List of source Application Security Group IDs - SourceApplicationSecurityGroupIds []*string `json:"sourceApplicationSecurityGroupIds,omitempty" tf:"source_application_security_group_ids,omitempty"` +// List of source address prefixes. Tags may not be used. This is required if source_address_prefix is not specified. +SourceAddressPrefixes []*string `json:"sourceAddressPrefixes,omitempty" tf:"source_address_prefixes,omitempty"` - // Source Port or Range. Integer or range between 0 and 65535 or * to match any. This is required if source_port_ranges is not specified. - SourcePortRange *string `json:"sourcePortRange,omitempty" tf:"source_port_range,omitempty"` +// A List of source Application Security Group IDs +SourceApplicationSecurityGroupIds []*string `json:"sourceApplicationSecurityGroupIds,omitempty" tf:"source_application_security_group_ids,omitempty"` - // List of source ports or port ranges. This is required if source_port_range is not specified. - SourcePortRanges []*string `json:"sourcePortRanges,omitempty" tf:"source_port_ranges,omitempty"` +// Source Port or Range. Integer or range between 0 and 65535 or * to match any. This is required if source_port_ranges is not specified. +SourcePortRange *string `json:"sourcePortRange,omitempty" tf:"source_port_range,omitempty"` + +// List of source ports or port ranges. This is required if source_port_range is not specified. +SourcePortRanges []*string `json:"sourcePortRanges,omitempty" tf:"source_port_ranges,omitempty"` } + type SecurityRuleParameters struct { - // Specifies whether network traffic is allowed or denied. Possible values are Allow and Deny. - // +kubebuilder:validation:Optional - Access *string `json:"access,omitempty" tf:"access"` - // A description for this rule. Restricted to 140 characters. - // +kubebuilder:validation:Optional - Description *string `json:"description,omitempty" tf:"description"` +// Specifies whether network traffic is allowed or denied. Possible values are Allow and Deny. +// +kubebuilder:validation:Optional +Access *string `json:"access,omitempty" tf:"access"` + +// A description for this rule. Restricted to 140 characters. +// +kubebuilder:validation:Optional +Description *string `json:"description,omitempty" tf:"description"` - // CIDR or destination IP range or * to match any IP. Tags such as VirtualNetwork, AzureLoadBalancer and Internet can also be used. This is required if destination_address_prefixes is not specified. - // +kubebuilder:validation:Optional - DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty" tf:"destination_address_prefix"` +// CIDR or destination IP range or * to match any IP. Tags such as VirtualNetwork, AzureLoadBalancer and Internet can also be used. This is required if destination_address_prefixes is not specified. +// +kubebuilder:validation:Optional +DestinationAddressPrefix *string `json:"destinationAddressPrefix,omitempty" tf:"destination_address_prefix"` - // List of destination address prefixes. Tags may not be used. This is required if destination_address_prefix is not specified. - // +kubebuilder:validation:Optional - DestinationAddressPrefixes []*string `json:"destinationAddressPrefixes,omitempty" tf:"destination_address_prefixes"` +// List of destination address prefixes. Tags may not be used. This is required if destination_address_prefix is not specified. +// +kubebuilder:validation:Optional +DestinationAddressPrefixes []*string `json:"destinationAddressPrefixes,omitempty" tf:"destination_address_prefixes"` - // A List of destination Application Security Group IDs - // +kubebuilder:validation:Optional - DestinationApplicationSecurityGroupIds []*string `json:"destinationApplicationSecurityGroupIds,omitempty" tf:"destination_application_security_group_ids"` +// A List of destination Application Security Group IDs +// +kubebuilder:validation:Optional +DestinationApplicationSecurityGroupIds []*string `json:"destinationApplicationSecurityGroupIds,omitempty" tf:"destination_application_security_group_ids"` - // Destination Port or Range. Integer or range between 0 and 65535 or * to match any. This is required if destination_port_ranges is not specified. - // +kubebuilder:validation:Optional - DestinationPortRange *string `json:"destinationPortRange,omitempty" tf:"destination_port_range"` +// Destination Port or Range. Integer or range between 0 and 65535 or * to match any. This is required if destination_port_ranges is not specified. +// +kubebuilder:validation:Optional +DestinationPortRange *string `json:"destinationPortRange,omitempty" tf:"destination_port_range"` - // List of destination ports or port ranges. This is required if destination_port_range is not specified. - // +kubebuilder:validation:Optional - DestinationPortRanges []*string `json:"destinationPortRanges,omitempty" tf:"destination_port_ranges"` +// List of destination ports or port ranges. This is required if destination_port_range is not specified. +// +kubebuilder:validation:Optional +DestinationPortRanges []*string `json:"destinationPortRanges,omitempty" tf:"destination_port_ranges"` - // The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values are Inbound and Outbound. - // +kubebuilder:validation:Optional - Direction *string `json:"direction,omitempty" tf:"direction"` +// The direction specifies if rule will be evaluated on incoming or outgoing traffic. Possible values are Inbound and Outbound. +// +kubebuilder:validation:Optional +Direction *string `json:"direction,omitempty" tf:"direction"` - // The name of the security rule. - // +kubebuilder:validation:Optional - Name *string `json:"name,omitempty" tf:"name"` +// The name of the security rule. +// +kubebuilder:validation:Optional +Name *string `json:"name,omitempty" tf:"name"` - // Specifies the priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. - // +kubebuilder:validation:Optional - Priority *float64 `json:"priority,omitempty" tf:"priority"` +// Specifies the priority of the rule. The value can be between 100 and 4096. The priority number must be unique for each rule in the collection. The lower the priority number, the higher the priority of the rule. +// +kubebuilder:validation:Optional +Priority *float64 `json:"priority,omitempty" tf:"priority"` - // Network protocol this rule applies to. Possible values include Tcp, Udp, Icmp, Esp, Ah or * (which matches all). - // +kubebuilder:validation:Optional - Protocol *string `json:"protocol,omitempty" tf:"protocol"` +// Network protocol this rule applies to. Possible values include Tcp, Udp, Icmp, Esp, Ah or * (which matches all). +// +kubebuilder:validation:Optional +Protocol *string `json:"protocol,omitempty" tf:"protocol"` - // CIDR or source IP range or * to match any IP. Tags such as VirtualNetwork, AzureLoadBalancer and Internet can also be used. This is required if source_address_prefixes is not specified. - // +kubebuilder:validation:Optional - SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty" tf:"source_address_prefix"` +// CIDR or source IP range or * to match any IP. Tags such as VirtualNetwork, AzureLoadBalancer and Internet can also be used. This is required if source_address_prefixes is not specified. +// +kubebuilder:validation:Optional +SourceAddressPrefix *string `json:"sourceAddressPrefix,omitempty" tf:"source_address_prefix"` - // List of source address prefixes. Tags may not be used. This is required if source_address_prefix is not specified. - // +kubebuilder:validation:Optional - SourceAddressPrefixes []*string `json:"sourceAddressPrefixes,omitempty" tf:"source_address_prefixes"` +// List of source address prefixes. Tags may not be used. This is required if source_address_prefix is not specified. +// +kubebuilder:validation:Optional +SourceAddressPrefixes []*string `json:"sourceAddressPrefixes,omitempty" tf:"source_address_prefixes"` - // A List of source Application Security Group IDs - // +kubebuilder:validation:Optional - SourceApplicationSecurityGroupIds []*string `json:"sourceApplicationSecurityGroupIds,omitempty" tf:"source_application_security_group_ids"` +// A List of source Application Security Group IDs +// +kubebuilder:validation:Optional +SourceApplicationSecurityGroupIds []*string `json:"sourceApplicationSecurityGroupIds,omitempty" tf:"source_application_security_group_ids"` - // Source Port or Range. Integer or range between 0 and 65535 or * to match any. This is required if source_port_ranges is not specified. - // +kubebuilder:validation:Optional - SourcePortRange *string `json:"sourcePortRange,omitempty" tf:"source_port_range"` +// Source Port or Range. Integer or range between 0 and 65535 or * to match any. This is required if source_port_ranges is not specified. +// +kubebuilder:validation:Optional +SourcePortRange *string `json:"sourcePortRange,omitempty" tf:"source_port_range"` - // List of source ports or port ranges. This is required if source_port_range is not specified. - // +kubebuilder:validation:Optional - SourcePortRanges []*string `json:"sourcePortRanges,omitempty" tf:"source_port_ranges"` +// List of source ports or port ranges. This is required if source_port_range is not specified. +// +kubebuilder:validation:Optional +SourcePortRanges []*string `json:"sourcePortRanges,omitempty" tf:"source_port_ranges"` } // SecurityGroupSpec defines the desired state of SecurityGroup type SecurityGroupSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider SecurityGroupParameters `json:"forProvider"` + ForProvider SecurityGroupParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -258,13 +273,13 @@ type SecurityGroupSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider SecurityGroupInitParameters `json:"initProvider,omitempty"` + InitProvider SecurityGroupInitParameters `json:"initProvider,omitempty"` } // SecurityGroupStatus defines the observed state of SecurityGroup. type SecurityGroupStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider SecurityGroupObservation `json:"atProvider,omitempty"` + AtProvider SecurityGroupObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -279,9 +294,9 @@ type SecurityGroupStatus struct { type SecurityGroup struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" - Spec SecurityGroupSpec `json:"spec"` - Status SecurityGroupStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" + Spec SecurityGroupSpec `json:"spec"` + Status SecurityGroupStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/network/v1alpha1/zz_subnet_types.go b/apis/network/v1alpha1/zz_subnet_types.go index 7e86940..88d6751 100755 --- a/apis/network/v1alpha1/zz_subnet_types.go +++ b/apis/network/v1alpha1/zz_subnet_types.go @@ -15,188 +15,209 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type DelegationInitParameters struct { - // A name for this delegation. - Name *string `json:"name,omitempty" tf:"name,omitempty"` - // A service_delegation block as defined below. - ServiceDelegation []ServiceDelegationInitParameters `json:"serviceDelegation,omitempty" tf:"service_delegation,omitempty"` +// A name for this delegation. +Name *string `json:"name,omitempty" tf:"name,omitempty"` + +// A service_delegation block as defined below. +ServiceDelegation []ServiceDelegationInitParameters `json:"serviceDelegation,omitempty" tf:"service_delegation,omitempty"` } + type DelegationObservation struct { - // A name for this delegation. - Name *string `json:"name,omitempty" tf:"name,omitempty"` - // A service_delegation block as defined below. - ServiceDelegation []ServiceDelegationObservation `json:"serviceDelegation,omitempty" tf:"service_delegation,omitempty"` +// A name for this delegation. +Name *string `json:"name,omitempty" tf:"name,omitempty"` + +// A service_delegation block as defined below. +ServiceDelegation []ServiceDelegationObservation `json:"serviceDelegation,omitempty" tf:"service_delegation,omitempty"` } + type DelegationParameters struct { - // A name for this delegation. - // +kubebuilder:validation:Optional - Name *string `json:"name" tf:"name,omitempty"` - // A service_delegation block as defined below. - // +kubebuilder:validation:Optional - ServiceDelegation []ServiceDelegationParameters `json:"serviceDelegation" tf:"service_delegation,omitempty"` +// A name for this delegation. +// +kubebuilder:validation:Optional +Name *string `json:"name" tf:"name,omitempty"` + +// A service_delegation block as defined below. +// +kubebuilder:validation:Optional +ServiceDelegation []ServiceDelegationParameters `json:"serviceDelegation" tf:"service_delegation,omitempty"` } + type ServiceDelegationInitParameters struct { - // A list of Actions which should be delegated. This list is specific to the service to delegate to. Possible values are Microsoft.Network/networkinterfaces/*, Microsoft.Network/publicIPAddresses/join/action, Microsoft.Network/publicIPAddresses/read, Microsoft.Network/virtualNetworks/read, Microsoft.Network/virtualNetworks/subnets/action, Microsoft.Network/virtualNetworks/subnets/join/action, Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action, and Microsoft.Network/virtualNetworks/subnets/unprepareNetworkPolicies/action. - Actions []*string `json:"actions,omitempty" tf:"actions,omitempty"` - // The name of service to delegate to. Possible values are GitHub.Network/networkSettings, Microsoft.ApiManagement/service, Microsoft.Apollo/npu, Microsoft.App/environments, Microsoft.App/testClients, Microsoft.AVS/PrivateClouds, Microsoft.AzureCosmosDB/clusters, Microsoft.BareMetal/AzureHostedService, Microsoft.BareMetal/AzureHPC, Microsoft.BareMetal/AzurePaymentHSM, Microsoft.BareMetal/AzureVMware, Microsoft.BareMetal/CrayServers, Microsoft.BareMetal/MonitoringServers, Microsoft.Batch/batchAccounts, Microsoft.CloudTest/hostedpools, Microsoft.CloudTest/images, Microsoft.CloudTest/pools, Microsoft.Codespaces/plans, Microsoft.ContainerInstance/containerGroups, Microsoft.ContainerService/managedClusters, Microsoft.ContainerService/TestClients, Microsoft.Databricks/workspaces, Microsoft.DBforMySQL/flexibleServers, Microsoft.DBforMySQL/servers, Microsoft.DBforMySQL/serversv2, Microsoft.DBforPostgreSQL/flexibleServers, Microsoft.DBforPostgreSQL/serversv2, Microsoft.DBforPostgreSQL/singleServers, Microsoft.DelegatedNetwork/controller, Microsoft.DevCenter/networkConnection, Microsoft.DocumentDB/cassandraClusters, Microsoft.Fidalgo/networkSettings, Microsoft.HardwareSecurityModules/dedicatedHSMs, Microsoft.Kusto/clusters, Microsoft.LabServices/labplans, Microsoft.Logic/integrationServiceEnvironments, Microsoft.MachineLearningServices/workspaces, Microsoft.Netapp/volumes, Microsoft.Network/dnsResolvers, Microsoft.Network/fpgaNetworkInterfaces, Microsoft.Network/networkWatchers., Microsoft.Network/virtualNetworkGateways, Microsoft.Orbital/orbitalGateways, Microsoft.PowerPlatform/enterprisePolicies, Microsoft.PowerPlatform/vnetaccesslinks, Microsoft.ServiceFabricMesh/networks, Microsoft.ServiceNetworking/trafficControllers, Microsoft.Singularity/accounts/networks, Microsoft.Singularity/accounts/npu, Microsoft.Sql/managedInstances, Microsoft.Sql/managedInstancesOnebox, Microsoft.Sql/managedInstancesStage, Microsoft.Sql/managedInstancesTest, Microsoft.StoragePool/diskPools, Microsoft.StreamAnalytics/streamingJobs, Microsoft.Synapse/workspaces, Microsoft.Web/hostingEnvironments, Microsoft.Web/serverFarms, NGINX.NGINXPLUS/nginxDeployments, PaloAltoNetworks.Cloudngfw/firewalls, and Qumulo.Storage/fileSystems. - Name *string `json:"name,omitempty" tf:"name,omitempty"` +// A list of Actions which should be delegated. This list is specific to the service to delegate to. Possible values are Microsoft.Network/networkinterfaces/*, Microsoft.Network/publicIPAddresses/join/action, Microsoft.Network/publicIPAddresses/read, Microsoft.Network/virtualNetworks/read, Microsoft.Network/virtualNetworks/subnets/action, Microsoft.Network/virtualNetworks/subnets/join/action, Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action, and Microsoft.Network/virtualNetworks/subnets/unprepareNetworkPolicies/action. +Actions []*string `json:"actions,omitempty" tf:"actions,omitempty"` + +// The name of service to delegate to. Possible values are GitHub.Network/networkSettings, Microsoft.ApiManagement/service, Microsoft.Apollo/npu, Microsoft.App/environments, Microsoft.App/testClients, Microsoft.AVS/PrivateClouds, Microsoft.AzureCosmosDB/clusters, Microsoft.BareMetal/AzureHostedService, Microsoft.BareMetal/AzureHPC, Microsoft.BareMetal/AzurePaymentHSM, Microsoft.BareMetal/AzureVMware, Microsoft.BareMetal/CrayServers, Microsoft.BareMetal/MonitoringServers, Microsoft.Batch/batchAccounts, Microsoft.CloudTest/hostedpools, Microsoft.CloudTest/images, Microsoft.CloudTest/pools, Microsoft.Codespaces/plans, Microsoft.ContainerInstance/containerGroups, Microsoft.ContainerService/managedClusters, Microsoft.ContainerService/TestClients, Microsoft.Databricks/workspaces, Microsoft.DBforMySQL/flexibleServers, Microsoft.DBforMySQL/servers, Microsoft.DBforMySQL/serversv2, Microsoft.DBforPostgreSQL/flexibleServers, Microsoft.DBforPostgreSQL/serversv2, Microsoft.DBforPostgreSQL/singleServers, Microsoft.DelegatedNetwork/controller, Microsoft.DevCenter/networkConnection, Microsoft.DocumentDB/cassandraClusters, Microsoft.Fidalgo/networkSettings, Microsoft.HardwareSecurityModules/dedicatedHSMs, Microsoft.Kusto/clusters, Microsoft.LabServices/labplans, Microsoft.Logic/integrationServiceEnvironments, Microsoft.MachineLearningServices/workspaces, Microsoft.Netapp/volumes, Microsoft.Network/dnsResolvers, Microsoft.Network/fpgaNetworkInterfaces, Microsoft.Network/networkWatchers., Microsoft.Network/virtualNetworkGateways, Microsoft.Orbital/orbitalGateways, Microsoft.PowerPlatform/enterprisePolicies, Microsoft.PowerPlatform/vnetaccesslinks, Microsoft.ServiceFabricMesh/networks, Microsoft.ServiceNetworking/trafficControllers, Microsoft.Singularity/accounts/networks, Microsoft.Singularity/accounts/npu, Microsoft.Sql/managedInstances, Microsoft.Sql/managedInstancesOnebox, Microsoft.Sql/managedInstancesStage, Microsoft.Sql/managedInstancesTest, Microsoft.StoragePool/diskPools, Microsoft.StreamAnalytics/streamingJobs, Microsoft.Synapse/workspaces, Microsoft.Web/hostingEnvironments, Microsoft.Web/serverFarms, NGINX.NGINXPLUS/nginxDeployments, PaloAltoNetworks.Cloudngfw/firewalls, and Qumulo.Storage/fileSystems. +Name *string `json:"name,omitempty" tf:"name,omitempty"` } + type ServiceDelegationObservation struct { - // A list of Actions which should be delegated. This list is specific to the service to delegate to. Possible values are Microsoft.Network/networkinterfaces/*, Microsoft.Network/publicIPAddresses/join/action, Microsoft.Network/publicIPAddresses/read, Microsoft.Network/virtualNetworks/read, Microsoft.Network/virtualNetworks/subnets/action, Microsoft.Network/virtualNetworks/subnets/join/action, Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action, and Microsoft.Network/virtualNetworks/subnets/unprepareNetworkPolicies/action. - Actions []*string `json:"actions,omitempty" tf:"actions,omitempty"` - // The name of service to delegate to. Possible values are GitHub.Network/networkSettings, Microsoft.ApiManagement/service, Microsoft.Apollo/npu, Microsoft.App/environments, Microsoft.App/testClients, Microsoft.AVS/PrivateClouds, Microsoft.AzureCosmosDB/clusters, Microsoft.BareMetal/AzureHostedService, Microsoft.BareMetal/AzureHPC, Microsoft.BareMetal/AzurePaymentHSM, Microsoft.BareMetal/AzureVMware, Microsoft.BareMetal/CrayServers, Microsoft.BareMetal/MonitoringServers, Microsoft.Batch/batchAccounts, Microsoft.CloudTest/hostedpools, Microsoft.CloudTest/images, Microsoft.CloudTest/pools, Microsoft.Codespaces/plans, Microsoft.ContainerInstance/containerGroups, Microsoft.ContainerService/managedClusters, Microsoft.ContainerService/TestClients, Microsoft.Databricks/workspaces, Microsoft.DBforMySQL/flexibleServers, Microsoft.DBforMySQL/servers, Microsoft.DBforMySQL/serversv2, Microsoft.DBforPostgreSQL/flexibleServers, Microsoft.DBforPostgreSQL/serversv2, Microsoft.DBforPostgreSQL/singleServers, Microsoft.DelegatedNetwork/controller, Microsoft.DevCenter/networkConnection, Microsoft.DocumentDB/cassandraClusters, Microsoft.Fidalgo/networkSettings, Microsoft.HardwareSecurityModules/dedicatedHSMs, Microsoft.Kusto/clusters, Microsoft.LabServices/labplans, Microsoft.Logic/integrationServiceEnvironments, Microsoft.MachineLearningServices/workspaces, Microsoft.Netapp/volumes, Microsoft.Network/dnsResolvers, Microsoft.Network/fpgaNetworkInterfaces, Microsoft.Network/networkWatchers., Microsoft.Network/virtualNetworkGateways, Microsoft.Orbital/orbitalGateways, Microsoft.PowerPlatform/enterprisePolicies, Microsoft.PowerPlatform/vnetaccesslinks, Microsoft.ServiceFabricMesh/networks, Microsoft.ServiceNetworking/trafficControllers, Microsoft.Singularity/accounts/networks, Microsoft.Singularity/accounts/npu, Microsoft.Sql/managedInstances, Microsoft.Sql/managedInstancesOnebox, Microsoft.Sql/managedInstancesStage, Microsoft.Sql/managedInstancesTest, Microsoft.StoragePool/diskPools, Microsoft.StreamAnalytics/streamingJobs, Microsoft.Synapse/workspaces, Microsoft.Web/hostingEnvironments, Microsoft.Web/serverFarms, NGINX.NGINXPLUS/nginxDeployments, PaloAltoNetworks.Cloudngfw/firewalls, and Qumulo.Storage/fileSystems. - Name *string `json:"name,omitempty" tf:"name,omitempty"` +// A list of Actions which should be delegated. This list is specific to the service to delegate to. Possible values are Microsoft.Network/networkinterfaces/*, Microsoft.Network/publicIPAddresses/join/action, Microsoft.Network/publicIPAddresses/read, Microsoft.Network/virtualNetworks/read, Microsoft.Network/virtualNetworks/subnets/action, Microsoft.Network/virtualNetworks/subnets/join/action, Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action, and Microsoft.Network/virtualNetworks/subnets/unprepareNetworkPolicies/action. +Actions []*string `json:"actions,omitempty" tf:"actions,omitempty"` + +// The name of service to delegate to. Possible values are GitHub.Network/networkSettings, Microsoft.ApiManagement/service, Microsoft.Apollo/npu, Microsoft.App/environments, Microsoft.App/testClients, Microsoft.AVS/PrivateClouds, Microsoft.AzureCosmosDB/clusters, Microsoft.BareMetal/AzureHostedService, Microsoft.BareMetal/AzureHPC, Microsoft.BareMetal/AzurePaymentHSM, Microsoft.BareMetal/AzureVMware, Microsoft.BareMetal/CrayServers, Microsoft.BareMetal/MonitoringServers, Microsoft.Batch/batchAccounts, Microsoft.CloudTest/hostedpools, Microsoft.CloudTest/images, Microsoft.CloudTest/pools, Microsoft.Codespaces/plans, Microsoft.ContainerInstance/containerGroups, Microsoft.ContainerService/managedClusters, Microsoft.ContainerService/TestClients, Microsoft.Databricks/workspaces, Microsoft.DBforMySQL/flexibleServers, Microsoft.DBforMySQL/servers, Microsoft.DBforMySQL/serversv2, Microsoft.DBforPostgreSQL/flexibleServers, Microsoft.DBforPostgreSQL/serversv2, Microsoft.DBforPostgreSQL/singleServers, Microsoft.DelegatedNetwork/controller, Microsoft.DevCenter/networkConnection, Microsoft.DocumentDB/cassandraClusters, Microsoft.Fidalgo/networkSettings, Microsoft.HardwareSecurityModules/dedicatedHSMs, Microsoft.Kusto/clusters, Microsoft.LabServices/labplans, Microsoft.Logic/integrationServiceEnvironments, Microsoft.MachineLearningServices/workspaces, Microsoft.Netapp/volumes, Microsoft.Network/dnsResolvers, Microsoft.Network/fpgaNetworkInterfaces, Microsoft.Network/networkWatchers., Microsoft.Network/virtualNetworkGateways, Microsoft.Orbital/orbitalGateways, Microsoft.PowerPlatform/enterprisePolicies, Microsoft.PowerPlatform/vnetaccesslinks, Microsoft.ServiceFabricMesh/networks, Microsoft.ServiceNetworking/trafficControllers, Microsoft.Singularity/accounts/networks, Microsoft.Singularity/accounts/npu, Microsoft.Sql/managedInstances, Microsoft.Sql/managedInstancesOnebox, Microsoft.Sql/managedInstancesStage, Microsoft.Sql/managedInstancesTest, Microsoft.StoragePool/diskPools, Microsoft.StreamAnalytics/streamingJobs, Microsoft.Synapse/workspaces, Microsoft.Web/hostingEnvironments, Microsoft.Web/serverFarms, NGINX.NGINXPLUS/nginxDeployments, PaloAltoNetworks.Cloudngfw/firewalls, and Qumulo.Storage/fileSystems. +Name *string `json:"name,omitempty" tf:"name,omitempty"` } + type ServiceDelegationParameters struct { - // A list of Actions which should be delegated. This list is specific to the service to delegate to. Possible values are Microsoft.Network/networkinterfaces/*, Microsoft.Network/publicIPAddresses/join/action, Microsoft.Network/publicIPAddresses/read, Microsoft.Network/virtualNetworks/read, Microsoft.Network/virtualNetworks/subnets/action, Microsoft.Network/virtualNetworks/subnets/join/action, Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action, and Microsoft.Network/virtualNetworks/subnets/unprepareNetworkPolicies/action. - // +kubebuilder:validation:Optional - Actions []*string `json:"actions,omitempty" tf:"actions,omitempty"` - // The name of service to delegate to. Possible values are GitHub.Network/networkSettings, Microsoft.ApiManagement/service, Microsoft.Apollo/npu, Microsoft.App/environments, Microsoft.App/testClients, Microsoft.AVS/PrivateClouds, Microsoft.AzureCosmosDB/clusters, Microsoft.BareMetal/AzureHostedService, Microsoft.BareMetal/AzureHPC, Microsoft.BareMetal/AzurePaymentHSM, Microsoft.BareMetal/AzureVMware, Microsoft.BareMetal/CrayServers, Microsoft.BareMetal/MonitoringServers, Microsoft.Batch/batchAccounts, Microsoft.CloudTest/hostedpools, Microsoft.CloudTest/images, Microsoft.CloudTest/pools, Microsoft.Codespaces/plans, Microsoft.ContainerInstance/containerGroups, Microsoft.ContainerService/managedClusters, Microsoft.ContainerService/TestClients, Microsoft.Databricks/workspaces, Microsoft.DBforMySQL/flexibleServers, Microsoft.DBforMySQL/servers, Microsoft.DBforMySQL/serversv2, Microsoft.DBforPostgreSQL/flexibleServers, Microsoft.DBforPostgreSQL/serversv2, Microsoft.DBforPostgreSQL/singleServers, Microsoft.DelegatedNetwork/controller, Microsoft.DevCenter/networkConnection, Microsoft.DocumentDB/cassandraClusters, Microsoft.Fidalgo/networkSettings, Microsoft.HardwareSecurityModules/dedicatedHSMs, Microsoft.Kusto/clusters, Microsoft.LabServices/labplans, Microsoft.Logic/integrationServiceEnvironments, Microsoft.MachineLearningServices/workspaces, Microsoft.Netapp/volumes, Microsoft.Network/dnsResolvers, Microsoft.Network/fpgaNetworkInterfaces, Microsoft.Network/networkWatchers., Microsoft.Network/virtualNetworkGateways, Microsoft.Orbital/orbitalGateways, Microsoft.PowerPlatform/enterprisePolicies, Microsoft.PowerPlatform/vnetaccesslinks, Microsoft.ServiceFabricMesh/networks, Microsoft.ServiceNetworking/trafficControllers, Microsoft.Singularity/accounts/networks, Microsoft.Singularity/accounts/npu, Microsoft.Sql/managedInstances, Microsoft.Sql/managedInstancesOnebox, Microsoft.Sql/managedInstancesStage, Microsoft.Sql/managedInstancesTest, Microsoft.StoragePool/diskPools, Microsoft.StreamAnalytics/streamingJobs, Microsoft.Synapse/workspaces, Microsoft.Web/hostingEnvironments, Microsoft.Web/serverFarms, NGINX.NGINXPLUS/nginxDeployments, PaloAltoNetworks.Cloudngfw/firewalls, and Qumulo.Storage/fileSystems. - // +kubebuilder:validation:Optional - Name *string `json:"name" tf:"name,omitempty"` +// A list of Actions which should be delegated. This list is specific to the service to delegate to. Possible values are Microsoft.Network/networkinterfaces/*, Microsoft.Network/publicIPAddresses/join/action, Microsoft.Network/publicIPAddresses/read, Microsoft.Network/virtualNetworks/read, Microsoft.Network/virtualNetworks/subnets/action, Microsoft.Network/virtualNetworks/subnets/join/action, Microsoft.Network/virtualNetworks/subnets/prepareNetworkPolicies/action, and Microsoft.Network/virtualNetworks/subnets/unprepareNetworkPolicies/action. +// +kubebuilder:validation:Optional +Actions []*string `json:"actions,omitempty" tf:"actions,omitempty"` + +// The name of service to delegate to. Possible values are GitHub.Network/networkSettings, Microsoft.ApiManagement/service, Microsoft.Apollo/npu, Microsoft.App/environments, Microsoft.App/testClients, Microsoft.AVS/PrivateClouds, Microsoft.AzureCosmosDB/clusters, Microsoft.BareMetal/AzureHostedService, Microsoft.BareMetal/AzureHPC, Microsoft.BareMetal/AzurePaymentHSM, Microsoft.BareMetal/AzureVMware, Microsoft.BareMetal/CrayServers, Microsoft.BareMetal/MonitoringServers, Microsoft.Batch/batchAccounts, Microsoft.CloudTest/hostedpools, Microsoft.CloudTest/images, Microsoft.CloudTest/pools, Microsoft.Codespaces/plans, Microsoft.ContainerInstance/containerGroups, Microsoft.ContainerService/managedClusters, Microsoft.ContainerService/TestClients, Microsoft.Databricks/workspaces, Microsoft.DBforMySQL/flexibleServers, Microsoft.DBforMySQL/servers, Microsoft.DBforMySQL/serversv2, Microsoft.DBforPostgreSQL/flexibleServers, Microsoft.DBforPostgreSQL/serversv2, Microsoft.DBforPostgreSQL/singleServers, Microsoft.DelegatedNetwork/controller, Microsoft.DevCenter/networkConnection, Microsoft.DocumentDB/cassandraClusters, Microsoft.Fidalgo/networkSettings, Microsoft.HardwareSecurityModules/dedicatedHSMs, Microsoft.Kusto/clusters, Microsoft.LabServices/labplans, Microsoft.Logic/integrationServiceEnvironments, Microsoft.MachineLearningServices/workspaces, Microsoft.Netapp/volumes, Microsoft.Network/dnsResolvers, Microsoft.Network/fpgaNetworkInterfaces, Microsoft.Network/networkWatchers., Microsoft.Network/virtualNetworkGateways, Microsoft.Orbital/orbitalGateways, Microsoft.PowerPlatform/enterprisePolicies, Microsoft.PowerPlatform/vnetaccesslinks, Microsoft.ServiceFabricMesh/networks, Microsoft.ServiceNetworking/trafficControllers, Microsoft.Singularity/accounts/networks, Microsoft.Singularity/accounts/npu, Microsoft.Sql/managedInstances, Microsoft.Sql/managedInstancesOnebox, Microsoft.Sql/managedInstancesStage, Microsoft.Sql/managedInstancesTest, Microsoft.StoragePool/diskPools, Microsoft.StreamAnalytics/streamingJobs, Microsoft.Synapse/workspaces, Microsoft.Web/hostingEnvironments, Microsoft.Web/serverFarms, NGINX.NGINXPLUS/nginxDeployments, PaloAltoNetworks.Cloudngfw/firewalls, and Qumulo.Storage/fileSystems. +// +kubebuilder:validation:Optional +Name *string `json:"name" tf:"name,omitempty"` } + type SubnetInitParameters struct { - // The address prefixes to use for the subnet. - AddressPrefixes []*string `json:"addressPrefixes,omitempty" tf:"address_prefixes,omitempty"` - // One or more delegation blocks as defined below. - Delegation []DelegationInitParameters `json:"delegation,omitempty" tf:"delegation,omitempty"` +// The address prefixes to use for the subnet. +AddressPrefixes []*string `json:"addressPrefixes,omitempty" tf:"address_prefixes,omitempty"` - EnforcePrivateLinkEndpointNetworkPolicies *bool `json:"enforcePrivateLinkEndpointNetworkPolicies,omitempty" tf:"enforce_private_link_endpoint_network_policies,omitempty"` +// One or more delegation blocks as defined below. +Delegation []DelegationInitParameters `json:"delegation,omitempty" tf:"delegation,omitempty"` - EnforcePrivateLinkServiceNetworkPolicies *bool `json:"enforcePrivateLinkServiceNetworkPolicies,omitempty" tf:"enforce_private_link_service_network_policies,omitempty"` +EnforcePrivateLinkEndpointNetworkPolicies *bool `json:"enforcePrivateLinkEndpointNetworkPolicies,omitempty" tf:"enforce_private_link_endpoint_network_policies,omitempty"` - // Enable or Disable network policies for the private endpoint on the subnet. Setting this to true will Enable the policy and setting this to false will Disable the policy. Defaults to true. - PrivateEndpointNetworkPoliciesEnabled *bool `json:"privateEndpointNetworkPoliciesEnabled,omitempty" tf:"private_endpoint_network_policies_enabled,omitempty"` +EnforcePrivateLinkServiceNetworkPolicies *bool `json:"enforcePrivateLinkServiceNetworkPolicies,omitempty" tf:"enforce_private_link_service_network_policies,omitempty"` - // Enable or Disable network policies for the private link service on the subnet. Setting this to true will Enable the policy and setting this to false will Disable the policy. Defaults to true. - PrivateLinkServiceNetworkPoliciesEnabled *bool `json:"privateLinkServiceNetworkPoliciesEnabled,omitempty" tf:"private_link_service_network_policies_enabled,omitempty"` +// Enable or Disable network policies for the private endpoint on the subnet. Setting this to true will Enable the policy and setting this to false will Disable the policy. Defaults to true. +PrivateEndpointNetworkPoliciesEnabled *bool `json:"privateEndpointNetworkPoliciesEnabled,omitempty" tf:"private_endpoint_network_policies_enabled,omitempty"` - // The list of IDs of Service Endpoint Policies to associate with the subnet. - ServiceEndpointPolicyIds []*string `json:"serviceEndpointPolicyIds,omitempty" tf:"service_endpoint_policy_ids,omitempty"` +// Enable or Disable network policies for the private link service on the subnet. Setting this to true will Enable the policy and setting this to false will Disable the policy. Defaults to true. +PrivateLinkServiceNetworkPoliciesEnabled *bool `json:"privateLinkServiceNetworkPoliciesEnabled,omitempty" tf:"private_link_service_network_policies_enabled,omitempty"` - // The list of Service endpoints to associate with the subnet. Possible values include: Microsoft.AzureActiveDirectory, Microsoft.AzureCosmosDB, Microsoft.ContainerRegistry, Microsoft.EventHub, Microsoft.KeyVault, Microsoft.ServiceBus, Microsoft.Sql, Microsoft.Storage, Microsoft.Storage.Global and Microsoft.Web. - ServiceEndpoints []*string `json:"serviceEndpoints,omitempty" tf:"service_endpoints,omitempty"` +// The list of IDs of Service Endpoint Policies to associate with the subnet. +ServiceEndpointPolicyIds []*string `json:"serviceEndpointPolicyIds,omitempty" tf:"service_endpoint_policy_ids,omitempty"` + +// The list of Service endpoints to associate with the subnet. Possible values include: Microsoft.AzureActiveDirectory, Microsoft.AzureCosmosDB, Microsoft.ContainerRegistry, Microsoft.EventHub, Microsoft.KeyVault, Microsoft.ServiceBus, Microsoft.Sql, Microsoft.Storage, Microsoft.Storage.Global and Microsoft.Web. +ServiceEndpoints []*string `json:"serviceEndpoints,omitempty" tf:"service_endpoints,omitempty"` } + type SubnetObservation struct { - // The address prefixes to use for the subnet. - AddressPrefixes []*string `json:"addressPrefixes,omitempty" tf:"address_prefixes,omitempty"` - // One or more delegation blocks as defined below. - Delegation []DelegationObservation `json:"delegation,omitempty" tf:"delegation,omitempty"` +// The address prefixes to use for the subnet. +AddressPrefixes []*string `json:"addressPrefixes,omitempty" tf:"address_prefixes,omitempty"` + +// One or more delegation blocks as defined below. +Delegation []DelegationObservation `json:"delegation,omitempty" tf:"delegation,omitempty"` - EnforcePrivateLinkEndpointNetworkPolicies *bool `json:"enforcePrivateLinkEndpointNetworkPolicies,omitempty" tf:"enforce_private_link_endpoint_network_policies,omitempty"` +EnforcePrivateLinkEndpointNetworkPolicies *bool `json:"enforcePrivateLinkEndpointNetworkPolicies,omitempty" tf:"enforce_private_link_endpoint_network_policies,omitempty"` - EnforcePrivateLinkServiceNetworkPolicies *bool `json:"enforcePrivateLinkServiceNetworkPolicies,omitempty" tf:"enforce_private_link_service_network_policies,omitempty"` +EnforcePrivateLinkServiceNetworkPolicies *bool `json:"enforcePrivateLinkServiceNetworkPolicies,omitempty" tf:"enforce_private_link_service_network_policies,omitempty"` - // The subnet ID. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// The subnet ID. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // Enable or Disable network policies for the private endpoint on the subnet. Setting this to true will Enable the policy and setting this to false will Disable the policy. Defaults to true. - PrivateEndpointNetworkPoliciesEnabled *bool `json:"privateEndpointNetworkPoliciesEnabled,omitempty" tf:"private_endpoint_network_policies_enabled,omitempty"` +// Enable or Disable network policies for the private endpoint on the subnet. Setting this to true will Enable the policy and setting this to false will Disable the policy. Defaults to true. +PrivateEndpointNetworkPoliciesEnabled *bool `json:"privateEndpointNetworkPoliciesEnabled,omitempty" tf:"private_endpoint_network_policies_enabled,omitempty"` - // Enable or Disable network policies for the private link service on the subnet. Setting this to true will Enable the policy and setting this to false will Disable the policy. Defaults to true. - PrivateLinkServiceNetworkPoliciesEnabled *bool `json:"privateLinkServiceNetworkPoliciesEnabled,omitempty" tf:"private_link_service_network_policies_enabled,omitempty"` +// Enable or Disable network policies for the private link service on the subnet. Setting this to true will Enable the policy and setting this to false will Disable the policy. Defaults to true. +PrivateLinkServiceNetworkPoliciesEnabled *bool `json:"privateLinkServiceNetworkPoliciesEnabled,omitempty" tf:"private_link_service_network_policies_enabled,omitempty"` - // The name of the resource group in which to create the subnet. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group in which to create the subnet. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // The list of IDs of Service Endpoint Policies to associate with the subnet. - ServiceEndpointPolicyIds []*string `json:"serviceEndpointPolicyIds,omitempty" tf:"service_endpoint_policy_ids,omitempty"` +// The list of IDs of Service Endpoint Policies to associate with the subnet. +ServiceEndpointPolicyIds []*string `json:"serviceEndpointPolicyIds,omitempty" tf:"service_endpoint_policy_ids,omitempty"` - // The list of Service endpoints to associate with the subnet. Possible values include: Microsoft.AzureActiveDirectory, Microsoft.AzureCosmosDB, Microsoft.ContainerRegistry, Microsoft.EventHub, Microsoft.KeyVault, Microsoft.ServiceBus, Microsoft.Sql, Microsoft.Storage, Microsoft.Storage.Global and Microsoft.Web. - ServiceEndpoints []*string `json:"serviceEndpoints,omitempty" tf:"service_endpoints,omitempty"` +// The list of Service endpoints to associate with the subnet. Possible values include: Microsoft.AzureActiveDirectory, Microsoft.AzureCosmosDB, Microsoft.ContainerRegistry, Microsoft.EventHub, Microsoft.KeyVault, Microsoft.ServiceBus, Microsoft.Sql, Microsoft.Storage, Microsoft.Storage.Global and Microsoft.Web. +ServiceEndpoints []*string `json:"serviceEndpoints,omitempty" tf:"service_endpoints,omitempty"` - // The name of the virtual network to which to attach the subnet. Changing this forces a new resource to be created. - VirtualNetworkName *string `json:"virtualNetworkName,omitempty" tf:"virtual_network_name,omitempty"` +// The name of the virtual network to which to attach the subnet. Changing this forces a new resource to be created. +VirtualNetworkName *string `json:"virtualNetworkName,omitempty" tf:"virtual_network_name,omitempty"` } + type SubnetParameters struct { - // The address prefixes to use for the subnet. - // +kubebuilder:validation:Optional - AddressPrefixes []*string `json:"addressPrefixes,omitempty" tf:"address_prefixes,omitempty"` - // One or more delegation blocks as defined below. - // +kubebuilder:validation:Optional - Delegation []DelegationParameters `json:"delegation,omitempty" tf:"delegation,omitempty"` +// The address prefixes to use for the subnet. +// +kubebuilder:validation:Optional +AddressPrefixes []*string `json:"addressPrefixes,omitempty" tf:"address_prefixes,omitempty"` + +// One or more delegation blocks as defined below. +// +kubebuilder:validation:Optional +Delegation []DelegationParameters `json:"delegation,omitempty" tf:"delegation,omitempty"` - // +kubebuilder:validation:Optional - EnforcePrivateLinkEndpointNetworkPolicies *bool `json:"enforcePrivateLinkEndpointNetworkPolicies,omitempty" tf:"enforce_private_link_endpoint_network_policies,omitempty"` +// +kubebuilder:validation:Optional +EnforcePrivateLinkEndpointNetworkPolicies *bool `json:"enforcePrivateLinkEndpointNetworkPolicies,omitempty" tf:"enforce_private_link_endpoint_network_policies,omitempty"` - // +kubebuilder:validation:Optional - EnforcePrivateLinkServiceNetworkPolicies *bool `json:"enforcePrivateLinkServiceNetworkPolicies,omitempty" tf:"enforce_private_link_service_network_policies,omitempty"` +// +kubebuilder:validation:Optional +EnforcePrivateLinkServiceNetworkPolicies *bool `json:"enforcePrivateLinkServiceNetworkPolicies,omitempty" tf:"enforce_private_link_service_network_policies,omitempty"` - // Enable or Disable network policies for the private endpoint on the subnet. Setting this to true will Enable the policy and setting this to false will Disable the policy. Defaults to true. - // +kubebuilder:validation:Optional - PrivateEndpointNetworkPoliciesEnabled *bool `json:"privateEndpointNetworkPoliciesEnabled,omitempty" tf:"private_endpoint_network_policies_enabled,omitempty"` +// Enable or Disable network policies for the private endpoint on the subnet. Setting this to true will Enable the policy and setting this to false will Disable the policy. Defaults to true. +// +kubebuilder:validation:Optional +PrivateEndpointNetworkPoliciesEnabled *bool `json:"privateEndpointNetworkPoliciesEnabled,omitempty" tf:"private_endpoint_network_policies_enabled,omitempty"` - // Enable or Disable network policies for the private link service on the subnet. Setting this to true will Enable the policy and setting this to false will Disable the policy. Defaults to true. - // +kubebuilder:validation:Optional - PrivateLinkServiceNetworkPoliciesEnabled *bool `json:"privateLinkServiceNetworkPoliciesEnabled,omitempty" tf:"private_link_service_network_policies_enabled,omitempty"` +// Enable or Disable network policies for the private link service on the subnet. Setting this to true will Enable the policy and setting this to false will Disable the policy. Defaults to true. +// +kubebuilder:validation:Optional +PrivateLinkServiceNetworkPoliciesEnabled *bool `json:"privateLinkServiceNetworkPoliciesEnabled,omitempty" tf:"private_link_service_network_policies_enabled,omitempty"` - // The name of the resource group in which to create the subnet. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group in which to create the subnet. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - // The list of IDs of Service Endpoint Policies to associate with the subnet. - // +kubebuilder:validation:Optional - ServiceEndpointPolicyIds []*string `json:"serviceEndpointPolicyIds,omitempty" tf:"service_endpoint_policy_ids,omitempty"` +// The list of IDs of Service Endpoint Policies to associate with the subnet. +// +kubebuilder:validation:Optional +ServiceEndpointPolicyIds []*string `json:"serviceEndpointPolicyIds,omitempty" tf:"service_endpoint_policy_ids,omitempty"` - // The list of Service endpoints to associate with the subnet. Possible values include: Microsoft.AzureActiveDirectory, Microsoft.AzureCosmosDB, Microsoft.ContainerRegistry, Microsoft.EventHub, Microsoft.KeyVault, Microsoft.ServiceBus, Microsoft.Sql, Microsoft.Storage, Microsoft.Storage.Global and Microsoft.Web. - // +kubebuilder:validation:Optional - ServiceEndpoints []*string `json:"serviceEndpoints,omitempty" tf:"service_endpoints,omitempty"` +// The list of Service endpoints to associate with the subnet. Possible values include: Microsoft.AzureActiveDirectory, Microsoft.AzureCosmosDB, Microsoft.ContainerRegistry, Microsoft.EventHub, Microsoft.KeyVault, Microsoft.ServiceBus, Microsoft.Sql, Microsoft.Storage, Microsoft.Storage.Global and Microsoft.Web. +// +kubebuilder:validation:Optional +ServiceEndpoints []*string `json:"serviceEndpoints,omitempty" tf:"service_endpoints,omitempty"` - // The name of the virtual network to which to attach the subnet. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/network/v1alpha1.VirtualNetwork - // +kubebuilder:validation:Optional - VirtualNetworkName *string `json:"virtualNetworkName,omitempty" tf:"virtual_network_name,omitempty"` +// The name of the virtual network to which to attach the subnet. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/network/v1alpha1.VirtualNetwork +// +kubebuilder:validation:Optional +VirtualNetworkName *string `json:"virtualNetworkName,omitempty" tf:"virtual_network_name,omitempty"` - // Reference to a VirtualNetwork in network to populate virtualNetworkName. - // +kubebuilder:validation:Optional - VirtualNetworkNameRef *v1.Reference `json:"virtualNetworkNameRef,omitempty" tf:"-"` +// Reference to a VirtualNetwork in network to populate virtualNetworkName. +// +kubebuilder:validation:Optional +VirtualNetworkNameRef *v1.Reference `json:"virtualNetworkNameRef,omitempty" tf:"-"` - // Selector for a VirtualNetwork in network to populate virtualNetworkName. - // +kubebuilder:validation:Optional - VirtualNetworkNameSelector *v1.Selector `json:"virtualNetworkNameSelector,omitempty" tf:"-"` +// Selector for a VirtualNetwork in network to populate virtualNetworkName. +// +kubebuilder:validation:Optional +VirtualNetworkNameSelector *v1.Selector `json:"virtualNetworkNameSelector,omitempty" tf:"-"` } // SubnetSpec defines the desired state of Subnet type SubnetSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider SubnetParameters `json:"forProvider"` + ForProvider SubnetParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -207,13 +228,13 @@ type SubnetSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider SubnetInitParameters `json:"initProvider,omitempty"` + InitProvider SubnetInitParameters `json:"initProvider,omitempty"` } // SubnetStatus defines the observed state of Subnet. type SubnetStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider SubnetObservation `json:"atProvider,omitempty"` + AtProvider SubnetObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -228,9 +249,9 @@ type SubnetStatus struct { type Subnet struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.addressPrefixes) || (has(self.initProvider) && has(self.initProvider.addressPrefixes))",message="spec.forProvider.addressPrefixes is a required parameter" - Spec SubnetSpec `json:"spec"` - Status SubnetStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.addressPrefixes) || (has(self.initProvider) && has(self.initProvider.addressPrefixes))",message="spec.forProvider.addressPrefixes is a required parameter" + Spec SubnetSpec `json:"spec"` + Status SubnetStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/network/v1alpha1/zz_subnetnetworksecuritygroupassociation_types.go b/apis/network/v1alpha1/zz_subnetnetworksecuritygroupassociation_types.go index 165bae9..5b1670e 100755 --- a/apis/network/v1alpha1/zz_subnetnetworksecuritygroupassociation_types.go +++ b/apis/network/v1alpha1/zz_subnetnetworksecuritygroupassociation_types.go @@ -15,58 +15,67 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type SubnetNetworkSecurityGroupAssociationInitParameters struct { + } + type SubnetNetworkSecurityGroupAssociationObservation struct { - // The ID of the Subnet. - ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The ID of the Network Security Group which should be associated with the Subnet. Changing this forces a new resource to be created. - NetworkSecurityGroupID *string `json:"networkSecurityGroupId,omitempty" tf:"network_security_group_id,omitempty"` +// The ID of the Subnet. +ID *string `json:"id,omitempty" tf:"id,omitempty"` + +// The ID of the Network Security Group which should be associated with the Subnet. Changing this forces a new resource to be created. +NetworkSecurityGroupID *string `json:"networkSecurityGroupId,omitempty" tf:"network_security_group_id,omitempty"` - // The ID of the Subnet. Changing this forces a new resource to be created. - SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"` +// The ID of the Subnet. Changing this forces a new resource to be created. +SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"` } + type SubnetNetworkSecurityGroupAssociationParameters struct { - // The ID of the Network Security Group which should be associated with the Subnet. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=SecurityGroup - // +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() - // +kubebuilder:validation:Optional - NetworkSecurityGroupID *string `json:"networkSecurityGroupId,omitempty" tf:"network_security_group_id,omitempty"` - - // Reference to a SecurityGroup to populate networkSecurityGroupId. - // +kubebuilder:validation:Optional - NetworkSecurityGroupIDRef *v1.Reference `json:"networkSecurityGroupIdRef,omitempty" tf:"-"` - - // Selector for a SecurityGroup to populate networkSecurityGroupId. - // +kubebuilder:validation:Optional - NetworkSecurityGroupIDSelector *v1.Selector `json:"networkSecurityGroupIdSelector,omitempty" tf:"-"` - - // The ID of the Subnet. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=Subnet - // +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() - // +kubebuilder:validation:Optional - SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"` - - // Reference to a Subnet to populate subnetId. - // +kubebuilder:validation:Optional - SubnetIDRef *v1.Reference `json:"subnetIdRef,omitempty" tf:"-"` - - // Selector for a Subnet to populate subnetId. - // +kubebuilder:validation:Optional - SubnetIDSelector *v1.Selector `json:"subnetIdSelector,omitempty" tf:"-"` + +// The ID of the Network Security Group which should be associated with the Subnet. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=SecurityGroup +// +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() +// +kubebuilder:validation:Optional +NetworkSecurityGroupID *string `json:"networkSecurityGroupId,omitempty" tf:"network_security_group_id,omitempty"` + +// Reference to a SecurityGroup to populate networkSecurityGroupId. +// +kubebuilder:validation:Optional +NetworkSecurityGroupIDRef *v1.Reference `json:"networkSecurityGroupIdRef,omitempty" tf:"-"` + +// Selector for a SecurityGroup to populate networkSecurityGroupId. +// +kubebuilder:validation:Optional +NetworkSecurityGroupIDSelector *v1.Selector `json:"networkSecurityGroupIdSelector,omitempty" tf:"-"` + +// The ID of the Subnet. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=Subnet +// +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() +// +kubebuilder:validation:Optional +SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"` + +// Reference to a Subnet to populate subnetId. +// +kubebuilder:validation:Optional +SubnetIDRef *v1.Reference `json:"subnetIdRef,omitempty" tf:"-"` + +// Selector for a Subnet to populate subnetId. +// +kubebuilder:validation:Optional +SubnetIDSelector *v1.Selector `json:"subnetIdSelector,omitempty" tf:"-"` } // SubnetNetworkSecurityGroupAssociationSpec defines the desired state of SubnetNetworkSecurityGroupAssociation type SubnetNetworkSecurityGroupAssociationSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider SubnetNetworkSecurityGroupAssociationParameters `json:"forProvider"` + ForProvider SubnetNetworkSecurityGroupAssociationParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -77,13 +86,13 @@ type SubnetNetworkSecurityGroupAssociationSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider SubnetNetworkSecurityGroupAssociationInitParameters `json:"initProvider,omitempty"` + InitProvider SubnetNetworkSecurityGroupAssociationInitParameters `json:"initProvider,omitempty"` } // SubnetNetworkSecurityGroupAssociationStatus defines the observed state of SubnetNetworkSecurityGroupAssociation. type SubnetNetworkSecurityGroupAssociationStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider SubnetNetworkSecurityGroupAssociationObservation `json:"atProvider,omitempty"` + AtProvider SubnetNetworkSecurityGroupAssociationObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/network/v1alpha1/zz_subnetroutetableassociation_types.go b/apis/network/v1alpha1/zz_subnetroutetableassociation_types.go index c91c96d..9d38712 100755 --- a/apis/network/v1alpha1/zz_subnetroutetableassociation_types.go +++ b/apis/network/v1alpha1/zz_subnetroutetableassociation_types.go @@ -15,58 +15,67 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type SubnetRouteTableAssociationInitParameters struct { + } + type SubnetRouteTableAssociationObservation struct { - // The ID of the Subnet. - ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The ID of the Route Table which should be associated with the Subnet. Changing this forces a new resource to be created. - RouteTableID *string `json:"routeTableId,omitempty" tf:"route_table_id,omitempty"` +// The ID of the Subnet. +ID *string `json:"id,omitempty" tf:"id,omitempty"` + +// The ID of the Route Table which should be associated with the Subnet. Changing this forces a new resource to be created. +RouteTableID *string `json:"routeTableId,omitempty" tf:"route_table_id,omitempty"` - // The ID of the Subnet. Changing this forces a new resource to be created. - SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"` +// The ID of the Subnet. Changing this forces a new resource to be created. +SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"` } + type SubnetRouteTableAssociationParameters struct { - // The ID of the Route Table which should be associated with the Subnet. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=RouteTable - // +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() - // +kubebuilder:validation:Optional - RouteTableID *string `json:"routeTableId,omitempty" tf:"route_table_id,omitempty"` - - // Reference to a RouteTable to populate routeTableId. - // +kubebuilder:validation:Optional - RouteTableIDRef *v1.Reference `json:"routeTableIdRef,omitempty" tf:"-"` - - // Selector for a RouteTable to populate routeTableId. - // +kubebuilder:validation:Optional - RouteTableIDSelector *v1.Selector `json:"routeTableIdSelector,omitempty" tf:"-"` - - // The ID of the Subnet. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=Subnet - // +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() - // +kubebuilder:validation:Optional - SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"` - - // Reference to a Subnet to populate subnetId. - // +kubebuilder:validation:Optional - SubnetIDRef *v1.Reference `json:"subnetIdRef,omitempty" tf:"-"` - - // Selector for a Subnet to populate subnetId. - // +kubebuilder:validation:Optional - SubnetIDSelector *v1.Selector `json:"subnetIdSelector,omitempty" tf:"-"` + +// The ID of the Route Table which should be associated with the Subnet. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=RouteTable +// +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() +// +kubebuilder:validation:Optional +RouteTableID *string `json:"routeTableId,omitempty" tf:"route_table_id,omitempty"` + +// Reference to a RouteTable to populate routeTableId. +// +kubebuilder:validation:Optional +RouteTableIDRef *v1.Reference `json:"routeTableIdRef,omitempty" tf:"-"` + +// Selector for a RouteTable to populate routeTableId. +// +kubebuilder:validation:Optional +RouteTableIDSelector *v1.Selector `json:"routeTableIdSelector,omitempty" tf:"-"` + +// The ID of the Subnet. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=Subnet +// +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() +// +kubebuilder:validation:Optional +SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"` + +// Reference to a Subnet to populate subnetId. +// +kubebuilder:validation:Optional +SubnetIDRef *v1.Reference `json:"subnetIdRef,omitempty" tf:"-"` + +// Selector for a Subnet to populate subnetId. +// +kubebuilder:validation:Optional +SubnetIDSelector *v1.Selector `json:"subnetIdSelector,omitempty" tf:"-"` } // SubnetRouteTableAssociationSpec defines the desired state of SubnetRouteTableAssociation type SubnetRouteTableAssociationSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider SubnetRouteTableAssociationParameters `json:"forProvider"` + ForProvider SubnetRouteTableAssociationParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -77,13 +86,13 @@ type SubnetRouteTableAssociationSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider SubnetRouteTableAssociationInitParameters `json:"initProvider,omitempty"` + InitProvider SubnetRouteTableAssociationInitParameters `json:"initProvider,omitempty"` } // SubnetRouteTableAssociationStatus defines the observed state of SubnetRouteTableAssociation. type SubnetRouteTableAssociationStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider SubnetRouteTableAssociationObservation `json:"atProvider,omitempty"` + AtProvider SubnetRouteTableAssociationObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/network/v1alpha1/zz_virtualnetwork_types.go b/apis/network/v1alpha1/zz_virtualnetwork_types.go index b81c935..0559041 100755 --- a/apis/network/v1alpha1/zz_virtualnetwork_types.go +++ b/apis/network/v1alpha1/zz_virtualnetwork_types.go @@ -15,176 +15,197 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type DdosProtectionPlanInitParameters struct { - // Enable/disable DDoS Protection Plan on Virtual Network. - Enable *bool `json:"enable,omitempty" tf:"enable,omitempty"` - // The ID of DDoS Protection Plan. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// Enable/disable DDoS Protection Plan on Virtual Network. +Enable *bool `json:"enable,omitempty" tf:"enable,omitempty"` + +// The ID of DDoS Protection Plan. +ID *string `json:"id,omitempty" tf:"id,omitempty"` } + type DdosProtectionPlanObservation struct { - // Enable/disable DDoS Protection Plan on Virtual Network. - Enable *bool `json:"enable,omitempty" tf:"enable,omitempty"` - // The ID of DDoS Protection Plan. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// Enable/disable DDoS Protection Plan on Virtual Network. +Enable *bool `json:"enable,omitempty" tf:"enable,omitempty"` + +// The ID of DDoS Protection Plan. +ID *string `json:"id,omitempty" tf:"id,omitempty"` } + type DdosProtectionPlanParameters struct { - // Enable/disable DDoS Protection Plan on Virtual Network. - // +kubebuilder:validation:Optional - Enable *bool `json:"enable" tf:"enable,omitempty"` - // The ID of DDoS Protection Plan. - // +kubebuilder:validation:Optional - ID *string `json:"id" tf:"id,omitempty"` +// Enable/disable DDoS Protection Plan on Virtual Network. +// +kubebuilder:validation:Optional +Enable *bool `json:"enable" tf:"enable,omitempty"` + +// The ID of DDoS Protection Plan. +// +kubebuilder:validation:Optional +ID *string `json:"id" tf:"id,omitempty"` } + type VirtualNetworkInitParameters struct { - // The address space that is used the virtual network. You can supply more than one address space. - AddressSpace []*string `json:"addressSpace,omitempty" tf:"address_space,omitempty"` - // The BGP community attribute in format :. - BGPCommunity *string `json:"bgpCommunity,omitempty" tf:"bgp_community,omitempty"` +// The address space that is used the virtual network. You can supply more than one address space. +AddressSpace []*string `json:"addressSpace,omitempty" tf:"address_space,omitempty"` + +// The BGP community attribute in format :. +BGPCommunity *string `json:"bgpCommunity,omitempty" tf:"bgp_community,omitempty"` - // List of IP addresses of DNS servers - DNSServers []*string `json:"dnsServers,omitempty" tf:"dns_servers,omitempty"` +// List of IP addresses of DNS servers +DNSServers []*string `json:"dnsServers,omitempty" tf:"dns_servers,omitempty"` - // A ddos_protection_plan block as documented below. - DdosProtectionPlan []DdosProtectionPlanInitParameters `json:"ddosProtectionPlan,omitempty" tf:"ddos_protection_plan,omitempty"` +// A ddos_protection_plan block as documented below. +DdosProtectionPlan []DdosProtectionPlanInitParameters `json:"ddosProtectionPlan,omitempty" tf:"ddos_protection_plan,omitempty"` - // Specifies the Edge Zone within the Azure Region where this Virtual Network should exist. Changing this forces a new Virtual Network to be created. - EdgeZone *string `json:"edgeZone,omitempty" tf:"edge_zone,omitempty"` +// Specifies the Edge Zone within the Azure Region where this Virtual Network should exist. Changing this forces a new Virtual Network to be created. +EdgeZone *string `json:"edgeZone,omitempty" tf:"edge_zone,omitempty"` - // The flow timeout in minutes for the Virtual Network, which is used to enable connection tracking for intra-VM flows. Possible values are between 4 and 30 minutes. - FlowTimeoutInMinutes *float64 `json:"flowTimeoutInMinutes,omitempty" tf:"flow_timeout_in_minutes,omitempty"` +// The flow timeout in minutes for the Virtual Network, which is used to enable connection tracking for intra-VM flows. Possible values are between 4 and 30 minutes. +FlowTimeoutInMinutes *float64 `json:"flowTimeoutInMinutes,omitempty" tf:"flow_timeout_in_minutes,omitempty"` - // The location/region where the virtual network is created. Changing this forces a new resource to be created. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// The location/region where the virtual network is created. Changing this forces a new resource to be created. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // A mapping of tags to assign to the resource. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A mapping of tags to assign to the resource. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` } + type VirtualNetworkObservation struct { - // The address space that is used the virtual network. You can supply more than one address space. - AddressSpace []*string `json:"addressSpace,omitempty" tf:"address_space,omitempty"` - // The BGP community attribute in format :. - BGPCommunity *string `json:"bgpCommunity,omitempty" tf:"bgp_community,omitempty"` +// The address space that is used the virtual network. You can supply more than one address space. +AddressSpace []*string `json:"addressSpace,omitempty" tf:"address_space,omitempty"` + +// The BGP community attribute in format :. +BGPCommunity *string `json:"bgpCommunity,omitempty" tf:"bgp_community,omitempty"` - // List of IP addresses of DNS servers - DNSServers []*string `json:"dnsServers,omitempty" tf:"dns_servers,omitempty"` +// List of IP addresses of DNS servers +DNSServers []*string `json:"dnsServers,omitempty" tf:"dns_servers,omitempty"` - // A ddos_protection_plan block as documented below. - DdosProtectionPlan []DdosProtectionPlanObservation `json:"ddosProtectionPlan,omitempty" tf:"ddos_protection_plan,omitempty"` +// A ddos_protection_plan block as documented below. +DdosProtectionPlan []DdosProtectionPlanObservation `json:"ddosProtectionPlan,omitempty" tf:"ddos_protection_plan,omitempty"` - // Specifies the Edge Zone within the Azure Region where this Virtual Network should exist. Changing this forces a new Virtual Network to be created. - EdgeZone *string `json:"edgeZone,omitempty" tf:"edge_zone,omitempty"` +// Specifies the Edge Zone within the Azure Region where this Virtual Network should exist. Changing this forces a new Virtual Network to be created. +EdgeZone *string `json:"edgeZone,omitempty" tf:"edge_zone,omitempty"` - // The flow timeout in minutes for the Virtual Network, which is used to enable connection tracking for intra-VM flows. Possible values are between 4 and 30 minutes. - FlowTimeoutInMinutes *float64 `json:"flowTimeoutInMinutes,omitempty" tf:"flow_timeout_in_minutes,omitempty"` +// The flow timeout in minutes for the Virtual Network, which is used to enable connection tracking for intra-VM flows. Possible values are between 4 and 30 minutes. +FlowTimeoutInMinutes *float64 `json:"flowTimeoutInMinutes,omitempty" tf:"flow_timeout_in_minutes,omitempty"` - // The GUID of the virtual network. - GUID *string `json:"guid,omitempty" tf:"guid,omitempty"` +// The GUID of the virtual network. +GUID *string `json:"guid,omitempty" tf:"guid,omitempty"` - // The virtual NetworkConfiguration ID. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// The virtual NetworkConfiguration ID. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The location/region where the virtual network is created. Changing this forces a new resource to be created. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// The location/region where the virtual network is created. Changing this forces a new resource to be created. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // The name of the resource group in which to create the virtual network. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group in which to create the virtual network. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Can be specified multiple times to define multiple subnets. Each subnet block supports fields documented below. - Subnet []VirtualNetworkSubnetObservation `json:"subnet,omitempty" tf:"subnet,omitempty"` +// Can be specified multiple times to define multiple subnets. Each subnet block supports fields documented below. +Subnet []VirtualNetworkSubnetObservation `json:"subnet,omitempty" tf:"subnet,omitempty"` - // A mapping of tags to assign to the resource. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A mapping of tags to assign to the resource. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` } + type VirtualNetworkParameters struct { - // The address space that is used the virtual network. You can supply more than one address space. - // +kubebuilder:validation:Optional - AddressSpace []*string `json:"addressSpace,omitempty" tf:"address_space,omitempty"` - // The BGP community attribute in format :. - // +kubebuilder:validation:Optional - BGPCommunity *string `json:"bgpCommunity,omitempty" tf:"bgp_community,omitempty"` +// The address space that is used the virtual network. You can supply more than one address space. +// +kubebuilder:validation:Optional +AddressSpace []*string `json:"addressSpace,omitempty" tf:"address_space,omitempty"` - // List of IP addresses of DNS servers - // +kubebuilder:validation:Optional - DNSServers []*string `json:"dnsServers,omitempty" tf:"dns_servers,omitempty"` +// The BGP community attribute in format :. +// +kubebuilder:validation:Optional +BGPCommunity *string `json:"bgpCommunity,omitempty" tf:"bgp_community,omitempty"` - // A ddos_protection_plan block as documented below. - // +kubebuilder:validation:Optional - DdosProtectionPlan []DdosProtectionPlanParameters `json:"ddosProtectionPlan,omitempty" tf:"ddos_protection_plan,omitempty"` +// List of IP addresses of DNS servers +// +kubebuilder:validation:Optional +DNSServers []*string `json:"dnsServers,omitempty" tf:"dns_servers,omitempty"` - // Specifies the Edge Zone within the Azure Region where this Virtual Network should exist. Changing this forces a new Virtual Network to be created. - // +kubebuilder:validation:Optional - EdgeZone *string `json:"edgeZone,omitempty" tf:"edge_zone,omitempty"` +// A ddos_protection_plan block as documented below. +// +kubebuilder:validation:Optional +DdosProtectionPlan []DdosProtectionPlanParameters `json:"ddosProtectionPlan,omitempty" tf:"ddos_protection_plan,omitempty"` - // The flow timeout in minutes for the Virtual Network, which is used to enable connection tracking for intra-VM flows. Possible values are between 4 and 30 minutes. - // +kubebuilder:validation:Optional - FlowTimeoutInMinutes *float64 `json:"flowTimeoutInMinutes,omitempty" tf:"flow_timeout_in_minutes,omitempty"` +// Specifies the Edge Zone within the Azure Region where this Virtual Network should exist. Changing this forces a new Virtual Network to be created. +// +kubebuilder:validation:Optional +EdgeZone *string `json:"edgeZone,omitempty" tf:"edge_zone,omitempty"` - // The location/region where the virtual network is created. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// The flow timeout in minutes for the Virtual Network, which is used to enable connection tracking for intra-VM flows. Possible values are between 4 and 30 minutes. +// +kubebuilder:validation:Optional +FlowTimeoutInMinutes *float64 `json:"flowTimeoutInMinutes,omitempty" tf:"flow_timeout_in_minutes,omitempty"` - // The name of the resource group in which to create the virtual network. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The location/region where the virtual network is created. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` +// The name of the resource group in which to create the virtual network. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - // A mapping of tags to assign to the resource. - // +kubebuilder:validation:Optional - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` + +// A mapping of tags to assign to the resource. +// +kubebuilder:validation:Optional +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` } + type VirtualNetworkSubnetInitParameters struct { + } + type VirtualNetworkSubnetObservation struct { - // The address prefix to use for the subnet. - AddressPrefix *string `json:"addressPrefix,omitempty" tf:"address_prefix,omitempty"` - // The ID of this subnet. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// The address prefix to use for the subnet. +AddressPrefix *string `json:"addressPrefix,omitempty" tf:"address_prefix,omitempty"` + +// The ID of this subnet. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The name of the subnet. - Name *string `json:"name,omitempty" tf:"name,omitempty"` +// The name of the subnet. +Name *string `json:"name,omitempty" tf:"name,omitempty"` - // The Network Security Group to associate with the subnet. (Referenced by id, ie. azurerm_network_security_group.example.id) - SecurityGroup *string `json:"securityGroup,omitempty" tf:"security_group,omitempty"` +// The Network Security Group to associate with the subnet. (Referenced by id, ie. azurerm_network_security_group.example.id) +SecurityGroup *string `json:"securityGroup,omitempty" tf:"security_group,omitempty"` } + type VirtualNetworkSubnetParameters struct { + } // VirtualNetworkSpec defines the desired state of VirtualNetwork type VirtualNetworkSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider VirtualNetworkParameters `json:"forProvider"` + ForProvider VirtualNetworkParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -195,13 +216,13 @@ type VirtualNetworkSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider VirtualNetworkInitParameters `json:"initProvider,omitempty"` + InitProvider VirtualNetworkInitParameters `json:"initProvider,omitempty"` } // VirtualNetworkStatus defines the observed state of VirtualNetwork. type VirtualNetworkStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider VirtualNetworkObservation `json:"atProvider,omitempty"` + AtProvider VirtualNetworkObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -216,10 +237,10 @@ type VirtualNetworkStatus struct { type VirtualNetwork struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.addressSpace) || (has(self.initProvider) && has(self.initProvider.addressSpace))",message="spec.forProvider.addressSpace is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" - Spec VirtualNetworkSpec `json:"spec"` - Status VirtualNetworkStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.addressSpace) || (has(self.initProvider) && has(self.initProvider.addressSpace))",message="spec.forProvider.addressSpace is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" + Spec VirtualNetworkSpec `json:"spec"` + Status VirtualNetworkStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/network/v1alpha1/zz_virtualnetworkpeering_types.go b/apis/network/v1alpha1/zz_virtualnetworkpeering_types.go index 2cdafea..6fb2c36 100755 --- a/apis/network/v1alpha1/zz_virtualnetworkpeering_types.go +++ b/apis/network/v1alpha1/zz_virtualnetworkpeering_types.go @@ -15,123 +15,132 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type VirtualNetworkPeeringInitParameters struct { - // Controls if forwarded traffic from VMs in the remote virtual network is allowed. Defaults to false. - AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty" tf:"allow_forwarded_traffic,omitempty"` - // Controls gatewayLinks can be used in the remote virtual network’s link to the local virtual network. Defaults to false. - AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty" tf:"allow_gateway_transit,omitempty"` +// Controls if forwarded traffic from VMs in the remote virtual network is allowed. Defaults to false. +AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty" tf:"allow_forwarded_traffic,omitempty"` + +// Controls gatewayLinks can be used in the remote virtual network’s link to the local virtual network. Defaults to false. +AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty" tf:"allow_gateway_transit,omitempty"` - // Controls if the VMs in the remote virtual network can access VMs in the local virtual network. Defaults to true. - AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty" tf:"allow_virtual_network_access,omitempty"` +// Controls if the VMs in the remote virtual network can access VMs in the local virtual network. Defaults to true. +AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty" tf:"allow_virtual_network_access,omitempty"` - // A mapping of key values pairs that can be used to sync network routes from the remote virtual network to the local virtual network. See the trigger example for an example on how to set it up. - Triggers map[string]*string `json:"triggers,omitempty" tf:"triggers,omitempty"` +// A mapping of key values pairs that can be used to sync network routes from the remote virtual network to the local virtual network. See the trigger example for an example on how to set it up. +Triggers map[string]*string `json:"triggers,omitempty" tf:"triggers,omitempty"` - // Controls if remote gateways can be used on the local virtual network. If the flag is set to true, and allow_gateway_transit on the remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway. Defaults to false. - UseRemoteGateways *bool `json:"useRemoteGateways,omitempty" tf:"use_remote_gateways,omitempty"` +// Controls if remote gateways can be used on the local virtual network. If the flag is set to true, and allow_gateway_transit on the remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway. Defaults to false. +UseRemoteGateways *bool `json:"useRemoteGateways,omitempty" tf:"use_remote_gateways,omitempty"` } + type VirtualNetworkPeeringObservation struct { - // Controls if forwarded traffic from VMs in the remote virtual network is allowed. Defaults to false. - AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty" tf:"allow_forwarded_traffic,omitempty"` - // Controls gatewayLinks can be used in the remote virtual network’s link to the local virtual network. Defaults to false. - AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty" tf:"allow_gateway_transit,omitempty"` +// Controls if forwarded traffic from VMs in the remote virtual network is allowed. Defaults to false. +AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty" tf:"allow_forwarded_traffic,omitempty"` - // Controls if the VMs in the remote virtual network can access VMs in the local virtual network. Defaults to true. - AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty" tf:"allow_virtual_network_access,omitempty"` +// Controls gatewayLinks can be used in the remote virtual network’s link to the local virtual network. Defaults to false. +AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty" tf:"allow_gateway_transit,omitempty"` - // The ID of the Virtual Network Peering. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// Controls if the VMs in the remote virtual network can access VMs in the local virtual network. Defaults to true. +AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty" tf:"allow_virtual_network_access,omitempty"` - // The full Azure resource ID of the remote virtual network. Changing this forces a new resource to be created. - RemoteVirtualNetworkID *string `json:"remoteVirtualNetworkId,omitempty" tf:"remote_virtual_network_id,omitempty"` +// The ID of the Virtual Network Peering. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The name of the resource group in which to create the virtual network peering. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The full Azure resource ID of the remote virtual network. Changing this forces a new resource to be created. +RemoteVirtualNetworkID *string `json:"remoteVirtualNetworkId,omitempty" tf:"remote_virtual_network_id,omitempty"` - // A mapping of key values pairs that can be used to sync network routes from the remote virtual network to the local virtual network. See the trigger example for an example on how to set it up. - Triggers map[string]*string `json:"triggers,omitempty" tf:"triggers,omitempty"` +// The name of the resource group in which to create the virtual network peering. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Controls if remote gateways can be used on the local virtual network. If the flag is set to true, and allow_gateway_transit on the remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway. Defaults to false. - UseRemoteGateways *bool `json:"useRemoteGateways,omitempty" tf:"use_remote_gateways,omitempty"` +// A mapping of key values pairs that can be used to sync network routes from the remote virtual network to the local virtual network. See the trigger example for an example on how to set it up. +Triggers map[string]*string `json:"triggers,omitempty" tf:"triggers,omitempty"` - // The name of the virtual network. Changing this forces a new resource to be created. - VirtualNetworkName *string `json:"virtualNetworkName,omitempty" tf:"virtual_network_name,omitempty"` +// Controls if remote gateways can be used on the local virtual network. If the flag is set to true, and allow_gateway_transit on the remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway. Defaults to false. +UseRemoteGateways *bool `json:"useRemoteGateways,omitempty" tf:"use_remote_gateways,omitempty"` + +// The name of the virtual network. Changing this forces a new resource to be created. +VirtualNetworkName *string `json:"virtualNetworkName,omitempty" tf:"virtual_network_name,omitempty"` } + type VirtualNetworkPeeringParameters struct { - // Controls if forwarded traffic from VMs in the remote virtual network is allowed. Defaults to false. - // +kubebuilder:validation:Optional - AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty" tf:"allow_forwarded_traffic,omitempty"` - - // Controls gatewayLinks can be used in the remote virtual network’s link to the local virtual network. Defaults to false. - // +kubebuilder:validation:Optional - AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty" tf:"allow_gateway_transit,omitempty"` - - // Controls if the VMs in the remote virtual network can access VMs in the local virtual network. Defaults to true. - // +kubebuilder:validation:Optional - AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty" tf:"allow_virtual_network_access,omitempty"` - - // The full Azure resource ID of the remote virtual network. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=VirtualNetwork - // +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() - // +kubebuilder:validation:Optional - RemoteVirtualNetworkID *string `json:"remoteVirtualNetworkId,omitempty" tf:"remote_virtual_network_id,omitempty"` - - // Reference to a VirtualNetwork to populate remoteVirtualNetworkId. - // +kubebuilder:validation:Optional - RemoteVirtualNetworkIDRef *v1.Reference `json:"remoteVirtualNetworkIdRef,omitempty" tf:"-"` - - // Selector for a VirtualNetwork to populate remoteVirtualNetworkId. - // +kubebuilder:validation:Optional - RemoteVirtualNetworkIDSelector *v1.Selector `json:"remoteVirtualNetworkIdSelector,omitempty" tf:"-"` - - // The name of the resource group in which to create the virtual network peering. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - - // A mapping of key values pairs that can be used to sync network routes from the remote virtual network to the local virtual network. See the trigger example for an example on how to set it up. - // +kubebuilder:validation:Optional - Triggers map[string]*string `json:"triggers,omitempty" tf:"triggers,omitempty"` - - // Controls if remote gateways can be used on the local virtual network. If the flag is set to true, and allow_gateway_transit on the remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway. Defaults to false. - // +kubebuilder:validation:Optional - UseRemoteGateways *bool `json:"useRemoteGateways,omitempty" tf:"use_remote_gateways,omitempty"` - - // The name of the virtual network. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=VirtualNetwork - // +kubebuilder:validation:Optional - VirtualNetworkName *string `json:"virtualNetworkName,omitempty" tf:"virtual_network_name,omitempty"` - - // Reference to a VirtualNetwork to populate virtualNetworkName. - // +kubebuilder:validation:Optional - VirtualNetworkNameRef *v1.Reference `json:"virtualNetworkNameRef,omitempty" tf:"-"` - - // Selector for a VirtualNetwork to populate virtualNetworkName. - // +kubebuilder:validation:Optional - VirtualNetworkNameSelector *v1.Selector `json:"virtualNetworkNameSelector,omitempty" tf:"-"` + +// Controls if forwarded traffic from VMs in the remote virtual network is allowed. Defaults to false. +// +kubebuilder:validation:Optional +AllowForwardedTraffic *bool `json:"allowForwardedTraffic,omitempty" tf:"allow_forwarded_traffic,omitempty"` + +// Controls gatewayLinks can be used in the remote virtual network’s link to the local virtual network. Defaults to false. +// +kubebuilder:validation:Optional +AllowGatewayTransit *bool `json:"allowGatewayTransit,omitempty" tf:"allow_gateway_transit,omitempty"` + +// Controls if the VMs in the remote virtual network can access VMs in the local virtual network. Defaults to true. +// +kubebuilder:validation:Optional +AllowVirtualNetworkAccess *bool `json:"allowVirtualNetworkAccess,omitempty" tf:"allow_virtual_network_access,omitempty"` + +// The full Azure resource ID of the remote virtual network. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=VirtualNetwork +// +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() +// +kubebuilder:validation:Optional +RemoteVirtualNetworkID *string `json:"remoteVirtualNetworkId,omitempty" tf:"remote_virtual_network_id,omitempty"` + +// Reference to a VirtualNetwork to populate remoteVirtualNetworkId. +// +kubebuilder:validation:Optional +RemoteVirtualNetworkIDRef *v1.Reference `json:"remoteVirtualNetworkIdRef,omitempty" tf:"-"` + +// Selector for a VirtualNetwork to populate remoteVirtualNetworkId. +// +kubebuilder:validation:Optional +RemoteVirtualNetworkIDSelector *v1.Selector `json:"remoteVirtualNetworkIdSelector,omitempty" tf:"-"` + +// The name of the resource group in which to create the virtual network peering. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` + +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` + +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` + +// A mapping of key values pairs that can be used to sync network routes from the remote virtual network to the local virtual network. See the trigger example for an example on how to set it up. +// +kubebuilder:validation:Optional +Triggers map[string]*string `json:"triggers,omitempty" tf:"triggers,omitempty"` + +// Controls if remote gateways can be used on the local virtual network. If the flag is set to true, and allow_gateway_transit on the remote peering is also true, virtual network will use gateways of remote virtual network for transit. Only one peering can have this flag set to true. This flag cannot be set if virtual network already has a gateway. Defaults to false. +// +kubebuilder:validation:Optional +UseRemoteGateways *bool `json:"useRemoteGateways,omitempty" tf:"use_remote_gateways,omitempty"` + +// The name of the virtual network. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=VirtualNetwork +// +kubebuilder:validation:Optional +VirtualNetworkName *string `json:"virtualNetworkName,omitempty" tf:"virtual_network_name,omitempty"` + +// Reference to a VirtualNetwork to populate virtualNetworkName. +// +kubebuilder:validation:Optional +VirtualNetworkNameRef *v1.Reference `json:"virtualNetworkNameRef,omitempty" tf:"-"` + +// Selector for a VirtualNetwork to populate virtualNetworkName. +// +kubebuilder:validation:Optional +VirtualNetworkNameSelector *v1.Selector `json:"virtualNetworkNameSelector,omitempty" tf:"-"` } // VirtualNetworkPeeringSpec defines the desired state of VirtualNetworkPeering type VirtualNetworkPeeringSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider VirtualNetworkPeeringParameters `json:"forProvider"` + ForProvider VirtualNetworkPeeringParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -142,13 +151,13 @@ type VirtualNetworkPeeringSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider VirtualNetworkPeeringInitParameters `json:"initProvider,omitempty"` + InitProvider VirtualNetworkPeeringInitParameters `json:"initProvider,omitempty"` } // VirtualNetworkPeeringStatus defines the observed state of VirtualNetworkPeering. type VirtualNetworkPeeringStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider VirtualNetworkPeeringObservation `json:"atProvider,omitempty"` + AtProvider VirtualNetworkPeeringObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/register_crd.go b/apis/register_crd.go new file mode 100644 index 0000000..a655129 --- /dev/null +++ b/apis/register_crd.go @@ -0,0 +1,18 @@ +package apis + +import ( + extentionapi "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + "k8s.io/apimachinery/pkg/runtime" +) + +func init() { + // Register the types with the Scheme so the components can map objects to GroupVersionKinds and back + AddToSchemes = append(AddToSchemes, + extentionapi.AddToScheme, + ) +} + +// AddToScheme adds all Resources to the Scheme +func AddToSchemeCrd(s *runtime.Scheme) error { + return AddToSchemes.AddToScheme(s) +} diff --git a/apis/sql/v1alpha1/zz_generated_terraformed.go b/apis/sql/v1alpha1/zz_generated_terraformed.go index e7f92e7..1036752 100755 --- a/apis/sql/v1alpha1/zz_generated_terraformed.go +++ b/apis/sql/v1alpha1/zz_generated_terraformed.go @@ -11,6 +11,7 @@ Copyright 2022 Upbound Inc. package v1alpha1 import ( + "dario.cat/mergo" "github.com/pkg/errors" "github.com/crossplane/upjet/pkg/resource" @@ -83,6 +84,36 @@ func (tr *MSSQLDatabase) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this MSSQLDatabase +func (tr *MSSQLDatabase) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this MSSQLDatabase using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *MSSQLDatabase) LateInitialize(attrs []byte) (bool, error) { @@ -169,6 +200,36 @@ func (tr *MSSQLServerMicrosoftSupportAuditingPolicy) GetInitParameters() (map[st return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this MSSQLServerMicrosoftSupportAuditingPolicy +func (tr *MSSQLServerMicrosoftSupportAuditingPolicy) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this MSSQLServerMicrosoftSupportAuditingPolicy using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *MSSQLServerMicrosoftSupportAuditingPolicy) LateInitialize(attrs []byte) (bool, error) { @@ -253,6 +314,36 @@ func (tr *MSSQLDatabaseVulnerabilityAssessmentRuleBaseline) GetInitParameters() return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this MSSQLDatabaseVulnerabilityAssessmentRuleBaseline +func (tr *MSSQLDatabaseVulnerabilityAssessmentRuleBaseline) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this MSSQLDatabaseVulnerabilityAssessmentRuleBaseline using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *MSSQLDatabaseVulnerabilityAssessmentRuleBaseline) LateInitialize(attrs []byte) (bool, error) { @@ -337,6 +428,36 @@ func (tr *MSSQLElasticPool) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this MSSQLElasticPool +func (tr *MSSQLElasticPool) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this MSSQLElasticPool using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *MSSQLElasticPool) LateInitialize(attrs []byte) (bool, error) { @@ -422,6 +543,36 @@ func (tr *MSSQLFailoverGroup) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this MSSQLFailoverGroup +func (tr *MSSQLFailoverGroup) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this MSSQLFailoverGroup using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *MSSQLFailoverGroup) LateInitialize(attrs []byte) (bool, error) { @@ -506,6 +657,36 @@ func (tr *MSSQLFirewallRule) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this MSSQLFirewallRule +func (tr *MSSQLFirewallRule) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this MSSQLFirewallRule using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *MSSQLFirewallRule) LateInitialize(attrs []byte) (bool, error) { @@ -590,6 +771,36 @@ func (tr *MSSQLJobAgent) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this MSSQLJobAgent +func (tr *MSSQLJobAgent) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this MSSQLJobAgent using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *MSSQLJobAgent) LateInitialize(attrs []byte) (bool, error) { @@ -674,6 +885,36 @@ func (tr *MSSQLJobCredential) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this MSSQLJobCredential +func (tr *MSSQLJobCredential) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this MSSQLJobCredential using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *MSSQLJobCredential) LateInitialize(attrs []byte) (bool, error) { @@ -758,6 +999,36 @@ func (tr *MSSQLManagedDatabase) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this MSSQLManagedDatabase +func (tr *MSSQLManagedDatabase) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this MSSQLManagedDatabase using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *MSSQLManagedDatabase) LateInitialize(attrs []byte) (bool, error) { @@ -842,6 +1113,36 @@ func (tr *MSSQLManagedInstance) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this MSSQLManagedInstance +func (tr *MSSQLManagedInstance) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this MSSQLManagedInstance using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *MSSQLManagedInstance) LateInitialize(attrs []byte) (bool, error) { @@ -926,6 +1227,36 @@ func (tr *MSSQLManagedInstanceActiveDirectoryAdministrator) GetInitParameters() return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this MSSQLManagedInstanceActiveDirectoryAdministrator +func (tr *MSSQLManagedInstanceActiveDirectoryAdministrator) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this MSSQLManagedInstanceActiveDirectoryAdministrator using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *MSSQLManagedInstanceActiveDirectoryAdministrator) LateInitialize(attrs []byte) (bool, error) { @@ -1010,6 +1341,36 @@ func (tr *MSSQLManagedInstanceFailoverGroup) GetInitParameters() (map[string]any return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this MSSQLManagedInstanceFailoverGroup +func (tr *MSSQLManagedInstanceFailoverGroup) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this MSSQLManagedInstanceFailoverGroup using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *MSSQLManagedInstanceFailoverGroup) LateInitialize(attrs []byte) (bool, error) { @@ -1094,6 +1455,36 @@ func (tr *MSSQLManagedInstanceVulnerabilityAssessment) GetInitParameters() (map[ return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this MSSQLManagedInstanceVulnerabilityAssessment +func (tr *MSSQLManagedInstanceVulnerabilityAssessment) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this MSSQLManagedInstanceVulnerabilityAssessment using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *MSSQLManagedInstanceVulnerabilityAssessment) LateInitialize(attrs []byte) (bool, error) { @@ -1178,6 +1569,36 @@ func (tr *MSSQLOutboundFirewallRule) GetInitParameters() (map[string]any, error) return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this MSSQLOutboundFirewallRule +func (tr *MSSQLOutboundFirewallRule) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this MSSQLOutboundFirewallRule using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *MSSQLOutboundFirewallRule) LateInitialize(attrs []byte) (bool, error) { @@ -1262,6 +1683,36 @@ func (tr *MSSQLServer) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this MSSQLServer +func (tr *MSSQLServer) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this MSSQLServer using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *MSSQLServer) LateInitialize(attrs []byte) (bool, error) { @@ -1346,6 +1797,36 @@ func (tr *MSSQLServerDNSAlias) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this MSSQLServerDNSAlias +func (tr *MSSQLServerDNSAlias) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this MSSQLServerDNSAlias using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *MSSQLServerDNSAlias) LateInitialize(attrs []byte) (bool, error) { @@ -1430,6 +1911,36 @@ func (tr *MSSQLServerSecurityAlertPolicy) GetInitParameters() (map[string]any, e return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this MSSQLServerSecurityAlertPolicy +func (tr *MSSQLServerSecurityAlertPolicy) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this MSSQLServerSecurityAlertPolicy using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *MSSQLServerSecurityAlertPolicy) LateInitialize(attrs []byte) (bool, error) { @@ -1514,6 +2025,36 @@ func (tr *MSSQLServerTransparentDataEncryption) GetInitParameters() (map[string] return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this MSSQLServerTransparentDataEncryption +func (tr *MSSQLServerTransparentDataEncryption) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this MSSQLServerTransparentDataEncryption using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *MSSQLServerTransparentDataEncryption) LateInitialize(attrs []byte) (bool, error) { @@ -1598,6 +2139,36 @@ func (tr *MSSQLServerVulnerabilityAssessment) GetInitParameters() (map[string]an return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this MSSQLServerVulnerabilityAssessment +func (tr *MSSQLServerVulnerabilityAssessment) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this MSSQLServerVulnerabilityAssessment using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *MSSQLServerVulnerabilityAssessment) LateInitialize(attrs []byte) (bool, error) { @@ -1682,6 +2253,36 @@ func (tr *MSSQLVirtualNetworkRule) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this MSSQLVirtualNetworkRule +func (tr *MSSQLVirtualNetworkRule) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this MSSQLVirtualNetworkRule using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *MSSQLVirtualNetworkRule) LateInitialize(attrs []byte) (bool, error) { diff --git a/apis/sql/v1alpha1/zz_mssqldatabase_types.go b/apis/sql/v1alpha1/zz_mssqldatabase_types.go index e61bff4..af1f34f 100755 --- a/apis/sql/v1alpha1/zz_mssqldatabase_types.go +++ b/apis/sql/v1alpha1/zz_mssqldatabase_types.go @@ -15,519 +15,552 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type ImportInitParameters struct { - // Specifies the name of the SQL administrator. - AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` - // Specifies the type of authentication used to access the server. Valid values are SQL or ADPassword. - AuthenticationType *string `json:"authenticationType,omitempty" tf:"authentication_type,omitempty"` +// Specifies the name of the SQL administrator. +AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` + +// Specifies the type of authentication used to access the server. Valid values are SQL or ADPassword. +AuthenticationType *string `json:"authenticationType,omitempty" tf:"authentication_type,omitempty"` - // The resource id for the storage account used to store BACPAC file. If set, private endpoint connection will be created for the storage account. Must match storage account used for storage_uri parameter. - StorageAccountID *string `json:"storageAccountId,omitempty" tf:"storage_account_id,omitempty"` +// The resource id for the storage account used to store BACPAC file. If set, private endpoint connection will be created for the storage account. Must match storage account used for storage_uri parameter. +StorageAccountID *string `json:"storageAccountId,omitempty" tf:"storage_account_id,omitempty"` - // Specifies the type of access key for the storage account. Valid values are StorageAccessKey or SharedAccessKey. - StorageKeyType *string `json:"storageKeyType,omitempty" tf:"storage_key_type,omitempty"` +// Specifies the type of access key for the storage account. Valid values are StorageAccessKey or SharedAccessKey. +StorageKeyType *string `json:"storageKeyType,omitempty" tf:"storage_key_type,omitempty"` - // Specifies the blob URI of the .bacpac file. - StorageURI *string `json:"storageUri,omitempty" tf:"storage_uri,omitempty"` +// Specifies the blob URI of the .bacpac file. +StorageURI *string `json:"storageUri,omitempty" tf:"storage_uri,omitempty"` } + type ImportObservation struct { - // Specifies the name of the SQL administrator. - AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` - // Specifies the type of authentication used to access the server. Valid values are SQL or ADPassword. - AuthenticationType *string `json:"authenticationType,omitempty" tf:"authentication_type,omitempty"` +// Specifies the name of the SQL administrator. +AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` + +// Specifies the type of authentication used to access the server. Valid values are SQL or ADPassword. +AuthenticationType *string `json:"authenticationType,omitempty" tf:"authentication_type,omitempty"` - // The resource id for the storage account used to store BACPAC file. If set, private endpoint connection will be created for the storage account. Must match storage account used for storage_uri parameter. - StorageAccountID *string `json:"storageAccountId,omitempty" tf:"storage_account_id,omitempty"` +// The resource id for the storage account used to store BACPAC file. If set, private endpoint connection will be created for the storage account. Must match storage account used for storage_uri parameter. +StorageAccountID *string `json:"storageAccountId,omitempty" tf:"storage_account_id,omitempty"` - // Specifies the type of access key for the storage account. Valid values are StorageAccessKey or SharedAccessKey. - StorageKeyType *string `json:"storageKeyType,omitempty" tf:"storage_key_type,omitempty"` +// Specifies the type of access key for the storage account. Valid values are StorageAccessKey or SharedAccessKey. +StorageKeyType *string `json:"storageKeyType,omitempty" tf:"storage_key_type,omitempty"` - // Specifies the blob URI of the .bacpac file. - StorageURI *string `json:"storageUri,omitempty" tf:"storage_uri,omitempty"` +// Specifies the blob URI of the .bacpac file. +StorageURI *string `json:"storageUri,omitempty" tf:"storage_uri,omitempty"` } + type ImportParameters struct { - // Specifies the name of the SQL administrator. - // +kubebuilder:validation:Optional - AdministratorLogin *string `json:"administratorLogin" tf:"administrator_login,omitempty"` - // Specifies the password of the SQL administrator. - // +kubebuilder:validation:Required - AdministratorLoginPasswordSecretRef v1.SecretKeySelector `json:"administratorLoginPasswordSecretRef" tf:"-"` +// Specifies the name of the SQL administrator. +// +kubebuilder:validation:Optional +AdministratorLogin *string `json:"administratorLogin" tf:"administrator_login,omitempty"` + +// Specifies the password of the SQL administrator. +// +kubebuilder:validation:Required +AdministratorLoginPasswordSecretRef v1.SecretKeySelector `json:"administratorLoginPasswordSecretRef" tf:"-"` - // Specifies the type of authentication used to access the server. Valid values are SQL or ADPassword. - // +kubebuilder:validation:Optional - AuthenticationType *string `json:"authenticationType" tf:"authentication_type,omitempty"` +// Specifies the type of authentication used to access the server. Valid values are SQL or ADPassword. +// +kubebuilder:validation:Optional +AuthenticationType *string `json:"authenticationType" tf:"authentication_type,omitempty"` - // The resource id for the storage account used to store BACPAC file. If set, private endpoint connection will be created for the storage account. Must match storage account used for storage_uri parameter. - // +kubebuilder:validation:Optional - StorageAccountID *string `json:"storageAccountId,omitempty" tf:"storage_account_id,omitempty"` +// The resource id for the storage account used to store BACPAC file. If set, private endpoint connection will be created for the storage account. Must match storage account used for storage_uri parameter. +// +kubebuilder:validation:Optional +StorageAccountID *string `json:"storageAccountId,omitempty" tf:"storage_account_id,omitempty"` - // Specifies the access key for the storage account. - // +kubebuilder:validation:Required - StorageKeySecretRef v1.SecretKeySelector `json:"storageKeySecretRef" tf:"-"` +// Specifies the access key for the storage account. +// +kubebuilder:validation:Required +StorageKeySecretRef v1.SecretKeySelector `json:"storageKeySecretRef" tf:"-"` - // Specifies the type of access key for the storage account. Valid values are StorageAccessKey or SharedAccessKey. - // +kubebuilder:validation:Optional - StorageKeyType *string `json:"storageKeyType" tf:"storage_key_type,omitempty"` +// Specifies the type of access key for the storage account. Valid values are StorageAccessKey or SharedAccessKey. +// +kubebuilder:validation:Optional +StorageKeyType *string `json:"storageKeyType" tf:"storage_key_type,omitempty"` - // Specifies the blob URI of the .bacpac file. - // +kubebuilder:validation:Optional - StorageURI *string `json:"storageUri" tf:"storage_uri,omitempty"` +// Specifies the blob URI of the .bacpac file. +// +kubebuilder:validation:Optional +StorageURI *string `json:"storageUri" tf:"storage_uri,omitempty"` } + type LongTermRetentionPolicyInitParameters struct { - // The monthly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 120 months. e.g. P1Y, P1M, P4W or P30D. - MonthlyRetention *string `json:"monthlyRetention,omitempty" tf:"monthly_retention,omitempty"` - // The week of year to take the yearly backup. Value has to be between 1 and 52. - WeekOfYear *float64 `json:"weekOfYear,omitempty" tf:"week_of_year,omitempty"` +// The monthly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 120 months. e.g. P1Y, P1M, P4W or P30D. +MonthlyRetention *string `json:"monthlyRetention,omitempty" tf:"monthly_retention,omitempty"` + +// The week of year to take the yearly backup. Value has to be between 1 and 52. +WeekOfYear *float64 `json:"weekOfYear,omitempty" tf:"week_of_year,omitempty"` - // The weekly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 520 weeks. e.g. P1Y, P1M, P1W or P7D. - WeeklyRetention *string `json:"weeklyRetention,omitempty" tf:"weekly_retention,omitempty"` +// The weekly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 520 weeks. e.g. P1Y, P1M, P1W or P7D. +WeeklyRetention *string `json:"weeklyRetention,omitempty" tf:"weekly_retention,omitempty"` - // The yearly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 10 years. e.g. P1Y, P12M, P52W or P365D. - YearlyRetention *string `json:"yearlyRetention,omitempty" tf:"yearly_retention,omitempty"` +// The yearly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 10 years. e.g. P1Y, P12M, P52W or P365D. +YearlyRetention *string `json:"yearlyRetention,omitempty" tf:"yearly_retention,omitempty"` } + type LongTermRetentionPolicyObservation struct { - // The monthly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 120 months. e.g. P1Y, P1M, P4W or P30D. - MonthlyRetention *string `json:"monthlyRetention,omitempty" tf:"monthly_retention,omitempty"` - // The week of year to take the yearly backup. Value has to be between 1 and 52. - WeekOfYear *float64 `json:"weekOfYear,omitempty" tf:"week_of_year,omitempty"` +// The monthly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 120 months. e.g. P1Y, P1M, P4W or P30D. +MonthlyRetention *string `json:"monthlyRetention,omitempty" tf:"monthly_retention,omitempty"` + +// The week of year to take the yearly backup. Value has to be between 1 and 52. +WeekOfYear *float64 `json:"weekOfYear,omitempty" tf:"week_of_year,omitempty"` - // The weekly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 520 weeks. e.g. P1Y, P1M, P1W or P7D. - WeeklyRetention *string `json:"weeklyRetention,omitempty" tf:"weekly_retention,omitempty"` +// The weekly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 520 weeks. e.g. P1Y, P1M, P1W or P7D. +WeeklyRetention *string `json:"weeklyRetention,omitempty" tf:"weekly_retention,omitempty"` - // The yearly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 10 years. e.g. P1Y, P12M, P52W or P365D. - YearlyRetention *string `json:"yearlyRetention,omitempty" tf:"yearly_retention,omitempty"` +// The yearly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 10 years. e.g. P1Y, P12M, P52W or P365D. +YearlyRetention *string `json:"yearlyRetention,omitempty" tf:"yearly_retention,omitempty"` } + type LongTermRetentionPolicyParameters struct { - // The monthly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 120 months. e.g. P1Y, P1M, P4W or P30D. - // +kubebuilder:validation:Optional - MonthlyRetention *string `json:"monthlyRetention,omitempty" tf:"monthly_retention,omitempty"` - // The week of year to take the yearly backup. Value has to be between 1 and 52. - // +kubebuilder:validation:Optional - WeekOfYear *float64 `json:"weekOfYear,omitempty" tf:"week_of_year,omitempty"` +// The monthly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 120 months. e.g. P1Y, P1M, P4W or P30D. +// +kubebuilder:validation:Optional +MonthlyRetention *string `json:"monthlyRetention,omitempty" tf:"monthly_retention,omitempty"` + +// The week of year to take the yearly backup. Value has to be between 1 and 52. +// +kubebuilder:validation:Optional +WeekOfYear *float64 `json:"weekOfYear,omitempty" tf:"week_of_year,omitempty"` - // The weekly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 520 weeks. e.g. P1Y, P1M, P1W or P7D. - // +kubebuilder:validation:Optional - WeeklyRetention *string `json:"weeklyRetention,omitempty" tf:"weekly_retention,omitempty"` +// The weekly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 520 weeks. e.g. P1Y, P1M, P1W or P7D. +// +kubebuilder:validation:Optional +WeeklyRetention *string `json:"weeklyRetention,omitempty" tf:"weekly_retention,omitempty"` - // The yearly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 10 years. e.g. P1Y, P12M, P52W or P365D. - // +kubebuilder:validation:Optional - YearlyRetention *string `json:"yearlyRetention,omitempty" tf:"yearly_retention,omitempty"` +// The yearly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 10 years. e.g. P1Y, P12M, P52W or P365D. +// +kubebuilder:validation:Optional +YearlyRetention *string `json:"yearlyRetention,omitempty" tf:"yearly_retention,omitempty"` } + type MSSQLDatabaseInitParameters struct { - // Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled. This property is only settable for General Purpose Serverless databases. - AutoPauseDelayInMinutes *float64 `json:"autoPauseDelayInMinutes,omitempty" tf:"auto_pause_delay_in_minutes,omitempty"` - // Specifies the collation of the database. Changing this forces a new resource to be created. - Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` +// Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled. This property is only settable for General Purpose Serverless databases. +AutoPauseDelayInMinutes *float64 `json:"autoPauseDelayInMinutes,omitempty" tf:"auto_pause_delay_in_minutes,omitempty"` + +// Specifies the collation of the database. Changing this forces a new resource to be created. +Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` - // The create mode of the database. Possible values are Copy, Default, OnlineSecondary, PointInTimeRestore, Recovery, Restore, RestoreExternalBackup, RestoreExternalBackupSecondary, RestoreLongTermRetentionBackup and Secondary. Mutually exclusive with import. Changing this forces a new resource to be created. - CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` +// The create mode of the database. Possible values are Copy, Default, OnlineSecondary, PointInTimeRestore, Recovery, Restore, RestoreExternalBackup, RestoreExternalBackupSecondary, RestoreLongTermRetentionBackup and Secondary. Mutually exclusive with import. Changing this forces a new resource to be created. +CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` - // The ID of the source database from which to create the new database. This should only be used for databases with create_mode values that use another database as reference. Changing this forces a new resource to be created. - CreationSourceDatabaseID *string `json:"creationSourceDatabaseId,omitempty" tf:"creation_source_database_id,omitempty"` +// The ID of the source database from which to create the new database. This should only be used for databases with create_mode values that use another database as reference. Changing this forces a new resource to be created. +CreationSourceDatabaseID *string `json:"creationSourceDatabaseId,omitempty" tf:"creation_source_database_id,omitempty"` - // Specifies the ID of the elastic pool containing this database. - ElasticPoolID *string `json:"elasticPoolId,omitempty" tf:"elastic_pool_id,omitempty"` +// Specifies the ID of the elastic pool containing this database. +ElasticPoolID *string `json:"elasticPoolId,omitempty" tf:"elastic_pool_id,omitempty"` - // A boolean that specifies if the Geo Backup Policy is enabled. Defaults to true. - GeoBackupEnabled *bool `json:"geoBackupEnabled,omitempty" tf:"geo_backup_enabled,omitempty"` +// A boolean that specifies if the Geo Backup Policy is enabled. Defaults to true. +GeoBackupEnabled *bool `json:"geoBackupEnabled,omitempty" tf:"geo_backup_enabled,omitempty"` - // A Database Import block as documented below. Mutually exclusive with create_mode. - Import []ImportInitParameters `json:"import,omitempty" tf:"import,omitempty"` +// A Database Import block as documented below. Mutually exclusive with create_mode. +Import []ImportInitParameters `json:"import,omitempty" tf:"import,omitempty"` - // A boolean that specifies if this is a ledger database. Defaults to false. Changing this forces a new resource to be created. - LedgerEnabled *bool `json:"ledgerEnabled,omitempty" tf:"ledger_enabled,omitempty"` +// A boolean that specifies if this is a ledger database. Defaults to false. Changing this forces a new resource to be created. +LedgerEnabled *bool `json:"ledgerEnabled,omitempty" tf:"ledger_enabled,omitempty"` - // Specifies the license type applied to this database. Possible values are LicenseIncluded and BasePrice. - LicenseType *string `json:"licenseType,omitempty" tf:"license_type,omitempty"` +// Specifies the license type applied to this database. Possible values are LicenseIncluded and BasePrice. +LicenseType *string `json:"licenseType,omitempty" tf:"license_type,omitempty"` - // A long_term_retention_policy block as defined below. - LongTermRetentionPolicy []LongTermRetentionPolicyInitParameters `json:"longTermRetentionPolicy,omitempty" tf:"long_term_retention_policy,omitempty"` +// A long_term_retention_policy block as defined below. +LongTermRetentionPolicy []LongTermRetentionPolicyInitParameters `json:"longTermRetentionPolicy,omitempty" tf:"long_term_retention_policy,omitempty"` - // The name of the Public Maintenance Configuration window to apply to the database. Valid values include SQL_Default, SQL_EastUS_DB_1, SQL_EastUS2_DB_1, SQL_SoutheastAsia_DB_1, SQL_AustraliaEast_DB_1, SQL_NorthEurope_DB_1, SQL_SouthCentralUS_DB_1, SQL_WestUS2_DB_1, SQL_UKSouth_DB_1, SQL_WestEurope_DB_1, SQL_EastUS_DB_2, SQL_EastUS2_DB_2, SQL_WestUS2_DB_2, SQL_SoutheastAsia_DB_2, SQL_AustraliaEast_DB_2, SQL_NorthEurope_DB_2, SQL_SouthCentralUS_DB_2, SQL_UKSouth_DB_2, SQL_WestEurope_DB_2, SQL_AustraliaSoutheast_DB_1, SQL_BrazilSouth_DB_1, SQL_CanadaCentral_DB_1, SQL_CanadaEast_DB_1, SQL_CentralUS_DB_1, SQL_EastAsia_DB_1, SQL_FranceCentral_DB_1, SQL_GermanyWestCentral_DB_1, SQL_CentralIndia_DB_1, SQL_SouthIndia_DB_1, SQL_JapanEast_DB_1, SQL_JapanWest_DB_1, SQL_NorthCentralUS_DB_1, SQL_UKWest_DB_1, SQL_WestUS_DB_1, SQL_AustraliaSoutheast_DB_2, SQL_BrazilSouth_DB_2, SQL_CanadaCentral_DB_2, SQL_CanadaEast_DB_2, SQL_CentralUS_DB_2, SQL_EastAsia_DB_2, SQL_FranceCentral_DB_2, SQL_GermanyWestCentral_DB_2, SQL_CentralIndia_DB_2, SQL_SouthIndia_DB_2, SQL_JapanEast_DB_2, SQL_JapanWest_DB_2, SQL_NorthCentralUS_DB_2, SQL_UKWest_DB_2, SQL_WestUS_DB_2, SQL_WestCentralUS_DB_1, SQL_FranceSouth_DB_1, SQL_WestCentralUS_DB_2, SQL_FranceSouth_DB_2, SQL_SwitzerlandNorth_DB_1, SQL_SwitzerlandNorth_DB_2, SQL_BrazilSoutheast_DB_1, SQL_UAENorth_DB_1, SQL_BrazilSoutheast_DB_2, SQL_UAENorth_DB_2. Defaults to SQL_Default. - MaintenanceConfigurationName *string `json:"maintenanceConfigurationName,omitempty" tf:"maintenance_configuration_name,omitempty"` +// The name of the Public Maintenance Configuration window to apply to the database. Valid values include SQL_Default, SQL_EastUS_DB_1, SQL_EastUS2_DB_1, SQL_SoutheastAsia_DB_1, SQL_AustraliaEast_DB_1, SQL_NorthEurope_DB_1, SQL_SouthCentralUS_DB_1, SQL_WestUS2_DB_1, SQL_UKSouth_DB_1, SQL_WestEurope_DB_1, SQL_EastUS_DB_2, SQL_EastUS2_DB_2, SQL_WestUS2_DB_2, SQL_SoutheastAsia_DB_2, SQL_AustraliaEast_DB_2, SQL_NorthEurope_DB_2, SQL_SouthCentralUS_DB_2, SQL_UKSouth_DB_2, SQL_WestEurope_DB_2, SQL_AustraliaSoutheast_DB_1, SQL_BrazilSouth_DB_1, SQL_CanadaCentral_DB_1, SQL_CanadaEast_DB_1, SQL_CentralUS_DB_1, SQL_EastAsia_DB_1, SQL_FranceCentral_DB_1, SQL_GermanyWestCentral_DB_1, SQL_CentralIndia_DB_1, SQL_SouthIndia_DB_1, SQL_JapanEast_DB_1, SQL_JapanWest_DB_1, SQL_NorthCentralUS_DB_1, SQL_UKWest_DB_1, SQL_WestUS_DB_1, SQL_AustraliaSoutheast_DB_2, SQL_BrazilSouth_DB_2, SQL_CanadaCentral_DB_2, SQL_CanadaEast_DB_2, SQL_CentralUS_DB_2, SQL_EastAsia_DB_2, SQL_FranceCentral_DB_2, SQL_GermanyWestCentral_DB_2, SQL_CentralIndia_DB_2, SQL_SouthIndia_DB_2, SQL_JapanEast_DB_2, SQL_JapanWest_DB_2, SQL_NorthCentralUS_DB_2, SQL_UKWest_DB_2, SQL_WestUS_DB_2, SQL_WestCentralUS_DB_1, SQL_FranceSouth_DB_1, SQL_WestCentralUS_DB_2, SQL_FranceSouth_DB_2, SQL_SwitzerlandNorth_DB_1, SQL_SwitzerlandNorth_DB_2, SQL_BrazilSoutheast_DB_1, SQL_UAENorth_DB_1, SQL_BrazilSoutheast_DB_2, SQL_UAENorth_DB_2. Defaults to SQL_Default. +MaintenanceConfigurationName *string `json:"maintenanceConfigurationName,omitempty" tf:"maintenance_configuration_name,omitempty"` - // The max size of the database in gigabytes. - MaxSizeGb *float64 `json:"maxSizeGb,omitempty" tf:"max_size_gb,omitempty"` +// The max size of the database in gigabytes. +MaxSizeGb *float64 `json:"maxSizeGb,omitempty" tf:"max_size_gb,omitempty"` - // Minimal capacity that database will always have allocated, if not paused. This property is only settable for General Purpose Serverless databases. - MinCapacity *float64 `json:"minCapacity,omitempty" tf:"min_capacity,omitempty"` +// Minimal capacity that database will always have allocated, if not paused. This property is only settable for General Purpose Serverless databases. +MinCapacity *float64 `json:"minCapacity,omitempty" tf:"min_capacity,omitempty"` - // The number of readonly secondary replicas associated with the database to which readonly application intent connections may be routed. This property is only settable for Hyperscale edition databases. - ReadReplicaCount *float64 `json:"readReplicaCount,omitempty" tf:"read_replica_count,omitempty"` +// The number of readonly secondary replicas associated with the database to which readonly application intent connections may be routed. This property is only settable for Hyperscale edition databases. +ReadReplicaCount *float64 `json:"readReplicaCount,omitempty" tf:"read_replica_count,omitempty"` - // If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica. This property is only settable for Premium and Business Critical databases. - ReadScale *bool `json:"readScale,omitempty" tf:"read_scale,omitempty"` +// If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica. This property is only settable for Premium and Business Critical databases. +ReadScale *bool `json:"readScale,omitempty" tf:"read_scale,omitempty"` - // The ID of the database to be recovered. This property is only applicable when the create_mode is Recovery. - RecoverDatabaseID *string `json:"recoverDatabaseId,omitempty" tf:"recover_database_id,omitempty"` +// The ID of the database to be recovered. This property is only applicable when the create_mode is Recovery. +RecoverDatabaseID *string `json:"recoverDatabaseId,omitempty" tf:"recover_database_id,omitempty"` - // The ID of the database to be restored. This property is only applicable when the create_mode is Restore. - RestoreDroppedDatabaseID *string `json:"restoreDroppedDatabaseId,omitempty" tf:"restore_dropped_database_id,omitempty"` +// The ID of the database to be restored. This property is only applicable when the create_mode is Restore. +RestoreDroppedDatabaseID *string `json:"restoreDroppedDatabaseId,omitempty" tf:"restore_dropped_database_id,omitempty"` - // Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. This property is only settable for create_mode= PointInTimeRestore databases. - RestorePointInTime *string `json:"restorePointInTime,omitempty" tf:"restore_point_in_time,omitempty"` +// Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. This property is only settable for create_mode= PointInTimeRestore databases. +RestorePointInTime *string `json:"restorePointInTime,omitempty" tf:"restore_point_in_time,omitempty"` - // Specifies the name of the sample schema to apply when creating this database. Possible value is AdventureWorksLT. - SampleName *string `json:"sampleName,omitempty" tf:"sample_name,omitempty"` +// Specifies the name of the sample schema to apply when creating this database. Possible value is AdventureWorksLT. +SampleName *string `json:"sampleName,omitempty" tf:"sample_name,omitempty"` - // A short_term_retention_policy block as defined below. - ShortTermRetentionPolicy []ShortTermRetentionPolicyInitParameters `json:"shortTermRetentionPolicy,omitempty" tf:"short_term_retention_policy,omitempty"` +// A short_term_retention_policy block as defined below. +ShortTermRetentionPolicy []ShortTermRetentionPolicyInitParameters `json:"shortTermRetentionPolicy,omitempty" tf:"short_term_retention_policy,omitempty"` - // Specifies the name of the SKU used by the database. For example, GP_S_Gen5_2,HS_Gen4_1,BC_Gen5_2, ElasticPool, Basic,S0, P2 ,DW100c, DS100. Changing this from the HyperScale service tier to another service tier will create a new resource. - SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` +// Specifies the name of the SKU used by the database. For example, GP_S_Gen5_2,HS_Gen4_1,BC_Gen5_2, ElasticPool, Basic,S0, P2 ,DW100c, DS100. Changing this from the HyperScale service tier to another service tier will create a new resource. +SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` - // Specifies the storage account type used to store backups for this database. Possible values are Geo, Local and Zone. The default value is Geo. - StorageAccountType *string `json:"storageAccountType,omitempty" tf:"storage_account_type,omitempty"` +// Specifies the storage account type used to store backups for this database. Possible values are Geo, Local and Zone. The default value is Geo. +StorageAccountType *string `json:"storageAccountType,omitempty" tf:"storage_account_type,omitempty"` - // A mapping of tags to assign to the resource. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A mapping of tags to assign to the resource. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - // Threat detection policy configuration. The threat_detection_policy block supports fields documented below. - ThreatDetectionPolicy []ThreatDetectionPolicyInitParameters `json:"threatDetectionPolicy,omitempty" tf:"threat_detection_policy,omitempty"` +// Threat detection policy configuration. The threat_detection_policy block supports fields documented below. +ThreatDetectionPolicy []ThreatDetectionPolicyInitParameters `json:"threatDetectionPolicy,omitempty" tf:"threat_detection_policy,omitempty"` - // If set to true, Transparent Data Encryption will be enabled on the database. Defaults to true. - TransparentDataEncryptionEnabled *bool `json:"transparentDataEncryptionEnabled,omitempty" tf:"transparent_data_encryption_enabled,omitempty"` +// If set to true, Transparent Data Encryption will be enabled on the database. Defaults to true. +TransparentDataEncryptionEnabled *bool `json:"transparentDataEncryptionEnabled,omitempty" tf:"transparent_data_encryption_enabled,omitempty"` - // Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones. This property is only settable for Premium and Business Critical databases. - ZoneRedundant *bool `json:"zoneRedundant,omitempty" tf:"zone_redundant,omitempty"` +// Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones. This property is only settable for Premium and Business Critical databases. +ZoneRedundant *bool `json:"zoneRedundant,omitempty" tf:"zone_redundant,omitempty"` } + type MSSQLDatabaseObservation struct { - // Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled. This property is only settable for General Purpose Serverless databases. - AutoPauseDelayInMinutes *float64 `json:"autoPauseDelayInMinutes,omitempty" tf:"auto_pause_delay_in_minutes,omitempty"` - // Specifies the collation of the database. Changing this forces a new resource to be created. - Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` +// Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled. This property is only settable for General Purpose Serverless databases. +AutoPauseDelayInMinutes *float64 `json:"autoPauseDelayInMinutes,omitempty" tf:"auto_pause_delay_in_minutes,omitempty"` + +// Specifies the collation of the database. Changing this forces a new resource to be created. +Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` - // The create mode of the database. Possible values are Copy, Default, OnlineSecondary, PointInTimeRestore, Recovery, Restore, RestoreExternalBackup, RestoreExternalBackupSecondary, RestoreLongTermRetentionBackup and Secondary. Mutually exclusive with import. Changing this forces a new resource to be created. - CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` +// The create mode of the database. Possible values are Copy, Default, OnlineSecondary, PointInTimeRestore, Recovery, Restore, RestoreExternalBackup, RestoreExternalBackupSecondary, RestoreLongTermRetentionBackup and Secondary. Mutually exclusive with import. Changing this forces a new resource to be created. +CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` - // The ID of the source database from which to create the new database. This should only be used for databases with create_mode values that use another database as reference. Changing this forces a new resource to be created. - CreationSourceDatabaseID *string `json:"creationSourceDatabaseId,omitempty" tf:"creation_source_database_id,omitempty"` +// The ID of the source database from which to create the new database. This should only be used for databases with create_mode values that use another database as reference. Changing this forces a new resource to be created. +CreationSourceDatabaseID *string `json:"creationSourceDatabaseId,omitempty" tf:"creation_source_database_id,omitempty"` - // Specifies the ID of the elastic pool containing this database. - ElasticPoolID *string `json:"elasticPoolId,omitempty" tf:"elastic_pool_id,omitempty"` +// Specifies the ID of the elastic pool containing this database. +ElasticPoolID *string `json:"elasticPoolId,omitempty" tf:"elastic_pool_id,omitempty"` - // A boolean that specifies if the Geo Backup Policy is enabled. Defaults to true. - GeoBackupEnabled *bool `json:"geoBackupEnabled,omitempty" tf:"geo_backup_enabled,omitempty"` +// A boolean that specifies if the Geo Backup Policy is enabled. Defaults to true. +GeoBackupEnabled *bool `json:"geoBackupEnabled,omitempty" tf:"geo_backup_enabled,omitempty"` - // The ID of the MS SQL Database. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// The ID of the MS SQL Database. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // A Database Import block as documented below. Mutually exclusive with create_mode. - Import []ImportObservation `json:"import,omitempty" tf:"import,omitempty"` +// A Database Import block as documented below. Mutually exclusive with create_mode. +Import []ImportObservation `json:"import,omitempty" tf:"import,omitempty"` - // A boolean that specifies if this is a ledger database. Defaults to false. Changing this forces a new resource to be created. - LedgerEnabled *bool `json:"ledgerEnabled,omitempty" tf:"ledger_enabled,omitempty"` +// A boolean that specifies if this is a ledger database. Defaults to false. Changing this forces a new resource to be created. +LedgerEnabled *bool `json:"ledgerEnabled,omitempty" tf:"ledger_enabled,omitempty"` - // Specifies the license type applied to this database. Possible values are LicenseIncluded and BasePrice. - LicenseType *string `json:"licenseType,omitempty" tf:"license_type,omitempty"` +// Specifies the license type applied to this database. Possible values are LicenseIncluded and BasePrice. +LicenseType *string `json:"licenseType,omitempty" tf:"license_type,omitempty"` - // A long_term_retention_policy block as defined below. - LongTermRetentionPolicy []LongTermRetentionPolicyObservation `json:"longTermRetentionPolicy,omitempty" tf:"long_term_retention_policy,omitempty"` +// A long_term_retention_policy block as defined below. +LongTermRetentionPolicy []LongTermRetentionPolicyObservation `json:"longTermRetentionPolicy,omitempty" tf:"long_term_retention_policy,omitempty"` - // The name of the Public Maintenance Configuration window to apply to the database. Valid values include SQL_Default, SQL_EastUS_DB_1, SQL_EastUS2_DB_1, SQL_SoutheastAsia_DB_1, SQL_AustraliaEast_DB_1, SQL_NorthEurope_DB_1, SQL_SouthCentralUS_DB_1, SQL_WestUS2_DB_1, SQL_UKSouth_DB_1, SQL_WestEurope_DB_1, SQL_EastUS_DB_2, SQL_EastUS2_DB_2, SQL_WestUS2_DB_2, SQL_SoutheastAsia_DB_2, SQL_AustraliaEast_DB_2, SQL_NorthEurope_DB_2, SQL_SouthCentralUS_DB_2, SQL_UKSouth_DB_2, SQL_WestEurope_DB_2, SQL_AustraliaSoutheast_DB_1, SQL_BrazilSouth_DB_1, SQL_CanadaCentral_DB_1, SQL_CanadaEast_DB_1, SQL_CentralUS_DB_1, SQL_EastAsia_DB_1, SQL_FranceCentral_DB_1, SQL_GermanyWestCentral_DB_1, SQL_CentralIndia_DB_1, SQL_SouthIndia_DB_1, SQL_JapanEast_DB_1, SQL_JapanWest_DB_1, SQL_NorthCentralUS_DB_1, SQL_UKWest_DB_1, SQL_WestUS_DB_1, SQL_AustraliaSoutheast_DB_2, SQL_BrazilSouth_DB_2, SQL_CanadaCentral_DB_2, SQL_CanadaEast_DB_2, SQL_CentralUS_DB_2, SQL_EastAsia_DB_2, SQL_FranceCentral_DB_2, SQL_GermanyWestCentral_DB_2, SQL_CentralIndia_DB_2, SQL_SouthIndia_DB_2, SQL_JapanEast_DB_2, SQL_JapanWest_DB_2, SQL_NorthCentralUS_DB_2, SQL_UKWest_DB_2, SQL_WestUS_DB_2, SQL_WestCentralUS_DB_1, SQL_FranceSouth_DB_1, SQL_WestCentralUS_DB_2, SQL_FranceSouth_DB_2, SQL_SwitzerlandNorth_DB_1, SQL_SwitzerlandNorth_DB_2, SQL_BrazilSoutheast_DB_1, SQL_UAENorth_DB_1, SQL_BrazilSoutheast_DB_2, SQL_UAENorth_DB_2. Defaults to SQL_Default. - MaintenanceConfigurationName *string `json:"maintenanceConfigurationName,omitempty" tf:"maintenance_configuration_name,omitempty"` +// The name of the Public Maintenance Configuration window to apply to the database. Valid values include SQL_Default, SQL_EastUS_DB_1, SQL_EastUS2_DB_1, SQL_SoutheastAsia_DB_1, SQL_AustraliaEast_DB_1, SQL_NorthEurope_DB_1, SQL_SouthCentralUS_DB_1, SQL_WestUS2_DB_1, SQL_UKSouth_DB_1, SQL_WestEurope_DB_1, SQL_EastUS_DB_2, SQL_EastUS2_DB_2, SQL_WestUS2_DB_2, SQL_SoutheastAsia_DB_2, SQL_AustraliaEast_DB_2, SQL_NorthEurope_DB_2, SQL_SouthCentralUS_DB_2, SQL_UKSouth_DB_2, SQL_WestEurope_DB_2, SQL_AustraliaSoutheast_DB_1, SQL_BrazilSouth_DB_1, SQL_CanadaCentral_DB_1, SQL_CanadaEast_DB_1, SQL_CentralUS_DB_1, SQL_EastAsia_DB_1, SQL_FranceCentral_DB_1, SQL_GermanyWestCentral_DB_1, SQL_CentralIndia_DB_1, SQL_SouthIndia_DB_1, SQL_JapanEast_DB_1, SQL_JapanWest_DB_1, SQL_NorthCentralUS_DB_1, SQL_UKWest_DB_1, SQL_WestUS_DB_1, SQL_AustraliaSoutheast_DB_2, SQL_BrazilSouth_DB_2, SQL_CanadaCentral_DB_2, SQL_CanadaEast_DB_2, SQL_CentralUS_DB_2, SQL_EastAsia_DB_2, SQL_FranceCentral_DB_2, SQL_GermanyWestCentral_DB_2, SQL_CentralIndia_DB_2, SQL_SouthIndia_DB_2, SQL_JapanEast_DB_2, SQL_JapanWest_DB_2, SQL_NorthCentralUS_DB_2, SQL_UKWest_DB_2, SQL_WestUS_DB_2, SQL_WestCentralUS_DB_1, SQL_FranceSouth_DB_1, SQL_WestCentralUS_DB_2, SQL_FranceSouth_DB_2, SQL_SwitzerlandNorth_DB_1, SQL_SwitzerlandNorth_DB_2, SQL_BrazilSoutheast_DB_1, SQL_UAENorth_DB_1, SQL_BrazilSoutheast_DB_2, SQL_UAENorth_DB_2. Defaults to SQL_Default. +MaintenanceConfigurationName *string `json:"maintenanceConfigurationName,omitempty" tf:"maintenance_configuration_name,omitempty"` - // The max size of the database in gigabytes. - MaxSizeGb *float64 `json:"maxSizeGb,omitempty" tf:"max_size_gb,omitempty"` +// The max size of the database in gigabytes. +MaxSizeGb *float64 `json:"maxSizeGb,omitempty" tf:"max_size_gb,omitempty"` - // Minimal capacity that database will always have allocated, if not paused. This property is only settable for General Purpose Serverless databases. - MinCapacity *float64 `json:"minCapacity,omitempty" tf:"min_capacity,omitempty"` +// Minimal capacity that database will always have allocated, if not paused. This property is only settable for General Purpose Serverless databases. +MinCapacity *float64 `json:"minCapacity,omitempty" tf:"min_capacity,omitempty"` - // The number of readonly secondary replicas associated with the database to which readonly application intent connections may be routed. This property is only settable for Hyperscale edition databases. - ReadReplicaCount *float64 `json:"readReplicaCount,omitempty" tf:"read_replica_count,omitempty"` +// The number of readonly secondary replicas associated with the database to which readonly application intent connections may be routed. This property is only settable for Hyperscale edition databases. +ReadReplicaCount *float64 `json:"readReplicaCount,omitempty" tf:"read_replica_count,omitempty"` - // If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica. This property is only settable for Premium and Business Critical databases. - ReadScale *bool `json:"readScale,omitempty" tf:"read_scale,omitempty"` +// If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica. This property is only settable for Premium and Business Critical databases. +ReadScale *bool `json:"readScale,omitempty" tf:"read_scale,omitempty"` - // The ID of the database to be recovered. This property is only applicable when the create_mode is Recovery. - RecoverDatabaseID *string `json:"recoverDatabaseId,omitempty" tf:"recover_database_id,omitempty"` +// The ID of the database to be recovered. This property is only applicable when the create_mode is Recovery. +RecoverDatabaseID *string `json:"recoverDatabaseId,omitempty" tf:"recover_database_id,omitempty"` - // The ID of the database to be restored. This property is only applicable when the create_mode is Restore. - RestoreDroppedDatabaseID *string `json:"restoreDroppedDatabaseId,omitempty" tf:"restore_dropped_database_id,omitempty"` +// The ID of the database to be restored. This property is only applicable when the create_mode is Restore. +RestoreDroppedDatabaseID *string `json:"restoreDroppedDatabaseId,omitempty" tf:"restore_dropped_database_id,omitempty"` - // Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. This property is only settable for create_mode= PointInTimeRestore databases. - RestorePointInTime *string `json:"restorePointInTime,omitempty" tf:"restore_point_in_time,omitempty"` +// Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. This property is only settable for create_mode= PointInTimeRestore databases. +RestorePointInTime *string `json:"restorePointInTime,omitempty" tf:"restore_point_in_time,omitempty"` - // Specifies the name of the sample schema to apply when creating this database. Possible value is AdventureWorksLT. - SampleName *string `json:"sampleName,omitempty" tf:"sample_name,omitempty"` +// Specifies the name of the sample schema to apply when creating this database. Possible value is AdventureWorksLT. +SampleName *string `json:"sampleName,omitempty" tf:"sample_name,omitempty"` - // The id of the MS SQL Server on which to create the database. Changing this forces a new resource to be created. - ServerID *string `json:"serverId,omitempty" tf:"server_id,omitempty"` +// The id of the MS SQL Server on which to create the database. Changing this forces a new resource to be created. +ServerID *string `json:"serverId,omitempty" tf:"server_id,omitempty"` - // A short_term_retention_policy block as defined below. - ShortTermRetentionPolicy []ShortTermRetentionPolicyObservation `json:"shortTermRetentionPolicy,omitempty" tf:"short_term_retention_policy,omitempty"` +// A short_term_retention_policy block as defined below. +ShortTermRetentionPolicy []ShortTermRetentionPolicyObservation `json:"shortTermRetentionPolicy,omitempty" tf:"short_term_retention_policy,omitempty"` - // Specifies the name of the SKU used by the database. For example, GP_S_Gen5_2,HS_Gen4_1,BC_Gen5_2, ElasticPool, Basic,S0, P2 ,DW100c, DS100. Changing this from the HyperScale service tier to another service tier will create a new resource. - SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` +// Specifies the name of the SKU used by the database. For example, GP_S_Gen5_2,HS_Gen4_1,BC_Gen5_2, ElasticPool, Basic,S0, P2 ,DW100c, DS100. Changing this from the HyperScale service tier to another service tier will create a new resource. +SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` - // Specifies the storage account type used to store backups for this database. Possible values are Geo, Local and Zone. The default value is Geo. - StorageAccountType *string `json:"storageAccountType,omitempty" tf:"storage_account_type,omitempty"` +// Specifies the storage account type used to store backups for this database. Possible values are Geo, Local and Zone. The default value is Geo. +StorageAccountType *string `json:"storageAccountType,omitempty" tf:"storage_account_type,omitempty"` - // A mapping of tags to assign to the resource. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A mapping of tags to assign to the resource. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - // Threat detection policy configuration. The threat_detection_policy block supports fields documented below. - ThreatDetectionPolicy []ThreatDetectionPolicyObservation `json:"threatDetectionPolicy,omitempty" tf:"threat_detection_policy,omitempty"` +// Threat detection policy configuration. The threat_detection_policy block supports fields documented below. +ThreatDetectionPolicy []ThreatDetectionPolicyObservation `json:"threatDetectionPolicy,omitempty" tf:"threat_detection_policy,omitempty"` - // If set to true, Transparent Data Encryption will be enabled on the database. Defaults to true. - TransparentDataEncryptionEnabled *bool `json:"transparentDataEncryptionEnabled,omitempty" tf:"transparent_data_encryption_enabled,omitempty"` +// If set to true, Transparent Data Encryption will be enabled on the database. Defaults to true. +TransparentDataEncryptionEnabled *bool `json:"transparentDataEncryptionEnabled,omitempty" tf:"transparent_data_encryption_enabled,omitempty"` - // Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones. This property is only settable for Premium and Business Critical databases. - ZoneRedundant *bool `json:"zoneRedundant,omitempty" tf:"zone_redundant,omitempty"` +// Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones. This property is only settable for Premium and Business Critical databases. +ZoneRedundant *bool `json:"zoneRedundant,omitempty" tf:"zone_redundant,omitempty"` } + type MSSQLDatabaseParameters struct { - // Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled. This property is only settable for General Purpose Serverless databases. - // +kubebuilder:validation:Optional - AutoPauseDelayInMinutes *float64 `json:"autoPauseDelayInMinutes,omitempty" tf:"auto_pause_delay_in_minutes,omitempty"` - // Specifies the collation of the database. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` +// Time in minutes after which database is automatically paused. A value of -1 means that automatic pause is disabled. This property is only settable for General Purpose Serverless databases. +// +kubebuilder:validation:Optional +AutoPauseDelayInMinutes *float64 `json:"autoPauseDelayInMinutes,omitempty" tf:"auto_pause_delay_in_minutes,omitempty"` + +// Specifies the collation of the database. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` - // The create mode of the database. Possible values are Copy, Default, OnlineSecondary, PointInTimeRestore, Recovery, Restore, RestoreExternalBackup, RestoreExternalBackupSecondary, RestoreLongTermRetentionBackup and Secondary. Mutually exclusive with import. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` +// The create mode of the database. Possible values are Copy, Default, OnlineSecondary, PointInTimeRestore, Recovery, Restore, RestoreExternalBackup, RestoreExternalBackupSecondary, RestoreLongTermRetentionBackup and Secondary. Mutually exclusive with import. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +CreateMode *string `json:"createMode,omitempty" tf:"create_mode,omitempty"` - // The ID of the source database from which to create the new database. This should only be used for databases with create_mode values that use another database as reference. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - CreationSourceDatabaseID *string `json:"creationSourceDatabaseId,omitempty" tf:"creation_source_database_id,omitempty"` +// The ID of the source database from which to create the new database. This should only be used for databases with create_mode values that use another database as reference. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +CreationSourceDatabaseID *string `json:"creationSourceDatabaseId,omitempty" tf:"creation_source_database_id,omitempty"` - // Specifies the ID of the elastic pool containing this database. - // +kubebuilder:validation:Optional - ElasticPoolID *string `json:"elasticPoolId,omitempty" tf:"elastic_pool_id,omitempty"` +// Specifies the ID of the elastic pool containing this database. +// +kubebuilder:validation:Optional +ElasticPoolID *string `json:"elasticPoolId,omitempty" tf:"elastic_pool_id,omitempty"` - // A boolean that specifies if the Geo Backup Policy is enabled. Defaults to true. - // +kubebuilder:validation:Optional - GeoBackupEnabled *bool `json:"geoBackupEnabled,omitempty" tf:"geo_backup_enabled,omitempty"` +// A boolean that specifies if the Geo Backup Policy is enabled. Defaults to true. +// +kubebuilder:validation:Optional +GeoBackupEnabled *bool `json:"geoBackupEnabled,omitempty" tf:"geo_backup_enabled,omitempty"` - // A Database Import block as documented below. Mutually exclusive with create_mode. - // +kubebuilder:validation:Optional - Import []ImportParameters `json:"import,omitempty" tf:"import,omitempty"` +// A Database Import block as documented below. Mutually exclusive with create_mode. +// +kubebuilder:validation:Optional +Import []ImportParameters `json:"import,omitempty" tf:"import,omitempty"` - // A boolean that specifies if this is a ledger database. Defaults to false. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - LedgerEnabled *bool `json:"ledgerEnabled,omitempty" tf:"ledger_enabled,omitempty"` +// A boolean that specifies if this is a ledger database. Defaults to false. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +LedgerEnabled *bool `json:"ledgerEnabled,omitempty" tf:"ledger_enabled,omitempty"` - // Specifies the license type applied to this database. Possible values are LicenseIncluded and BasePrice. - // +kubebuilder:validation:Optional - LicenseType *string `json:"licenseType,omitempty" tf:"license_type,omitempty"` +// Specifies the license type applied to this database. Possible values are LicenseIncluded and BasePrice. +// +kubebuilder:validation:Optional +LicenseType *string `json:"licenseType,omitempty" tf:"license_type,omitempty"` - // A long_term_retention_policy block as defined below. - // +kubebuilder:validation:Optional - LongTermRetentionPolicy []LongTermRetentionPolicyParameters `json:"longTermRetentionPolicy,omitempty" tf:"long_term_retention_policy,omitempty"` +// A long_term_retention_policy block as defined below. +// +kubebuilder:validation:Optional +LongTermRetentionPolicy []LongTermRetentionPolicyParameters `json:"longTermRetentionPolicy,omitempty" tf:"long_term_retention_policy,omitempty"` - // The name of the Public Maintenance Configuration window to apply to the database. Valid values include SQL_Default, SQL_EastUS_DB_1, SQL_EastUS2_DB_1, SQL_SoutheastAsia_DB_1, SQL_AustraliaEast_DB_1, SQL_NorthEurope_DB_1, SQL_SouthCentralUS_DB_1, SQL_WestUS2_DB_1, SQL_UKSouth_DB_1, SQL_WestEurope_DB_1, SQL_EastUS_DB_2, SQL_EastUS2_DB_2, SQL_WestUS2_DB_2, SQL_SoutheastAsia_DB_2, SQL_AustraliaEast_DB_2, SQL_NorthEurope_DB_2, SQL_SouthCentralUS_DB_2, SQL_UKSouth_DB_2, SQL_WestEurope_DB_2, SQL_AustraliaSoutheast_DB_1, SQL_BrazilSouth_DB_1, SQL_CanadaCentral_DB_1, SQL_CanadaEast_DB_1, SQL_CentralUS_DB_1, SQL_EastAsia_DB_1, SQL_FranceCentral_DB_1, SQL_GermanyWestCentral_DB_1, SQL_CentralIndia_DB_1, SQL_SouthIndia_DB_1, SQL_JapanEast_DB_1, SQL_JapanWest_DB_1, SQL_NorthCentralUS_DB_1, SQL_UKWest_DB_1, SQL_WestUS_DB_1, SQL_AustraliaSoutheast_DB_2, SQL_BrazilSouth_DB_2, SQL_CanadaCentral_DB_2, SQL_CanadaEast_DB_2, SQL_CentralUS_DB_2, SQL_EastAsia_DB_2, SQL_FranceCentral_DB_2, SQL_GermanyWestCentral_DB_2, SQL_CentralIndia_DB_2, SQL_SouthIndia_DB_2, SQL_JapanEast_DB_2, SQL_JapanWest_DB_2, SQL_NorthCentralUS_DB_2, SQL_UKWest_DB_2, SQL_WestUS_DB_2, SQL_WestCentralUS_DB_1, SQL_FranceSouth_DB_1, SQL_WestCentralUS_DB_2, SQL_FranceSouth_DB_2, SQL_SwitzerlandNorth_DB_1, SQL_SwitzerlandNorth_DB_2, SQL_BrazilSoutheast_DB_1, SQL_UAENorth_DB_1, SQL_BrazilSoutheast_DB_2, SQL_UAENorth_DB_2. Defaults to SQL_Default. - // +kubebuilder:validation:Optional - MaintenanceConfigurationName *string `json:"maintenanceConfigurationName,omitempty" tf:"maintenance_configuration_name,omitempty"` +// The name of the Public Maintenance Configuration window to apply to the database. Valid values include SQL_Default, SQL_EastUS_DB_1, SQL_EastUS2_DB_1, SQL_SoutheastAsia_DB_1, SQL_AustraliaEast_DB_1, SQL_NorthEurope_DB_1, SQL_SouthCentralUS_DB_1, SQL_WestUS2_DB_1, SQL_UKSouth_DB_1, SQL_WestEurope_DB_1, SQL_EastUS_DB_2, SQL_EastUS2_DB_2, SQL_WestUS2_DB_2, SQL_SoutheastAsia_DB_2, SQL_AustraliaEast_DB_2, SQL_NorthEurope_DB_2, SQL_SouthCentralUS_DB_2, SQL_UKSouth_DB_2, SQL_WestEurope_DB_2, SQL_AustraliaSoutheast_DB_1, SQL_BrazilSouth_DB_1, SQL_CanadaCentral_DB_1, SQL_CanadaEast_DB_1, SQL_CentralUS_DB_1, SQL_EastAsia_DB_1, SQL_FranceCentral_DB_1, SQL_GermanyWestCentral_DB_1, SQL_CentralIndia_DB_1, SQL_SouthIndia_DB_1, SQL_JapanEast_DB_1, SQL_JapanWest_DB_1, SQL_NorthCentralUS_DB_1, SQL_UKWest_DB_1, SQL_WestUS_DB_1, SQL_AustraliaSoutheast_DB_2, SQL_BrazilSouth_DB_2, SQL_CanadaCentral_DB_2, SQL_CanadaEast_DB_2, SQL_CentralUS_DB_2, SQL_EastAsia_DB_2, SQL_FranceCentral_DB_2, SQL_GermanyWestCentral_DB_2, SQL_CentralIndia_DB_2, SQL_SouthIndia_DB_2, SQL_JapanEast_DB_2, SQL_JapanWest_DB_2, SQL_NorthCentralUS_DB_2, SQL_UKWest_DB_2, SQL_WestUS_DB_2, SQL_WestCentralUS_DB_1, SQL_FranceSouth_DB_1, SQL_WestCentralUS_DB_2, SQL_FranceSouth_DB_2, SQL_SwitzerlandNorth_DB_1, SQL_SwitzerlandNorth_DB_2, SQL_BrazilSoutheast_DB_1, SQL_UAENorth_DB_1, SQL_BrazilSoutheast_DB_2, SQL_UAENorth_DB_2. Defaults to SQL_Default. +// +kubebuilder:validation:Optional +MaintenanceConfigurationName *string `json:"maintenanceConfigurationName,omitempty" tf:"maintenance_configuration_name,omitempty"` - // The max size of the database in gigabytes. - // +kubebuilder:validation:Optional - MaxSizeGb *float64 `json:"maxSizeGb,omitempty" tf:"max_size_gb,omitempty"` +// The max size of the database in gigabytes. +// +kubebuilder:validation:Optional +MaxSizeGb *float64 `json:"maxSizeGb,omitempty" tf:"max_size_gb,omitempty"` - // Minimal capacity that database will always have allocated, if not paused. This property is only settable for General Purpose Serverless databases. - // +kubebuilder:validation:Optional - MinCapacity *float64 `json:"minCapacity,omitempty" tf:"min_capacity,omitempty"` +// Minimal capacity that database will always have allocated, if not paused. This property is only settable for General Purpose Serverless databases. +// +kubebuilder:validation:Optional +MinCapacity *float64 `json:"minCapacity,omitempty" tf:"min_capacity,omitempty"` - // The number of readonly secondary replicas associated with the database to which readonly application intent connections may be routed. This property is only settable for Hyperscale edition databases. - // +kubebuilder:validation:Optional - ReadReplicaCount *float64 `json:"readReplicaCount,omitempty" tf:"read_replica_count,omitempty"` +// The number of readonly secondary replicas associated with the database to which readonly application intent connections may be routed. This property is only settable for Hyperscale edition databases. +// +kubebuilder:validation:Optional +ReadReplicaCount *float64 `json:"readReplicaCount,omitempty" tf:"read_replica_count,omitempty"` - // If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica. This property is only settable for Premium and Business Critical databases. - // +kubebuilder:validation:Optional - ReadScale *bool `json:"readScale,omitempty" tf:"read_scale,omitempty"` +// If enabled, connections that have application intent set to readonly in their connection string may be routed to a readonly secondary replica. This property is only settable for Premium and Business Critical databases. +// +kubebuilder:validation:Optional +ReadScale *bool `json:"readScale,omitempty" tf:"read_scale,omitempty"` - // The ID of the database to be recovered. This property is only applicable when the create_mode is Recovery. - // +kubebuilder:validation:Optional - RecoverDatabaseID *string `json:"recoverDatabaseId,omitempty" tf:"recover_database_id,omitempty"` +// The ID of the database to be recovered. This property is only applicable when the create_mode is Recovery. +// +kubebuilder:validation:Optional +RecoverDatabaseID *string `json:"recoverDatabaseId,omitempty" tf:"recover_database_id,omitempty"` - // The ID of the database to be restored. This property is only applicable when the create_mode is Restore. - // +kubebuilder:validation:Optional - RestoreDroppedDatabaseID *string `json:"restoreDroppedDatabaseId,omitempty" tf:"restore_dropped_database_id,omitempty"` +// The ID of the database to be restored. This property is only applicable when the create_mode is Restore. +// +kubebuilder:validation:Optional +RestoreDroppedDatabaseID *string `json:"restoreDroppedDatabaseId,omitempty" tf:"restore_dropped_database_id,omitempty"` - // Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. This property is only settable for create_mode= PointInTimeRestore databases. - // +kubebuilder:validation:Optional - RestorePointInTime *string `json:"restorePointInTime,omitempty" tf:"restore_point_in_time,omitempty"` +// Specifies the point in time (ISO8601 format) of the source database that will be restored to create the new database. This property is only settable for create_mode= PointInTimeRestore databases. +// +kubebuilder:validation:Optional +RestorePointInTime *string `json:"restorePointInTime,omitempty" tf:"restore_point_in_time,omitempty"` - // Specifies the name of the sample schema to apply when creating this database. Possible value is AdventureWorksLT. - // +kubebuilder:validation:Optional - SampleName *string `json:"sampleName,omitempty" tf:"sample_name,omitempty"` +// Specifies the name of the sample schema to apply when creating this database. Possible value is AdventureWorksLT. +// +kubebuilder:validation:Optional +SampleName *string `json:"sampleName,omitempty" tf:"sample_name,omitempty"` - // The id of the MS SQL Server on which to create the database. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=MSSQLServer - // +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() - // +kubebuilder:validation:Optional - ServerID *string `json:"serverId,omitempty" tf:"server_id,omitempty"` +// The id of the MS SQL Server on which to create the database. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=MSSQLServer +// +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() +// +kubebuilder:validation:Optional +ServerID *string `json:"serverId,omitempty" tf:"server_id,omitempty"` - // Reference to a MSSQLServer to populate serverId. - // +kubebuilder:validation:Optional - ServerIDRef *v1.Reference `json:"serverIdRef,omitempty" tf:"-"` +// Reference to a MSSQLServer to populate serverId. +// +kubebuilder:validation:Optional +ServerIDRef *v1.Reference `json:"serverIdRef,omitempty" tf:"-"` - // Selector for a MSSQLServer to populate serverId. - // +kubebuilder:validation:Optional - ServerIDSelector *v1.Selector `json:"serverIdSelector,omitempty" tf:"-"` +// Selector for a MSSQLServer to populate serverId. +// +kubebuilder:validation:Optional +ServerIDSelector *v1.Selector `json:"serverIdSelector,omitempty" tf:"-"` - // A short_term_retention_policy block as defined below. - // +kubebuilder:validation:Optional - ShortTermRetentionPolicy []ShortTermRetentionPolicyParameters `json:"shortTermRetentionPolicy,omitempty" tf:"short_term_retention_policy,omitempty"` +// A short_term_retention_policy block as defined below. +// +kubebuilder:validation:Optional +ShortTermRetentionPolicy []ShortTermRetentionPolicyParameters `json:"shortTermRetentionPolicy,omitempty" tf:"short_term_retention_policy,omitempty"` - // Specifies the name of the SKU used by the database. For example, GP_S_Gen5_2,HS_Gen4_1,BC_Gen5_2, ElasticPool, Basic,S0, P2 ,DW100c, DS100. Changing this from the HyperScale service tier to another service tier will create a new resource. - // +kubebuilder:validation:Optional - SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` +// Specifies the name of the SKU used by the database. For example, GP_S_Gen5_2,HS_Gen4_1,BC_Gen5_2, ElasticPool, Basic,S0, P2 ,DW100c, DS100. Changing this from the HyperScale service tier to another service tier will create a new resource. +// +kubebuilder:validation:Optional +SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` - // Specifies the storage account type used to store backups for this database. Possible values are Geo, Local and Zone. The default value is Geo. - // +kubebuilder:validation:Optional - StorageAccountType *string `json:"storageAccountType,omitempty" tf:"storage_account_type,omitempty"` - - // A mapping of tags to assign to the resource. - // +kubebuilder:validation:Optional - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - - // Threat detection policy configuration. The threat_detection_policy block supports fields documented below. - // +kubebuilder:validation:Optional - ThreatDetectionPolicy []ThreatDetectionPolicyParameters `json:"threatDetectionPolicy,omitempty" tf:"threat_detection_policy,omitempty"` - - // If set to true, Transparent Data Encryption will be enabled on the database. Defaults to true. - // +kubebuilder:validation:Optional - TransparentDataEncryptionEnabled *bool `json:"transparentDataEncryptionEnabled,omitempty" tf:"transparent_data_encryption_enabled,omitempty"` - - // Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones. This property is only settable for Premium and Business Critical databases. - // +kubebuilder:validation:Optional - ZoneRedundant *bool `json:"zoneRedundant,omitempty" tf:"zone_redundant,omitempty"` +// Specifies the storage account type used to store backups for this database. Possible values are Geo, Local and Zone. The default value is Geo. +// +kubebuilder:validation:Optional +StorageAccountType *string `json:"storageAccountType,omitempty" tf:"storage_account_type,omitempty"` + +// A mapping of tags to assign to the resource. +// +kubebuilder:validation:Optional +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + +// Threat detection policy configuration. The threat_detection_policy block supports fields documented below. +// +kubebuilder:validation:Optional +ThreatDetectionPolicy []ThreatDetectionPolicyParameters `json:"threatDetectionPolicy,omitempty" tf:"threat_detection_policy,omitempty"` + +// If set to true, Transparent Data Encryption will be enabled on the database. Defaults to true. +// +kubebuilder:validation:Optional +TransparentDataEncryptionEnabled *bool `json:"transparentDataEncryptionEnabled,omitempty" tf:"transparent_data_encryption_enabled,omitempty"` + +// Whether or not this database is zone redundant, which means the replicas of this database will be spread across multiple availability zones. This property is only settable for Premium and Business Critical databases. +// +kubebuilder:validation:Optional +ZoneRedundant *bool `json:"zoneRedundant,omitempty" tf:"zone_redundant,omitempty"` } + type ShortTermRetentionPolicyInitParameters struct { - // The hours between each differential backup. This is only applicable to live databases but not dropped databases. Value has to be 12 or 24. Defaults to 12 hours. - BackupIntervalInHours *float64 `json:"backupIntervalInHours,omitempty" tf:"backup_interval_in_hours,omitempty"` - // Point In Time Restore configuration. Value has to be between 7 and 35. - RetentionDays *float64 `json:"retentionDays,omitempty" tf:"retention_days,omitempty"` +// The hours between each differential backup. This is only applicable to live databases but not dropped databases. Value has to be 12 or 24. Defaults to 12 hours. +BackupIntervalInHours *float64 `json:"backupIntervalInHours,omitempty" tf:"backup_interval_in_hours,omitempty"` + +// Point In Time Restore configuration. Value has to be between 7 and 35. +RetentionDays *float64 `json:"retentionDays,omitempty" tf:"retention_days,omitempty"` } + type ShortTermRetentionPolicyObservation struct { - // The hours between each differential backup. This is only applicable to live databases but not dropped databases. Value has to be 12 or 24. Defaults to 12 hours. - BackupIntervalInHours *float64 `json:"backupIntervalInHours,omitempty" tf:"backup_interval_in_hours,omitempty"` - // Point In Time Restore configuration. Value has to be between 7 and 35. - RetentionDays *float64 `json:"retentionDays,omitempty" tf:"retention_days,omitempty"` +// The hours between each differential backup. This is only applicable to live databases but not dropped databases. Value has to be 12 or 24. Defaults to 12 hours. +BackupIntervalInHours *float64 `json:"backupIntervalInHours,omitempty" tf:"backup_interval_in_hours,omitempty"` + +// Point In Time Restore configuration. Value has to be between 7 and 35. +RetentionDays *float64 `json:"retentionDays,omitempty" tf:"retention_days,omitempty"` } + type ShortTermRetentionPolicyParameters struct { - // The hours between each differential backup. This is only applicable to live databases but not dropped databases. Value has to be 12 or 24. Defaults to 12 hours. - // +kubebuilder:validation:Optional - BackupIntervalInHours *float64 `json:"backupIntervalInHours,omitempty" tf:"backup_interval_in_hours,omitempty"` - // Point In Time Restore configuration. Value has to be between 7 and 35. - // +kubebuilder:validation:Optional - RetentionDays *float64 `json:"retentionDays" tf:"retention_days,omitempty"` +// The hours between each differential backup. This is only applicable to live databases but not dropped databases. Value has to be 12 or 24. Defaults to 12 hours. +// +kubebuilder:validation:Optional +BackupIntervalInHours *float64 `json:"backupIntervalInHours,omitempty" tf:"backup_interval_in_hours,omitempty"` + +// Point In Time Restore configuration. Value has to be between 7 and 35. +// +kubebuilder:validation:Optional +RetentionDays *float64 `json:"retentionDays" tf:"retention_days,omitempty"` } + type ThreatDetectionPolicyInitParameters struct { - // Specifies a list of alerts which should be disabled. Possible values include Access_Anomaly, Sql_Injection and Sql_Injection_Vulnerability. - DisabledAlerts []*string `json:"disabledAlerts,omitempty" tf:"disabled_alerts,omitempty"` - // Should the account administrators be emailed when this alert is triggered? Possible values are Disabled and Enabled. - EmailAccountAdmins *string `json:"emailAccountAdmins,omitempty" tf:"email_account_admins,omitempty"` +// Specifies a list of alerts which should be disabled. Possible values include Access_Anomaly, Sql_Injection and Sql_Injection_Vulnerability. +DisabledAlerts []*string `json:"disabledAlerts,omitempty" tf:"disabled_alerts,omitempty"` + +// Should the account administrators be emailed when this alert is triggered? Possible values are Disabled and Enabled. +EmailAccountAdmins *string `json:"emailAccountAdmins,omitempty" tf:"email_account_admins,omitempty"` - // A list of email addresses which alerts should be sent to. - EmailAddresses []*string `json:"emailAddresses,omitempty" tf:"email_addresses,omitempty"` +// A list of email addresses which alerts should be sent to. +EmailAddresses []*string `json:"emailAddresses,omitempty" tf:"email_addresses,omitempty"` - // Specifies the number of days to keep in the Threat Detection audit logs. - RetentionDays *float64 `json:"retentionDays,omitempty" tf:"retention_days,omitempty"` +// Specifies the number of days to keep in the Threat Detection audit logs. +RetentionDays *float64 `json:"retentionDays,omitempty" tf:"retention_days,omitempty"` - // The State of the Policy. Possible values are Enabled, Disabled or New. - State *string `json:"state,omitempty" tf:"state,omitempty"` +// The State of the Policy. Possible values are Enabled, Disabled or New. +State *string `json:"state,omitempty" tf:"state,omitempty"` - // Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. Required if state is Enabled. - StorageEndpoint *string `json:"storageEndpoint,omitempty" tf:"storage_endpoint,omitempty"` +// Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. Required if state is Enabled. +StorageEndpoint *string `json:"storageEndpoint,omitempty" tf:"storage_endpoint,omitempty"` } + type ThreatDetectionPolicyObservation struct { - // Specifies a list of alerts which should be disabled. Possible values include Access_Anomaly, Sql_Injection and Sql_Injection_Vulnerability. - DisabledAlerts []*string `json:"disabledAlerts,omitempty" tf:"disabled_alerts,omitempty"` - // Should the account administrators be emailed when this alert is triggered? Possible values are Disabled and Enabled. - EmailAccountAdmins *string `json:"emailAccountAdmins,omitempty" tf:"email_account_admins,omitempty"` +// Specifies a list of alerts which should be disabled. Possible values include Access_Anomaly, Sql_Injection and Sql_Injection_Vulnerability. +DisabledAlerts []*string `json:"disabledAlerts,omitempty" tf:"disabled_alerts,omitempty"` + +// Should the account administrators be emailed when this alert is triggered? Possible values are Disabled and Enabled. +EmailAccountAdmins *string `json:"emailAccountAdmins,omitempty" tf:"email_account_admins,omitempty"` - // A list of email addresses which alerts should be sent to. - EmailAddresses []*string `json:"emailAddresses,omitempty" tf:"email_addresses,omitempty"` +// A list of email addresses which alerts should be sent to. +EmailAddresses []*string `json:"emailAddresses,omitempty" tf:"email_addresses,omitempty"` - // Specifies the number of days to keep in the Threat Detection audit logs. - RetentionDays *float64 `json:"retentionDays,omitempty" tf:"retention_days,omitempty"` +// Specifies the number of days to keep in the Threat Detection audit logs. +RetentionDays *float64 `json:"retentionDays,omitempty" tf:"retention_days,omitempty"` - // The State of the Policy. Possible values are Enabled, Disabled or New. - State *string `json:"state,omitempty" tf:"state,omitempty"` +// The State of the Policy. Possible values are Enabled, Disabled or New. +State *string `json:"state,omitempty" tf:"state,omitempty"` - // Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. Required if state is Enabled. - StorageEndpoint *string `json:"storageEndpoint,omitempty" tf:"storage_endpoint,omitempty"` +// Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. Required if state is Enabled. +StorageEndpoint *string `json:"storageEndpoint,omitempty" tf:"storage_endpoint,omitempty"` } + type ThreatDetectionPolicyParameters struct { - // Specifies a list of alerts which should be disabled. Possible values include Access_Anomaly, Sql_Injection and Sql_Injection_Vulnerability. - // +kubebuilder:validation:Optional - DisabledAlerts []*string `json:"disabledAlerts,omitempty" tf:"disabled_alerts,omitempty"` - // Should the account administrators be emailed when this alert is triggered? Possible values are Disabled and Enabled. - // +kubebuilder:validation:Optional - EmailAccountAdmins *string `json:"emailAccountAdmins,omitempty" tf:"email_account_admins,omitempty"` +// Specifies a list of alerts which should be disabled. Possible values include Access_Anomaly, Sql_Injection and Sql_Injection_Vulnerability. +// +kubebuilder:validation:Optional +DisabledAlerts []*string `json:"disabledAlerts,omitempty" tf:"disabled_alerts,omitempty"` + +// Should the account administrators be emailed when this alert is triggered? Possible values are Disabled and Enabled. +// +kubebuilder:validation:Optional +EmailAccountAdmins *string `json:"emailAccountAdmins,omitempty" tf:"email_account_admins,omitempty"` - // A list of email addresses which alerts should be sent to. - // +kubebuilder:validation:Optional - EmailAddresses []*string `json:"emailAddresses,omitempty" tf:"email_addresses,omitempty"` +// A list of email addresses which alerts should be sent to. +// +kubebuilder:validation:Optional +EmailAddresses []*string `json:"emailAddresses,omitempty" tf:"email_addresses,omitempty"` - // Specifies the number of days to keep in the Threat Detection audit logs. - // +kubebuilder:validation:Optional - RetentionDays *float64 `json:"retentionDays,omitempty" tf:"retention_days,omitempty"` +// Specifies the number of days to keep in the Threat Detection audit logs. +// +kubebuilder:validation:Optional +RetentionDays *float64 `json:"retentionDays,omitempty" tf:"retention_days,omitempty"` - // The State of the Policy. Possible values are Enabled, Disabled or New. - // +kubebuilder:validation:Optional - State *string `json:"state,omitempty" tf:"state,omitempty"` +// The State of the Policy. Possible values are Enabled, Disabled or New. +// +kubebuilder:validation:Optional +State *string `json:"state,omitempty" tf:"state,omitempty"` - // Specifies the identifier key of the Threat Detection audit storage account. Required if state is Enabled. - // +kubebuilder:validation:Optional - StorageAccountAccessKeySecretRef *v1.SecretKeySelector `json:"storageAccountAccessKeySecretRef,omitempty" tf:"-"` +// Specifies the identifier key of the Threat Detection audit storage account. Required if state is Enabled. +// +kubebuilder:validation:Optional +StorageAccountAccessKeySecretRef *v1.SecretKeySelector `json:"storageAccountAccessKeySecretRef,omitempty" tf:"-"` - // Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. Required if state is Enabled. - // +kubebuilder:validation:Optional - StorageEndpoint *string `json:"storageEndpoint,omitempty" tf:"storage_endpoint,omitempty"` +// Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. Required if state is Enabled. +// +kubebuilder:validation:Optional +StorageEndpoint *string `json:"storageEndpoint,omitempty" tf:"storage_endpoint,omitempty"` } // MSSQLDatabaseSpec defines the desired state of MSSQLDatabase type MSSQLDatabaseSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider MSSQLDatabaseParameters `json:"forProvider"` + ForProvider MSSQLDatabaseParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -538,13 +571,13 @@ type MSSQLDatabaseSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider MSSQLDatabaseInitParameters `json:"initProvider,omitempty"` + InitProvider MSSQLDatabaseInitParameters `json:"initProvider,omitempty"` } // MSSQLDatabaseStatus defines the observed state of MSSQLDatabase. type MSSQLDatabaseStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider MSSQLDatabaseObservation `json:"atProvider,omitempty"` + AtProvider MSSQLDatabaseObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/sql/v1alpha1/zz_mssqldatabasevulnerabilityassessmentrulebaseline_types.go b/apis/sql/v1alpha1/zz_mssqldatabasevulnerabilityassessmentrulebaseline_types.go index 2555b02..a3fa0fc 100755 --- a/apis/sql/v1alpha1/zz_mssqldatabasevulnerabilityassessmentrulebaseline_types.go +++ b/apis/sql/v1alpha1/zz_mssqldatabasevulnerabilityassessmentrulebaseline_types.go @@ -15,106 +15,121 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type BaselineResultInitParameters struct { - // A list representing a result of the baseline. - Result []*string `json:"result,omitempty" tf:"result,omitempty"` + +// A list representing a result of the baseline. +Result []*string `json:"result,omitempty" tf:"result,omitempty"` } + type BaselineResultObservation struct { - // A list representing a result of the baseline. - Result []*string `json:"result,omitempty" tf:"result,omitempty"` + +// A list representing a result of the baseline. +Result []*string `json:"result,omitempty" tf:"result,omitempty"` } + type BaselineResultParameters struct { - // A list representing a result of the baseline. - // +kubebuilder:validation:Optional - Result []*string `json:"result" tf:"result,omitempty"` + +// A list representing a result of the baseline. +// +kubebuilder:validation:Optional +Result []*string `json:"result" tf:"result,omitempty"` } + type MSSQLDatabaseVulnerabilityAssessmentRuleBaselineInitParameters struct { - // The name of the vulnerability assessment rule baseline. Valid options are default and master. default implies a baseline on a database level rule and master for server level rule. Defaults to default. Changing this forces a new resource to be created. - BaselineName *string `json:"baselineName,omitempty" tf:"baseline_name,omitempty"` - // A baseline_result block as documented below. Multiple blocks can be defined. - BaselineResult []BaselineResultInitParameters `json:"baselineResult,omitempty" tf:"baseline_result,omitempty"` +// The name of the vulnerability assessment rule baseline. Valid options are default and master. default implies a baseline on a database level rule and master for server level rule. Defaults to default. Changing this forces a new resource to be created. +BaselineName *string `json:"baselineName,omitempty" tf:"baseline_name,omitempty"` - // The vulnerability assessment rule ID. Changing this forces a new resource to be created. - RuleID *string `json:"ruleId,omitempty" tf:"rule_id,omitempty"` +// A baseline_result block as documented below. Multiple blocks can be defined. +BaselineResult []BaselineResultInitParameters `json:"baselineResult,omitempty" tf:"baseline_result,omitempty"` + +// The vulnerability assessment rule ID. Changing this forces a new resource to be created. +RuleID *string `json:"ruleId,omitempty" tf:"rule_id,omitempty"` } + type MSSQLDatabaseVulnerabilityAssessmentRuleBaselineObservation struct { - // The name of the vulnerability assessment rule baseline. Valid options are default and master. default implies a baseline on a database level rule and master for server level rule. Defaults to default. Changing this forces a new resource to be created. - BaselineName *string `json:"baselineName,omitempty" tf:"baseline_name,omitempty"` - // A baseline_result block as documented below. Multiple blocks can be defined. - BaselineResult []BaselineResultObservation `json:"baselineResult,omitempty" tf:"baseline_result,omitempty"` +// The name of the vulnerability assessment rule baseline. Valid options are default and master. default implies a baseline on a database level rule and master for server level rule. Defaults to default. Changing this forces a new resource to be created. +BaselineName *string `json:"baselineName,omitempty" tf:"baseline_name,omitempty"` - // Specifies the name of the MS SQL Database. Changing this forces a new resource to be created. - DatabaseName *string `json:"databaseName,omitempty" tf:"database_name,omitempty"` +// A baseline_result block as documented below. Multiple blocks can be defined. +BaselineResult []BaselineResultObservation `json:"baselineResult,omitempty" tf:"baseline_result,omitempty"` - // The ID of the Database Vulnerability Assessment Rule Baseline. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// Specifies the name of the MS SQL Database. Changing this forces a new resource to be created. +DatabaseName *string `json:"databaseName,omitempty" tf:"database_name,omitempty"` - // The vulnerability assessment rule ID. Changing this forces a new resource to be created. - RuleID *string `json:"ruleId,omitempty" tf:"rule_id,omitempty"` +// The ID of the Database Vulnerability Assessment Rule Baseline. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The Vulnerability Assessment ID of the MS SQL Server. Changing this forces a new resource to be created. - ServerVulnerabilityAssessmentID *string `json:"serverVulnerabilityAssessmentId,omitempty" tf:"server_vulnerability_assessment_id,omitempty"` +// The vulnerability assessment rule ID. Changing this forces a new resource to be created. +RuleID *string `json:"ruleId,omitempty" tf:"rule_id,omitempty"` + +// The Vulnerability Assessment ID of the MS SQL Server. Changing this forces a new resource to be created. +ServerVulnerabilityAssessmentID *string `json:"serverVulnerabilityAssessmentId,omitempty" tf:"server_vulnerability_assessment_id,omitempty"` } + type MSSQLDatabaseVulnerabilityAssessmentRuleBaselineParameters struct { - // The name of the vulnerability assessment rule baseline. Valid options are default and master. default implies a baseline on a database level rule and master for server level rule. Defaults to default. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - BaselineName *string `json:"baselineName,omitempty" tf:"baseline_name,omitempty"` - // A baseline_result block as documented below. Multiple blocks can be defined. - // +kubebuilder:validation:Optional - BaselineResult []BaselineResultParameters `json:"baselineResult,omitempty" tf:"baseline_result,omitempty"` +// The name of the vulnerability assessment rule baseline. Valid options are default and master. default implies a baseline on a database level rule and master for server level rule. Defaults to default. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +BaselineName *string `json:"baselineName,omitempty" tf:"baseline_name,omitempty"` + +// A baseline_result block as documented below. Multiple blocks can be defined. +// +kubebuilder:validation:Optional +BaselineResult []BaselineResultParameters `json:"baselineResult,omitempty" tf:"baseline_result,omitempty"` - // Specifies the name of the MS SQL Database. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=MSSQLDatabase - // +kubebuilder:validation:Optional - DatabaseName *string `json:"databaseName,omitempty" tf:"database_name,omitempty"` +// Specifies the name of the MS SQL Database. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=MSSQLDatabase +// +kubebuilder:validation:Optional +DatabaseName *string `json:"databaseName,omitempty" tf:"database_name,omitempty"` - // Reference to a MSSQLDatabase to populate databaseName. - // +kubebuilder:validation:Optional - DatabaseNameRef *v1.Reference `json:"databaseNameRef,omitempty" tf:"-"` +// Reference to a MSSQLDatabase to populate databaseName. +// +kubebuilder:validation:Optional +DatabaseNameRef *v1.Reference `json:"databaseNameRef,omitempty" tf:"-"` - // Selector for a MSSQLDatabase to populate databaseName. - // +kubebuilder:validation:Optional - DatabaseNameSelector *v1.Selector `json:"databaseNameSelector,omitempty" tf:"-"` +// Selector for a MSSQLDatabase to populate databaseName. +// +kubebuilder:validation:Optional +DatabaseNameSelector *v1.Selector `json:"databaseNameSelector,omitempty" tf:"-"` - // The vulnerability assessment rule ID. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - RuleID *string `json:"ruleId,omitempty" tf:"rule_id,omitempty"` +// The vulnerability assessment rule ID. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +RuleID *string `json:"ruleId,omitempty" tf:"rule_id,omitempty"` - // The Vulnerability Assessment ID of the MS SQL Server. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/sql/v1alpha1.MSSQLServerVulnerabilityAssessment - // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() - // +kubebuilder:validation:Optional - ServerVulnerabilityAssessmentID *string `json:"serverVulnerabilityAssessmentId,omitempty" tf:"server_vulnerability_assessment_id,omitempty"` +// The Vulnerability Assessment ID of the MS SQL Server. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/sql/v1alpha1.MSSQLServerVulnerabilityAssessment +// +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() +// +kubebuilder:validation:Optional +ServerVulnerabilityAssessmentID *string `json:"serverVulnerabilityAssessmentId,omitempty" tf:"server_vulnerability_assessment_id,omitempty"` - // Reference to a MSSQLServerVulnerabilityAssessment in sql to populate serverVulnerabilityAssessmentId. - // +kubebuilder:validation:Optional - ServerVulnerabilityAssessmentIDRef *v1.Reference `json:"serverVulnerabilityAssessmentIdRef,omitempty" tf:"-"` +// Reference to a MSSQLServerVulnerabilityAssessment in sql to populate serverVulnerabilityAssessmentId. +// +kubebuilder:validation:Optional +ServerVulnerabilityAssessmentIDRef *v1.Reference `json:"serverVulnerabilityAssessmentIdRef,omitempty" tf:"-"` - // Selector for a MSSQLServerVulnerabilityAssessment in sql to populate serverVulnerabilityAssessmentId. - // +kubebuilder:validation:Optional - ServerVulnerabilityAssessmentIDSelector *v1.Selector `json:"serverVulnerabilityAssessmentIdSelector,omitempty" tf:"-"` +// Selector for a MSSQLServerVulnerabilityAssessment in sql to populate serverVulnerabilityAssessmentId. +// +kubebuilder:validation:Optional +ServerVulnerabilityAssessmentIDSelector *v1.Selector `json:"serverVulnerabilityAssessmentIdSelector,omitempty" tf:"-"` } // MSSQLDatabaseVulnerabilityAssessmentRuleBaselineSpec defines the desired state of MSSQLDatabaseVulnerabilityAssessmentRuleBaseline type MSSQLDatabaseVulnerabilityAssessmentRuleBaselineSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider MSSQLDatabaseVulnerabilityAssessmentRuleBaselineParameters `json:"forProvider"` + ForProvider MSSQLDatabaseVulnerabilityAssessmentRuleBaselineParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -125,13 +140,13 @@ type MSSQLDatabaseVulnerabilityAssessmentRuleBaselineSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider MSSQLDatabaseVulnerabilityAssessmentRuleBaselineInitParameters `json:"initProvider,omitempty"` + InitProvider MSSQLDatabaseVulnerabilityAssessmentRuleBaselineInitParameters `json:"initProvider,omitempty"` } // MSSQLDatabaseVulnerabilityAssessmentRuleBaselineStatus defines the observed state of MSSQLDatabaseVulnerabilityAssessmentRuleBaseline. type MSSQLDatabaseVulnerabilityAssessmentRuleBaselineStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider MSSQLDatabaseVulnerabilityAssessmentRuleBaselineObservation `json:"atProvider,omitempty"` + AtProvider MSSQLDatabaseVulnerabilityAssessmentRuleBaselineObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -146,10 +161,10 @@ type MSSQLDatabaseVulnerabilityAssessmentRuleBaselineStatus struct { type MSSQLDatabaseVulnerabilityAssessmentRuleBaseline struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.baselineResult) || (has(self.initProvider) && has(self.initProvider.baselineResult))",message="spec.forProvider.baselineResult is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.ruleId) || (has(self.initProvider) && has(self.initProvider.ruleId))",message="spec.forProvider.ruleId is a required parameter" - Spec MSSQLDatabaseVulnerabilityAssessmentRuleBaselineSpec `json:"spec"` - Status MSSQLDatabaseVulnerabilityAssessmentRuleBaselineStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.baselineResult) || (has(self.initProvider) && has(self.initProvider.baselineResult))",message="spec.forProvider.baselineResult is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.ruleId) || (has(self.initProvider) && has(self.initProvider.ruleId))",message="spec.forProvider.ruleId is a required parameter" + Spec MSSQLDatabaseVulnerabilityAssessmentRuleBaselineSpec `json:"spec"` + Status MSSQLDatabaseVulnerabilityAssessmentRuleBaselineStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/sql/v1alpha1/zz_mssqlelasticpool_types.go b/apis/sql/v1alpha1/zz_mssqlelasticpool_types.go index da1b100..92678eb 100755 --- a/apis/sql/v1alpha1/zz_mssqlelasticpool_types.go +++ b/apis/sql/v1alpha1/zz_mssqlelasticpool_types.go @@ -15,224 +15,245 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type MSSQLElasticPoolInitParameters struct { - // Specifies the license type applied to this database. Possible values are LicenseIncluded and BasePrice. - LicenseType *string `json:"licenseType,omitempty" tf:"license_type,omitempty"` - // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// Specifies the license type applied to this database. Possible values are LicenseIncluded and BasePrice. +LicenseType *string `json:"licenseType,omitempty" tf:"license_type,omitempty"` + +// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // The name of the Public Maintenance Configuration window to apply to the elastic pool. Valid values include SQL_Default, SQL_EastUS_DB_1, SQL_EastUS2_DB_1, SQL_SoutheastAsia_DB_1, SQL_AustraliaEast_DB_1, SQL_NorthEurope_DB_1, SQL_SouthCentralUS_DB_1, SQL_WestUS2_DB_1, SQL_UKSouth_DB_1, SQL_WestEurope_DB_1, SQL_EastUS_DB_2, SQL_EastUS2_DB_2, SQL_WestUS2_DB_2, SQL_SoutheastAsia_DB_2, SQL_AustraliaEast_DB_2, SQL_NorthEurope_DB_2, SQL_SouthCentralUS_DB_2, SQL_UKSouth_DB_2, SQL_WestEurope_DB_2, SQL_AustraliaSoutheast_DB_1, SQL_BrazilSouth_DB_1, SQL_CanadaCentral_DB_1, SQL_CanadaEast_DB_1, SQL_CentralUS_DB_1, SQL_EastAsia_DB_1, SQL_FranceCentral_DB_1, SQL_GermanyWestCentral_DB_1, SQL_CentralIndia_DB_1, SQL_SouthIndia_DB_1, SQL_JapanEast_DB_1, SQL_JapanWest_DB_1, SQL_NorthCentralUS_DB_1, SQL_UKWest_DB_1, SQL_WestUS_DB_1, SQL_AustraliaSoutheast_DB_2, SQL_BrazilSouth_DB_2, SQL_CanadaCentral_DB_2, SQL_CanadaEast_DB_2, SQL_CentralUS_DB_2, SQL_EastAsia_DB_2, SQL_FranceCentral_DB_2, SQL_GermanyWestCentral_DB_2, SQL_CentralIndia_DB_2, SQL_SouthIndia_DB_2, SQL_JapanEast_DB_2, SQL_JapanWest_DB_2, SQL_NorthCentralUS_DB_2, SQL_UKWest_DB_2, SQL_WestUS_DB_2, SQL_WestCentralUS_DB_1, SQL_FranceSouth_DB_1, SQL_WestCentralUS_DB_2, SQL_FranceSouth_DB_2, SQL_SwitzerlandNorth_DB_1, SQL_SwitzerlandNorth_DB_2, SQL_BrazilSoutheast_DB_1, SQL_UAENorth_DB_1, SQL_BrazilSoutheast_DB_2, SQL_UAENorth_DB_2. Defaults to SQL_Default. - MaintenanceConfigurationName *string `json:"maintenanceConfigurationName,omitempty" tf:"maintenance_configuration_name,omitempty"` +// The name of the Public Maintenance Configuration window to apply to the elastic pool. Valid values include SQL_Default, SQL_EastUS_DB_1, SQL_EastUS2_DB_1, SQL_SoutheastAsia_DB_1, SQL_AustraliaEast_DB_1, SQL_NorthEurope_DB_1, SQL_SouthCentralUS_DB_1, SQL_WestUS2_DB_1, SQL_UKSouth_DB_1, SQL_WestEurope_DB_1, SQL_EastUS_DB_2, SQL_EastUS2_DB_2, SQL_WestUS2_DB_2, SQL_SoutheastAsia_DB_2, SQL_AustraliaEast_DB_2, SQL_NorthEurope_DB_2, SQL_SouthCentralUS_DB_2, SQL_UKSouth_DB_2, SQL_WestEurope_DB_2, SQL_AustraliaSoutheast_DB_1, SQL_BrazilSouth_DB_1, SQL_CanadaCentral_DB_1, SQL_CanadaEast_DB_1, SQL_CentralUS_DB_1, SQL_EastAsia_DB_1, SQL_FranceCentral_DB_1, SQL_GermanyWestCentral_DB_1, SQL_CentralIndia_DB_1, SQL_SouthIndia_DB_1, SQL_JapanEast_DB_1, SQL_JapanWest_DB_1, SQL_NorthCentralUS_DB_1, SQL_UKWest_DB_1, SQL_WestUS_DB_1, SQL_AustraliaSoutheast_DB_2, SQL_BrazilSouth_DB_2, SQL_CanadaCentral_DB_2, SQL_CanadaEast_DB_2, SQL_CentralUS_DB_2, SQL_EastAsia_DB_2, SQL_FranceCentral_DB_2, SQL_GermanyWestCentral_DB_2, SQL_CentralIndia_DB_2, SQL_SouthIndia_DB_2, SQL_JapanEast_DB_2, SQL_JapanWest_DB_2, SQL_NorthCentralUS_DB_2, SQL_UKWest_DB_2, SQL_WestUS_DB_2, SQL_WestCentralUS_DB_1, SQL_FranceSouth_DB_1, SQL_WestCentralUS_DB_2, SQL_FranceSouth_DB_2, SQL_SwitzerlandNorth_DB_1, SQL_SwitzerlandNorth_DB_2, SQL_BrazilSoutheast_DB_1, SQL_UAENorth_DB_1, SQL_BrazilSoutheast_DB_2, SQL_UAENorth_DB_2. Defaults to SQL_Default. +MaintenanceConfigurationName *string `json:"maintenanceConfigurationName,omitempty" tf:"maintenance_configuration_name,omitempty"` - // The max data size of the elastic pool in bytes. Conflicts with max_size_gb. - MaxSizeBytes *float64 `json:"maxSizeBytes,omitempty" tf:"max_size_bytes,omitempty"` +// The max data size of the elastic pool in bytes. Conflicts with max_size_gb. +MaxSizeBytes *float64 `json:"maxSizeBytes,omitempty" tf:"max_size_bytes,omitempty"` - // The max data size of the elastic pool in gigabytes. Conflicts with max_size_bytes. - MaxSizeGb *float64 `json:"maxSizeGb,omitempty" tf:"max_size_gb,omitempty"` +// The max data size of the elastic pool in gigabytes. Conflicts with max_size_bytes. +MaxSizeGb *float64 `json:"maxSizeGb,omitempty" tf:"max_size_gb,omitempty"` - // A per_database_settings block as defined below. - PerDatabaseSettings []PerDatabaseSettingsInitParameters `json:"perDatabaseSettings,omitempty" tf:"per_database_settings,omitempty"` +// A per_database_settings block as defined below. +PerDatabaseSettings []PerDatabaseSettingsInitParameters `json:"perDatabaseSettings,omitempty" tf:"per_database_settings,omitempty"` - // A sku block as defined below. - Sku []SkuInitParameters `json:"sku,omitempty" tf:"sku,omitempty"` +// A sku block as defined below. +Sku []SkuInitParameters `json:"sku,omitempty" tf:"sku,omitempty"` - // A mapping of tags to assign to the resource. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A mapping of tags to assign to the resource. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - // Whether or not this elastic pool is zone redundant. tier needs to be Premium for DTU based or BusinessCritical for vCore based sku. - ZoneRedundant *bool `json:"zoneRedundant,omitempty" tf:"zone_redundant,omitempty"` +// Whether or not this elastic pool is zone redundant. tier needs to be Premium for DTU based or BusinessCritical for vCore based sku. +ZoneRedundant *bool `json:"zoneRedundant,omitempty" tf:"zone_redundant,omitempty"` } + type MSSQLElasticPoolObservation struct { - // The ID of the MS SQL Elastic Pool. - ID *string `json:"id,omitempty" tf:"id,omitempty"` - // Specifies the license type applied to this database. Possible values are LicenseIncluded and BasePrice. - LicenseType *string `json:"licenseType,omitempty" tf:"license_type,omitempty"` +// The ID of the MS SQL Elastic Pool. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// Specifies the license type applied to this database. Possible values are LicenseIncluded and BasePrice. +LicenseType *string `json:"licenseType,omitempty" tf:"license_type,omitempty"` - // The name of the Public Maintenance Configuration window to apply to the elastic pool. Valid values include SQL_Default, SQL_EastUS_DB_1, SQL_EastUS2_DB_1, SQL_SoutheastAsia_DB_1, SQL_AustraliaEast_DB_1, SQL_NorthEurope_DB_1, SQL_SouthCentralUS_DB_1, SQL_WestUS2_DB_1, SQL_UKSouth_DB_1, SQL_WestEurope_DB_1, SQL_EastUS_DB_2, SQL_EastUS2_DB_2, SQL_WestUS2_DB_2, SQL_SoutheastAsia_DB_2, SQL_AustraliaEast_DB_2, SQL_NorthEurope_DB_2, SQL_SouthCentralUS_DB_2, SQL_UKSouth_DB_2, SQL_WestEurope_DB_2, SQL_AustraliaSoutheast_DB_1, SQL_BrazilSouth_DB_1, SQL_CanadaCentral_DB_1, SQL_CanadaEast_DB_1, SQL_CentralUS_DB_1, SQL_EastAsia_DB_1, SQL_FranceCentral_DB_1, SQL_GermanyWestCentral_DB_1, SQL_CentralIndia_DB_1, SQL_SouthIndia_DB_1, SQL_JapanEast_DB_1, SQL_JapanWest_DB_1, SQL_NorthCentralUS_DB_1, SQL_UKWest_DB_1, SQL_WestUS_DB_1, SQL_AustraliaSoutheast_DB_2, SQL_BrazilSouth_DB_2, SQL_CanadaCentral_DB_2, SQL_CanadaEast_DB_2, SQL_CentralUS_DB_2, SQL_EastAsia_DB_2, SQL_FranceCentral_DB_2, SQL_GermanyWestCentral_DB_2, SQL_CentralIndia_DB_2, SQL_SouthIndia_DB_2, SQL_JapanEast_DB_2, SQL_JapanWest_DB_2, SQL_NorthCentralUS_DB_2, SQL_UKWest_DB_2, SQL_WestUS_DB_2, SQL_WestCentralUS_DB_1, SQL_FranceSouth_DB_1, SQL_WestCentralUS_DB_2, SQL_FranceSouth_DB_2, SQL_SwitzerlandNorth_DB_1, SQL_SwitzerlandNorth_DB_2, SQL_BrazilSoutheast_DB_1, SQL_UAENorth_DB_1, SQL_BrazilSoutheast_DB_2, SQL_UAENorth_DB_2. Defaults to SQL_Default. - MaintenanceConfigurationName *string `json:"maintenanceConfigurationName,omitempty" tf:"maintenance_configuration_name,omitempty"` +// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // The max data size of the elastic pool in bytes. Conflicts with max_size_gb. - MaxSizeBytes *float64 `json:"maxSizeBytes,omitempty" tf:"max_size_bytes,omitempty"` +// The name of the Public Maintenance Configuration window to apply to the elastic pool. Valid values include SQL_Default, SQL_EastUS_DB_1, SQL_EastUS2_DB_1, SQL_SoutheastAsia_DB_1, SQL_AustraliaEast_DB_1, SQL_NorthEurope_DB_1, SQL_SouthCentralUS_DB_1, SQL_WestUS2_DB_1, SQL_UKSouth_DB_1, SQL_WestEurope_DB_1, SQL_EastUS_DB_2, SQL_EastUS2_DB_2, SQL_WestUS2_DB_2, SQL_SoutheastAsia_DB_2, SQL_AustraliaEast_DB_2, SQL_NorthEurope_DB_2, SQL_SouthCentralUS_DB_2, SQL_UKSouth_DB_2, SQL_WestEurope_DB_2, SQL_AustraliaSoutheast_DB_1, SQL_BrazilSouth_DB_1, SQL_CanadaCentral_DB_1, SQL_CanadaEast_DB_1, SQL_CentralUS_DB_1, SQL_EastAsia_DB_1, SQL_FranceCentral_DB_1, SQL_GermanyWestCentral_DB_1, SQL_CentralIndia_DB_1, SQL_SouthIndia_DB_1, SQL_JapanEast_DB_1, SQL_JapanWest_DB_1, SQL_NorthCentralUS_DB_1, SQL_UKWest_DB_1, SQL_WestUS_DB_1, SQL_AustraliaSoutheast_DB_2, SQL_BrazilSouth_DB_2, SQL_CanadaCentral_DB_2, SQL_CanadaEast_DB_2, SQL_CentralUS_DB_2, SQL_EastAsia_DB_2, SQL_FranceCentral_DB_2, SQL_GermanyWestCentral_DB_2, SQL_CentralIndia_DB_2, SQL_SouthIndia_DB_2, SQL_JapanEast_DB_2, SQL_JapanWest_DB_2, SQL_NorthCentralUS_DB_2, SQL_UKWest_DB_2, SQL_WestUS_DB_2, SQL_WestCentralUS_DB_1, SQL_FranceSouth_DB_1, SQL_WestCentralUS_DB_2, SQL_FranceSouth_DB_2, SQL_SwitzerlandNorth_DB_1, SQL_SwitzerlandNorth_DB_2, SQL_BrazilSoutheast_DB_1, SQL_UAENorth_DB_1, SQL_BrazilSoutheast_DB_2, SQL_UAENorth_DB_2. Defaults to SQL_Default. +MaintenanceConfigurationName *string `json:"maintenanceConfigurationName,omitempty" tf:"maintenance_configuration_name,omitempty"` - // The max data size of the elastic pool in gigabytes. Conflicts with max_size_bytes. - MaxSizeGb *float64 `json:"maxSizeGb,omitempty" tf:"max_size_gb,omitempty"` +// The max data size of the elastic pool in bytes. Conflicts with max_size_gb. +MaxSizeBytes *float64 `json:"maxSizeBytes,omitempty" tf:"max_size_bytes,omitempty"` - // A per_database_settings block as defined below. - PerDatabaseSettings []PerDatabaseSettingsObservation `json:"perDatabaseSettings,omitempty" tf:"per_database_settings,omitempty"` +// The max data size of the elastic pool in gigabytes. Conflicts with max_size_bytes. +MaxSizeGb *float64 `json:"maxSizeGb,omitempty" tf:"max_size_gb,omitempty"` - // The name of the resource group in which to create the elastic pool. This must be the same as the resource group of the underlying SQL server. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// A per_database_settings block as defined below. +PerDatabaseSettings []PerDatabaseSettingsObservation `json:"perDatabaseSettings,omitempty" tf:"per_database_settings,omitempty"` - // The name of the SQL Server on which to create the elastic pool. Changing this forces a new resource to be created. - ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` +// The name of the resource group in which to create the elastic pool. This must be the same as the resource group of the underlying SQL server. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // A sku block as defined below. - Sku []SkuObservation `json:"sku,omitempty" tf:"sku,omitempty"` +// The name of the SQL Server on which to create the elastic pool. Changing this forces a new resource to be created. +ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` - // A mapping of tags to assign to the resource. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A sku block as defined below. +Sku []SkuObservation `json:"sku,omitempty" tf:"sku,omitempty"` - // Whether or not this elastic pool is zone redundant. tier needs to be Premium for DTU based or BusinessCritical for vCore based sku. - ZoneRedundant *bool `json:"zoneRedundant,omitempty" tf:"zone_redundant,omitempty"` +// A mapping of tags to assign to the resource. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + +// Whether or not this elastic pool is zone redundant. tier needs to be Premium for DTU based or BusinessCritical for vCore based sku. +ZoneRedundant *bool `json:"zoneRedundant,omitempty" tf:"zone_redundant,omitempty"` } + type MSSQLElasticPoolParameters struct { - // Specifies the license type applied to this database. Possible values are LicenseIncluded and BasePrice. - // +kubebuilder:validation:Optional - LicenseType *string `json:"licenseType,omitempty" tf:"license_type,omitempty"` - // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// Specifies the license type applied to this database. Possible values are LicenseIncluded and BasePrice. +// +kubebuilder:validation:Optional +LicenseType *string `json:"licenseType,omitempty" tf:"license_type,omitempty"` + +// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // The name of the Public Maintenance Configuration window to apply to the elastic pool. Valid values include SQL_Default, SQL_EastUS_DB_1, SQL_EastUS2_DB_1, SQL_SoutheastAsia_DB_1, SQL_AustraliaEast_DB_1, SQL_NorthEurope_DB_1, SQL_SouthCentralUS_DB_1, SQL_WestUS2_DB_1, SQL_UKSouth_DB_1, SQL_WestEurope_DB_1, SQL_EastUS_DB_2, SQL_EastUS2_DB_2, SQL_WestUS2_DB_2, SQL_SoutheastAsia_DB_2, SQL_AustraliaEast_DB_2, SQL_NorthEurope_DB_2, SQL_SouthCentralUS_DB_2, SQL_UKSouth_DB_2, SQL_WestEurope_DB_2, SQL_AustraliaSoutheast_DB_1, SQL_BrazilSouth_DB_1, SQL_CanadaCentral_DB_1, SQL_CanadaEast_DB_1, SQL_CentralUS_DB_1, SQL_EastAsia_DB_1, SQL_FranceCentral_DB_1, SQL_GermanyWestCentral_DB_1, SQL_CentralIndia_DB_1, SQL_SouthIndia_DB_1, SQL_JapanEast_DB_1, SQL_JapanWest_DB_1, SQL_NorthCentralUS_DB_1, SQL_UKWest_DB_1, SQL_WestUS_DB_1, SQL_AustraliaSoutheast_DB_2, SQL_BrazilSouth_DB_2, SQL_CanadaCentral_DB_2, SQL_CanadaEast_DB_2, SQL_CentralUS_DB_2, SQL_EastAsia_DB_2, SQL_FranceCentral_DB_2, SQL_GermanyWestCentral_DB_2, SQL_CentralIndia_DB_2, SQL_SouthIndia_DB_2, SQL_JapanEast_DB_2, SQL_JapanWest_DB_2, SQL_NorthCentralUS_DB_2, SQL_UKWest_DB_2, SQL_WestUS_DB_2, SQL_WestCentralUS_DB_1, SQL_FranceSouth_DB_1, SQL_WestCentralUS_DB_2, SQL_FranceSouth_DB_2, SQL_SwitzerlandNorth_DB_1, SQL_SwitzerlandNorth_DB_2, SQL_BrazilSoutheast_DB_1, SQL_UAENorth_DB_1, SQL_BrazilSoutheast_DB_2, SQL_UAENorth_DB_2. Defaults to SQL_Default. - // +kubebuilder:validation:Optional - MaintenanceConfigurationName *string `json:"maintenanceConfigurationName,omitempty" tf:"maintenance_configuration_name,omitempty"` +// The name of the Public Maintenance Configuration window to apply to the elastic pool. Valid values include SQL_Default, SQL_EastUS_DB_1, SQL_EastUS2_DB_1, SQL_SoutheastAsia_DB_1, SQL_AustraliaEast_DB_1, SQL_NorthEurope_DB_1, SQL_SouthCentralUS_DB_1, SQL_WestUS2_DB_1, SQL_UKSouth_DB_1, SQL_WestEurope_DB_1, SQL_EastUS_DB_2, SQL_EastUS2_DB_2, SQL_WestUS2_DB_2, SQL_SoutheastAsia_DB_2, SQL_AustraliaEast_DB_2, SQL_NorthEurope_DB_2, SQL_SouthCentralUS_DB_2, SQL_UKSouth_DB_2, SQL_WestEurope_DB_2, SQL_AustraliaSoutheast_DB_1, SQL_BrazilSouth_DB_1, SQL_CanadaCentral_DB_1, SQL_CanadaEast_DB_1, SQL_CentralUS_DB_1, SQL_EastAsia_DB_1, SQL_FranceCentral_DB_1, SQL_GermanyWestCentral_DB_1, SQL_CentralIndia_DB_1, SQL_SouthIndia_DB_1, SQL_JapanEast_DB_1, SQL_JapanWest_DB_1, SQL_NorthCentralUS_DB_1, SQL_UKWest_DB_1, SQL_WestUS_DB_1, SQL_AustraliaSoutheast_DB_2, SQL_BrazilSouth_DB_2, SQL_CanadaCentral_DB_2, SQL_CanadaEast_DB_2, SQL_CentralUS_DB_2, SQL_EastAsia_DB_2, SQL_FranceCentral_DB_2, SQL_GermanyWestCentral_DB_2, SQL_CentralIndia_DB_2, SQL_SouthIndia_DB_2, SQL_JapanEast_DB_2, SQL_JapanWest_DB_2, SQL_NorthCentralUS_DB_2, SQL_UKWest_DB_2, SQL_WestUS_DB_2, SQL_WestCentralUS_DB_1, SQL_FranceSouth_DB_1, SQL_WestCentralUS_DB_2, SQL_FranceSouth_DB_2, SQL_SwitzerlandNorth_DB_1, SQL_SwitzerlandNorth_DB_2, SQL_BrazilSoutheast_DB_1, SQL_UAENorth_DB_1, SQL_BrazilSoutheast_DB_2, SQL_UAENorth_DB_2. Defaults to SQL_Default. +// +kubebuilder:validation:Optional +MaintenanceConfigurationName *string `json:"maintenanceConfigurationName,omitempty" tf:"maintenance_configuration_name,omitempty"` - // The max data size of the elastic pool in bytes. Conflicts with max_size_gb. - // +kubebuilder:validation:Optional - MaxSizeBytes *float64 `json:"maxSizeBytes,omitempty" tf:"max_size_bytes,omitempty"` +// The max data size of the elastic pool in bytes. Conflicts with max_size_gb. +// +kubebuilder:validation:Optional +MaxSizeBytes *float64 `json:"maxSizeBytes,omitempty" tf:"max_size_bytes,omitempty"` - // The max data size of the elastic pool in gigabytes. Conflicts with max_size_bytes. - // +kubebuilder:validation:Optional - MaxSizeGb *float64 `json:"maxSizeGb,omitempty" tf:"max_size_gb,omitempty"` +// The max data size of the elastic pool in gigabytes. Conflicts with max_size_bytes. +// +kubebuilder:validation:Optional +MaxSizeGb *float64 `json:"maxSizeGb,omitempty" tf:"max_size_gb,omitempty"` - // A per_database_settings block as defined below. - // +kubebuilder:validation:Optional - PerDatabaseSettings []PerDatabaseSettingsParameters `json:"perDatabaseSettings,omitempty" tf:"per_database_settings,omitempty"` +// A per_database_settings block as defined below. +// +kubebuilder:validation:Optional +PerDatabaseSettings []PerDatabaseSettingsParameters `json:"perDatabaseSettings,omitempty" tf:"per_database_settings,omitempty"` - // The name of the resource group in which to create the elastic pool. This must be the same as the resource group of the underlying SQL server. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group in which to create the elastic pool. This must be the same as the resource group of the underlying SQL server. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - // The name of the SQL Server on which to create the elastic pool. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=MSSQLServer - // +kubebuilder:validation:Optional - ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` +// The name of the SQL Server on which to create the elastic pool. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=MSSQLServer +// +kubebuilder:validation:Optional +ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` - // Reference to a MSSQLServer to populate serverName. - // +kubebuilder:validation:Optional - ServerNameRef *v1.Reference `json:"serverNameRef,omitempty" tf:"-"` +// Reference to a MSSQLServer to populate serverName. +// +kubebuilder:validation:Optional +ServerNameRef *v1.Reference `json:"serverNameRef,omitempty" tf:"-"` - // Selector for a MSSQLServer to populate serverName. - // +kubebuilder:validation:Optional - ServerNameSelector *v1.Selector `json:"serverNameSelector,omitempty" tf:"-"` +// Selector for a MSSQLServer to populate serverName. +// +kubebuilder:validation:Optional +ServerNameSelector *v1.Selector `json:"serverNameSelector,omitempty" tf:"-"` - // A sku block as defined below. - // +kubebuilder:validation:Optional - Sku []SkuParameters `json:"sku,omitempty" tf:"sku,omitempty"` +// A sku block as defined below. +// +kubebuilder:validation:Optional +Sku []SkuParameters `json:"sku,omitempty" tf:"sku,omitempty"` - // A mapping of tags to assign to the resource. - // +kubebuilder:validation:Optional - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A mapping of tags to assign to the resource. +// +kubebuilder:validation:Optional +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - // Whether or not this elastic pool is zone redundant. tier needs to be Premium for DTU based or BusinessCritical for vCore based sku. - // +kubebuilder:validation:Optional - ZoneRedundant *bool `json:"zoneRedundant,omitempty" tf:"zone_redundant,omitempty"` +// Whether or not this elastic pool is zone redundant. tier needs to be Premium for DTU based or BusinessCritical for vCore based sku. +// +kubebuilder:validation:Optional +ZoneRedundant *bool `json:"zoneRedundant,omitempty" tf:"zone_redundant,omitempty"` } + type PerDatabaseSettingsInitParameters struct { - // The maximum capacity any one database can consume. - MaxCapacity *float64 `json:"maxCapacity,omitempty" tf:"max_capacity,omitempty"` - // The minimum capacity all databases are guaranteed. - MinCapacity *float64 `json:"minCapacity,omitempty" tf:"min_capacity,omitempty"` +// The maximum capacity any one database can consume. +MaxCapacity *float64 `json:"maxCapacity,omitempty" tf:"max_capacity,omitempty"` + +// The minimum capacity all databases are guaranteed. +MinCapacity *float64 `json:"minCapacity,omitempty" tf:"min_capacity,omitempty"` } + type PerDatabaseSettingsObservation struct { - // The maximum capacity any one database can consume. - MaxCapacity *float64 `json:"maxCapacity,omitempty" tf:"max_capacity,omitempty"` - // The minimum capacity all databases are guaranteed. - MinCapacity *float64 `json:"minCapacity,omitempty" tf:"min_capacity,omitempty"` +// The maximum capacity any one database can consume. +MaxCapacity *float64 `json:"maxCapacity,omitempty" tf:"max_capacity,omitempty"` + +// The minimum capacity all databases are guaranteed. +MinCapacity *float64 `json:"minCapacity,omitempty" tf:"min_capacity,omitempty"` } + type PerDatabaseSettingsParameters struct { - // The maximum capacity any one database can consume. - // +kubebuilder:validation:Optional - MaxCapacity *float64 `json:"maxCapacity" tf:"max_capacity,omitempty"` - // The minimum capacity all databases are guaranteed. - // +kubebuilder:validation:Optional - MinCapacity *float64 `json:"minCapacity" tf:"min_capacity,omitempty"` +// The maximum capacity any one database can consume. +// +kubebuilder:validation:Optional +MaxCapacity *float64 `json:"maxCapacity" tf:"max_capacity,omitempty"` + +// The minimum capacity all databases are guaranteed. +// +kubebuilder:validation:Optional +MinCapacity *float64 `json:"minCapacity" tf:"min_capacity,omitempty"` } + type SkuInitParameters struct { - // The scale up/out capacity, representing server's compute units. For more information see the documentation for your Elasticpool configuration: vCore-based or DTU-based. - Capacity *float64 `json:"capacity,omitempty" tf:"capacity,omitempty"` - // The family of hardware Gen4, Gen5, Fsv2 or DC. - Family *string `json:"family,omitempty" tf:"family,omitempty"` +// The scale up/out capacity, representing server's compute units. For more information see the documentation for your Elasticpool configuration: vCore-based or DTU-based. +Capacity *float64 `json:"capacity,omitempty" tf:"capacity,omitempty"` - // Specifies the SKU Name for this Elasticpool. The name of the SKU, will be either vCore based tier + family pattern (e.g. GP_Gen4, BC_Gen5) or the DTU based BasicPool, StandardPool, or PremiumPool pattern. Possible values are BasicPool, StandardPool, PremiumPool, GP_Gen4, GP_Gen5, GP_Fsv2, GP_DC, BC_Gen4, BC_Gen5 and BC_DC. - Name *string `json:"name,omitempty" tf:"name,omitempty"` +// The family of hardware Gen4, Gen5, Fsv2 or DC. +Family *string `json:"family,omitempty" tf:"family,omitempty"` - // The tier of the particular SKU. Possible values are GeneralPurpose, BusinessCritical, Basic, Standard, or Premium. For more information see the documentation for your Elasticpool configuration: vCore-based or DTU-based. - Tier *string `json:"tier,omitempty" tf:"tier,omitempty"` +// Specifies the SKU Name for this Elasticpool. The name of the SKU, will be either vCore based tier + family pattern (e.g. GP_Gen4, BC_Gen5) or the DTU based BasicPool, StandardPool, or PremiumPool pattern. Possible values are BasicPool, StandardPool, PremiumPool, GP_Gen4, GP_Gen5, GP_Fsv2, GP_DC, BC_Gen4, BC_Gen5 and BC_DC. +Name *string `json:"name,omitempty" tf:"name,omitempty"` + +// The tier of the particular SKU. Possible values are GeneralPurpose, BusinessCritical, Basic, Standard, or Premium. For more information see the documentation for your Elasticpool configuration: vCore-based or DTU-based. +Tier *string `json:"tier,omitempty" tf:"tier,omitempty"` } + type SkuObservation struct { - // The scale up/out capacity, representing server's compute units. For more information see the documentation for your Elasticpool configuration: vCore-based or DTU-based. - Capacity *float64 `json:"capacity,omitempty" tf:"capacity,omitempty"` - // The family of hardware Gen4, Gen5, Fsv2 or DC. - Family *string `json:"family,omitempty" tf:"family,omitempty"` +// The scale up/out capacity, representing server's compute units. For more information see the documentation for your Elasticpool configuration: vCore-based or DTU-based. +Capacity *float64 `json:"capacity,omitempty" tf:"capacity,omitempty"` + +// The family of hardware Gen4, Gen5, Fsv2 or DC. +Family *string `json:"family,omitempty" tf:"family,omitempty"` - // Specifies the SKU Name for this Elasticpool. The name of the SKU, will be either vCore based tier + family pattern (e.g. GP_Gen4, BC_Gen5) or the DTU based BasicPool, StandardPool, or PremiumPool pattern. Possible values are BasicPool, StandardPool, PremiumPool, GP_Gen4, GP_Gen5, GP_Fsv2, GP_DC, BC_Gen4, BC_Gen5 and BC_DC. - Name *string `json:"name,omitempty" tf:"name,omitempty"` +// Specifies the SKU Name for this Elasticpool. The name of the SKU, will be either vCore based tier + family pattern (e.g. GP_Gen4, BC_Gen5) or the DTU based BasicPool, StandardPool, or PremiumPool pattern. Possible values are BasicPool, StandardPool, PremiumPool, GP_Gen4, GP_Gen5, GP_Fsv2, GP_DC, BC_Gen4, BC_Gen5 and BC_DC. +Name *string `json:"name,omitempty" tf:"name,omitempty"` - // The tier of the particular SKU. Possible values are GeneralPurpose, BusinessCritical, Basic, Standard, or Premium. For more information see the documentation for your Elasticpool configuration: vCore-based or DTU-based. - Tier *string `json:"tier,omitempty" tf:"tier,omitempty"` +// The tier of the particular SKU. Possible values are GeneralPurpose, BusinessCritical, Basic, Standard, or Premium. For more information see the documentation for your Elasticpool configuration: vCore-based or DTU-based. +Tier *string `json:"tier,omitempty" tf:"tier,omitempty"` } + type SkuParameters struct { - // The scale up/out capacity, representing server's compute units. For more information see the documentation for your Elasticpool configuration: vCore-based or DTU-based. - // +kubebuilder:validation:Optional - Capacity *float64 `json:"capacity" tf:"capacity,omitempty"` - // The family of hardware Gen4, Gen5, Fsv2 or DC. - // +kubebuilder:validation:Optional - Family *string `json:"family,omitempty" tf:"family,omitempty"` +// The scale up/out capacity, representing server's compute units. For more information see the documentation for your Elasticpool configuration: vCore-based or DTU-based. +// +kubebuilder:validation:Optional +Capacity *float64 `json:"capacity" tf:"capacity,omitempty"` + +// The family of hardware Gen4, Gen5, Fsv2 or DC. +// +kubebuilder:validation:Optional +Family *string `json:"family,omitempty" tf:"family,omitempty"` - // Specifies the SKU Name for this Elasticpool. The name of the SKU, will be either vCore based tier + family pattern (e.g. GP_Gen4, BC_Gen5) or the DTU based BasicPool, StandardPool, or PremiumPool pattern. Possible values are BasicPool, StandardPool, PremiumPool, GP_Gen4, GP_Gen5, GP_Fsv2, GP_DC, BC_Gen4, BC_Gen5 and BC_DC. - // +kubebuilder:validation:Optional - Name *string `json:"name" tf:"name,omitempty"` +// Specifies the SKU Name for this Elasticpool. The name of the SKU, will be either vCore based tier + family pattern (e.g. GP_Gen4, BC_Gen5) or the DTU based BasicPool, StandardPool, or PremiumPool pattern. Possible values are BasicPool, StandardPool, PremiumPool, GP_Gen4, GP_Gen5, GP_Fsv2, GP_DC, BC_Gen4, BC_Gen5 and BC_DC. +// +kubebuilder:validation:Optional +Name *string `json:"name" tf:"name,omitempty"` - // The tier of the particular SKU. Possible values are GeneralPurpose, BusinessCritical, Basic, Standard, or Premium. For more information see the documentation for your Elasticpool configuration: vCore-based or DTU-based. - // +kubebuilder:validation:Optional - Tier *string `json:"tier" tf:"tier,omitempty"` +// The tier of the particular SKU. Possible values are GeneralPurpose, BusinessCritical, Basic, Standard, or Premium. For more information see the documentation for your Elasticpool configuration: vCore-based or DTU-based. +// +kubebuilder:validation:Optional +Tier *string `json:"tier" tf:"tier,omitempty"` } // MSSQLElasticPoolSpec defines the desired state of MSSQLElasticPool type MSSQLElasticPoolSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider MSSQLElasticPoolParameters `json:"forProvider"` + ForProvider MSSQLElasticPoolParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -243,13 +264,13 @@ type MSSQLElasticPoolSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider MSSQLElasticPoolInitParameters `json:"initProvider,omitempty"` + InitProvider MSSQLElasticPoolInitParameters `json:"initProvider,omitempty"` } // MSSQLElasticPoolStatus defines the observed state of MSSQLElasticPool. type MSSQLElasticPoolStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider MSSQLElasticPoolObservation `json:"atProvider,omitempty"` + AtProvider MSSQLElasticPoolObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -264,11 +285,11 @@ type MSSQLElasticPoolStatus struct { type MSSQLElasticPool struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.perDatabaseSettings) || (has(self.initProvider) && has(self.initProvider.perDatabaseSettings))",message="spec.forProvider.perDatabaseSettings is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.sku) || (has(self.initProvider) && has(self.initProvider.sku))",message="spec.forProvider.sku is a required parameter" - Spec MSSQLElasticPoolSpec `json:"spec"` - Status MSSQLElasticPoolStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.perDatabaseSettings) || (has(self.initProvider) && has(self.initProvider.perDatabaseSettings))",message="spec.forProvider.perDatabaseSettings is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.sku) || (has(self.initProvider) && has(self.initProvider.sku))",message="spec.forProvider.sku is a required parameter" + Spec MSSQLElasticPoolSpec `json:"spec"` + Status MSSQLElasticPoolStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/sql/v1alpha1/zz_mssqlfailovergroup_types.go b/apis/sql/v1alpha1/zz_mssqlfailovergroup_types.go index 4e1b950..757cfee 100755 --- a/apis/sql/v1alpha1/zz_mssqlfailovergroup_types.go +++ b/apis/sql/v1alpha1/zz_mssqlfailovergroup_types.go @@ -15,159 +15,180 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type MSSQLFailoverGroupInitParameters struct { - // A partner_server block as defined below. - PartnerServer []PartnerServerInitParameters `json:"partnerServer,omitempty" tf:"partner_server,omitempty"` - // A read_write_endpoint_failover_policy block as defined below. - ReadWriteEndpointFailoverPolicy []ReadWriteEndpointFailoverPolicyInitParameters `json:"readWriteEndpointFailoverPolicy,omitempty" tf:"read_write_endpoint_failover_policy,omitempty"` +// A partner_server block as defined below. +PartnerServer []PartnerServerInitParameters `json:"partnerServer,omitempty" tf:"partner_server,omitempty"` - // Whether failover is enabled for the readonly endpoint. Defaults to false. - ReadonlyEndpointFailoverPolicyEnabled *bool `json:"readonlyEndpointFailoverPolicyEnabled,omitempty" tf:"readonly_endpoint_failover_policy_enabled,omitempty"` +// A read_write_endpoint_failover_policy block as defined below. +ReadWriteEndpointFailoverPolicy []ReadWriteEndpointFailoverPolicyInitParameters `json:"readWriteEndpointFailoverPolicy,omitempty" tf:"read_write_endpoint_failover_policy,omitempty"` - // A mapping of tags to assign to the resource. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// Whether failover is enabled for the readonly endpoint. Defaults to false. +ReadonlyEndpointFailoverPolicyEnabled *bool `json:"readonlyEndpointFailoverPolicyEnabled,omitempty" tf:"readonly_endpoint_failover_policy_enabled,omitempty"` + +// A mapping of tags to assign to the resource. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` } + type MSSQLFailoverGroupObservation struct { - // A set of database names to include in the failover group. - Databases []*string `json:"databases,omitempty" tf:"databases,omitempty"` - // The ID of the Failover Group. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// A set of database names to include in the failover group. +Databases []*string `json:"databases,omitempty" tf:"databases,omitempty"` - // A partner_server block as defined below. - PartnerServer []PartnerServerObservation `json:"partnerServer,omitempty" tf:"partner_server,omitempty"` +// The ID of the Failover Group. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // A read_write_endpoint_failover_policy block as defined below. - ReadWriteEndpointFailoverPolicy []ReadWriteEndpointFailoverPolicyObservation `json:"readWriteEndpointFailoverPolicy,omitempty" tf:"read_write_endpoint_failover_policy,omitempty"` +// A partner_server block as defined below. +PartnerServer []PartnerServerObservation `json:"partnerServer,omitempty" tf:"partner_server,omitempty"` - // Whether failover is enabled for the readonly endpoint. Defaults to false. - ReadonlyEndpointFailoverPolicyEnabled *bool `json:"readonlyEndpointFailoverPolicyEnabled,omitempty" tf:"readonly_endpoint_failover_policy_enabled,omitempty"` +// A read_write_endpoint_failover_policy block as defined below. +ReadWriteEndpointFailoverPolicy []ReadWriteEndpointFailoverPolicyObservation `json:"readWriteEndpointFailoverPolicy,omitempty" tf:"read_write_endpoint_failover_policy,omitempty"` - // The ID of the primary SQL Server on which to create the failover group. Changing this forces a new resource to be created. - ServerID *string `json:"serverId,omitempty" tf:"server_id,omitempty"` +// Whether failover is enabled for the readonly endpoint. Defaults to false. +ReadonlyEndpointFailoverPolicyEnabled *bool `json:"readonlyEndpointFailoverPolicyEnabled,omitempty" tf:"readonly_endpoint_failover_policy_enabled,omitempty"` - // A mapping of tags to assign to the resource. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// The ID of the primary SQL Server on which to create the failover group. Changing this forces a new resource to be created. +ServerID *string `json:"serverId,omitempty" tf:"server_id,omitempty"` + +// A mapping of tags to assign to the resource. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` } + type MSSQLFailoverGroupParameters struct { - // A set of database names to include in the failover group. - // +crossplane:generate:reference:type=MSSQLDatabase - // +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() - // +kubebuilder:validation:Optional - Databases []*string `json:"databases,omitempty" tf:"databases,omitempty"` - - // References to MSSQLDatabase to populate databases. - // +kubebuilder:validation:Optional - DatabasesRefs []v1.Reference `json:"databasesRefs,omitempty" tf:"-"` - - // Selector for a list of MSSQLDatabase to populate databases. - // +kubebuilder:validation:Optional - DatabasesSelector *v1.Selector `json:"databasesSelector,omitempty" tf:"-"` - - // A partner_server block as defined below. - // +kubebuilder:validation:Optional - PartnerServer []PartnerServerParameters `json:"partnerServer,omitempty" tf:"partner_server,omitempty"` - - // A read_write_endpoint_failover_policy block as defined below. - // +kubebuilder:validation:Optional - ReadWriteEndpointFailoverPolicy []ReadWriteEndpointFailoverPolicyParameters `json:"readWriteEndpointFailoverPolicy,omitempty" tf:"read_write_endpoint_failover_policy,omitempty"` - - // Whether failover is enabled for the readonly endpoint. Defaults to false. - // +kubebuilder:validation:Optional - ReadonlyEndpointFailoverPolicyEnabled *bool `json:"readonlyEndpointFailoverPolicyEnabled,omitempty" tf:"readonly_endpoint_failover_policy_enabled,omitempty"` - - // The ID of the primary SQL Server on which to create the failover group. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=MSSQLServer - // +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() - // +kubebuilder:validation:Optional - ServerID *string `json:"serverId,omitempty" tf:"server_id,omitempty"` - - // Reference to a MSSQLServer to populate serverId. - // +kubebuilder:validation:Optional - ServerIDRef *v1.Reference `json:"serverIdRef,omitempty" tf:"-"` - - // Selector for a MSSQLServer to populate serverId. - // +kubebuilder:validation:Optional - ServerIDSelector *v1.Selector `json:"serverIdSelector,omitempty" tf:"-"` - - // A mapping of tags to assign to the resource. - // +kubebuilder:validation:Optional - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + +// A set of database names to include in the failover group. +// +crossplane:generate:reference:type=MSSQLDatabase +// +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() +// +kubebuilder:validation:Optional +Databases []*string `json:"databases,omitempty" tf:"databases,omitempty"` + +// References to MSSQLDatabase to populate databases. +// +kubebuilder:validation:Optional +DatabasesRefs []v1.Reference `json:"databasesRefs,omitempty" tf:"-"` + +// Selector for a list of MSSQLDatabase to populate databases. +// +kubebuilder:validation:Optional +DatabasesSelector *v1.Selector `json:"databasesSelector,omitempty" tf:"-"` + +// A partner_server block as defined below. +// +kubebuilder:validation:Optional +PartnerServer []PartnerServerParameters `json:"partnerServer,omitempty" tf:"partner_server,omitempty"` + +// A read_write_endpoint_failover_policy block as defined below. +// +kubebuilder:validation:Optional +ReadWriteEndpointFailoverPolicy []ReadWriteEndpointFailoverPolicyParameters `json:"readWriteEndpointFailoverPolicy,omitempty" tf:"read_write_endpoint_failover_policy,omitempty"` + +// Whether failover is enabled for the readonly endpoint. Defaults to false. +// +kubebuilder:validation:Optional +ReadonlyEndpointFailoverPolicyEnabled *bool `json:"readonlyEndpointFailoverPolicyEnabled,omitempty" tf:"readonly_endpoint_failover_policy_enabled,omitempty"` + +// The ID of the primary SQL Server on which to create the failover group. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=MSSQLServer +// +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() +// +kubebuilder:validation:Optional +ServerID *string `json:"serverId,omitempty" tf:"server_id,omitempty"` + +// Reference to a MSSQLServer to populate serverId. +// +kubebuilder:validation:Optional +ServerIDRef *v1.Reference `json:"serverIdRef,omitempty" tf:"-"` + +// Selector for a MSSQLServer to populate serverId. +// +kubebuilder:validation:Optional +ServerIDSelector *v1.Selector `json:"serverIdSelector,omitempty" tf:"-"` + +// A mapping of tags to assign to the resource. +// +kubebuilder:validation:Optional +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` } + type PartnerServerInitParameters struct { + } + type PartnerServerObservation struct { - // The ID of a partner SQL server to include in the failover group. - ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The location of the partner server. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// The ID of a partner SQL server to include in the failover group. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The replication role of the partner server. Possible values include Primary or Secondary. - Role *string `json:"role,omitempty" tf:"role,omitempty"` +// The location of the partner server. +Location *string `json:"location,omitempty" tf:"location,omitempty"` + +// The replication role of the partner server. Possible values include Primary or Secondary. +Role *string `json:"role,omitempty" tf:"role,omitempty"` } + type PartnerServerParameters struct { - // The ID of a partner SQL server to include in the failover group. - // +crossplane:generate:reference:type=MSSQLServer - // +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() - // +kubebuilder:validation:Optional - ID *string `json:"id,omitempty" tf:"id,omitempty"` - // Reference to a MSSQLServer to populate id. - // +kubebuilder:validation:Optional - IDRef *v1.Reference `json:"idRef,omitempty" tf:"-"` +// The ID of a partner SQL server to include in the failover group. +// +crossplane:generate:reference:type=MSSQLServer +// +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() +// +kubebuilder:validation:Optional +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // Selector for a MSSQLServer to populate id. - // +kubebuilder:validation:Optional - IDSelector *v1.Selector `json:"idSelector,omitempty" tf:"-"` +// Reference to a MSSQLServer to populate id. +// +kubebuilder:validation:Optional +IDRef *v1.Reference `json:"idRef,omitempty" tf:"-"` + +// Selector for a MSSQLServer to populate id. +// +kubebuilder:validation:Optional +IDSelector *v1.Selector `json:"idSelector,omitempty" tf:"-"` } + type ReadWriteEndpointFailoverPolicyInitParameters struct { - // The grace period in minutes, before failover with data loss is attempted for the read-write endpoint. Required when mode is Automatic. - GraceMinutes *float64 `json:"graceMinutes,omitempty" tf:"grace_minutes,omitempty"` - // The failover policy of the read-write endpoint for the failover group. Possible values are Automatic or Manual. - Mode *string `json:"mode,omitempty" tf:"mode,omitempty"` +// The grace period in minutes, before failover with data loss is attempted for the read-write endpoint. Required when mode is Automatic. +GraceMinutes *float64 `json:"graceMinutes,omitempty" tf:"grace_minutes,omitempty"` + +// The failover policy of the read-write endpoint for the failover group. Possible values are Automatic or Manual. +Mode *string `json:"mode,omitempty" tf:"mode,omitempty"` } + type ReadWriteEndpointFailoverPolicyObservation struct { - // The grace period in minutes, before failover with data loss is attempted for the read-write endpoint. Required when mode is Automatic. - GraceMinutes *float64 `json:"graceMinutes,omitempty" tf:"grace_minutes,omitempty"` - // The failover policy of the read-write endpoint for the failover group. Possible values are Automatic or Manual. - Mode *string `json:"mode,omitempty" tf:"mode,omitempty"` +// The grace period in minutes, before failover with data loss is attempted for the read-write endpoint. Required when mode is Automatic. +GraceMinutes *float64 `json:"graceMinutes,omitempty" tf:"grace_minutes,omitempty"` + +// The failover policy of the read-write endpoint for the failover group. Possible values are Automatic or Manual. +Mode *string `json:"mode,omitempty" tf:"mode,omitempty"` } + type ReadWriteEndpointFailoverPolicyParameters struct { - // The grace period in minutes, before failover with data loss is attempted for the read-write endpoint. Required when mode is Automatic. - // +kubebuilder:validation:Optional - GraceMinutes *float64 `json:"graceMinutes,omitempty" tf:"grace_minutes,omitempty"` - // The failover policy of the read-write endpoint for the failover group. Possible values are Automatic or Manual. - // +kubebuilder:validation:Optional - Mode *string `json:"mode" tf:"mode,omitempty"` +// The grace period in minutes, before failover with data loss is attempted for the read-write endpoint. Required when mode is Automatic. +// +kubebuilder:validation:Optional +GraceMinutes *float64 `json:"graceMinutes,omitempty" tf:"grace_minutes,omitempty"` + +// The failover policy of the read-write endpoint for the failover group. Possible values are Automatic or Manual. +// +kubebuilder:validation:Optional +Mode *string `json:"mode" tf:"mode,omitempty"` } // MSSQLFailoverGroupSpec defines the desired state of MSSQLFailoverGroup type MSSQLFailoverGroupSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider MSSQLFailoverGroupParameters `json:"forProvider"` + ForProvider MSSQLFailoverGroupParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -178,13 +199,13 @@ type MSSQLFailoverGroupSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider MSSQLFailoverGroupInitParameters `json:"initProvider,omitempty"` + InitProvider MSSQLFailoverGroupInitParameters `json:"initProvider,omitempty"` } // MSSQLFailoverGroupStatus defines the observed state of MSSQLFailoverGroup. type MSSQLFailoverGroupStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider MSSQLFailoverGroupObservation `json:"atProvider,omitempty"` + AtProvider MSSQLFailoverGroupObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -199,10 +220,10 @@ type MSSQLFailoverGroupStatus struct { type MSSQLFailoverGroup struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.partnerServer) || (has(self.initProvider) && has(self.initProvider.partnerServer))",message="spec.forProvider.partnerServer is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.readWriteEndpointFailoverPolicy) || (has(self.initProvider) && has(self.initProvider.readWriteEndpointFailoverPolicy))",message="spec.forProvider.readWriteEndpointFailoverPolicy is a required parameter" - Spec MSSQLFailoverGroupSpec `json:"spec"` - Status MSSQLFailoverGroupStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.partnerServer) || (has(self.initProvider) && has(self.initProvider.partnerServer))",message="spec.forProvider.partnerServer is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.readWriteEndpointFailoverPolicy) || (has(self.initProvider) && has(self.initProvider.readWriteEndpointFailoverPolicy))",message="spec.forProvider.readWriteEndpointFailoverPolicy is a required parameter" + Spec MSSQLFailoverGroupSpec `json:"spec"` + Status MSSQLFailoverGroupStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/sql/v1alpha1/zz_mssqlfirewallrule_types.go b/apis/sql/v1alpha1/zz_mssqlfirewallrule_types.go index 3f38401..7f3b629 100755 --- a/apis/sql/v1alpha1/zz_mssqlfirewallrule_types.go +++ b/apis/sql/v1alpha1/zz_mssqlfirewallrule_types.go @@ -15,61 +15,70 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type MSSQLFirewallRuleInitParameters struct { - // The ending IP address to allow through the firewall for this rule. - EndIPAddress *string `json:"endIpAddress,omitempty" tf:"end_ip_address,omitempty"` - // The starting IP address to allow through the firewall for this rule. - StartIPAddress *string `json:"startIpAddress,omitempty" tf:"start_ip_address,omitempty"` +// The ending IP address to allow through the firewall for this rule. +EndIPAddress *string `json:"endIpAddress,omitempty" tf:"end_ip_address,omitempty"` + +// The starting IP address to allow through the firewall for this rule. +StartIPAddress *string `json:"startIpAddress,omitempty" tf:"start_ip_address,omitempty"` } + type MSSQLFirewallRuleObservation struct { - // The ending IP address to allow through the firewall for this rule. - EndIPAddress *string `json:"endIpAddress,omitempty" tf:"end_ip_address,omitempty"` - // The SQL Firewall Rule ID. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// The ending IP address to allow through the firewall for this rule. +EndIPAddress *string `json:"endIpAddress,omitempty" tf:"end_ip_address,omitempty"` + +// The SQL Firewall Rule ID. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The resource ID of the SQL Server on which to create the Firewall Rule. Changing this forces a new resource to be created. - ServerID *string `json:"serverId,omitempty" tf:"server_id,omitempty"` +// The resource ID of the SQL Server on which to create the Firewall Rule. Changing this forces a new resource to be created. +ServerID *string `json:"serverId,omitempty" tf:"server_id,omitempty"` - // The starting IP address to allow through the firewall for this rule. - StartIPAddress *string `json:"startIpAddress,omitempty" tf:"start_ip_address,omitempty"` +// The starting IP address to allow through the firewall for this rule. +StartIPAddress *string `json:"startIpAddress,omitempty" tf:"start_ip_address,omitempty"` } + type MSSQLFirewallRuleParameters struct { - // The ending IP address to allow through the firewall for this rule. - // +kubebuilder:validation:Optional - EndIPAddress *string `json:"endIpAddress,omitempty" tf:"end_ip_address,omitempty"` - // The resource ID of the SQL Server on which to create the Firewall Rule. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/sql/v1alpha1.MSSQLServer - // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() - // +kubebuilder:validation:Optional - ServerID *string `json:"serverId,omitempty" tf:"server_id,omitempty"` +// The ending IP address to allow through the firewall for this rule. +// +kubebuilder:validation:Optional +EndIPAddress *string `json:"endIpAddress,omitempty" tf:"end_ip_address,omitempty"` + +// The resource ID of the SQL Server on which to create the Firewall Rule. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/sql/v1alpha1.MSSQLServer +// +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() +// +kubebuilder:validation:Optional +ServerID *string `json:"serverId,omitempty" tf:"server_id,omitempty"` - // Reference to a MSSQLServer in sql to populate serverId. - // +kubebuilder:validation:Optional - ServerIDRef *v1.Reference `json:"serverIdRef,omitempty" tf:"-"` +// Reference to a MSSQLServer in sql to populate serverId. +// +kubebuilder:validation:Optional +ServerIDRef *v1.Reference `json:"serverIdRef,omitempty" tf:"-"` - // Selector for a MSSQLServer in sql to populate serverId. - // +kubebuilder:validation:Optional - ServerIDSelector *v1.Selector `json:"serverIdSelector,omitempty" tf:"-"` +// Selector for a MSSQLServer in sql to populate serverId. +// +kubebuilder:validation:Optional +ServerIDSelector *v1.Selector `json:"serverIdSelector,omitempty" tf:"-"` - // The starting IP address to allow through the firewall for this rule. - // +kubebuilder:validation:Optional - StartIPAddress *string `json:"startIpAddress,omitempty" tf:"start_ip_address,omitempty"` +// The starting IP address to allow through the firewall for this rule. +// +kubebuilder:validation:Optional +StartIPAddress *string `json:"startIpAddress,omitempty" tf:"start_ip_address,omitempty"` } // MSSQLFirewallRuleSpec defines the desired state of MSSQLFirewallRule type MSSQLFirewallRuleSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider MSSQLFirewallRuleParameters `json:"forProvider"` + ForProvider MSSQLFirewallRuleParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -80,13 +89,13 @@ type MSSQLFirewallRuleSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider MSSQLFirewallRuleInitParameters `json:"initProvider,omitempty"` + InitProvider MSSQLFirewallRuleInitParameters `json:"initProvider,omitempty"` } // MSSQLFirewallRuleStatus defines the observed state of MSSQLFirewallRule. type MSSQLFirewallRuleStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider MSSQLFirewallRuleObservation `json:"atProvider,omitempty"` + AtProvider MSSQLFirewallRuleObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -101,10 +110,10 @@ type MSSQLFirewallRuleStatus struct { type MSSQLFirewallRule struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.endIpAddress) || (has(self.initProvider) && has(self.initProvider.endIpAddress))",message="spec.forProvider.endIpAddress is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.startIpAddress) || (has(self.initProvider) && has(self.initProvider.startIpAddress))",message="spec.forProvider.startIpAddress is a required parameter" - Spec MSSQLFirewallRuleSpec `json:"spec"` - Status MSSQLFirewallRuleStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.endIpAddress) || (has(self.initProvider) && has(self.initProvider.endIpAddress))",message="spec.forProvider.endIpAddress is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.startIpAddress) || (has(self.initProvider) && has(self.initProvider.startIpAddress))",message="spec.forProvider.startIpAddress is a required parameter" + Spec MSSQLFirewallRuleSpec `json:"spec"` + Status MSSQLFirewallRuleStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/sql/v1alpha1/zz_mssqljobagent_types.go b/apis/sql/v1alpha1/zz_mssqljobagent_types.go index da39c03..39ae556 100755 --- a/apis/sql/v1alpha1/zz_mssqljobagent_types.go +++ b/apis/sql/v1alpha1/zz_mssqljobagent_types.go @@ -15,71 +15,80 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type MSSQLJobAgentInitParameters struct { - // The Azure Region where the Elastic Job Agent should exist. Changing this forces a new Elastic Job Agent to be created. - Location *string `json:"location,omitempty" tf:"location,omitempty"` - // The name which should be used for this Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created. - Name *string `json:"name,omitempty" tf:"name,omitempty"` +// The Azure Region where the Elastic Job Agent should exist. Changing this forces a new Elastic Job Agent to be created. +Location *string `json:"location,omitempty" tf:"location,omitempty"` + +// The name which should be used for this Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created. +Name *string `json:"name,omitempty" tf:"name,omitempty"` - // A mapping of tags which should be assigned to the Database. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A mapping of tags which should be assigned to the Database. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` } + type MSSQLJobAgentObservation struct { - // The ID of the database to store metadata for the Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created. - DatabaseID *string `json:"databaseId,omitempty" tf:"database_id,omitempty"` - // The ID of the Elastic Job Agent. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// The ID of the database to store metadata for the Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created. +DatabaseID *string `json:"databaseId,omitempty" tf:"database_id,omitempty"` + +// The ID of the Elastic Job Agent. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The Azure Region where the Elastic Job Agent should exist. Changing this forces a new Elastic Job Agent to be created. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// The Azure Region where the Elastic Job Agent should exist. Changing this forces a new Elastic Job Agent to be created. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // The name which should be used for this Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created. - Name *string `json:"name,omitempty" tf:"name,omitempty"` +// The name which should be used for this Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created. +Name *string `json:"name,omitempty" tf:"name,omitempty"` - // A mapping of tags which should be assigned to the Database. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A mapping of tags which should be assigned to the Database. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` } + type MSSQLJobAgentParameters struct { - // The ID of the database to store metadata for the Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/sql/v1alpha1.MSSQLDatabase - // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() - // +kubebuilder:validation:Optional - DatabaseID *string `json:"databaseId,omitempty" tf:"database_id,omitempty"` - // Reference to a MSSQLDatabase in sql to populate databaseId. - // +kubebuilder:validation:Optional - DatabaseIDRef *v1.Reference `json:"databaseIdRef,omitempty" tf:"-"` +// The ID of the database to store metadata for the Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/sql/v1alpha1.MSSQLDatabase +// +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() +// +kubebuilder:validation:Optional +DatabaseID *string `json:"databaseId,omitempty" tf:"database_id,omitempty"` + +// Reference to a MSSQLDatabase in sql to populate databaseId. +// +kubebuilder:validation:Optional +DatabaseIDRef *v1.Reference `json:"databaseIdRef,omitempty" tf:"-"` - // Selector for a MSSQLDatabase in sql to populate databaseId. - // +kubebuilder:validation:Optional - DatabaseIDSelector *v1.Selector `json:"databaseIdSelector,omitempty" tf:"-"` +// Selector for a MSSQLDatabase in sql to populate databaseId. +// +kubebuilder:validation:Optional +DatabaseIDSelector *v1.Selector `json:"databaseIdSelector,omitempty" tf:"-"` - // The Azure Region where the Elastic Job Agent should exist. Changing this forces a new Elastic Job Agent to be created. - // +kubebuilder:validation:Optional - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// The Azure Region where the Elastic Job Agent should exist. Changing this forces a new Elastic Job Agent to be created. +// +kubebuilder:validation:Optional +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // The name which should be used for this Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created. - // +kubebuilder:validation:Optional - Name *string `json:"name,omitempty" tf:"name,omitempty"` +// The name which should be used for this Elastic Job Agent. Changing this forces a new Elastic Job Agent to be created. +// +kubebuilder:validation:Optional +Name *string `json:"name,omitempty" tf:"name,omitempty"` - // A mapping of tags which should be assigned to the Database. - // +kubebuilder:validation:Optional - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A mapping of tags which should be assigned to the Database. +// +kubebuilder:validation:Optional +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` } // MSSQLJobAgentSpec defines the desired state of MSSQLJobAgent type MSSQLJobAgentSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider MSSQLJobAgentParameters `json:"forProvider"` + ForProvider MSSQLJobAgentParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -90,13 +99,13 @@ type MSSQLJobAgentSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider MSSQLJobAgentInitParameters `json:"initProvider,omitempty"` + InitProvider MSSQLJobAgentInitParameters `json:"initProvider,omitempty"` } // MSSQLJobAgentStatus defines the observed state of MSSQLJobAgent. type MSSQLJobAgentStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider MSSQLJobAgentObservation `json:"atProvider,omitempty"` + AtProvider MSSQLJobAgentObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -111,10 +120,10 @@ type MSSQLJobAgentStatus struct { type MSSQLJobAgent struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.name) || (has(self.initProvider) && has(self.initProvider.name))",message="spec.forProvider.name is a required parameter" - Spec MSSQLJobAgentSpec `json:"spec"` - Status MSSQLJobAgentStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.name) || (has(self.initProvider) && has(self.initProvider.name))",message="spec.forProvider.name is a required parameter" + Spec MSSQLJobAgentSpec `json:"spec"` + Status MSSQLJobAgentStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/sql/v1alpha1/zz_mssqljobcredential_types.go b/apis/sql/v1alpha1/zz_mssqljobcredential_types.go index dfb4aaa..3b754bf 100755 --- a/apis/sql/v1alpha1/zz_mssqljobcredential_types.go +++ b/apis/sql/v1alpha1/zz_mssqljobcredential_types.go @@ -15,55 +15,64 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type MSSQLJobCredentialInitParameters struct { - // The username part of the credential. - Username *string `json:"username,omitempty" tf:"username,omitempty"` + +// The username part of the credential. +Username *string `json:"username,omitempty" tf:"username,omitempty"` } + type MSSQLJobCredentialObservation struct { - // The ID of the Elastic Job Credential. - ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The ID of the Elastic Job Agent. Changing this forces a new Elastic Job Credential to be created. - JobAgentID *string `json:"jobAgentId,omitempty" tf:"job_agent_id,omitempty"` +// The ID of the Elastic Job Credential. +ID *string `json:"id,omitempty" tf:"id,omitempty"` + +// The ID of the Elastic Job Agent. Changing this forces a new Elastic Job Credential to be created. +JobAgentID *string `json:"jobAgentId,omitempty" tf:"job_agent_id,omitempty"` - // The username part of the credential. - Username *string `json:"username,omitempty" tf:"username,omitempty"` +// The username part of the credential. +Username *string `json:"username,omitempty" tf:"username,omitempty"` } + type MSSQLJobCredentialParameters struct { - // The ID of the Elastic Job Agent. Changing this forces a new Elastic Job Credential to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/sql/v1alpha1.MSSQLJobAgent - // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() - // +kubebuilder:validation:Optional - JobAgentID *string `json:"jobAgentId,omitempty" tf:"job_agent_id,omitempty"` - // Reference to a MSSQLJobAgent in sql to populate jobAgentId. - // +kubebuilder:validation:Optional - JobAgentIDRef *v1.Reference `json:"jobAgentIdRef,omitempty" tf:"-"` +// The ID of the Elastic Job Agent. Changing this forces a new Elastic Job Credential to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/sql/v1alpha1.MSSQLJobAgent +// +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() +// +kubebuilder:validation:Optional +JobAgentID *string `json:"jobAgentId,omitempty" tf:"job_agent_id,omitempty"` + +// Reference to a MSSQLJobAgent in sql to populate jobAgentId. +// +kubebuilder:validation:Optional +JobAgentIDRef *v1.Reference `json:"jobAgentIdRef,omitempty" tf:"-"` - // Selector for a MSSQLJobAgent in sql to populate jobAgentId. - // +kubebuilder:validation:Optional - JobAgentIDSelector *v1.Selector `json:"jobAgentIdSelector,omitempty" tf:"-"` +// Selector for a MSSQLJobAgent in sql to populate jobAgentId. +// +kubebuilder:validation:Optional +JobAgentIDSelector *v1.Selector `json:"jobAgentIdSelector,omitempty" tf:"-"` - // The password part of the credential. - // +kubebuilder:validation:Optional - PasswordSecretRef v1.SecretKeySelector `json:"passwordSecretRef" tf:"-"` +// The password part of the credential. +// +kubebuilder:validation:Optional +PasswordSecretRef v1.SecretKeySelector `json:"passwordSecretRef" tf:"-"` - // The username part of the credential. - // +kubebuilder:validation:Optional - Username *string `json:"username,omitempty" tf:"username,omitempty"` +// The username part of the credential. +// +kubebuilder:validation:Optional +Username *string `json:"username,omitempty" tf:"username,omitempty"` } // MSSQLJobCredentialSpec defines the desired state of MSSQLJobCredential type MSSQLJobCredentialSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider MSSQLJobCredentialParameters `json:"forProvider"` + ForProvider MSSQLJobCredentialParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -74,13 +83,13 @@ type MSSQLJobCredentialSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider MSSQLJobCredentialInitParameters `json:"initProvider,omitempty"` + InitProvider MSSQLJobCredentialInitParameters `json:"initProvider,omitempty"` } // MSSQLJobCredentialStatus defines the observed state of MSSQLJobCredential. type MSSQLJobCredentialStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider MSSQLJobCredentialObservation `json:"atProvider,omitempty"` + AtProvider MSSQLJobCredentialObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -95,10 +104,10 @@ type MSSQLJobCredentialStatus struct { type MSSQLJobCredential struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.passwordSecretRef)",message="spec.forProvider.passwordSecretRef is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.username) || (has(self.initProvider) && has(self.initProvider.username))",message="spec.forProvider.username is a required parameter" - Spec MSSQLJobCredentialSpec `json:"spec"` - Status MSSQLJobCredentialStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.passwordSecretRef)",message="spec.forProvider.passwordSecretRef is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.username) || (has(self.initProvider) && has(self.initProvider.username))",message="spec.forProvider.username is a required parameter" + Spec MSSQLJobCredentialSpec `json:"spec"` + Status MSSQLJobCredentialStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/sql/v1alpha1/zz_mssqlmanageddatabase_types.go b/apis/sql/v1alpha1/zz_mssqlmanageddatabase_types.go index b2daaf9..889f9a1 100755 --- a/apis/sql/v1alpha1/zz_mssqlmanageddatabase_types.go +++ b/apis/sql/v1alpha1/zz_mssqlmanageddatabase_types.go @@ -15,110 +15,125 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type MSSQLManagedDatabaseInitParameters struct { - // A long_term_retention_policy block as defined below. - LongTermRetentionPolicy []MSSQLManagedDatabaseLongTermRetentionPolicyInitParameters `json:"longTermRetentionPolicy,omitempty" tf:"long_term_retention_policy,omitempty"` - // The backup retention period in days. This is how many days Point-in-Time Restore will be supported. - ShortTermRetentionDays *float64 `json:"shortTermRetentionDays,omitempty" tf:"short_term_retention_days,omitempty"` +// A long_term_retention_policy block as defined below. +LongTermRetentionPolicy []MSSQLManagedDatabaseLongTermRetentionPolicyInitParameters `json:"longTermRetentionPolicy,omitempty" tf:"long_term_retention_policy,omitempty"` + +// The backup retention period in days. This is how many days Point-in-Time Restore will be supported. +ShortTermRetentionDays *float64 `json:"shortTermRetentionDays,omitempty" tf:"short_term_retention_days,omitempty"` } + type MSSQLManagedDatabaseLongTermRetentionPolicyInitParameters struct { - // The monthly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 120 months. e.g. P1Y, P1M, P4W or P30D. - MonthlyRetention *string `json:"monthlyRetention,omitempty" tf:"monthly_retention,omitempty"` - // The week of year to take the yearly backup. Value has to be between 1 and 52. - WeekOfYear *float64 `json:"weekOfYear,omitempty" tf:"week_of_year,omitempty"` +// The monthly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 120 months. e.g. P1Y, P1M, P4W or P30D. +MonthlyRetention *string `json:"monthlyRetention,omitempty" tf:"monthly_retention,omitempty"` - // The weekly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 520 weeks. e.g. P1Y, P1M, P1W or P7D. - WeeklyRetention *string `json:"weeklyRetention,omitempty" tf:"weekly_retention,omitempty"` +// The week of year to take the yearly backup. Value has to be between 1 and 52. +WeekOfYear *float64 `json:"weekOfYear,omitempty" tf:"week_of_year,omitempty"` - // The yearly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 10 years. e.g. P1Y, P12M, P52W or P365D. - YearlyRetention *string `json:"yearlyRetention,omitempty" tf:"yearly_retention,omitempty"` +// The weekly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 520 weeks. e.g. P1Y, P1M, P1W or P7D. +WeeklyRetention *string `json:"weeklyRetention,omitempty" tf:"weekly_retention,omitempty"` + +// The yearly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 10 years. e.g. P1Y, P12M, P52W or P365D. +YearlyRetention *string `json:"yearlyRetention,omitempty" tf:"yearly_retention,omitempty"` } + type MSSQLManagedDatabaseLongTermRetentionPolicyObservation struct { - // The monthly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 120 months. e.g. P1Y, P1M, P4W or P30D. - MonthlyRetention *string `json:"monthlyRetention,omitempty" tf:"monthly_retention,omitempty"` - // The week of year to take the yearly backup. Value has to be between 1 and 52. - WeekOfYear *float64 `json:"weekOfYear,omitempty" tf:"week_of_year,omitempty"` +// The monthly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 120 months. e.g. P1Y, P1M, P4W or P30D. +MonthlyRetention *string `json:"monthlyRetention,omitempty" tf:"monthly_retention,omitempty"` - // The weekly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 520 weeks. e.g. P1Y, P1M, P1W or P7D. - WeeklyRetention *string `json:"weeklyRetention,omitempty" tf:"weekly_retention,omitempty"` +// The week of year to take the yearly backup. Value has to be between 1 and 52. +WeekOfYear *float64 `json:"weekOfYear,omitempty" tf:"week_of_year,omitempty"` - // The yearly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 10 years. e.g. P1Y, P12M, P52W or P365D. - YearlyRetention *string `json:"yearlyRetention,omitempty" tf:"yearly_retention,omitempty"` +// The weekly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 520 weeks. e.g. P1Y, P1M, P1W or P7D. +WeeklyRetention *string `json:"weeklyRetention,omitempty" tf:"weekly_retention,omitempty"` + +// The yearly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 10 years. e.g. P1Y, P12M, P52W or P365D. +YearlyRetention *string `json:"yearlyRetention,omitempty" tf:"yearly_retention,omitempty"` } + type MSSQLManagedDatabaseLongTermRetentionPolicyParameters struct { - // The monthly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 120 months. e.g. P1Y, P1M, P4W or P30D. - // +kubebuilder:validation:Optional - MonthlyRetention *string `json:"monthlyRetention,omitempty" tf:"monthly_retention,omitempty"` - // The week of year to take the yearly backup. Value has to be between 1 and 52. - // +kubebuilder:validation:Optional - WeekOfYear *float64 `json:"weekOfYear,omitempty" tf:"week_of_year,omitempty"` +// The monthly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 120 months. e.g. P1Y, P1M, P4W or P30D. +// +kubebuilder:validation:Optional +MonthlyRetention *string `json:"monthlyRetention,omitempty" tf:"monthly_retention,omitempty"` - // The weekly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 520 weeks. e.g. P1Y, P1M, P1W or P7D. - // +kubebuilder:validation:Optional - WeeklyRetention *string `json:"weeklyRetention,omitempty" tf:"weekly_retention,omitempty"` +// The week of year to take the yearly backup. Value has to be between 1 and 52. +// +kubebuilder:validation:Optional +WeekOfYear *float64 `json:"weekOfYear,omitempty" tf:"week_of_year,omitempty"` - // The yearly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 10 years. e.g. P1Y, P12M, P52W or P365D. - // +kubebuilder:validation:Optional - YearlyRetention *string `json:"yearlyRetention,omitempty" tf:"yearly_retention,omitempty"` +// The weekly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 520 weeks. e.g. P1Y, P1M, P1W or P7D. +// +kubebuilder:validation:Optional +WeeklyRetention *string `json:"weeklyRetention,omitempty" tf:"weekly_retention,omitempty"` + +// The yearly retention policy for an LTR backup in an ISO 8601 format. Valid value is between 1 to 10 years. e.g. P1Y, P12M, P52W or P365D. +// +kubebuilder:validation:Optional +YearlyRetention *string `json:"yearlyRetention,omitempty" tf:"yearly_retention,omitempty"` } + type MSSQLManagedDatabaseObservation struct { - // The Azure SQL Managed Database ID. - ID *string `json:"id,omitempty" tf:"id,omitempty"` - // A long_term_retention_policy block as defined below. - LongTermRetentionPolicy []MSSQLManagedDatabaseLongTermRetentionPolicyObservation `json:"longTermRetentionPolicy,omitempty" tf:"long_term_retention_policy,omitempty"` +// The Azure SQL Managed Database ID. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The ID of the Azure SQL Managed Instance on which to create this Managed Database. Changing this forces a new resource to be created. - ManagedInstanceID *string `json:"managedInstanceId,omitempty" tf:"managed_instance_id,omitempty"` +// A long_term_retention_policy block as defined below. +LongTermRetentionPolicy []MSSQLManagedDatabaseLongTermRetentionPolicyObservation `json:"longTermRetentionPolicy,omitempty" tf:"long_term_retention_policy,omitempty"` - // The backup retention period in days. This is how many days Point-in-Time Restore will be supported. - ShortTermRetentionDays *float64 `json:"shortTermRetentionDays,omitempty" tf:"short_term_retention_days,omitempty"` +// The ID of the Azure SQL Managed Instance on which to create this Managed Database. Changing this forces a new resource to be created. +ManagedInstanceID *string `json:"managedInstanceId,omitempty" tf:"managed_instance_id,omitempty"` + +// The backup retention period in days. This is how many days Point-in-Time Restore will be supported. +ShortTermRetentionDays *float64 `json:"shortTermRetentionDays,omitempty" tf:"short_term_retention_days,omitempty"` } + type MSSQLManagedDatabaseParameters struct { - // A long_term_retention_policy block as defined below. - // +kubebuilder:validation:Optional - LongTermRetentionPolicy []MSSQLManagedDatabaseLongTermRetentionPolicyParameters `json:"longTermRetentionPolicy,omitempty" tf:"long_term_retention_policy,omitempty"` - // The ID of the Azure SQL Managed Instance on which to create this Managed Database. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=MSSQLManagedInstance - // +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() - // +kubebuilder:validation:Optional - ManagedInstanceID *string `json:"managedInstanceId,omitempty" tf:"managed_instance_id,omitempty"` +// A long_term_retention_policy block as defined below. +// +kubebuilder:validation:Optional +LongTermRetentionPolicy []MSSQLManagedDatabaseLongTermRetentionPolicyParameters `json:"longTermRetentionPolicy,omitempty" tf:"long_term_retention_policy,omitempty"` + +// The ID of the Azure SQL Managed Instance on which to create this Managed Database. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=MSSQLManagedInstance +// +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() +// +kubebuilder:validation:Optional +ManagedInstanceID *string `json:"managedInstanceId,omitempty" tf:"managed_instance_id,omitempty"` - // Reference to a MSSQLManagedInstance to populate managedInstanceId. - // +kubebuilder:validation:Optional - ManagedInstanceIDRef *v1.Reference `json:"managedInstanceIdRef,omitempty" tf:"-"` +// Reference to a MSSQLManagedInstance to populate managedInstanceId. +// +kubebuilder:validation:Optional +ManagedInstanceIDRef *v1.Reference `json:"managedInstanceIdRef,omitempty" tf:"-"` - // Selector for a MSSQLManagedInstance to populate managedInstanceId. - // +kubebuilder:validation:Optional - ManagedInstanceIDSelector *v1.Selector `json:"managedInstanceIdSelector,omitempty" tf:"-"` +// Selector for a MSSQLManagedInstance to populate managedInstanceId. +// +kubebuilder:validation:Optional +ManagedInstanceIDSelector *v1.Selector `json:"managedInstanceIdSelector,omitempty" tf:"-"` - // The backup retention period in days. This is how many days Point-in-Time Restore will be supported. - // +kubebuilder:validation:Optional - ShortTermRetentionDays *float64 `json:"shortTermRetentionDays,omitempty" tf:"short_term_retention_days,omitempty"` +// The backup retention period in days. This is how many days Point-in-Time Restore will be supported. +// +kubebuilder:validation:Optional +ShortTermRetentionDays *float64 `json:"shortTermRetentionDays,omitempty" tf:"short_term_retention_days,omitempty"` } // MSSQLManagedDatabaseSpec defines the desired state of MSSQLManagedDatabase type MSSQLManagedDatabaseSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider MSSQLManagedDatabaseParameters `json:"forProvider"` + ForProvider MSSQLManagedDatabaseParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -129,13 +144,13 @@ type MSSQLManagedDatabaseSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider MSSQLManagedDatabaseInitParameters `json:"initProvider,omitempty"` + InitProvider MSSQLManagedDatabaseInitParameters `json:"initProvider,omitempty"` } // MSSQLManagedDatabaseStatus defines the observed state of MSSQLManagedDatabase. type MSSQLManagedDatabaseStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider MSSQLManagedDatabaseObservation `json:"atProvider,omitempty"` + AtProvider MSSQLManagedDatabaseObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/sql/v1alpha1/zz_mssqlmanagedinstance_types.go b/apis/sql/v1alpha1/zz_mssqlmanagedinstance_types.go index 2f043bd..c5e9755 100755 --- a/apis/sql/v1alpha1/zz_mssqlmanagedinstance_types.go +++ b/apis/sql/v1alpha1/zz_mssqlmanagedinstance_types.go @@ -15,266 +15,281 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type IdentityInitParameters struct { - // Specifies a list of User Assigned Managed Identity IDs to be assigned to this SQL Managed Instance. Required when type is set to UserAssigned. - IdentityIds []*string `json:"identityIds,omitempty" tf:"identity_ids,omitempty"` - // Specifies the type of Managed Service Identity that should be configured on this SQL Managed Instance. Possible values are SystemAssigned, UserAssigned. - Type *string `json:"type,omitempty" tf:"type,omitempty"` +// Specifies a list of User Assigned Managed Identity IDs to be assigned to this SQL Managed Instance. Required when type is set to UserAssigned. +IdentityIds []*string `json:"identityIds,omitempty" tf:"identity_ids,omitempty"` + +// Specifies the type of Managed Service Identity that should be configured on this SQL Managed Instance. Possible values are SystemAssigned, UserAssigned. +Type *string `json:"type,omitempty" tf:"type,omitempty"` } + type IdentityObservation struct { - // Specifies a list of User Assigned Managed Identity IDs to be assigned to this SQL Managed Instance. Required when type is set to UserAssigned. - IdentityIds []*string `json:"identityIds,omitempty" tf:"identity_ids,omitempty"` - // The Principal ID for the Service Principal associated with the Identity of this SQL Managed Instance. - PrincipalID *string `json:"principalId,omitempty" tf:"principal_id,omitempty"` +// Specifies a list of User Assigned Managed Identity IDs to be assigned to this SQL Managed Instance. Required when type is set to UserAssigned. +IdentityIds []*string `json:"identityIds,omitempty" tf:"identity_ids,omitempty"` + +// The Principal ID for the Service Principal associated with the Identity of this SQL Managed Instance. +PrincipalID *string `json:"principalId,omitempty" tf:"principal_id,omitempty"` - // The Tenant ID for the Service Principal associated with the Identity of this SQL Managed Instance. - TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` +// The Tenant ID for the Service Principal associated with the Identity of this SQL Managed Instance. +TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` - // Specifies the type of Managed Service Identity that should be configured on this SQL Managed Instance. Possible values are SystemAssigned, UserAssigned. - Type *string `json:"type,omitempty" tf:"type,omitempty"` +// Specifies the type of Managed Service Identity that should be configured on this SQL Managed Instance. Possible values are SystemAssigned, UserAssigned. +Type *string `json:"type,omitempty" tf:"type,omitempty"` } + type IdentityParameters struct { - // Specifies a list of User Assigned Managed Identity IDs to be assigned to this SQL Managed Instance. Required when type is set to UserAssigned. - // +kubebuilder:validation:Optional - IdentityIds []*string `json:"identityIds,omitempty" tf:"identity_ids,omitempty"` - // Specifies the type of Managed Service Identity that should be configured on this SQL Managed Instance. Possible values are SystemAssigned, UserAssigned. - // +kubebuilder:validation:Optional - Type *string `json:"type" tf:"type,omitempty"` +// Specifies a list of User Assigned Managed Identity IDs to be assigned to this SQL Managed Instance. Required when type is set to UserAssigned. +// +kubebuilder:validation:Optional +IdentityIds []*string `json:"identityIds,omitempty" tf:"identity_ids,omitempty"` + +// Specifies the type of Managed Service Identity that should be configured on this SQL Managed Instance. Possible values are SystemAssigned, UserAssigned. +// +kubebuilder:validation:Optional +Type *string `json:"type" tf:"type,omitempty"` } + type MSSQLManagedInstanceInitParameters struct { - // The administrator login name for the new SQL Managed Instance. Changing this forces a new resource to be created. - AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` - // Specifies how the SQL Managed Instance will be collated. Default value is SQL_Latin1_General_CP1_CI_AS. Changing this forces a new resource to be created. - Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` +// The administrator login name for the new SQL Managed Instance. Changing this forces a new resource to be created. +AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` - // An identity block as defined below. - Identity []IdentityInitParameters `json:"identity,omitempty" tf:"identity,omitempty"` +// Specifies how the SQL Managed Instance will be collated. Default value is SQL_Latin1_General_CP1_CI_AS. Changing this forces a new resource to be created. +Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` - // What type of license the Managed Instance will use. Possible values are LicenseIncluded and BasePrice. - LicenseType *string `json:"licenseType,omitempty" tf:"license_type,omitempty"` +// An identity block as defined below. +Identity []IdentityInitParameters `json:"identity,omitempty" tf:"identity,omitempty"` - // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// What type of license the Managed Instance will use. Possible values are LicenseIncluded and BasePrice. +LicenseType *string `json:"licenseType,omitempty" tf:"license_type,omitempty"` - // The name of the Public Maintenance Configuration window to apply to the SQL Managed Instance. Valid values include SQL_Default or an Azure Location in the format SQL_{Location}_MI_{Size}(for example SQL_EastUS_MI_1). Defaults to SQL_Default. - MaintenanceConfigurationName *string `json:"maintenanceConfigurationName,omitempty" tf:"maintenance_configuration_name,omitempty"` +// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // The Minimum TLS Version. Default value is 1.2 Valid values include 1.0, 1.1, 1.2. - MinimumTLSVersion *string `json:"minimumTlsVersion,omitempty" tf:"minimum_tls_version,omitempty"` +// The name of the Public Maintenance Configuration window to apply to the SQL Managed Instance. Valid values include SQL_Default or an Azure Location in the format SQL_{Location}_MI_{Size}(for example SQL_EastUS_MI_1). Defaults to SQL_Default. +MaintenanceConfigurationName *string `json:"maintenanceConfigurationName,omitempty" tf:"maintenance_configuration_name,omitempty"` - // Specifies how the SQL Managed Instance will be accessed. Default value is Default. Valid values include Default, Proxy, and Redirect. - ProxyOverride *string `json:"proxyOverride,omitempty" tf:"proxy_override,omitempty"` +// The Minimum TLS Version. Default value is 1.2 Valid values include 1.0, 1.1, 1.2. +MinimumTLSVersion *string `json:"minimumTlsVersion,omitempty" tf:"minimum_tls_version,omitempty"` - // Is the public data endpoint enabled? Default value is false. - PublicDataEndpointEnabled *bool `json:"publicDataEndpointEnabled,omitempty" tf:"public_data_endpoint_enabled,omitempty"` +// Specifies how the SQL Managed Instance will be accessed. Default value is Default. Valid values include Default, Proxy, and Redirect. +ProxyOverride *string `json:"proxyOverride,omitempty" tf:"proxy_override,omitempty"` - // Specifies the SKU Name for the SQL Managed Instance. Valid values include GP_Gen4, GP_Gen5, GP_Gen8IM, GP_Gen8IH, BC_Gen4, BC_Gen5, BC_Gen8IM or BC_Gen8IH. - SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` +// Is the public data endpoint enabled? Default value is false. +PublicDataEndpointEnabled *bool `json:"publicDataEndpointEnabled,omitempty" tf:"public_data_endpoint_enabled,omitempty"` - // Specifies the storage account type used to store backups for this database. Changing this forces a new resource to be created. Possible values are GRS, LRS and ZRS. The default value is GRS. - StorageAccountType *string `json:"storageAccountType,omitempty" tf:"storage_account_type,omitempty"` +// Specifies the SKU Name for the SQL Managed Instance. Valid values include GP_Gen4, GP_Gen5, GP_Gen8IM, GP_Gen8IH, BC_Gen4, BC_Gen5, BC_Gen8IM or BC_Gen8IH. +SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` - // Maximum storage space for the SQL Managed instance. This should be a multiple of 32 (GB). - StorageSizeInGb *float64 `json:"storageSizeInGb,omitempty" tf:"storage_size_in_gb,omitempty"` +// Specifies the storage account type used to store backups for this database. Changing this forces a new resource to be created. Possible values are GRS, LRS and ZRS. The default value is GRS. +StorageAccountType *string `json:"storageAccountType,omitempty" tf:"storage_account_type,omitempty"` - // A mapping of tags to assign to the resource. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// Maximum storage space for the SQL Managed instance. This should be a multiple of 32 (GB). +StorageSizeInGb *float64 `json:"storageSizeInGb,omitempty" tf:"storage_size_in_gb,omitempty"` - // The TimeZone ID that the SQL Managed Instance will be operating in. Default value is UTC. Changing this forces a new resource to be created. - TimezoneID *string `json:"timezoneId,omitempty" tf:"timezone_id,omitempty"` +// A mapping of tags to assign to the resource. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - // Number of cores that should be assigned to the SQL Managed Instance. Values can be 8, 16, or 24 for Gen4 SKUs, or 4, 8, 16, 24, 32, 40, 64, or 80 for Gen5 SKUs. - Vcores *float64 `json:"vcores,omitempty" tf:"vcores,omitempty"` +// The TimeZone ID that the SQL Managed Instance will be operating in. Default value is UTC. Changing this forces a new resource to be created. +TimezoneID *string `json:"timezoneId,omitempty" tf:"timezone_id,omitempty"` + +// Number of cores that should be assigned to the SQL Managed Instance. Values can be 8, 16, or 24 for Gen4 SKUs, or 4, 8, 16, 24, 32, 40, 64, or 80 for Gen5 SKUs. +Vcores *float64 `json:"vcores,omitempty" tf:"vcores,omitempty"` } + type MSSQLManagedInstanceObservation struct { - // The administrator login name for the new SQL Managed Instance. Changing this forces a new resource to be created. - AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` - // Specifies how the SQL Managed Instance will be collated. Default value is SQL_Latin1_General_CP1_CI_AS. Changing this forces a new resource to be created. - Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` +// The administrator login name for the new SQL Managed Instance. Changing this forces a new resource to be created. +AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` + +// Specifies how the SQL Managed Instance will be collated. Default value is SQL_Latin1_General_CP1_CI_AS. Changing this forces a new resource to be created. +Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` - // The ID of the SQL Managed Instance which will share the DNS zone. This is a prerequisite for creating an azurerm_sql_managed_instance_failover_group. Setting this after creation forces a new resource to be created. - DNSZonePartnerID *string `json:"dnsZonePartnerId,omitempty" tf:"dns_zone_partner_id,omitempty"` +// The ID of the SQL Managed Instance which will share the DNS zone. This is a prerequisite for creating an azurerm_sql_managed_instance_failover_group. Setting this after creation forces a new resource to be created. +DNSZonePartnerID *string `json:"dnsZonePartnerId,omitempty" tf:"dns_zone_partner_id,omitempty"` - // The fully qualified domain name of the Azure Managed SQL Instance - Fqdn *string `json:"fqdn,omitempty" tf:"fqdn,omitempty"` +// The fully qualified domain name of the Azure Managed SQL Instance +Fqdn *string `json:"fqdn,omitempty" tf:"fqdn,omitempty"` - // The SQL Managed Instance ID. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// The SQL Managed Instance ID. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // An identity block as defined below. - Identity []IdentityObservation `json:"identity,omitempty" tf:"identity,omitempty"` +// An identity block as defined below. +Identity []IdentityObservation `json:"identity,omitempty" tf:"identity,omitempty"` - // What type of license the Managed Instance will use. Possible values are LicenseIncluded and BasePrice. - LicenseType *string `json:"licenseType,omitempty" tf:"license_type,omitempty"` +// What type of license the Managed Instance will use. Possible values are LicenseIncluded and BasePrice. +LicenseType *string `json:"licenseType,omitempty" tf:"license_type,omitempty"` - // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // The name of the Public Maintenance Configuration window to apply to the SQL Managed Instance. Valid values include SQL_Default or an Azure Location in the format SQL_{Location}_MI_{Size}(for example SQL_EastUS_MI_1). Defaults to SQL_Default. - MaintenanceConfigurationName *string `json:"maintenanceConfigurationName,omitempty" tf:"maintenance_configuration_name,omitempty"` +// The name of the Public Maintenance Configuration window to apply to the SQL Managed Instance. Valid values include SQL_Default or an Azure Location in the format SQL_{Location}_MI_{Size}(for example SQL_EastUS_MI_1). Defaults to SQL_Default. +MaintenanceConfigurationName *string `json:"maintenanceConfigurationName,omitempty" tf:"maintenance_configuration_name,omitempty"` - // The Minimum TLS Version. Default value is 1.2 Valid values include 1.0, 1.1, 1.2. - MinimumTLSVersion *string `json:"minimumTlsVersion,omitempty" tf:"minimum_tls_version,omitempty"` +// The Minimum TLS Version. Default value is 1.2 Valid values include 1.0, 1.1, 1.2. +MinimumTLSVersion *string `json:"minimumTlsVersion,omitempty" tf:"minimum_tls_version,omitempty"` - // Specifies how the SQL Managed Instance will be accessed. Default value is Default. Valid values include Default, Proxy, and Redirect. - ProxyOverride *string `json:"proxyOverride,omitempty" tf:"proxy_override,omitempty"` +// Specifies how the SQL Managed Instance will be accessed. Default value is Default. Valid values include Default, Proxy, and Redirect. +ProxyOverride *string `json:"proxyOverride,omitempty" tf:"proxy_override,omitempty"` - // Is the public data endpoint enabled? Default value is false. - PublicDataEndpointEnabled *bool `json:"publicDataEndpointEnabled,omitempty" tf:"public_data_endpoint_enabled,omitempty"` +// Is the public data endpoint enabled? Default value is false. +PublicDataEndpointEnabled *bool `json:"publicDataEndpointEnabled,omitempty" tf:"public_data_endpoint_enabled,omitempty"` - // The name of the resource group in which to create the SQL Managed Instance. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group in which to create the SQL Managed Instance. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Specifies the SKU Name for the SQL Managed Instance. Valid values include GP_Gen4, GP_Gen5, GP_Gen8IM, GP_Gen8IH, BC_Gen4, BC_Gen5, BC_Gen8IM or BC_Gen8IH. - SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` +// Specifies the SKU Name for the SQL Managed Instance. Valid values include GP_Gen4, GP_Gen5, GP_Gen8IM, GP_Gen8IH, BC_Gen4, BC_Gen5, BC_Gen8IM or BC_Gen8IH. +SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` - // Specifies the storage account type used to store backups for this database. Changing this forces a new resource to be created. Possible values are GRS, LRS and ZRS. The default value is GRS. - StorageAccountType *string `json:"storageAccountType,omitempty" tf:"storage_account_type,omitempty"` +// Specifies the storage account type used to store backups for this database. Changing this forces a new resource to be created. Possible values are GRS, LRS and ZRS. The default value is GRS. +StorageAccountType *string `json:"storageAccountType,omitempty" tf:"storage_account_type,omitempty"` - // Maximum storage space for the SQL Managed instance. This should be a multiple of 32 (GB). - StorageSizeInGb *float64 `json:"storageSizeInGb,omitempty" tf:"storage_size_in_gb,omitempty"` +// Maximum storage space for the SQL Managed instance. This should be a multiple of 32 (GB). +StorageSizeInGb *float64 `json:"storageSizeInGb,omitempty" tf:"storage_size_in_gb,omitempty"` - // The subnet resource id that the SQL Managed Instance will be associated with. Changing this forces a new resource to be created. - SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"` +// The subnet resource id that the SQL Managed Instance will be associated with. Changing this forces a new resource to be created. +SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"` - // A mapping of tags to assign to the resource. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A mapping of tags to assign to the resource. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - // The TimeZone ID that the SQL Managed Instance will be operating in. Default value is UTC. Changing this forces a new resource to be created. - TimezoneID *string `json:"timezoneId,omitempty" tf:"timezone_id,omitempty"` +// The TimeZone ID that the SQL Managed Instance will be operating in. Default value is UTC. Changing this forces a new resource to be created. +TimezoneID *string `json:"timezoneId,omitempty" tf:"timezone_id,omitempty"` - // Number of cores that should be assigned to the SQL Managed Instance. Values can be 8, 16, or 24 for Gen4 SKUs, or 4, 8, 16, 24, 32, 40, 64, or 80 for Gen5 SKUs. - Vcores *float64 `json:"vcores,omitempty" tf:"vcores,omitempty"` +// Number of cores that should be assigned to the SQL Managed Instance. Values can be 8, 16, or 24 for Gen4 SKUs, or 4, 8, 16, 24, 32, 40, 64, or 80 for Gen5 SKUs. +Vcores *float64 `json:"vcores,omitempty" tf:"vcores,omitempty"` } + type MSSQLManagedInstanceParameters struct { - // The administrator login name for the new SQL Managed Instance. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` - - // The password associated with the administrator_login user. Needs to comply with Azure's Password Policy - // +kubebuilder:validation:Optional - AdministratorLoginPasswordSecretRef v1.SecretKeySelector `json:"administratorLoginPasswordSecretRef" tf:"-"` - - // Specifies how the SQL Managed Instance will be collated. Default value is SQL_Latin1_General_CP1_CI_AS. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` - - // The ID of the SQL Managed Instance which will share the DNS zone. This is a prerequisite for creating an azurerm_sql_managed_instance_failover_group. Setting this after creation forces a new resource to be created. - // +crossplane:generate:reference:type=MSSQLManagedInstance - // +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() - // +kubebuilder:validation:Optional - DNSZonePartnerID *string `json:"dnsZonePartnerId,omitempty" tf:"dns_zone_partner_id,omitempty"` - - // Reference to a MSSQLManagedInstance to populate dnsZonePartnerId. - // +kubebuilder:validation:Optional - DNSZonePartnerIDRef *v1.Reference `json:"dnsZonePartnerIdRef,omitempty" tf:"-"` - - // Selector for a MSSQLManagedInstance to populate dnsZonePartnerId. - // +kubebuilder:validation:Optional - DNSZonePartnerIDSelector *v1.Selector `json:"dnsZonePartnerIdSelector,omitempty" tf:"-"` - - // An identity block as defined below. - // +kubebuilder:validation:Optional - Identity []IdentityParameters `json:"identity,omitempty" tf:"identity,omitempty"` - - // What type of license the Managed Instance will use. Possible values are LicenseIncluded and BasePrice. - // +kubebuilder:validation:Optional - LicenseType *string `json:"licenseType,omitempty" tf:"license_type,omitempty"` - - // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Location *string `json:"location,omitempty" tf:"location,omitempty"` - - // The name of the Public Maintenance Configuration window to apply to the SQL Managed Instance. Valid values include SQL_Default or an Azure Location in the format SQL_{Location}_MI_{Size}(for example SQL_EastUS_MI_1). Defaults to SQL_Default. - // +kubebuilder:validation:Optional - MaintenanceConfigurationName *string `json:"maintenanceConfigurationName,omitempty" tf:"maintenance_configuration_name,omitempty"` - - // The Minimum TLS Version. Default value is 1.2 Valid values include 1.0, 1.1, 1.2. - // +kubebuilder:validation:Optional - MinimumTLSVersion *string `json:"minimumTlsVersion,omitempty" tf:"minimum_tls_version,omitempty"` - - // Specifies how the SQL Managed Instance will be accessed. Default value is Default. Valid values include Default, Proxy, and Redirect. - // +kubebuilder:validation:Optional - ProxyOverride *string `json:"proxyOverride,omitempty" tf:"proxy_override,omitempty"` - - // Is the public data endpoint enabled? Default value is false. - // +kubebuilder:validation:Optional - PublicDataEndpointEnabled *bool `json:"publicDataEndpointEnabled,omitempty" tf:"public_data_endpoint_enabled,omitempty"` - - // The name of the resource group in which to create the SQL Managed Instance. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - - // Specifies the SKU Name for the SQL Managed Instance. Valid values include GP_Gen4, GP_Gen5, GP_Gen8IM, GP_Gen8IH, BC_Gen4, BC_Gen5, BC_Gen8IM or BC_Gen8IH. - // +kubebuilder:validation:Optional - SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` - - // Specifies the storage account type used to store backups for this database. Changing this forces a new resource to be created. Possible values are GRS, LRS and ZRS. The default value is GRS. - // +kubebuilder:validation:Optional - StorageAccountType *string `json:"storageAccountType,omitempty" tf:"storage_account_type,omitempty"` - - // Maximum storage space for the SQL Managed instance. This should be a multiple of 32 (GB). - // +kubebuilder:validation:Optional - StorageSizeInGb *float64 `json:"storageSizeInGb,omitempty" tf:"storage_size_in_gb,omitempty"` - - // The subnet resource id that the SQL Managed Instance will be associated with. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/network/v1alpha1.Subnet - // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() - // +kubebuilder:validation:Optional - SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"` - - // Reference to a Subnet in network to populate subnetId. - // +kubebuilder:validation:Optional - SubnetIDRef *v1.Reference `json:"subnetIdRef,omitempty" tf:"-"` - - // Selector for a Subnet in network to populate subnetId. - // +kubebuilder:validation:Optional - SubnetIDSelector *v1.Selector `json:"subnetIdSelector,omitempty" tf:"-"` - - // A mapping of tags to assign to the resource. - // +kubebuilder:validation:Optional - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - - // The TimeZone ID that the SQL Managed Instance will be operating in. Default value is UTC. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - TimezoneID *string `json:"timezoneId,omitempty" tf:"timezone_id,omitempty"` - - // Number of cores that should be assigned to the SQL Managed Instance. Values can be 8, 16, or 24 for Gen4 SKUs, or 4, 8, 16, 24, 32, 40, 64, or 80 for Gen5 SKUs. - // +kubebuilder:validation:Optional - Vcores *float64 `json:"vcores,omitempty" tf:"vcores,omitempty"` + +// The administrator login name for the new SQL Managed Instance. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` + +// The password associated with the administrator_login user. Needs to comply with Azure's Password Policy +// +kubebuilder:validation:Optional +AdministratorLoginPasswordSecretRef v1.SecretKeySelector `json:"administratorLoginPasswordSecretRef" tf:"-"` + +// Specifies how the SQL Managed Instance will be collated. Default value is SQL_Latin1_General_CP1_CI_AS. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` + +// The ID of the SQL Managed Instance which will share the DNS zone. This is a prerequisite for creating an azurerm_sql_managed_instance_failover_group. Setting this after creation forces a new resource to be created. +// +crossplane:generate:reference:type=MSSQLManagedInstance +// +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() +// +kubebuilder:validation:Optional +DNSZonePartnerID *string `json:"dnsZonePartnerId,omitempty" tf:"dns_zone_partner_id,omitempty"` + +// Reference to a MSSQLManagedInstance to populate dnsZonePartnerId. +// +kubebuilder:validation:Optional +DNSZonePartnerIDRef *v1.Reference `json:"dnsZonePartnerIdRef,omitempty" tf:"-"` + +// Selector for a MSSQLManagedInstance to populate dnsZonePartnerId. +// +kubebuilder:validation:Optional +DNSZonePartnerIDSelector *v1.Selector `json:"dnsZonePartnerIdSelector,omitempty" tf:"-"` + +// An identity block as defined below. +// +kubebuilder:validation:Optional +Identity []IdentityParameters `json:"identity,omitempty" tf:"identity,omitempty"` + +// What type of license the Managed Instance will use. Possible values are LicenseIncluded and BasePrice. +// +kubebuilder:validation:Optional +LicenseType *string `json:"licenseType,omitempty" tf:"license_type,omitempty"` + +// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Location *string `json:"location,omitempty" tf:"location,omitempty"` + +// The name of the Public Maintenance Configuration window to apply to the SQL Managed Instance. Valid values include SQL_Default or an Azure Location in the format SQL_{Location}_MI_{Size}(for example SQL_EastUS_MI_1). Defaults to SQL_Default. +// +kubebuilder:validation:Optional +MaintenanceConfigurationName *string `json:"maintenanceConfigurationName,omitempty" tf:"maintenance_configuration_name,omitempty"` + +// The Minimum TLS Version. Default value is 1.2 Valid values include 1.0, 1.1, 1.2. +// +kubebuilder:validation:Optional +MinimumTLSVersion *string `json:"minimumTlsVersion,omitempty" tf:"minimum_tls_version,omitempty"` + +// Specifies how the SQL Managed Instance will be accessed. Default value is Default. Valid values include Default, Proxy, and Redirect. +// +kubebuilder:validation:Optional +ProxyOverride *string `json:"proxyOverride,omitempty" tf:"proxy_override,omitempty"` + +// Is the public data endpoint enabled? Default value is false. +// +kubebuilder:validation:Optional +PublicDataEndpointEnabled *bool `json:"publicDataEndpointEnabled,omitempty" tf:"public_data_endpoint_enabled,omitempty"` + +// The name of the resource group in which to create the SQL Managed Instance. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` + +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` + +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` + +// Specifies the SKU Name for the SQL Managed Instance. Valid values include GP_Gen4, GP_Gen5, GP_Gen8IM, GP_Gen8IH, BC_Gen4, BC_Gen5, BC_Gen8IM or BC_Gen8IH. +// +kubebuilder:validation:Optional +SkuName *string `json:"skuName,omitempty" tf:"sku_name,omitempty"` + +// Specifies the storage account type used to store backups for this database. Changing this forces a new resource to be created. Possible values are GRS, LRS and ZRS. The default value is GRS. +// +kubebuilder:validation:Optional +StorageAccountType *string `json:"storageAccountType,omitempty" tf:"storage_account_type,omitempty"` + +// Maximum storage space for the SQL Managed instance. This should be a multiple of 32 (GB). +// +kubebuilder:validation:Optional +StorageSizeInGb *float64 `json:"storageSizeInGb,omitempty" tf:"storage_size_in_gb,omitempty"` + +// The subnet resource id that the SQL Managed Instance will be associated with. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/network/v1alpha1.Subnet +// +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() +// +kubebuilder:validation:Optional +SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"` + +// Reference to a Subnet in network to populate subnetId. +// +kubebuilder:validation:Optional +SubnetIDRef *v1.Reference `json:"subnetIdRef,omitempty" tf:"-"` + +// Selector for a Subnet in network to populate subnetId. +// +kubebuilder:validation:Optional +SubnetIDSelector *v1.Selector `json:"subnetIdSelector,omitempty" tf:"-"` + +// A mapping of tags to assign to the resource. +// +kubebuilder:validation:Optional +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + +// The TimeZone ID that the SQL Managed Instance will be operating in. Default value is UTC. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +TimezoneID *string `json:"timezoneId,omitempty" tf:"timezone_id,omitempty"` + +// Number of cores that should be assigned to the SQL Managed Instance. Values can be 8, 16, or 24 for Gen4 SKUs, or 4, 8, 16, 24, 32, 40, 64, or 80 for Gen5 SKUs. +// +kubebuilder:validation:Optional +Vcores *float64 `json:"vcores,omitempty" tf:"vcores,omitempty"` } // MSSQLManagedInstanceSpec defines the desired state of MSSQLManagedInstance type MSSQLManagedInstanceSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider MSSQLManagedInstanceParameters `json:"forProvider"` + ForProvider MSSQLManagedInstanceParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -285,13 +300,13 @@ type MSSQLManagedInstanceSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider MSSQLManagedInstanceInitParameters `json:"initProvider,omitempty"` + InitProvider MSSQLManagedInstanceInitParameters `json:"initProvider,omitempty"` } // MSSQLManagedInstanceStatus defines the observed state of MSSQLManagedInstance. type MSSQLManagedInstanceStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider MSSQLManagedInstanceObservation `json:"atProvider,omitempty"` + AtProvider MSSQLManagedInstanceObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -306,15 +321,15 @@ type MSSQLManagedInstanceStatus struct { type MSSQLManagedInstance struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.administratorLogin) || (has(self.initProvider) && has(self.initProvider.administratorLogin))",message="spec.forProvider.administratorLogin is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.administratorLoginPasswordSecretRef)",message="spec.forProvider.administratorLoginPasswordSecretRef is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.licenseType) || (has(self.initProvider) && has(self.initProvider.licenseType))",message="spec.forProvider.licenseType is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.skuName) || (has(self.initProvider) && has(self.initProvider.skuName))",message="spec.forProvider.skuName is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.storageSizeInGb) || (has(self.initProvider) && has(self.initProvider.storageSizeInGb))",message="spec.forProvider.storageSizeInGb is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.vcores) || (has(self.initProvider) && has(self.initProvider.vcores))",message="spec.forProvider.vcores is a required parameter" - Spec MSSQLManagedInstanceSpec `json:"spec"` - Status MSSQLManagedInstanceStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.administratorLogin) || (has(self.initProvider) && has(self.initProvider.administratorLogin))",message="spec.forProvider.administratorLogin is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.administratorLoginPasswordSecretRef)",message="spec.forProvider.administratorLoginPasswordSecretRef is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.licenseType) || (has(self.initProvider) && has(self.initProvider.licenseType))",message="spec.forProvider.licenseType is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.skuName) || (has(self.initProvider) && has(self.initProvider.skuName))",message="spec.forProvider.skuName is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.storageSizeInGb) || (has(self.initProvider) && has(self.initProvider.storageSizeInGb))",message="spec.forProvider.storageSizeInGb is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.vcores) || (has(self.initProvider) && has(self.initProvider.vcores))",message="spec.forProvider.vcores is a required parameter" + Spec MSSQLManagedInstanceSpec `json:"spec"` + Status MSSQLManagedInstanceStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/sql/v1alpha1/zz_mssqlmanagedinstanceactivedirectoryadministrator_types.go b/apis/sql/v1alpha1/zz_mssqlmanagedinstanceactivedirectoryadministrator_types.go index aad408b..846a482 100755 --- a/apis/sql/v1alpha1/zz_mssqlmanagedinstanceactivedirectoryadministrator_types.go +++ b/apis/sql/v1alpha1/zz_mssqlmanagedinstanceactivedirectoryadministrator_types.go @@ -15,81 +15,90 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type MSSQLManagedInstanceActiveDirectoryAdministratorInitParameters struct { - // When true, only permit logins from AAD users and administrators. When false, also allow local database users. - AzureadAuthenticationOnly *bool `json:"azureadAuthenticationOnly,omitempty" tf:"azuread_authentication_only,omitempty"` - // The login name of the principal to set as the Managed Instance Administrator. - LoginUsername *string `json:"loginUsername,omitempty" tf:"login_username,omitempty"` +// When true, only permit logins from AAD users and administrators. When false, also allow local database users. +AzureadAuthenticationOnly *bool `json:"azureadAuthenticationOnly,omitempty" tf:"azuread_authentication_only,omitempty"` + +// The login name of the principal to set as the Managed Instance Administrator. +LoginUsername *string `json:"loginUsername,omitempty" tf:"login_username,omitempty"` - // The Object ID of the principal to set as the Managed Instance Administrator. - ObjectID *string `json:"objectId,omitempty" tf:"object_id,omitempty"` +// The Object ID of the principal to set as the Managed Instance Administrator. +ObjectID *string `json:"objectId,omitempty" tf:"object_id,omitempty"` - // The Azure Active Directory Tenant ID. - TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` +// The Azure Active Directory Tenant ID. +TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` } + type MSSQLManagedInstanceActiveDirectoryAdministratorObservation struct { - // When true, only permit logins from AAD users and administrators. When false, also allow local database users. - AzureadAuthenticationOnly *bool `json:"azureadAuthenticationOnly,omitempty" tf:"azuread_authentication_only,omitempty"` - // The ID of the SQL Managed Instance Active Directory Administrator. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// When true, only permit logins from AAD users and administrators. When false, also allow local database users. +AzureadAuthenticationOnly *bool `json:"azureadAuthenticationOnly,omitempty" tf:"azuread_authentication_only,omitempty"` + +// The ID of the SQL Managed Instance Active Directory Administrator. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The login name of the principal to set as the Managed Instance Administrator. - LoginUsername *string `json:"loginUsername,omitempty" tf:"login_username,omitempty"` +// The login name of the principal to set as the Managed Instance Administrator. +LoginUsername *string `json:"loginUsername,omitempty" tf:"login_username,omitempty"` - // The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created. - ManagedInstanceID *string `json:"managedInstanceId,omitempty" tf:"managed_instance_id,omitempty"` +// The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created. +ManagedInstanceID *string `json:"managedInstanceId,omitempty" tf:"managed_instance_id,omitempty"` - // The Object ID of the principal to set as the Managed Instance Administrator. - ObjectID *string `json:"objectId,omitempty" tf:"object_id,omitempty"` +// The Object ID of the principal to set as the Managed Instance Administrator. +ObjectID *string `json:"objectId,omitempty" tf:"object_id,omitempty"` - // The Azure Active Directory Tenant ID. - TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` +// The Azure Active Directory Tenant ID. +TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` } + type MSSQLManagedInstanceActiveDirectoryAdministratorParameters struct { - // When true, only permit logins from AAD users and administrators. When false, also allow local database users. - // +kubebuilder:validation:Optional - AzureadAuthenticationOnly *bool `json:"azureadAuthenticationOnly,omitempty" tf:"azuread_authentication_only,omitempty"` - // The login name of the principal to set as the Managed Instance Administrator. - // +kubebuilder:validation:Optional - LoginUsername *string `json:"loginUsername,omitempty" tf:"login_username,omitempty"` +// When true, only permit logins from AAD users and administrators. When false, also allow local database users. +// +kubebuilder:validation:Optional +AzureadAuthenticationOnly *bool `json:"azureadAuthenticationOnly,omitempty" tf:"azuread_authentication_only,omitempty"` + +// The login name of the principal to set as the Managed Instance Administrator. +// +kubebuilder:validation:Optional +LoginUsername *string `json:"loginUsername,omitempty" tf:"login_username,omitempty"` - // The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=MSSQLManagedInstance - // +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() - // +kubebuilder:validation:Optional - ManagedInstanceID *string `json:"managedInstanceId,omitempty" tf:"managed_instance_id,omitempty"` +// The ID of the Azure SQL Managed Instance for which to set the administrator. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=MSSQLManagedInstance +// +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() +// +kubebuilder:validation:Optional +ManagedInstanceID *string `json:"managedInstanceId,omitempty" tf:"managed_instance_id,omitempty"` - // Reference to a MSSQLManagedInstance to populate managedInstanceId. - // +kubebuilder:validation:Optional - ManagedInstanceIDRef *v1.Reference `json:"managedInstanceIdRef,omitempty" tf:"-"` +// Reference to a MSSQLManagedInstance to populate managedInstanceId. +// +kubebuilder:validation:Optional +ManagedInstanceIDRef *v1.Reference `json:"managedInstanceIdRef,omitempty" tf:"-"` - // Selector for a MSSQLManagedInstance to populate managedInstanceId. - // +kubebuilder:validation:Optional - ManagedInstanceIDSelector *v1.Selector `json:"managedInstanceIdSelector,omitempty" tf:"-"` +// Selector for a MSSQLManagedInstance to populate managedInstanceId. +// +kubebuilder:validation:Optional +ManagedInstanceIDSelector *v1.Selector `json:"managedInstanceIdSelector,omitempty" tf:"-"` - // The Object ID of the principal to set as the Managed Instance Administrator. - // +kubebuilder:validation:Optional - ObjectID *string `json:"objectId,omitempty" tf:"object_id,omitempty"` +// The Object ID of the principal to set as the Managed Instance Administrator. +// +kubebuilder:validation:Optional +ObjectID *string `json:"objectId,omitempty" tf:"object_id,omitempty"` - // The Azure Active Directory Tenant ID. - // +kubebuilder:validation:Optional - TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` +// The Azure Active Directory Tenant ID. +// +kubebuilder:validation:Optional +TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` } // MSSQLManagedInstanceActiveDirectoryAdministratorSpec defines the desired state of MSSQLManagedInstanceActiveDirectoryAdministrator type MSSQLManagedInstanceActiveDirectoryAdministratorSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider MSSQLManagedInstanceActiveDirectoryAdministratorParameters `json:"forProvider"` + ForProvider MSSQLManagedInstanceActiveDirectoryAdministratorParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -100,13 +109,13 @@ type MSSQLManagedInstanceActiveDirectoryAdministratorSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider MSSQLManagedInstanceActiveDirectoryAdministratorInitParameters `json:"initProvider,omitempty"` + InitProvider MSSQLManagedInstanceActiveDirectoryAdministratorInitParameters `json:"initProvider,omitempty"` } // MSSQLManagedInstanceActiveDirectoryAdministratorStatus defines the observed state of MSSQLManagedInstanceActiveDirectoryAdministrator. type MSSQLManagedInstanceActiveDirectoryAdministratorStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider MSSQLManagedInstanceActiveDirectoryAdministratorObservation `json:"atProvider,omitempty"` + AtProvider MSSQLManagedInstanceActiveDirectoryAdministratorObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -121,11 +130,11 @@ type MSSQLManagedInstanceActiveDirectoryAdministratorStatus struct { type MSSQLManagedInstanceActiveDirectoryAdministrator struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.loginUsername) || (has(self.initProvider) && has(self.initProvider.loginUsername))",message="spec.forProvider.loginUsername is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.objectId) || (has(self.initProvider) && has(self.initProvider.objectId))",message="spec.forProvider.objectId is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.tenantId) || (has(self.initProvider) && has(self.initProvider.tenantId))",message="spec.forProvider.tenantId is a required parameter" - Spec MSSQLManagedInstanceActiveDirectoryAdministratorSpec `json:"spec"` - Status MSSQLManagedInstanceActiveDirectoryAdministratorStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.loginUsername) || (has(self.initProvider) && has(self.initProvider.loginUsername))",message="spec.forProvider.loginUsername is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.objectId) || (has(self.initProvider) && has(self.initProvider.objectId))",message="spec.forProvider.objectId is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.tenantId) || (has(self.initProvider) && has(self.initProvider.tenantId))",message="spec.forProvider.tenantId is a required parameter" + Spec MSSQLManagedInstanceActiveDirectoryAdministratorSpec `json:"spec"` + Status MSSQLManagedInstanceActiveDirectoryAdministratorStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/sql/v1alpha1/zz_mssqlmanagedinstancefailovergroup_types.go b/apis/sql/v1alpha1/zz_mssqlmanagedinstancefailovergroup_types.go index 4ef9460..25fe864 100755 --- a/apis/sql/v1alpha1/zz_mssqlmanagedinstancefailovergroup_types.go +++ b/apis/sql/v1alpha1/zz_mssqlmanagedinstancefailovergroup_types.go @@ -15,135 +15,156 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type MSSQLManagedInstanceFailoverGroupInitParameters struct { - // A read_write_endpoint_failover_policy block as defined below. - ReadWriteEndpointFailoverPolicy []MSSQLManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyInitParameters `json:"readWriteEndpointFailoverPolicy,omitempty" tf:"read_write_endpoint_failover_policy,omitempty"` - // Failover policy for the read-only endpoint. Defaults to true. - ReadonlyEndpointFailoverPolicyEnabled *bool `json:"readonlyEndpointFailoverPolicyEnabled,omitempty" tf:"readonly_endpoint_failover_policy_enabled,omitempty"` +// A read_write_endpoint_failover_policy block as defined below. +ReadWriteEndpointFailoverPolicy []MSSQLManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyInitParameters `json:"readWriteEndpointFailoverPolicy,omitempty" tf:"read_write_endpoint_failover_policy,omitempty"` + +// Failover policy for the read-only endpoint. Defaults to true. +ReadonlyEndpointFailoverPolicyEnabled *bool `json:"readonlyEndpointFailoverPolicyEnabled,omitempty" tf:"readonly_endpoint_failover_policy_enabled,omitempty"` } + type MSSQLManagedInstanceFailoverGroupObservation struct { - // The ID of the Managed Instance Failover Group. - ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The Azure Region where the Managed Instance Failover Group should exist. Changing this forces a new resource to be created. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// The ID of the Managed Instance Failover Group. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The ID of the Azure SQL Managed Instance which will be replicated using a Managed Instance Failover Group. Changing this forces a new resource to be created. - ManagedInstanceID *string `json:"managedInstanceId,omitempty" tf:"managed_instance_id,omitempty"` +// The Azure Region where the Managed Instance Failover Group should exist. Changing this forces a new resource to be created. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // The ID of the Azure SQL Managed Instance which will be replicated to. Changing this forces a new resource to be created. - PartnerManagedInstanceID *string `json:"partnerManagedInstanceId,omitempty" tf:"partner_managed_instance_id,omitempty"` +// The ID of the Azure SQL Managed Instance which will be replicated using a Managed Instance Failover Group. Changing this forces a new resource to be created. +ManagedInstanceID *string `json:"managedInstanceId,omitempty" tf:"managed_instance_id,omitempty"` - // A partner_region block as defined below. - PartnerRegion []PartnerRegionObservation `json:"partnerRegion,omitempty" tf:"partner_region,omitempty"` +// The ID of the Azure SQL Managed Instance which will be replicated to. Changing this forces a new resource to be created. +PartnerManagedInstanceID *string `json:"partnerManagedInstanceId,omitempty" tf:"partner_managed_instance_id,omitempty"` - // A read_write_endpoint_failover_policy block as defined below. - ReadWriteEndpointFailoverPolicy []MSSQLManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyObservation `json:"readWriteEndpointFailoverPolicy,omitempty" tf:"read_write_endpoint_failover_policy,omitempty"` +// A partner_region block as defined below. +PartnerRegion []PartnerRegionObservation `json:"partnerRegion,omitempty" tf:"partner_region,omitempty"` - // Failover policy for the read-only endpoint. Defaults to true. - ReadonlyEndpointFailoverPolicyEnabled *bool `json:"readonlyEndpointFailoverPolicyEnabled,omitempty" tf:"readonly_endpoint_failover_policy_enabled,omitempty"` +// A read_write_endpoint_failover_policy block as defined below. +ReadWriteEndpointFailoverPolicy []MSSQLManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyObservation `json:"readWriteEndpointFailoverPolicy,omitempty" tf:"read_write_endpoint_failover_policy,omitempty"` - // The local replication role of the Managed Instance Failover Group. - Role *string `json:"role,omitempty" tf:"role,omitempty"` +// Failover policy for the read-only endpoint. Defaults to true. +ReadonlyEndpointFailoverPolicyEnabled *bool `json:"readonlyEndpointFailoverPolicyEnabled,omitempty" tf:"readonly_endpoint_failover_policy_enabled,omitempty"` + +// The local replication role of the Managed Instance Failover Group. +Role *string `json:"role,omitempty" tf:"role,omitempty"` } + type MSSQLManagedInstanceFailoverGroupParameters struct { - // The Azure Region where the Managed Instance Failover Group should exist. Changing this forces a new resource to be created. - // +kubebuilder:validation:Required - Location *string `json:"location" tf:"location,omitempty"` - - // The ID of the Azure SQL Managed Instance which will be replicated using a Managed Instance Failover Group. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=MSSQLManagedInstance - // +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() - // +kubebuilder:validation:Optional - ManagedInstanceID *string `json:"managedInstanceId,omitempty" tf:"managed_instance_id,omitempty"` - - // Reference to a MSSQLManagedInstance to populate managedInstanceId. - // +kubebuilder:validation:Optional - ManagedInstanceIDRef *v1.Reference `json:"managedInstanceIdRef,omitempty" tf:"-"` - - // Selector for a MSSQLManagedInstance to populate managedInstanceId. - // +kubebuilder:validation:Optional - ManagedInstanceIDSelector *v1.Selector `json:"managedInstanceIdSelector,omitempty" tf:"-"` - - // The ID of the Azure SQL Managed Instance which will be replicated to. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=MSSQLManagedInstance - // +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() - // +kubebuilder:validation:Optional - PartnerManagedInstanceID *string `json:"partnerManagedInstanceId,omitempty" tf:"partner_managed_instance_id,omitempty"` - - // Reference to a MSSQLManagedInstance to populate partnerManagedInstanceId. - // +kubebuilder:validation:Optional - PartnerManagedInstanceIDRef *v1.Reference `json:"partnerManagedInstanceIdRef,omitempty" tf:"-"` - - // Selector for a MSSQLManagedInstance to populate partnerManagedInstanceId. - // +kubebuilder:validation:Optional - PartnerManagedInstanceIDSelector *v1.Selector `json:"partnerManagedInstanceIdSelector,omitempty" tf:"-"` - - // A read_write_endpoint_failover_policy block as defined below. - // +kubebuilder:validation:Optional - ReadWriteEndpointFailoverPolicy []MSSQLManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyParameters `json:"readWriteEndpointFailoverPolicy,omitempty" tf:"read_write_endpoint_failover_policy,omitempty"` - - // Failover policy for the read-only endpoint. Defaults to true. - // +kubebuilder:validation:Optional - ReadonlyEndpointFailoverPolicyEnabled *bool `json:"readonlyEndpointFailoverPolicyEnabled,omitempty" tf:"readonly_endpoint_failover_policy_enabled,omitempty"` + +// The Azure Region where the Managed Instance Failover Group should exist. Changing this forces a new resource to be created. +// +kubebuilder:validation:Required +Location *string `json:"location" tf:"location,omitempty"` + +// The ID of the Azure SQL Managed Instance which will be replicated using a Managed Instance Failover Group. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=MSSQLManagedInstance +// +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() +// +kubebuilder:validation:Optional +ManagedInstanceID *string `json:"managedInstanceId,omitempty" tf:"managed_instance_id,omitempty"` + +// Reference to a MSSQLManagedInstance to populate managedInstanceId. +// +kubebuilder:validation:Optional +ManagedInstanceIDRef *v1.Reference `json:"managedInstanceIdRef,omitempty" tf:"-"` + +// Selector for a MSSQLManagedInstance to populate managedInstanceId. +// +kubebuilder:validation:Optional +ManagedInstanceIDSelector *v1.Selector `json:"managedInstanceIdSelector,omitempty" tf:"-"` + +// The ID of the Azure SQL Managed Instance which will be replicated to. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=MSSQLManagedInstance +// +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() +// +kubebuilder:validation:Optional +PartnerManagedInstanceID *string `json:"partnerManagedInstanceId,omitempty" tf:"partner_managed_instance_id,omitempty"` + +// Reference to a MSSQLManagedInstance to populate partnerManagedInstanceId. +// +kubebuilder:validation:Optional +PartnerManagedInstanceIDRef *v1.Reference `json:"partnerManagedInstanceIdRef,omitempty" tf:"-"` + +// Selector for a MSSQLManagedInstance to populate partnerManagedInstanceId. +// +kubebuilder:validation:Optional +PartnerManagedInstanceIDSelector *v1.Selector `json:"partnerManagedInstanceIdSelector,omitempty" tf:"-"` + +// A read_write_endpoint_failover_policy block as defined below. +// +kubebuilder:validation:Optional +ReadWriteEndpointFailoverPolicy []MSSQLManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyParameters `json:"readWriteEndpointFailoverPolicy,omitempty" tf:"read_write_endpoint_failover_policy,omitempty"` + +// Failover policy for the read-only endpoint. Defaults to true. +// +kubebuilder:validation:Optional +ReadonlyEndpointFailoverPolicyEnabled *bool `json:"readonlyEndpointFailoverPolicyEnabled,omitempty" tf:"readonly_endpoint_failover_policy_enabled,omitempty"` } + type MSSQLManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyInitParameters struct { - // Applies only if mode is Automatic. The grace period in minutes before failover with data loss is attempted. - GraceMinutes *float64 `json:"graceMinutes,omitempty" tf:"grace_minutes,omitempty"` - // The failover mode. Possible values are Automatic or Manual. - Mode *string `json:"mode,omitempty" tf:"mode,omitempty"` +// Applies only if mode is Automatic. The grace period in minutes before failover with data loss is attempted. +GraceMinutes *float64 `json:"graceMinutes,omitempty" tf:"grace_minutes,omitempty"` + +// The failover mode. Possible values are Automatic or Manual. +Mode *string `json:"mode,omitempty" tf:"mode,omitempty"` } + type MSSQLManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyObservation struct { - // Applies only if mode is Automatic. The grace period in minutes before failover with data loss is attempted. - GraceMinutes *float64 `json:"graceMinutes,omitempty" tf:"grace_minutes,omitempty"` - // The failover mode. Possible values are Automatic or Manual. - Mode *string `json:"mode,omitempty" tf:"mode,omitempty"` +// Applies only if mode is Automatic. The grace period in minutes before failover with data loss is attempted. +GraceMinutes *float64 `json:"graceMinutes,omitempty" tf:"grace_minutes,omitempty"` + +// The failover mode. Possible values are Automatic or Manual. +Mode *string `json:"mode,omitempty" tf:"mode,omitempty"` } + type MSSQLManagedInstanceFailoverGroupReadWriteEndpointFailoverPolicyParameters struct { - // Applies only if mode is Automatic. The grace period in minutes before failover with data loss is attempted. - // +kubebuilder:validation:Optional - GraceMinutes *float64 `json:"graceMinutes,omitempty" tf:"grace_minutes,omitempty"` - // The failover mode. Possible values are Automatic or Manual. - // +kubebuilder:validation:Optional - Mode *string `json:"mode" tf:"mode,omitempty"` +// Applies only if mode is Automatic. The grace period in minutes before failover with data loss is attempted. +// +kubebuilder:validation:Optional +GraceMinutes *float64 `json:"graceMinutes,omitempty" tf:"grace_minutes,omitempty"` + +// The failover mode. Possible values are Automatic or Manual. +// +kubebuilder:validation:Optional +Mode *string `json:"mode" tf:"mode,omitempty"` } + type PartnerRegionInitParameters struct { + } + type PartnerRegionObservation struct { - // The Azure Region where the Managed Instance Failover Group partner exists. - Location *string `json:"location,omitempty" tf:"location,omitempty"` - // The partner replication role of the Managed Instance Failover Group. - Role *string `json:"role,omitempty" tf:"role,omitempty"` +// The Azure Region where the Managed Instance Failover Group partner exists. +Location *string `json:"location,omitempty" tf:"location,omitempty"` + +// The partner replication role of the Managed Instance Failover Group. +Role *string `json:"role,omitempty" tf:"role,omitempty"` } + type PartnerRegionParameters struct { + } // MSSQLManagedInstanceFailoverGroupSpec defines the desired state of MSSQLManagedInstanceFailoverGroup type MSSQLManagedInstanceFailoverGroupSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider MSSQLManagedInstanceFailoverGroupParameters `json:"forProvider"` + ForProvider MSSQLManagedInstanceFailoverGroupParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -154,13 +175,13 @@ type MSSQLManagedInstanceFailoverGroupSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider MSSQLManagedInstanceFailoverGroupInitParameters `json:"initProvider,omitempty"` + InitProvider MSSQLManagedInstanceFailoverGroupInitParameters `json:"initProvider,omitempty"` } // MSSQLManagedInstanceFailoverGroupStatus defines the observed state of MSSQLManagedInstanceFailoverGroup. type MSSQLManagedInstanceFailoverGroupStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider MSSQLManagedInstanceFailoverGroupObservation `json:"atProvider,omitempty"` + AtProvider MSSQLManagedInstanceFailoverGroupObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -175,9 +196,9 @@ type MSSQLManagedInstanceFailoverGroupStatus struct { type MSSQLManagedInstanceFailoverGroup struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.readWriteEndpointFailoverPolicy) || (has(self.initProvider) && has(self.initProvider.readWriteEndpointFailoverPolicy))",message="spec.forProvider.readWriteEndpointFailoverPolicy is a required parameter" - Spec MSSQLManagedInstanceFailoverGroupSpec `json:"spec"` - Status MSSQLManagedInstanceFailoverGroupStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.readWriteEndpointFailoverPolicy) || (has(self.initProvider) && has(self.initProvider.readWriteEndpointFailoverPolicy))",message="spec.forProvider.readWriteEndpointFailoverPolicy is a required parameter" + Spec MSSQLManagedInstanceFailoverGroupSpec `json:"spec"` + Status MSSQLManagedInstanceFailoverGroupStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/sql/v1alpha1/zz_mssqlmanagedinstancevulnerabilityassessment_types.go b/apis/sql/v1alpha1/zz_mssqlmanagedinstancevulnerabilityassessment_types.go index 0ed783a..8c6f1f2 100755 --- a/apis/sql/v1alpha1/zz_mssqlmanagedinstancevulnerabilityassessment_types.go +++ b/apis/sql/v1alpha1/zz_mssqlmanagedinstancevulnerabilityassessment_types.go @@ -15,108 +15,123 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type MSSQLManagedInstanceVulnerabilityAssessmentInitParameters struct { - // The recurring scans settings. The recurring_scans block supports fields documented below. - RecurringScans []RecurringScansInitParameters `json:"recurringScans,omitempty" tf:"recurring_scans,omitempty"` - // A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). - StorageContainerPath *string `json:"storageContainerPath,omitempty" tf:"storage_container_path,omitempty"` +// The recurring scans settings. The recurring_scans block supports fields documented below. +RecurringScans []RecurringScansInitParameters `json:"recurringScans,omitempty" tf:"recurring_scans,omitempty"` + +// A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). +StorageContainerPath *string `json:"storageContainerPath,omitempty" tf:"storage_container_path,omitempty"` } + type MSSQLManagedInstanceVulnerabilityAssessmentObservation struct { - // The ID of the Vulnerability Assessment. - ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The id of the MS SQL Managed Instance. Changing this forces a new resource to be created. - ManagedInstanceID *string `json:"managedInstanceId,omitempty" tf:"managed_instance_id,omitempty"` +// The ID of the Vulnerability Assessment. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The recurring scans settings. The recurring_scans block supports fields documented below. - RecurringScans []RecurringScansObservation `json:"recurringScans,omitempty" tf:"recurring_scans,omitempty"` +// The id of the MS SQL Managed Instance. Changing this forces a new resource to be created. +ManagedInstanceID *string `json:"managedInstanceId,omitempty" tf:"managed_instance_id,omitempty"` - // A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). - StorageContainerPath *string `json:"storageContainerPath,omitempty" tf:"storage_container_path,omitempty"` +// The recurring scans settings. The recurring_scans block supports fields documented below. +RecurringScans []RecurringScansObservation `json:"recurringScans,omitempty" tf:"recurring_scans,omitempty"` + +// A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). +StorageContainerPath *string `json:"storageContainerPath,omitempty" tf:"storage_container_path,omitempty"` } + type MSSQLManagedInstanceVulnerabilityAssessmentParameters struct { - // The id of the MS SQL Managed Instance. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=MSSQLManagedInstance - // +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() - // +kubebuilder:validation:Optional - ManagedInstanceID *string `json:"managedInstanceId,omitempty" tf:"managed_instance_id,omitempty"` - // Reference to a MSSQLManagedInstance to populate managedInstanceId. - // +kubebuilder:validation:Optional - ManagedInstanceIDRef *v1.Reference `json:"managedInstanceIdRef,omitempty" tf:"-"` +// The id of the MS SQL Managed Instance. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=MSSQLManagedInstance +// +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() +// +kubebuilder:validation:Optional +ManagedInstanceID *string `json:"managedInstanceId,omitempty" tf:"managed_instance_id,omitempty"` - // Selector for a MSSQLManagedInstance to populate managedInstanceId. - // +kubebuilder:validation:Optional - ManagedInstanceIDSelector *v1.Selector `json:"managedInstanceIdSelector,omitempty" tf:"-"` +// Reference to a MSSQLManagedInstance to populate managedInstanceId. +// +kubebuilder:validation:Optional +ManagedInstanceIDRef *v1.Reference `json:"managedInstanceIdRef,omitempty" tf:"-"` - // The recurring scans settings. The recurring_scans block supports fields documented below. - // +kubebuilder:validation:Optional - RecurringScans []RecurringScansParameters `json:"recurringScans,omitempty" tf:"recurring_scans,omitempty"` +// Selector for a MSSQLManagedInstance to populate managedInstanceId. +// +kubebuilder:validation:Optional +ManagedInstanceIDSelector *v1.Selector `json:"managedInstanceIdSelector,omitempty" tf:"-"` - // Specifies the identifier key of the storage account for vulnerability assessment scan results. If storage_container_sas_key isn't specified, storage_account_access_key is required. - // +kubebuilder:validation:Optional - StorageAccountAccessKeySecretRef *v1.SecretKeySelector `json:"storageAccountAccessKeySecretRef,omitempty" tf:"-"` +// The recurring scans settings. The recurring_scans block supports fields documented below. +// +kubebuilder:validation:Optional +RecurringScans []RecurringScansParameters `json:"recurringScans,omitempty" tf:"recurring_scans,omitempty"` - // A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). - // +kubebuilder:validation:Optional - StorageContainerPath *string `json:"storageContainerPath,omitempty" tf:"storage_container_path,omitempty"` +// Specifies the identifier key of the storage account for vulnerability assessment scan results. If storage_container_sas_key isn't specified, storage_account_access_key is required. +// +kubebuilder:validation:Optional +StorageAccountAccessKeySecretRef *v1.SecretKeySelector `json:"storageAccountAccessKeySecretRef,omitempty" tf:"-"` - // A shared access signature (SAS Key) that has write access to the blob container specified in storage_container_path parameter. If storage_account_access_key isn't specified, storage_container_sas_key is required. - // +kubebuilder:validation:Optional - StorageContainerSasKeySecretRef *v1.SecretKeySelector `json:"storageContainerSasKeySecretRef,omitempty" tf:"-"` +// A blob storage container path to hold the scan results (e.g. https://myStorage.blob.core.windows.net/VaScans/). +// +kubebuilder:validation:Optional +StorageContainerPath *string `json:"storageContainerPath,omitempty" tf:"storage_container_path,omitempty"` + +// A shared access signature (SAS Key) that has write access to the blob container specified in storage_container_path parameter. If storage_account_access_key isn't specified, storage_container_sas_key is required. +// +kubebuilder:validation:Optional +StorageContainerSasKeySecretRef *v1.SecretKeySelector `json:"storageContainerSasKeySecretRef,omitempty" tf:"-"` } + type RecurringScansInitParameters struct { - // Boolean flag which specifies if the schedule scan notification will be sent to the subscription administrators. Defaults to true. - EmailSubscriptionAdmins *bool `json:"emailSubscriptionAdmins,omitempty" tf:"email_subscription_admins,omitempty"` - // Specifies an array of e-mail addresses to which the scan notification is sent. - Emails []*string `json:"emails,omitempty" tf:"emails,omitempty"` +// Boolean flag which specifies if the schedule scan notification will be sent to the subscription administrators. Defaults to true. +EmailSubscriptionAdmins *bool `json:"emailSubscriptionAdmins,omitempty" tf:"email_subscription_admins,omitempty"` - // Boolean flag which specifies if recurring scans is enabled or disabled. Defaults to false. - Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` +// Specifies an array of e-mail addresses to which the scan notification is sent. +Emails []*string `json:"emails,omitempty" tf:"emails,omitempty"` + +// Boolean flag which specifies if recurring scans is enabled or disabled. Defaults to false. +Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` } + type RecurringScansObservation struct { - // Boolean flag which specifies if the schedule scan notification will be sent to the subscription administrators. Defaults to true. - EmailSubscriptionAdmins *bool `json:"emailSubscriptionAdmins,omitempty" tf:"email_subscription_admins,omitempty"` - // Specifies an array of e-mail addresses to which the scan notification is sent. - Emails []*string `json:"emails,omitempty" tf:"emails,omitempty"` +// Boolean flag which specifies if the schedule scan notification will be sent to the subscription administrators. Defaults to true. +EmailSubscriptionAdmins *bool `json:"emailSubscriptionAdmins,omitempty" tf:"email_subscription_admins,omitempty"` - // Boolean flag which specifies if recurring scans is enabled or disabled. Defaults to false. - Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` +// Specifies an array of e-mail addresses to which the scan notification is sent. +Emails []*string `json:"emails,omitempty" tf:"emails,omitempty"` + +// Boolean flag which specifies if recurring scans is enabled or disabled. Defaults to false. +Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` } + type RecurringScansParameters struct { - // Boolean flag which specifies if the schedule scan notification will be sent to the subscription administrators. Defaults to true. - // +kubebuilder:validation:Optional - EmailSubscriptionAdmins *bool `json:"emailSubscriptionAdmins,omitempty" tf:"email_subscription_admins,omitempty"` - // Specifies an array of e-mail addresses to which the scan notification is sent. - // +kubebuilder:validation:Optional - Emails []*string `json:"emails,omitempty" tf:"emails,omitempty"` +// Boolean flag which specifies if the schedule scan notification will be sent to the subscription administrators. Defaults to true. +// +kubebuilder:validation:Optional +EmailSubscriptionAdmins *bool `json:"emailSubscriptionAdmins,omitempty" tf:"email_subscription_admins,omitempty"` + +// Specifies an array of e-mail addresses to which the scan notification is sent. +// +kubebuilder:validation:Optional +Emails []*string `json:"emails,omitempty" tf:"emails,omitempty"` - // Boolean flag which specifies if recurring scans is enabled or disabled. Defaults to false. - // +kubebuilder:validation:Optional - Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` +// Boolean flag which specifies if recurring scans is enabled or disabled. Defaults to false. +// +kubebuilder:validation:Optional +Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` } // MSSQLManagedInstanceVulnerabilityAssessmentSpec defines the desired state of MSSQLManagedInstanceVulnerabilityAssessment type MSSQLManagedInstanceVulnerabilityAssessmentSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider MSSQLManagedInstanceVulnerabilityAssessmentParameters `json:"forProvider"` + ForProvider MSSQLManagedInstanceVulnerabilityAssessmentParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -127,13 +142,13 @@ type MSSQLManagedInstanceVulnerabilityAssessmentSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider MSSQLManagedInstanceVulnerabilityAssessmentInitParameters `json:"initProvider,omitempty"` + InitProvider MSSQLManagedInstanceVulnerabilityAssessmentInitParameters `json:"initProvider,omitempty"` } // MSSQLManagedInstanceVulnerabilityAssessmentStatus defines the observed state of MSSQLManagedInstanceVulnerabilityAssessment. type MSSQLManagedInstanceVulnerabilityAssessmentStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider MSSQLManagedInstanceVulnerabilityAssessmentObservation `json:"atProvider,omitempty"` + AtProvider MSSQLManagedInstanceVulnerabilityAssessmentObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -148,9 +163,9 @@ type MSSQLManagedInstanceVulnerabilityAssessmentStatus struct { type MSSQLManagedInstanceVulnerabilityAssessment struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.storageContainerPath) || (has(self.initProvider) && has(self.initProvider.storageContainerPath))",message="spec.forProvider.storageContainerPath is a required parameter" - Spec MSSQLManagedInstanceVulnerabilityAssessmentSpec `json:"spec"` - Status MSSQLManagedInstanceVulnerabilityAssessmentStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.storageContainerPath) || (has(self.initProvider) && has(self.initProvider.storageContainerPath))",message="spec.forProvider.storageContainerPath is a required parameter" + Spec MSSQLManagedInstanceVulnerabilityAssessmentSpec `json:"spec"` + Status MSSQLManagedInstanceVulnerabilityAssessmentStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/sql/v1alpha1/zz_mssqloutboundfirewallrule_types.go b/apis/sql/v1alpha1/zz_mssqloutboundfirewallrule_types.go index 7c36967..e70ba07 100755 --- a/apis/sql/v1alpha1/zz_mssqloutboundfirewallrule_types.go +++ b/apis/sql/v1alpha1/zz_mssqloutboundfirewallrule_types.go @@ -15,41 +15,50 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type MSSQLOutboundFirewallRuleInitParameters struct { + } + type MSSQLOutboundFirewallRuleObservation struct { - // The SQL Outbound Firewall Rule ID. - ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The resource ID of the SQL Server on which to create the Outbound Firewall Rule. Changing this forces a new resource to be created. - ServerID *string `json:"serverId,omitempty" tf:"server_id,omitempty"` +// The SQL Outbound Firewall Rule ID. +ID *string `json:"id,omitempty" tf:"id,omitempty"` + +// The resource ID of the SQL Server on which to create the Outbound Firewall Rule. Changing this forces a new resource to be created. +ServerID *string `json:"serverId,omitempty" tf:"server_id,omitempty"` } + type MSSQLOutboundFirewallRuleParameters struct { - // The resource ID of the SQL Server on which to create the Outbound Firewall Rule. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=MSSQLServer - // +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() - // +kubebuilder:validation:Optional - ServerID *string `json:"serverId,omitempty" tf:"server_id,omitempty"` - // Reference to a MSSQLServer to populate serverId. - // +kubebuilder:validation:Optional - ServerIDRef *v1.Reference `json:"serverIdRef,omitempty" tf:"-"` +// The resource ID of the SQL Server on which to create the Outbound Firewall Rule. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=MSSQLServer +// +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() +// +kubebuilder:validation:Optional +ServerID *string `json:"serverId,omitempty" tf:"server_id,omitempty"` + +// Reference to a MSSQLServer to populate serverId. +// +kubebuilder:validation:Optional +ServerIDRef *v1.Reference `json:"serverIdRef,omitempty" tf:"-"` - // Selector for a MSSQLServer to populate serverId. - // +kubebuilder:validation:Optional - ServerIDSelector *v1.Selector `json:"serverIdSelector,omitempty" tf:"-"` +// Selector for a MSSQLServer to populate serverId. +// +kubebuilder:validation:Optional +ServerIDSelector *v1.Selector `json:"serverIdSelector,omitempty" tf:"-"` } // MSSQLOutboundFirewallRuleSpec defines the desired state of MSSQLOutboundFirewallRule type MSSQLOutboundFirewallRuleSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider MSSQLOutboundFirewallRuleParameters `json:"forProvider"` + ForProvider MSSQLOutboundFirewallRuleParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -60,13 +69,13 @@ type MSSQLOutboundFirewallRuleSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider MSSQLOutboundFirewallRuleInitParameters `json:"initProvider,omitempty"` + InitProvider MSSQLOutboundFirewallRuleInitParameters `json:"initProvider,omitempty"` } // MSSQLOutboundFirewallRuleStatus defines the observed state of MSSQLOutboundFirewallRule. type MSSQLOutboundFirewallRuleStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider MSSQLOutboundFirewallRuleObservation `json:"atProvider,omitempty"` + AtProvider MSSQLOutboundFirewallRuleObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/sql/v1alpha1/zz_mssqlserver_types.go b/apis/sql/v1alpha1/zz_mssqlserver_types.go index bdca72f..c6b8137 100755 --- a/apis/sql/v1alpha1/zz_mssqlserver_types.go +++ b/apis/sql/v1alpha1/zz_mssqlserver_types.go @@ -15,261 +15,282 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type AzureadAdministratorInitParameters struct { - // Specifies whether only AD Users and administrators (e.g. azuread_administrator.0.login_username) can be used to login, or also local database users (e.g. administrator_login). When true, the administrator_login and administrator_login_password properties can be omitted. - AzureadAuthenticationOnly *bool `json:"azureadAuthenticationOnly,omitempty" tf:"azuread_authentication_only,omitempty"` - // The login username of the Azure AD Administrator of this SQL Server. - LoginUsername *string `json:"loginUsername,omitempty" tf:"login_username,omitempty"` +// Specifies whether only AD Users and administrators (e.g. azuread_administrator.0.login_username) can be used to login, or also local database users (e.g. administrator_login). When true, the administrator_login and administrator_login_password properties can be omitted. +AzureadAuthenticationOnly *bool `json:"azureadAuthenticationOnly,omitempty" tf:"azuread_authentication_only,omitempty"` + +// The login username of the Azure AD Administrator of this SQL Server. +LoginUsername *string `json:"loginUsername,omitempty" tf:"login_username,omitempty"` - // The object id of the Azure AD Administrator of this SQL Server. - ObjectID *string `json:"objectId,omitempty" tf:"object_id,omitempty"` +// The object id of the Azure AD Administrator of this SQL Server. +ObjectID *string `json:"objectId,omitempty" tf:"object_id,omitempty"` - // The tenant id of the Azure AD Administrator of this SQL Server. - TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` +// The tenant id of the Azure AD Administrator of this SQL Server. +TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` } + type AzureadAdministratorObservation struct { - // Specifies whether only AD Users and administrators (e.g. azuread_administrator.0.login_username) can be used to login, or also local database users (e.g. administrator_login). When true, the administrator_login and administrator_login_password properties can be omitted. - AzureadAuthenticationOnly *bool `json:"azureadAuthenticationOnly,omitempty" tf:"azuread_authentication_only,omitempty"` - // The login username of the Azure AD Administrator of this SQL Server. - LoginUsername *string `json:"loginUsername,omitempty" tf:"login_username,omitempty"` +// Specifies whether only AD Users and administrators (e.g. azuread_administrator.0.login_username) can be used to login, or also local database users (e.g. administrator_login). When true, the administrator_login and administrator_login_password properties can be omitted. +AzureadAuthenticationOnly *bool `json:"azureadAuthenticationOnly,omitempty" tf:"azuread_authentication_only,omitempty"` - // The object id of the Azure AD Administrator of this SQL Server. - ObjectID *string `json:"objectId,omitempty" tf:"object_id,omitempty"` +// The login username of the Azure AD Administrator of this SQL Server. +LoginUsername *string `json:"loginUsername,omitempty" tf:"login_username,omitempty"` - // The tenant id of the Azure AD Administrator of this SQL Server. - TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` +// The object id of the Azure AD Administrator of this SQL Server. +ObjectID *string `json:"objectId,omitempty" tf:"object_id,omitempty"` + +// The tenant id of the Azure AD Administrator of this SQL Server. +TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` } + type AzureadAdministratorParameters struct { - // Specifies whether only AD Users and administrators (e.g. azuread_administrator.0.login_username) can be used to login, or also local database users (e.g. administrator_login). When true, the administrator_login and administrator_login_password properties can be omitted. - // +kubebuilder:validation:Optional - AzureadAuthenticationOnly *bool `json:"azureadAuthenticationOnly,omitempty" tf:"azuread_authentication_only,omitempty"` - // The login username of the Azure AD Administrator of this SQL Server. - // +kubebuilder:validation:Optional - LoginUsername *string `json:"loginUsername" tf:"login_username,omitempty"` +// Specifies whether only AD Users and administrators (e.g. azuread_administrator.0.login_username) can be used to login, or also local database users (e.g. administrator_login). When true, the administrator_login and administrator_login_password properties can be omitted. +// +kubebuilder:validation:Optional +AzureadAuthenticationOnly *bool `json:"azureadAuthenticationOnly,omitempty" tf:"azuread_authentication_only,omitempty"` + +// The login username of the Azure AD Administrator of this SQL Server. +// +kubebuilder:validation:Optional +LoginUsername *string `json:"loginUsername" tf:"login_username,omitempty"` - // The object id of the Azure AD Administrator of this SQL Server. - // +kubebuilder:validation:Optional - ObjectID *string `json:"objectId" tf:"object_id,omitempty"` +// The object id of the Azure AD Administrator of this SQL Server. +// +kubebuilder:validation:Optional +ObjectID *string `json:"objectId" tf:"object_id,omitempty"` - // The tenant id of the Azure AD Administrator of this SQL Server. - // +kubebuilder:validation:Optional - TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` +// The tenant id of the Azure AD Administrator of this SQL Server. +// +kubebuilder:validation:Optional +TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` } + type MSSQLServerIdentityInitParameters struct { - // Specifies a list of User Assigned Managed Identity IDs to be assigned to this SQL Server. - IdentityIds []*string `json:"identityIds,omitempty" tf:"identity_ids,omitempty"` - // Specifies the type of Managed Service Identity that should be configured on this SQL Server. Possible values are SystemAssigned, UserAssigned. - Type *string `json:"type,omitempty" tf:"type,omitempty"` +// Specifies a list of User Assigned Managed Identity IDs to be assigned to this SQL Server. +IdentityIds []*string `json:"identityIds,omitempty" tf:"identity_ids,omitempty"` + +// Specifies the type of Managed Service Identity that should be configured on this SQL Server. Possible values are SystemAssigned, UserAssigned. +Type *string `json:"type,omitempty" tf:"type,omitempty"` } + type MSSQLServerIdentityObservation struct { - // Specifies a list of User Assigned Managed Identity IDs to be assigned to this SQL Server. - IdentityIds []*string `json:"identityIds,omitempty" tf:"identity_ids,omitempty"` - // The Principal ID for the Service Principal associated with the Identity of this SQL Server. - PrincipalID *string `json:"principalId,omitempty" tf:"principal_id,omitempty"` +// Specifies a list of User Assigned Managed Identity IDs to be assigned to this SQL Server. +IdentityIds []*string `json:"identityIds,omitempty" tf:"identity_ids,omitempty"` + +// The Principal ID for the Service Principal associated with the Identity of this SQL Server. +PrincipalID *string `json:"principalId,omitempty" tf:"principal_id,omitempty"` - // The Tenant ID for the Service Principal associated with the Identity of this SQL Server. - TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` +// The Tenant ID for the Service Principal associated with the Identity of this SQL Server. +TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` - // Specifies the type of Managed Service Identity that should be configured on this SQL Server. Possible values are SystemAssigned, UserAssigned. - Type *string `json:"type,omitempty" tf:"type,omitempty"` +// Specifies the type of Managed Service Identity that should be configured on this SQL Server. Possible values are SystemAssigned, UserAssigned. +Type *string `json:"type,omitempty" tf:"type,omitempty"` } + type MSSQLServerIdentityParameters struct { - // Specifies a list of User Assigned Managed Identity IDs to be assigned to this SQL Server. - // +kubebuilder:validation:Optional - IdentityIds []*string `json:"identityIds,omitempty" tf:"identity_ids,omitempty"` - // Specifies the type of Managed Service Identity that should be configured on this SQL Server. Possible values are SystemAssigned, UserAssigned. - // +kubebuilder:validation:Optional - Type *string `json:"type" tf:"type,omitempty"` +// Specifies a list of User Assigned Managed Identity IDs to be assigned to this SQL Server. +// +kubebuilder:validation:Optional +IdentityIds []*string `json:"identityIds,omitempty" tf:"identity_ids,omitempty"` + +// Specifies the type of Managed Service Identity that should be configured on this SQL Server. Possible values are SystemAssigned, UserAssigned. +// +kubebuilder:validation:Optional +Type *string `json:"type" tf:"type,omitempty"` } + type MSSQLServerInitParameters struct { - // The administrator login name for the new server. Required unless azuread_authentication_only in the azuread_administrator block is true. When omitted, Azure will generate a default username which cannot be subsequently changed. Changing this forces a new resource to be created. - AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` - // An azuread_administrator block as defined below. - AzureadAdministrator []AzureadAdministratorInitParameters `json:"azureadAdministrator,omitempty" tf:"azuread_administrator,omitempty"` +// The administrator login name for the new server. Required unless azuread_authentication_only in the azuread_administrator block is true. When omitted, Azure will generate a default username which cannot be subsequently changed. Changing this forces a new resource to be created. +AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` - // The connection policy the server will use. Possible values are Default, Proxy, and Redirect. Defaults to Default. - ConnectionPolicy *string `json:"connectionPolicy,omitempty" tf:"connection_policy,omitempty"` +// An azuread_administrator block as defined below. +AzureadAdministrator []AzureadAdministratorInitParameters `json:"azureadAdministrator,omitempty" tf:"azuread_administrator,omitempty"` - // An identity block as defined below. - Identity []MSSQLServerIdentityInitParameters `json:"identity,omitempty" tf:"identity,omitempty"` +// The connection policy the server will use. Possible values are Default, Proxy, and Redirect. Defaults to Default. +ConnectionPolicy *string `json:"connectionPolicy,omitempty" tf:"connection_policy,omitempty"` - // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// An identity block as defined below. +Identity []MSSQLServerIdentityInitParameters `json:"identity,omitempty" tf:"identity,omitempty"` - // The Minimum TLS Version for all SQL Database and SQL Data Warehouse databases associated with the server. Valid values are: 1.0, 1.1 , 1.2 and Disabled. Defaults to 1.2. - MinimumTLSVersion *string `json:"minimumTlsVersion,omitempty" tf:"minimum_tls_version,omitempty"` +// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // Whether outbound network traffic is restricted for this server. Defaults to false. - OutboundNetworkRestrictionEnabled *bool `json:"outboundNetworkRestrictionEnabled,omitempty" tf:"outbound_network_restriction_enabled,omitempty"` +// The Minimum TLS Version for all SQL Database and SQL Data Warehouse databases associated with the server. Valid values are: 1.0, 1.1 , 1.2 and Disabled. Defaults to 1.2. +MinimumTLSVersion *string `json:"minimumTlsVersion,omitempty" tf:"minimum_tls_version,omitempty"` - // Specifies the primary user managed identity id. Required if type is UserAssigned and should be combined with identity_ids. - PrimaryUserAssignedIdentityID *string `json:"primaryUserAssignedIdentityId,omitempty" tf:"primary_user_assigned_identity_id,omitempty"` +// Whether outbound network traffic is restricted for this server. Defaults to false. +OutboundNetworkRestrictionEnabled *bool `json:"outboundNetworkRestrictionEnabled,omitempty" tf:"outbound_network_restriction_enabled,omitempty"` - // Whether public network access is allowed for this server. Defaults to true. - PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` +// Specifies the primary user managed identity id. Required if type is UserAssigned and should be combined with identity_ids. +PrimaryUserAssignedIdentityID *string `json:"primaryUserAssignedIdentityId,omitempty" tf:"primary_user_assigned_identity_id,omitempty"` - // A mapping of tags to assign to the resource. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// Whether public network access is allowed for this server. Defaults to true. +PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` - // The version for the new server. Valid values are: 2.0 (for v11 server) and 12.0 (for v12 server). Changing this forces a new resource to be created. - Version *string `json:"version,omitempty" tf:"version,omitempty"` +// A mapping of tags to assign to the resource. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` + +// The version for the new server. Valid values are: 2.0 (for v11 server) and 12.0 (for v12 server). Changing this forces a new resource to be created. +Version *string `json:"version,omitempty" tf:"version,omitempty"` } + type MSSQLServerObservation struct { - // The administrator login name for the new server. Required unless azuread_authentication_only in the azuread_administrator block is true. When omitted, Azure will generate a default username which cannot be subsequently changed. Changing this forces a new resource to be created. - AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` - // An azuread_administrator block as defined below. - AzureadAdministrator []AzureadAdministratorObservation `json:"azureadAdministrator,omitempty" tf:"azuread_administrator,omitempty"` +// The administrator login name for the new server. Required unless azuread_authentication_only in the azuread_administrator block is true. When omitted, Azure will generate a default username which cannot be subsequently changed. Changing this forces a new resource to be created. +AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` + +// An azuread_administrator block as defined below. +AzureadAdministrator []AzureadAdministratorObservation `json:"azureadAdministrator,omitempty" tf:"azuread_administrator,omitempty"` - // The connection policy the server will use. Possible values are Default, Proxy, and Redirect. Defaults to Default. - ConnectionPolicy *string `json:"connectionPolicy,omitempty" tf:"connection_policy,omitempty"` +// The connection policy the server will use. Possible values are Default, Proxy, and Redirect. Defaults to Default. +ConnectionPolicy *string `json:"connectionPolicy,omitempty" tf:"connection_policy,omitempty"` - // The fully qualified domain name of the Azure SQL Server (e.g. myServerName.database.windows.net) - FullyQualifiedDomainName *string `json:"fullyQualifiedDomainName,omitempty" tf:"fully_qualified_domain_name,omitempty"` +// The fully qualified domain name of the Azure SQL Server (e.g. myServerName.database.windows.net) +FullyQualifiedDomainName *string `json:"fullyQualifiedDomainName,omitempty" tf:"fully_qualified_domain_name,omitempty"` - // the Microsoft SQL Server ID. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// the Microsoft SQL Server ID. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // An identity block as defined below. - Identity []MSSQLServerIdentityObservation `json:"identity,omitempty" tf:"identity,omitempty"` +// An identity block as defined below. +Identity []MSSQLServerIdentityObservation `json:"identity,omitempty" tf:"identity,omitempty"` - // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // The Minimum TLS Version for all SQL Database and SQL Data Warehouse databases associated with the server. Valid values are: 1.0, 1.1 , 1.2 and Disabled. Defaults to 1.2. - MinimumTLSVersion *string `json:"minimumTlsVersion,omitempty" tf:"minimum_tls_version,omitempty"` +// The Minimum TLS Version for all SQL Database and SQL Data Warehouse databases associated with the server. Valid values are: 1.0, 1.1 , 1.2 and Disabled. Defaults to 1.2. +MinimumTLSVersion *string `json:"minimumTlsVersion,omitempty" tf:"minimum_tls_version,omitempty"` - // Whether outbound network traffic is restricted for this server. Defaults to false. - OutboundNetworkRestrictionEnabled *bool `json:"outboundNetworkRestrictionEnabled,omitempty" tf:"outbound_network_restriction_enabled,omitempty"` +// Whether outbound network traffic is restricted for this server. Defaults to false. +OutboundNetworkRestrictionEnabled *bool `json:"outboundNetworkRestrictionEnabled,omitempty" tf:"outbound_network_restriction_enabled,omitempty"` - // Specifies the primary user managed identity id. Required if type is UserAssigned and should be combined with identity_ids. - PrimaryUserAssignedIdentityID *string `json:"primaryUserAssignedIdentityId,omitempty" tf:"primary_user_assigned_identity_id,omitempty"` +// Specifies the primary user managed identity id. Required if type is UserAssigned and should be combined with identity_ids. +PrimaryUserAssignedIdentityID *string `json:"primaryUserAssignedIdentityId,omitempty" tf:"primary_user_assigned_identity_id,omitempty"` - // Whether public network access is allowed for this server. Defaults to true. - PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` +// Whether public network access is allowed for this server. Defaults to true. +PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` - // The name of the resource group in which to create the Microsoft SQL Server. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group in which to create the Microsoft SQL Server. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // A list of dropped restorable database IDs on the server. - RestorableDroppedDatabaseIds []*string `json:"restorableDroppedDatabaseIds,omitempty" tf:"restorable_dropped_database_ids,omitempty"` +// A list of dropped restorable database IDs on the server. +RestorableDroppedDatabaseIds []*string `json:"restorableDroppedDatabaseIds,omitempty" tf:"restorable_dropped_database_ids,omitempty"` - // A mapping of tags to assign to the resource. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A mapping of tags to assign to the resource. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - // The fully versioned Key Vault Key URL (e.g. 'https://.vault.azure.net/keys//) to be used as the Customer Managed Key(CMK/BYOK) for the Transparent Data Encryption(TDE) layer. - TransparentDataEncryptionKeyVaultKeyID *string `json:"transparentDataEncryptionKeyVaultKeyId,omitempty" tf:"transparent_data_encryption_key_vault_key_id,omitempty"` +// The fully versioned Key Vault Key URL (e.g. 'https://.vault.azure.net/keys//) to be used as the Customer Managed Key(CMK/BYOK) for the Transparent Data Encryption(TDE) layer. +TransparentDataEncryptionKeyVaultKeyID *string `json:"transparentDataEncryptionKeyVaultKeyId,omitempty" tf:"transparent_data_encryption_key_vault_key_id,omitempty"` - // The version for the new server. Valid values are: 2.0 (for v11 server) and 12.0 (for v12 server). Changing this forces a new resource to be created. - Version *string `json:"version,omitempty" tf:"version,omitempty"` +// The version for the new server. Valid values are: 2.0 (for v11 server) and 12.0 (for v12 server). Changing this forces a new resource to be created. +Version *string `json:"version,omitempty" tf:"version,omitempty"` } + type MSSQLServerParameters struct { - // The administrator login name for the new server. Required unless azuread_authentication_only in the azuread_administrator block is true. When omitted, Azure will generate a default username which cannot be subsequently changed. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` - // The password associated with the administrator_login user. Needs to comply with Azure's Password Policy. Required unless azuread_authentication_only in the azuread_administrator block is true. - // +kubebuilder:validation:Optional - AdministratorLoginPasswordSecretRef *v1.SecretKeySelector `json:"administratorLoginPasswordSecretRef,omitempty" tf:"-"` +// The administrator login name for the new server. Required unless azuread_authentication_only in the azuread_administrator block is true. When omitted, Azure will generate a default username which cannot be subsequently changed. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +AdministratorLogin *string `json:"administratorLogin,omitempty" tf:"administrator_login,omitempty"` + +// The password associated with the administrator_login user. Needs to comply with Azure's Password Policy. Required unless azuread_authentication_only in the azuread_administrator block is true. +// +kubebuilder:validation:Optional +AdministratorLoginPasswordSecretRef *v1.SecretKeySelector `json:"administratorLoginPasswordSecretRef,omitempty" tf:"-"` - // An azuread_administrator block as defined below. - // +kubebuilder:validation:Optional - AzureadAdministrator []AzureadAdministratorParameters `json:"azureadAdministrator,omitempty" tf:"azuread_administrator,omitempty"` +// An azuread_administrator block as defined below. +// +kubebuilder:validation:Optional +AzureadAdministrator []AzureadAdministratorParameters `json:"azureadAdministrator,omitempty" tf:"azuread_administrator,omitempty"` - // The connection policy the server will use. Possible values are Default, Proxy, and Redirect. Defaults to Default. - // +kubebuilder:validation:Optional - ConnectionPolicy *string `json:"connectionPolicy,omitempty" tf:"connection_policy,omitempty"` +// The connection policy the server will use. Possible values are Default, Proxy, and Redirect. Defaults to Default. +// +kubebuilder:validation:Optional +ConnectionPolicy *string `json:"connectionPolicy,omitempty" tf:"connection_policy,omitempty"` - // An identity block as defined below. - // +kubebuilder:validation:Optional - Identity []MSSQLServerIdentityParameters `json:"identity,omitempty" tf:"identity,omitempty"` +// An identity block as defined below. +// +kubebuilder:validation:Optional +Identity []MSSQLServerIdentityParameters `json:"identity,omitempty" tf:"identity,omitempty"` - // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // The Minimum TLS Version for all SQL Database and SQL Data Warehouse databases associated with the server. Valid values are: 1.0, 1.1 , 1.2 and Disabled. Defaults to 1.2. - // +kubebuilder:validation:Optional - MinimumTLSVersion *string `json:"minimumTlsVersion,omitempty" tf:"minimum_tls_version,omitempty"` +// The Minimum TLS Version for all SQL Database and SQL Data Warehouse databases associated with the server. Valid values are: 1.0, 1.1 , 1.2 and Disabled. Defaults to 1.2. +// +kubebuilder:validation:Optional +MinimumTLSVersion *string `json:"minimumTlsVersion,omitempty" tf:"minimum_tls_version,omitempty"` - // Whether outbound network traffic is restricted for this server. Defaults to false. - // +kubebuilder:validation:Optional - OutboundNetworkRestrictionEnabled *bool `json:"outboundNetworkRestrictionEnabled,omitempty" tf:"outbound_network_restriction_enabled,omitempty"` +// Whether outbound network traffic is restricted for this server. Defaults to false. +// +kubebuilder:validation:Optional +OutboundNetworkRestrictionEnabled *bool `json:"outboundNetworkRestrictionEnabled,omitempty" tf:"outbound_network_restriction_enabled,omitempty"` - // Specifies the primary user managed identity id. Required if type is UserAssigned and should be combined with identity_ids. - // +kubebuilder:validation:Optional - PrimaryUserAssignedIdentityID *string `json:"primaryUserAssignedIdentityId,omitempty" tf:"primary_user_assigned_identity_id,omitempty"` +// Specifies the primary user managed identity id. Required if type is UserAssigned and should be combined with identity_ids. +// +kubebuilder:validation:Optional +PrimaryUserAssignedIdentityID *string `json:"primaryUserAssignedIdentityId,omitempty" tf:"primary_user_assigned_identity_id,omitempty"` - // Whether public network access is allowed for this server. Defaults to true. - // +kubebuilder:validation:Optional - PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` +// Whether public network access is allowed for this server. Defaults to true. +// +kubebuilder:validation:Optional +PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` - // The name of the resource group in which to create the Microsoft SQL Server. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group in which to create the Microsoft SQL Server. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - // A mapping of tags to assign to the resource. - // +kubebuilder:validation:Optional - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A mapping of tags to assign to the resource. +// +kubebuilder:validation:Optional +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` - // The fully versioned Key Vault Key URL (e.g. 'https://.vault.azure.net/keys//) to be used as the Customer Managed Key(CMK/BYOK) for the Transparent Data Encryption(TDE) layer. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/keyvault/v1alpha1.Key - // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() - // +kubebuilder:validation:Optional - TransparentDataEncryptionKeyVaultKeyID *string `json:"transparentDataEncryptionKeyVaultKeyId,omitempty" tf:"transparent_data_encryption_key_vault_key_id,omitempty"` +// The fully versioned Key Vault Key URL (e.g. 'https://.vault.azure.net/keys//) to be used as the Customer Managed Key(CMK/BYOK) for the Transparent Data Encryption(TDE) layer. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/keyvault/v1alpha1.Key +// +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() +// +kubebuilder:validation:Optional +TransparentDataEncryptionKeyVaultKeyID *string `json:"transparentDataEncryptionKeyVaultKeyId,omitempty" tf:"transparent_data_encryption_key_vault_key_id,omitempty"` - // Reference to a Key in keyvault to populate transparentDataEncryptionKeyVaultKeyId. - // +kubebuilder:validation:Optional - TransparentDataEncryptionKeyVaultKeyIDRef *v1.Reference `json:"transparentDataEncryptionKeyVaultKeyIdRef,omitempty" tf:"-"` +// Reference to a Key in keyvault to populate transparentDataEncryptionKeyVaultKeyId. +// +kubebuilder:validation:Optional +TransparentDataEncryptionKeyVaultKeyIDRef *v1.Reference `json:"transparentDataEncryptionKeyVaultKeyIdRef,omitempty" tf:"-"` - // Selector for a Key in keyvault to populate transparentDataEncryptionKeyVaultKeyId. - // +kubebuilder:validation:Optional - TransparentDataEncryptionKeyVaultKeyIDSelector *v1.Selector `json:"transparentDataEncryptionKeyVaultKeyIdSelector,omitempty" tf:"-"` +// Selector for a Key in keyvault to populate transparentDataEncryptionKeyVaultKeyId. +// +kubebuilder:validation:Optional +TransparentDataEncryptionKeyVaultKeyIDSelector *v1.Selector `json:"transparentDataEncryptionKeyVaultKeyIdSelector,omitempty" tf:"-"` - // The version for the new server. Valid values are: 2.0 (for v11 server) and 12.0 (for v12 server). Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Version *string `json:"version,omitempty" tf:"version,omitempty"` +// The version for the new server. Valid values are: 2.0 (for v11 server) and 12.0 (for v12 server). Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Version *string `json:"version,omitempty" tf:"version,omitempty"` } // MSSQLServerSpec defines the desired state of MSSQLServer type MSSQLServerSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider MSSQLServerParameters `json:"forProvider"` + ForProvider MSSQLServerParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -280,13 +301,13 @@ type MSSQLServerSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider MSSQLServerInitParameters `json:"initProvider,omitempty"` + InitProvider MSSQLServerInitParameters `json:"initProvider,omitempty"` } // MSSQLServerStatus defines the observed state of MSSQLServer. type MSSQLServerStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider MSSQLServerObservation `json:"atProvider,omitempty"` + AtProvider MSSQLServerObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -301,10 +322,10 @@ type MSSQLServerStatus struct { type MSSQLServer struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.version) || (has(self.initProvider) && has(self.initProvider.version))",message="spec.forProvider.version is a required parameter" - Spec MSSQLServerSpec `json:"spec"` - Status MSSQLServerStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.version) || (has(self.initProvider) && has(self.initProvider.version))",message="spec.forProvider.version is a required parameter" + Spec MSSQLServerSpec `json:"spec"` + Status MSSQLServerStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/sql/v1alpha1/zz_mssqlserverdnsalias_types.go b/apis/sql/v1alpha1/zz_mssqlserverdnsalias_types.go index 6cea6f9..2908cf5 100755 --- a/apis/sql/v1alpha1/zz_mssqlserverdnsalias_types.go +++ b/apis/sql/v1alpha1/zz_mssqlserverdnsalias_types.go @@ -15,44 +15,53 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type MSSQLServerDNSAliasInitParameters struct { + } + type MSSQLServerDNSAliasObservation struct { - // The fully qualified DNS record for alias. - DNSRecord *string `json:"dnsRecord,omitempty" tf:"dns_record,omitempty"` - // The ID of the MSSQL Server DNS Alias. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// The fully qualified DNS record for alias. +DNSRecord *string `json:"dnsRecord,omitempty" tf:"dns_record,omitempty"` + +// The ID of the MSSQL Server DNS Alias. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The ID of the mssql server. Changing this forces a new MSSQL Server DNS Alias to be created. - MssqlServerID *string `json:"mssqlServerId,omitempty" tf:"mssql_server_id,omitempty"` +// The ID of the mssql server. Changing this forces a new MSSQL Server DNS Alias to be created. +MssqlServerID *string `json:"mssqlServerId,omitempty" tf:"mssql_server_id,omitempty"` } + type MSSQLServerDNSAliasParameters struct { - // The ID of the mssql server. Changing this forces a new MSSQL Server DNS Alias to be created. - // +crossplane:generate:reference:type=MSSQLServer - // +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() - // +kubebuilder:validation:Optional - MssqlServerID *string `json:"mssqlServerId,omitempty" tf:"mssql_server_id,omitempty"` - // Reference to a MSSQLServer to populate mssqlServerId. - // +kubebuilder:validation:Optional - MssqlServerIDRef *v1.Reference `json:"mssqlServerIdRef,omitempty" tf:"-"` +// The ID of the mssql server. Changing this forces a new MSSQL Server DNS Alias to be created. +// +crossplane:generate:reference:type=MSSQLServer +// +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() +// +kubebuilder:validation:Optional +MssqlServerID *string `json:"mssqlServerId,omitempty" tf:"mssql_server_id,omitempty"` + +// Reference to a MSSQLServer to populate mssqlServerId. +// +kubebuilder:validation:Optional +MssqlServerIDRef *v1.Reference `json:"mssqlServerIdRef,omitempty" tf:"-"` - // Selector for a MSSQLServer to populate mssqlServerId. - // +kubebuilder:validation:Optional - MssqlServerIDSelector *v1.Selector `json:"mssqlServerIdSelector,omitempty" tf:"-"` +// Selector for a MSSQLServer to populate mssqlServerId. +// +kubebuilder:validation:Optional +MssqlServerIDSelector *v1.Selector `json:"mssqlServerIdSelector,omitempty" tf:"-"` } // MSSQLServerDNSAliasSpec defines the desired state of MSSQLServerDNSAlias type MSSQLServerDNSAliasSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider MSSQLServerDNSAliasParameters `json:"forProvider"` + ForProvider MSSQLServerDNSAliasParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -63,13 +72,13 @@ type MSSQLServerDNSAliasSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider MSSQLServerDNSAliasInitParameters `json:"initProvider,omitempty"` + InitProvider MSSQLServerDNSAliasInitParameters `json:"initProvider,omitempty"` } // MSSQLServerDNSAliasStatus defines the observed state of MSSQLServerDNSAlias. type MSSQLServerDNSAliasStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider MSSQLServerDNSAliasObservation `json:"atProvider,omitempty"` + AtProvider MSSQLServerDNSAliasObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/sql/v1alpha1/zz_mssqlservermicrosoftsupportauditingpolicy_types.go b/apis/sql/v1alpha1/zz_mssqlservermicrosoftsupportauditingpolicy_types.go index 36e7d01..a573be9 100755 --- a/apis/sql/v1alpha1/zz_mssqlservermicrosoftsupportauditingpolicy_types.go +++ b/apis/sql/v1alpha1/zz_mssqlservermicrosoftsupportauditingpolicy_types.go @@ -15,102 +15,111 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type MSSQLServerMicrosoftSupportAuditingPolicyInitParameters struct { - // Whether to enable the extended auditing policy. Possible values are true and false. Defaults to true. - Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` - // Enable audit events to Azure Monitor? Defaults to true. - LogMonitoringEnabled *bool `json:"logMonitoringEnabled,omitempty" tf:"log_monitoring_enabled,omitempty"` +// Whether to enable the extended auditing policy. Possible values are true and false. Defaults to true. +Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` + +// Enable audit events to Azure Monitor? Defaults to true. +LogMonitoringEnabled *bool `json:"logMonitoringEnabled,omitempty" tf:"log_monitoring_enabled,omitempty"` - // The number of days to retain logs for in the storage account. Defaults to 0. - RetentionInDays *float64 `json:"retentionInDays,omitempty" tf:"retention_in_days,omitempty"` +// The number of days to retain logs for in the storage account. Defaults to 0. +RetentionInDays *float64 `json:"retentionInDays,omitempty" tf:"retention_in_days,omitempty"` - // Is storage_account_access_key value the storage's secondary key? - StorageAccountAccessKeyIsSecondary *bool `json:"storageAccountAccessKeyIsSecondary,omitempty" tf:"storage_account_access_key_is_secondary,omitempty"` +// Is storage_account_access_key value the storage's secondary key? +StorageAccountAccessKeyIsSecondary *bool `json:"storageAccountAccessKeyIsSecondary,omitempty" tf:"storage_account_access_key_is_secondary,omitempty"` } + type MSSQLServerMicrosoftSupportAuditingPolicyObservation struct { - // The ID of the SQL database to set the extended auditing policy. Changing this forces a new resource to be created. - DatabaseID *string `json:"databaseId,omitempty" tf:"database_id,omitempty"` - // Whether to enable the extended auditing policy. Possible values are true and false. Defaults to true. - Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` +// The ID of the SQL database to set the extended auditing policy. Changing this forces a new resource to be created. +DatabaseID *string `json:"databaseId,omitempty" tf:"database_id,omitempty"` + +// Whether to enable the extended auditing policy. Possible values are true and false. Defaults to true. +Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` - // The ID of the MS SQL Database Extended Auditing Policy. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// The ID of the MS SQL Database Extended Auditing Policy. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // Enable audit events to Azure Monitor? Defaults to true. - LogMonitoringEnabled *bool `json:"logMonitoringEnabled,omitempty" tf:"log_monitoring_enabled,omitempty"` +// Enable audit events to Azure Monitor? Defaults to true. +LogMonitoringEnabled *bool `json:"logMonitoringEnabled,omitempty" tf:"log_monitoring_enabled,omitempty"` - // The number of days to retain logs for in the storage account. Defaults to 0. - RetentionInDays *float64 `json:"retentionInDays,omitempty" tf:"retention_in_days,omitempty"` +// The number of days to retain logs for in the storage account. Defaults to 0. +RetentionInDays *float64 `json:"retentionInDays,omitempty" tf:"retention_in_days,omitempty"` - // Is storage_account_access_key value the storage's secondary key? - StorageAccountAccessKeyIsSecondary *bool `json:"storageAccountAccessKeyIsSecondary,omitempty" tf:"storage_account_access_key_is_secondary,omitempty"` +// Is storage_account_access_key value the storage's secondary key? +StorageAccountAccessKeyIsSecondary *bool `json:"storageAccountAccessKeyIsSecondary,omitempty" tf:"storage_account_access_key_is_secondary,omitempty"` - // The blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all extended auditing logs. - StorageEndpoint *string `json:"storageEndpoint,omitempty" tf:"storage_endpoint,omitempty"` +// The blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all extended auditing logs. +StorageEndpoint *string `json:"storageEndpoint,omitempty" tf:"storage_endpoint,omitempty"` } + type MSSQLServerMicrosoftSupportAuditingPolicyParameters struct { - // The ID of the SQL database to set the extended auditing policy. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/sql/v1alpha1.MSSQLDatabase - // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() - // +kubebuilder:validation:Optional - DatabaseID *string `json:"databaseId,omitempty" tf:"database_id,omitempty"` - - // Reference to a MSSQLDatabase in sql to populate databaseId. - // +kubebuilder:validation:Optional - DatabaseIDRef *v1.Reference `json:"databaseIdRef,omitempty" tf:"-"` - - // Selector for a MSSQLDatabase in sql to populate databaseId. - // +kubebuilder:validation:Optional - DatabaseIDSelector *v1.Selector `json:"databaseIdSelector,omitempty" tf:"-"` - - // Whether to enable the extended auditing policy. Possible values are true and false. Defaults to true. - // +kubebuilder:validation:Optional - Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` - - // Enable audit events to Azure Monitor? Defaults to true. - // +kubebuilder:validation:Optional - LogMonitoringEnabled *bool `json:"logMonitoringEnabled,omitempty" tf:"log_monitoring_enabled,omitempty"` - - // The number of days to retain logs for in the storage account. Defaults to 0. - // +kubebuilder:validation:Optional - RetentionInDays *float64 `json:"retentionInDays,omitempty" tf:"retention_in_days,omitempty"` - - // Is storage_account_access_key value the storage's secondary key? - // +kubebuilder:validation:Optional - StorageAccountAccessKeyIsSecondary *bool `json:"storageAccountAccessKeyIsSecondary,omitempty" tf:"storage_account_access_key_is_secondary,omitempty"` - - // The access key to use for the auditing storage account. - // +kubebuilder:validation:Optional - StorageAccountAccessKeySecretRef *v1.SecretKeySelector `json:"storageAccountAccessKeySecretRef,omitempty" tf:"-"` - - // The blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all extended auditing logs. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/storage/v1alpha1.Account - // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractParamPath("primary_blob_endpoint",true) - // +kubebuilder:validation:Optional - StorageEndpoint *string `json:"storageEndpoint,omitempty" tf:"storage_endpoint,omitempty"` - - // Reference to a Account in storage to populate storageEndpoint. - // +kubebuilder:validation:Optional - StorageEndpointRef *v1.Reference `json:"storageEndpointRef,omitempty" tf:"-"` - - // Selector for a Account in storage to populate storageEndpoint. - // +kubebuilder:validation:Optional - StorageEndpointSelector *v1.Selector `json:"storageEndpointSelector,omitempty" tf:"-"` + +// The ID of the SQL database to set the extended auditing policy. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/sql/v1alpha1.MSSQLDatabase +// +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() +// +kubebuilder:validation:Optional +DatabaseID *string `json:"databaseId,omitempty" tf:"database_id,omitempty"` + +// Reference to a MSSQLDatabase in sql to populate databaseId. +// +kubebuilder:validation:Optional +DatabaseIDRef *v1.Reference `json:"databaseIdRef,omitempty" tf:"-"` + +// Selector for a MSSQLDatabase in sql to populate databaseId. +// +kubebuilder:validation:Optional +DatabaseIDSelector *v1.Selector `json:"databaseIdSelector,omitempty" tf:"-"` + +// Whether to enable the extended auditing policy. Possible values are true and false. Defaults to true. +// +kubebuilder:validation:Optional +Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` + +// Enable audit events to Azure Monitor? Defaults to true. +// +kubebuilder:validation:Optional +LogMonitoringEnabled *bool `json:"logMonitoringEnabled,omitempty" tf:"log_monitoring_enabled,omitempty"` + +// The number of days to retain logs for in the storage account. Defaults to 0. +// +kubebuilder:validation:Optional +RetentionInDays *float64 `json:"retentionInDays,omitempty" tf:"retention_in_days,omitempty"` + +// Is storage_account_access_key value the storage's secondary key? +// +kubebuilder:validation:Optional +StorageAccountAccessKeyIsSecondary *bool `json:"storageAccountAccessKeyIsSecondary,omitempty" tf:"storage_account_access_key_is_secondary,omitempty"` + +// The access key to use for the auditing storage account. +// +kubebuilder:validation:Optional +StorageAccountAccessKeySecretRef *v1.SecretKeySelector `json:"storageAccountAccessKeySecretRef,omitempty" tf:"-"` + +// The blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all extended auditing logs. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/storage/v1alpha1.Account +// +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractParamPath("primary_blob_endpoint",true) +// +kubebuilder:validation:Optional +StorageEndpoint *string `json:"storageEndpoint,omitempty" tf:"storage_endpoint,omitempty"` + +// Reference to a Account in storage to populate storageEndpoint. +// +kubebuilder:validation:Optional +StorageEndpointRef *v1.Reference `json:"storageEndpointRef,omitempty" tf:"-"` + +// Selector for a Account in storage to populate storageEndpoint. +// +kubebuilder:validation:Optional +StorageEndpointSelector *v1.Selector `json:"storageEndpointSelector,omitempty" tf:"-"` } // MSSQLServerMicrosoftSupportAuditingPolicySpec defines the desired state of MSSQLServerMicrosoftSupportAuditingPolicy type MSSQLServerMicrosoftSupportAuditingPolicySpec struct { v1.ResourceSpec `json:",inline"` - ForProvider MSSQLServerMicrosoftSupportAuditingPolicyParameters `json:"forProvider"` + ForProvider MSSQLServerMicrosoftSupportAuditingPolicyParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -121,13 +130,13 @@ type MSSQLServerMicrosoftSupportAuditingPolicySpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider MSSQLServerMicrosoftSupportAuditingPolicyInitParameters `json:"initProvider,omitempty"` + InitProvider MSSQLServerMicrosoftSupportAuditingPolicyInitParameters `json:"initProvider,omitempty"` } // MSSQLServerMicrosoftSupportAuditingPolicyStatus defines the observed state of MSSQLServerMicrosoftSupportAuditingPolicy. type MSSQLServerMicrosoftSupportAuditingPolicyStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider MSSQLServerMicrosoftSupportAuditingPolicyObservation `json:"atProvider,omitempty"` + AtProvider MSSQLServerMicrosoftSupportAuditingPolicyObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/sql/v1alpha1/zz_mssqlserversecurityalertpolicy_types.go b/apis/sql/v1alpha1/zz_mssqlserversecurityalertpolicy_types.go index 33e2824..d86bc27 100755 --- a/apis/sql/v1alpha1/zz_mssqlserversecurityalertpolicy_types.go +++ b/apis/sql/v1alpha1/zz_mssqlserversecurityalertpolicy_types.go @@ -15,127 +15,136 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type MSSQLServerSecurityAlertPolicyInitParameters struct { - // Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action. - DisabledAlerts []*string `json:"disabledAlerts,omitempty" tf:"disabled_alerts,omitempty"` - // Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to false. - EmailAccountAdmins *bool `json:"emailAccountAdmins,omitempty" tf:"email_account_admins,omitempty"` +// Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action. +DisabledAlerts []*string `json:"disabledAlerts,omitempty" tf:"disabled_alerts,omitempty"` + +// Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to false. +EmailAccountAdmins *bool `json:"emailAccountAdmins,omitempty" tf:"email_account_admins,omitempty"` - // Specifies an array of email addresses to which the alert is sent. - EmailAddresses []*string `json:"emailAddresses,omitempty" tf:"email_addresses,omitempty"` +// Specifies an array of email addresses to which the alert is sent. +EmailAddresses []*string `json:"emailAddresses,omitempty" tf:"email_addresses,omitempty"` - // Specifies the number of days to keep in the Threat Detection audit logs. Defaults to 0. - RetentionDays *float64 `json:"retentionDays,omitempty" tf:"retention_days,omitempty"` +// Specifies the number of days to keep in the Threat Detection audit logs. Defaults to 0. +RetentionDays *float64 `json:"retentionDays,omitempty" tf:"retention_days,omitempty"` - // Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database server. Possible values are Disabled, Enabled and New. - State *string `json:"state,omitempty" tf:"state,omitempty"` +// Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database server. Possible values are Disabled, Enabled and New. +State *string `json:"state,omitempty" tf:"state,omitempty"` } + type MSSQLServerSecurityAlertPolicyObservation struct { - // Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action. - DisabledAlerts []*string `json:"disabledAlerts,omitempty" tf:"disabled_alerts,omitempty"` - // Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to false. - EmailAccountAdmins *bool `json:"emailAccountAdmins,omitempty" tf:"email_account_admins,omitempty"` +// Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action. +DisabledAlerts []*string `json:"disabledAlerts,omitempty" tf:"disabled_alerts,omitempty"` - // Specifies an array of email addresses to which the alert is sent. - EmailAddresses []*string `json:"emailAddresses,omitempty" tf:"email_addresses,omitempty"` +// Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to false. +EmailAccountAdmins *bool `json:"emailAccountAdmins,omitempty" tf:"email_account_admins,omitempty"` - // The ID of the MS SQL Server Security Alert Policy. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// Specifies an array of email addresses to which the alert is sent. +EmailAddresses []*string `json:"emailAddresses,omitempty" tf:"email_addresses,omitempty"` - // The name of the resource group that contains the MS SQL Server. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The ID of the MS SQL Server Security Alert Policy. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // Specifies the number of days to keep in the Threat Detection audit logs. Defaults to 0. - RetentionDays *float64 `json:"retentionDays,omitempty" tf:"retention_days,omitempty"` +// The name of the resource group that contains the MS SQL Server. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Specifies the name of the MS SQL Server. Changing this forces a new resource to be created. - ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` +// Specifies the number of days to keep in the Threat Detection audit logs. Defaults to 0. +RetentionDays *float64 `json:"retentionDays,omitempty" tf:"retention_days,omitempty"` - // Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database server. Possible values are Disabled, Enabled and New. - State *string `json:"state,omitempty" tf:"state,omitempty"` +// Specifies the name of the MS SQL Server. Changing this forces a new resource to be created. +ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` - // Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. - StorageEndpoint *string `json:"storageEndpoint,omitempty" tf:"storage_endpoint,omitempty"` +// Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database server. Possible values are Disabled, Enabled and New. +State *string `json:"state,omitempty" tf:"state,omitempty"` + +// Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. +StorageEndpoint *string `json:"storageEndpoint,omitempty" tf:"storage_endpoint,omitempty"` } + type MSSQLServerSecurityAlertPolicyParameters struct { - // Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action. - // +kubebuilder:validation:Optional - DisabledAlerts []*string `json:"disabledAlerts,omitempty" tf:"disabled_alerts,omitempty"` - - // Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to false. - // +kubebuilder:validation:Optional - EmailAccountAdmins *bool `json:"emailAccountAdmins,omitempty" tf:"email_account_admins,omitempty"` - - // Specifies an array of email addresses to which the alert is sent. - // +kubebuilder:validation:Optional - EmailAddresses []*string `json:"emailAddresses,omitempty" tf:"email_addresses,omitempty"` - - // The name of the resource group that contains the MS SQL Server. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - - // Specifies the number of days to keep in the Threat Detection audit logs. Defaults to 0. - // +kubebuilder:validation:Optional - RetentionDays *float64 `json:"retentionDays,omitempty" tf:"retention_days,omitempty"` - - // Specifies the name of the MS SQL Server. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=MSSQLServer - // +kubebuilder:validation:Optional - ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` - - // Reference to a MSSQLServer to populate serverName. - // +kubebuilder:validation:Optional - ServerNameRef *v1.Reference `json:"serverNameRef,omitempty" tf:"-"` - - // Selector for a MSSQLServer to populate serverName. - // +kubebuilder:validation:Optional - ServerNameSelector *v1.Selector `json:"serverNameSelector,omitempty" tf:"-"` - - // Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database server. Possible values are Disabled, Enabled and New. - // +kubebuilder:validation:Optional - State *string `json:"state,omitempty" tf:"state,omitempty"` - - // Specifies the identifier key of the Threat Detection audit storage account. This is mandatory when you use storage_endpoint to specify a storage account blob endpoint. - // +kubebuilder:validation:Optional - StorageAccountAccessKeySecretRef *v1.SecretKeySelector `json:"storageAccountAccessKeySecretRef,omitempty" tf:"-"` - - // Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/storage/v1alpha1.Account - // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractParamPath("primary_blob_endpoint",true) - // +kubebuilder:validation:Optional - StorageEndpoint *string `json:"storageEndpoint,omitempty" tf:"storage_endpoint,omitempty"` - - // Reference to a Account in storage to populate storageEndpoint. - // +kubebuilder:validation:Optional - StorageEndpointRef *v1.Reference `json:"storageEndpointRef,omitempty" tf:"-"` - - // Selector for a Account in storage to populate storageEndpoint. - // +kubebuilder:validation:Optional - StorageEndpointSelector *v1.Selector `json:"storageEndpointSelector,omitempty" tf:"-"` + +// Specifies an array of alerts that are disabled. Allowed values are: Sql_Injection, Sql_Injection_Vulnerability, Access_Anomaly, Data_Exfiltration, Unsafe_Action. +// +kubebuilder:validation:Optional +DisabledAlerts []*string `json:"disabledAlerts,omitempty" tf:"disabled_alerts,omitempty"` + +// Boolean flag which specifies if the alert is sent to the account administrators or not. Defaults to false. +// +kubebuilder:validation:Optional +EmailAccountAdmins *bool `json:"emailAccountAdmins,omitempty" tf:"email_account_admins,omitempty"` + +// Specifies an array of email addresses to which the alert is sent. +// +kubebuilder:validation:Optional +EmailAddresses []*string `json:"emailAddresses,omitempty" tf:"email_addresses,omitempty"` + +// The name of the resource group that contains the MS SQL Server. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` + +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` + +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` + +// Specifies the number of days to keep in the Threat Detection audit logs. Defaults to 0. +// +kubebuilder:validation:Optional +RetentionDays *float64 `json:"retentionDays,omitempty" tf:"retention_days,omitempty"` + +// Specifies the name of the MS SQL Server. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=MSSQLServer +// +kubebuilder:validation:Optional +ServerName *string `json:"serverName,omitempty" tf:"server_name,omitempty"` + +// Reference to a MSSQLServer to populate serverName. +// +kubebuilder:validation:Optional +ServerNameRef *v1.Reference `json:"serverNameRef,omitempty" tf:"-"` + +// Selector for a MSSQLServer to populate serverName. +// +kubebuilder:validation:Optional +ServerNameSelector *v1.Selector `json:"serverNameSelector,omitempty" tf:"-"` + +// Specifies the state of the policy, whether it is enabled or disabled or a policy has not been applied yet on the specific database server. Possible values are Disabled, Enabled and New. +// +kubebuilder:validation:Optional +State *string `json:"state,omitempty" tf:"state,omitempty"` + +// Specifies the identifier key of the Threat Detection audit storage account. This is mandatory when you use storage_endpoint to specify a storage account blob endpoint. +// +kubebuilder:validation:Optional +StorageAccountAccessKeySecretRef *v1.SecretKeySelector `json:"storageAccountAccessKeySecretRef,omitempty" tf:"-"` + +// Specifies the blob storage endpoint (e.g. https://example.blob.core.windows.net). This blob storage will hold all Threat Detection audit logs. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/storage/v1alpha1.Account +// +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractParamPath("primary_blob_endpoint",true) +// +kubebuilder:validation:Optional +StorageEndpoint *string `json:"storageEndpoint,omitempty" tf:"storage_endpoint,omitempty"` + +// Reference to a Account in storage to populate storageEndpoint. +// +kubebuilder:validation:Optional +StorageEndpointRef *v1.Reference `json:"storageEndpointRef,omitempty" tf:"-"` + +// Selector for a Account in storage to populate storageEndpoint. +// +kubebuilder:validation:Optional +StorageEndpointSelector *v1.Selector `json:"storageEndpointSelector,omitempty" tf:"-"` } // MSSQLServerSecurityAlertPolicySpec defines the desired state of MSSQLServerSecurityAlertPolicy type MSSQLServerSecurityAlertPolicySpec struct { v1.ResourceSpec `json:",inline"` - ForProvider MSSQLServerSecurityAlertPolicyParameters `json:"forProvider"` + ForProvider MSSQLServerSecurityAlertPolicyParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -146,13 +155,13 @@ type MSSQLServerSecurityAlertPolicySpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider MSSQLServerSecurityAlertPolicyInitParameters `json:"initProvider,omitempty"` + InitProvider MSSQLServerSecurityAlertPolicyInitParameters `json:"initProvider,omitempty"` } // MSSQLServerSecurityAlertPolicyStatus defines the observed state of MSSQLServerSecurityAlertPolicy. type MSSQLServerSecurityAlertPolicyStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider MSSQLServerSecurityAlertPolicyObservation `json:"atProvider,omitempty"` + AtProvider MSSQLServerSecurityAlertPolicyObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -167,9 +176,9 @@ type MSSQLServerSecurityAlertPolicyStatus struct { type MSSQLServerSecurityAlertPolicy struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.state) || (has(self.initProvider) && has(self.initProvider.state))",message="spec.forProvider.state is a required parameter" - Spec MSSQLServerSecurityAlertPolicySpec `json:"spec"` - Status MSSQLServerSecurityAlertPolicyStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.state) || (has(self.initProvider) && has(self.initProvider.state))",message="spec.forProvider.state is a required parameter" + Spec MSSQLServerSecurityAlertPolicySpec `json:"spec"` + Status MSSQLServerSecurityAlertPolicyStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/sql/v1alpha1/zz_mssqlservertransparentdataencryption_types.go b/apis/sql/v1alpha1/zz_mssqlservertransparentdataencryption_types.go index 2ff70a1..16e13e2 100755 --- a/apis/sql/v1alpha1/zz_mssqlservertransparentdataencryption_types.go +++ b/apis/sql/v1alpha1/zz_mssqlservertransparentdataencryption_types.go @@ -15,68 +15,77 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type MSSQLServerTransparentDataEncryptionInitParameters struct { - // When enabled, the server will continuously check the key vault for any new versions of the key being used as the TDE protector. If a new version of the key is detected, the TDE protector on the server will be automatically rotated to the latest key version within 60 minutes. - AutoRotationEnabled *bool `json:"autoRotationEnabled,omitempty" tf:"auto_rotation_enabled,omitempty"` + +// When enabled, the server will continuously check the key vault for any new versions of the key being used as the TDE protector. If a new version of the key is detected, the TDE protector on the server will be automatically rotated to the latest key version within 60 minutes. +AutoRotationEnabled *bool `json:"autoRotationEnabled,omitempty" tf:"auto_rotation_enabled,omitempty"` } + type MSSQLServerTransparentDataEncryptionObservation struct { - // When enabled, the server will continuously check the key vault for any new versions of the key being used as the TDE protector. If a new version of the key is detected, the TDE protector on the server will be automatically rotated to the latest key version within 60 minutes. - AutoRotationEnabled *bool `json:"autoRotationEnabled,omitempty" tf:"auto_rotation_enabled,omitempty"` - // The ID of the MSSQL encryption protector - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// When enabled, the server will continuously check the key vault for any new versions of the key being used as the TDE protector. If a new version of the key is detected, the TDE protector on the server will be automatically rotated to the latest key version within 60 minutes. +AutoRotationEnabled *bool `json:"autoRotationEnabled,omitempty" tf:"auto_rotation_enabled,omitempty"` - // To use customer managed keys from Azure Key Vault, provide the AKV Key ID. To use service managed keys, omit this field. - KeyVaultKeyID *string `json:"keyVaultKeyId,omitempty" tf:"key_vault_key_id,omitempty"` +// The ID of the MSSQL encryption protector +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // Specifies the name of the MS SQL Server. Changing this forces a new resource to be created. - ServerID *string `json:"serverId,omitempty" tf:"server_id,omitempty"` +// To use customer managed keys from Azure Key Vault, provide the AKV Key ID. To use service managed keys, omit this field. +KeyVaultKeyID *string `json:"keyVaultKeyId,omitempty" tf:"key_vault_key_id,omitempty"` + +// Specifies the name of the MS SQL Server. Changing this forces a new resource to be created. +ServerID *string `json:"serverId,omitempty" tf:"server_id,omitempty"` } + type MSSQLServerTransparentDataEncryptionParameters struct { - // When enabled, the server will continuously check the key vault for any new versions of the key being used as the TDE protector. If a new version of the key is detected, the TDE protector on the server will be automatically rotated to the latest key version within 60 minutes. - // +kubebuilder:validation:Optional - AutoRotationEnabled *bool `json:"autoRotationEnabled,omitempty" tf:"auto_rotation_enabled,omitempty"` - - // To use customer managed keys from Azure Key Vault, provide the AKV Key ID. To use service managed keys, omit this field. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/keyvault/v1alpha1.Key - // +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() - // +kubebuilder:validation:Optional - KeyVaultKeyID *string `json:"keyVaultKeyId,omitempty" tf:"key_vault_key_id,omitempty"` - - // Reference to a Key in keyvault to populate keyVaultKeyId. - // +kubebuilder:validation:Optional - KeyVaultKeyIDRef *v1.Reference `json:"keyVaultKeyIdRef,omitempty" tf:"-"` - - // Selector for a Key in keyvault to populate keyVaultKeyId. - // +kubebuilder:validation:Optional - KeyVaultKeyIDSelector *v1.Selector `json:"keyVaultKeyIdSelector,omitempty" tf:"-"` - - // Specifies the name of the MS SQL Server. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=MSSQLServer - // +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() - // +kubebuilder:validation:Optional - ServerID *string `json:"serverId,omitempty" tf:"server_id,omitempty"` - - // Reference to a MSSQLServer to populate serverId. - // +kubebuilder:validation:Optional - ServerIDRef *v1.Reference `json:"serverIdRef,omitempty" tf:"-"` - - // Selector for a MSSQLServer to populate serverId. - // +kubebuilder:validation:Optional - ServerIDSelector *v1.Selector `json:"serverIdSelector,omitempty" tf:"-"` + +// When enabled, the server will continuously check the key vault for any new versions of the key being used as the TDE protector. If a new version of the key is detected, the TDE protector on the server will be automatically rotated to the latest key version within 60 minutes. +// +kubebuilder:validation:Optional +AutoRotationEnabled *bool `json:"autoRotationEnabled,omitempty" tf:"auto_rotation_enabled,omitempty"` + +// To use customer managed keys from Azure Key Vault, provide the AKV Key ID. To use service managed keys, omit this field. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/keyvault/v1alpha1.Key +// +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() +// +kubebuilder:validation:Optional +KeyVaultKeyID *string `json:"keyVaultKeyId,omitempty" tf:"key_vault_key_id,omitempty"` + +// Reference to a Key in keyvault to populate keyVaultKeyId. +// +kubebuilder:validation:Optional +KeyVaultKeyIDRef *v1.Reference `json:"keyVaultKeyIdRef,omitempty" tf:"-"` + +// Selector for a Key in keyvault to populate keyVaultKeyId. +// +kubebuilder:validation:Optional +KeyVaultKeyIDSelector *v1.Selector `json:"keyVaultKeyIdSelector,omitempty" tf:"-"` + +// Specifies the name of the MS SQL Server. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=MSSQLServer +// +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() +// +kubebuilder:validation:Optional +ServerID *string `json:"serverId,omitempty" tf:"server_id,omitempty"` + +// Reference to a MSSQLServer to populate serverId. +// +kubebuilder:validation:Optional +ServerIDRef *v1.Reference `json:"serverIdRef,omitempty" tf:"-"` + +// Selector for a MSSQLServer to populate serverId. +// +kubebuilder:validation:Optional +ServerIDSelector *v1.Selector `json:"serverIdSelector,omitempty" tf:"-"` } // MSSQLServerTransparentDataEncryptionSpec defines the desired state of MSSQLServerTransparentDataEncryption type MSSQLServerTransparentDataEncryptionSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider MSSQLServerTransparentDataEncryptionParameters `json:"forProvider"` + ForProvider MSSQLServerTransparentDataEncryptionParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -87,13 +96,13 @@ type MSSQLServerTransparentDataEncryptionSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider MSSQLServerTransparentDataEncryptionInitParameters `json:"initProvider,omitempty"` + InitProvider MSSQLServerTransparentDataEncryptionInitParameters `json:"initProvider,omitempty"` } // MSSQLServerTransparentDataEncryptionStatus defines the observed state of MSSQLServerTransparentDataEncryption. type MSSQLServerTransparentDataEncryptionStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider MSSQLServerTransparentDataEncryptionObservation `json:"atProvider,omitempty"` + AtProvider MSSQLServerTransparentDataEncryptionObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/sql/v1alpha1/zz_mssqlservervulnerabilityassessment_types.go b/apis/sql/v1alpha1/zz_mssqlservervulnerabilityassessment_types.go index 3f46712..592a1d6 100755 --- a/apis/sql/v1alpha1/zz_mssqlservervulnerabilityassessment_types.go +++ b/apis/sql/v1alpha1/zz_mssqlservervulnerabilityassessment_types.go @@ -15,108 +15,123 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type MSSQLServerVulnerabilityAssessmentInitParameters struct { - // The recurring scans settings. The recurring_scans block supports fields documented below. - RecurringScans []MSSQLServerVulnerabilityAssessmentRecurringScansInitParameters `json:"recurringScans,omitempty" tf:"recurring_scans,omitempty"` - // A blob storage container path to hold the scan results (e.g. https://example.blob.core.windows.net/VaScans/). - StorageContainerPath *string `json:"storageContainerPath,omitempty" tf:"storage_container_path,omitempty"` +// The recurring scans settings. The recurring_scans block supports fields documented below. +RecurringScans []MSSQLServerVulnerabilityAssessmentRecurringScansInitParameters `json:"recurringScans,omitempty" tf:"recurring_scans,omitempty"` + +// A blob storage container path to hold the scan results (e.g. https://example.blob.core.windows.net/VaScans/). +StorageContainerPath *string `json:"storageContainerPath,omitempty" tf:"storage_container_path,omitempty"` } + type MSSQLServerVulnerabilityAssessmentObservation struct { - // The ID of the MS SQL Server Vulnerability Assessment. - ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The recurring scans settings. The recurring_scans block supports fields documented below. - RecurringScans []MSSQLServerVulnerabilityAssessmentRecurringScansObservation `json:"recurringScans,omitempty" tf:"recurring_scans,omitempty"` +// The ID of the MS SQL Server Vulnerability Assessment. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The id of the security alert policy of the MS SQL Server. Changing this forces a new resource to be created. - ServerSecurityAlertPolicyID *string `json:"serverSecurityAlertPolicyId,omitempty" tf:"server_security_alert_policy_id,omitempty"` +// The recurring scans settings. The recurring_scans block supports fields documented below. +RecurringScans []MSSQLServerVulnerabilityAssessmentRecurringScansObservation `json:"recurringScans,omitempty" tf:"recurring_scans,omitempty"` - // A blob storage container path to hold the scan results (e.g. https://example.blob.core.windows.net/VaScans/). - StorageContainerPath *string `json:"storageContainerPath,omitempty" tf:"storage_container_path,omitempty"` +// The id of the security alert policy of the MS SQL Server. Changing this forces a new resource to be created. +ServerSecurityAlertPolicyID *string `json:"serverSecurityAlertPolicyId,omitempty" tf:"server_security_alert_policy_id,omitempty"` + +// A blob storage container path to hold the scan results (e.g. https://example.blob.core.windows.net/VaScans/). +StorageContainerPath *string `json:"storageContainerPath,omitempty" tf:"storage_container_path,omitempty"` } + type MSSQLServerVulnerabilityAssessmentParameters struct { - // The recurring scans settings. The recurring_scans block supports fields documented below. - // +kubebuilder:validation:Optional - RecurringScans []MSSQLServerVulnerabilityAssessmentRecurringScansParameters `json:"recurringScans,omitempty" tf:"recurring_scans,omitempty"` - // The id of the security alert policy of the MS SQL Server. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/sql/v1alpha1.MSSQLServerSecurityAlertPolicy - // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() - // +kubebuilder:validation:Optional - ServerSecurityAlertPolicyID *string `json:"serverSecurityAlertPolicyId,omitempty" tf:"server_security_alert_policy_id,omitempty"` +// The recurring scans settings. The recurring_scans block supports fields documented below. +// +kubebuilder:validation:Optional +RecurringScans []MSSQLServerVulnerabilityAssessmentRecurringScansParameters `json:"recurringScans,omitempty" tf:"recurring_scans,omitempty"` - // Reference to a MSSQLServerSecurityAlertPolicy in sql to populate serverSecurityAlertPolicyId. - // +kubebuilder:validation:Optional - ServerSecurityAlertPolicyIDRef *v1.Reference `json:"serverSecurityAlertPolicyIdRef,omitempty" tf:"-"` +// The id of the security alert policy of the MS SQL Server. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/sql/v1alpha1.MSSQLServerSecurityAlertPolicy +// +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() +// +kubebuilder:validation:Optional +ServerSecurityAlertPolicyID *string `json:"serverSecurityAlertPolicyId,omitempty" tf:"server_security_alert_policy_id,omitempty"` - // Selector for a MSSQLServerSecurityAlertPolicy in sql to populate serverSecurityAlertPolicyId. - // +kubebuilder:validation:Optional - ServerSecurityAlertPolicyIDSelector *v1.Selector `json:"serverSecurityAlertPolicyIdSelector,omitempty" tf:"-"` +// Reference to a MSSQLServerSecurityAlertPolicy in sql to populate serverSecurityAlertPolicyId. +// +kubebuilder:validation:Optional +ServerSecurityAlertPolicyIDRef *v1.Reference `json:"serverSecurityAlertPolicyIdRef,omitempty" tf:"-"` - // Specifies the identifier key of the storage account for vulnerability assessment scan results. If storage_container_sas_key isn't specified, storage_account_access_key is required. - // +kubebuilder:validation:Optional - StorageAccountAccessKeySecretRef *v1.SecretKeySelector `json:"storageAccountAccessKeySecretRef,omitempty" tf:"-"` +// Selector for a MSSQLServerSecurityAlertPolicy in sql to populate serverSecurityAlertPolicyId. +// +kubebuilder:validation:Optional +ServerSecurityAlertPolicyIDSelector *v1.Selector `json:"serverSecurityAlertPolicyIdSelector,omitempty" tf:"-"` - // A blob storage container path to hold the scan results (e.g. https://example.blob.core.windows.net/VaScans/). - // +kubebuilder:validation:Optional - StorageContainerPath *string `json:"storageContainerPath,omitempty" tf:"storage_container_path,omitempty"` +// Specifies the identifier key of the storage account for vulnerability assessment scan results. If storage_container_sas_key isn't specified, storage_account_access_key is required. +// +kubebuilder:validation:Optional +StorageAccountAccessKeySecretRef *v1.SecretKeySelector `json:"storageAccountAccessKeySecretRef,omitempty" tf:"-"` - // A shared access signature (SAS Key) that has write access to the blob container specified in storage_container_path parameter. If storage_account_access_key isn't specified, storage_container_sas_key is required. - // +kubebuilder:validation:Optional - StorageContainerSasKeySecretRef *v1.SecretKeySelector `json:"storageContainerSasKeySecretRef,omitempty" tf:"-"` +// A blob storage container path to hold the scan results (e.g. https://example.blob.core.windows.net/VaScans/). +// +kubebuilder:validation:Optional +StorageContainerPath *string `json:"storageContainerPath,omitempty" tf:"storage_container_path,omitempty"` + +// A shared access signature (SAS Key) that has write access to the blob container specified in storage_container_path parameter. If storage_account_access_key isn't specified, storage_container_sas_key is required. +// +kubebuilder:validation:Optional +StorageContainerSasKeySecretRef *v1.SecretKeySelector `json:"storageContainerSasKeySecretRef,omitempty" tf:"-"` } + type MSSQLServerVulnerabilityAssessmentRecurringScansInitParameters struct { - // Boolean flag which specifies if the schedule scan notification will be sent to the subscription administrators. Defaults to false. - EmailSubscriptionAdmins *bool `json:"emailSubscriptionAdmins,omitempty" tf:"email_subscription_admins,omitempty"` - // Specifies an array of email addresses to which the scan notification is sent. - Emails []*string `json:"emails,omitempty" tf:"emails,omitempty"` +// Boolean flag which specifies if the schedule scan notification will be sent to the subscription administrators. Defaults to false. +EmailSubscriptionAdmins *bool `json:"emailSubscriptionAdmins,omitempty" tf:"email_subscription_admins,omitempty"` - // Boolean flag which specifies if recurring scans is enabled or disabled. Defaults to false. - Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` +// Specifies an array of email addresses to which the scan notification is sent. +Emails []*string `json:"emails,omitempty" tf:"emails,omitempty"` + +// Boolean flag which specifies if recurring scans is enabled or disabled. Defaults to false. +Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` } + type MSSQLServerVulnerabilityAssessmentRecurringScansObservation struct { - // Boolean flag which specifies if the schedule scan notification will be sent to the subscription administrators. Defaults to false. - EmailSubscriptionAdmins *bool `json:"emailSubscriptionAdmins,omitempty" tf:"email_subscription_admins,omitempty"` - // Specifies an array of email addresses to which the scan notification is sent. - Emails []*string `json:"emails,omitempty" tf:"emails,omitempty"` +// Boolean flag which specifies if the schedule scan notification will be sent to the subscription administrators. Defaults to false. +EmailSubscriptionAdmins *bool `json:"emailSubscriptionAdmins,omitempty" tf:"email_subscription_admins,omitempty"` - // Boolean flag which specifies if recurring scans is enabled or disabled. Defaults to false. - Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` +// Specifies an array of email addresses to which the scan notification is sent. +Emails []*string `json:"emails,omitempty" tf:"emails,omitempty"` + +// Boolean flag which specifies if recurring scans is enabled or disabled. Defaults to false. +Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` } + type MSSQLServerVulnerabilityAssessmentRecurringScansParameters struct { - // Boolean flag which specifies if the schedule scan notification will be sent to the subscription administrators. Defaults to false. - // +kubebuilder:validation:Optional - EmailSubscriptionAdmins *bool `json:"emailSubscriptionAdmins,omitempty" tf:"email_subscription_admins,omitempty"` - // Specifies an array of email addresses to which the scan notification is sent. - // +kubebuilder:validation:Optional - Emails []*string `json:"emails,omitempty" tf:"emails,omitempty"` +// Boolean flag which specifies if the schedule scan notification will be sent to the subscription administrators. Defaults to false. +// +kubebuilder:validation:Optional +EmailSubscriptionAdmins *bool `json:"emailSubscriptionAdmins,omitempty" tf:"email_subscription_admins,omitempty"` + +// Specifies an array of email addresses to which the scan notification is sent. +// +kubebuilder:validation:Optional +Emails []*string `json:"emails,omitempty" tf:"emails,omitempty"` - // Boolean flag which specifies if recurring scans is enabled or disabled. Defaults to false. - // +kubebuilder:validation:Optional - Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` +// Boolean flag which specifies if recurring scans is enabled or disabled. Defaults to false. +// +kubebuilder:validation:Optional +Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` } // MSSQLServerVulnerabilityAssessmentSpec defines the desired state of MSSQLServerVulnerabilityAssessment type MSSQLServerVulnerabilityAssessmentSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider MSSQLServerVulnerabilityAssessmentParameters `json:"forProvider"` + ForProvider MSSQLServerVulnerabilityAssessmentParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -127,13 +142,13 @@ type MSSQLServerVulnerabilityAssessmentSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider MSSQLServerVulnerabilityAssessmentInitParameters `json:"initProvider,omitempty"` + InitProvider MSSQLServerVulnerabilityAssessmentInitParameters `json:"initProvider,omitempty"` } // MSSQLServerVulnerabilityAssessmentStatus defines the observed state of MSSQLServerVulnerabilityAssessment. type MSSQLServerVulnerabilityAssessmentStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider MSSQLServerVulnerabilityAssessmentObservation `json:"atProvider,omitempty"` + AtProvider MSSQLServerVulnerabilityAssessmentObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -148,9 +163,9 @@ type MSSQLServerVulnerabilityAssessmentStatus struct { type MSSQLServerVulnerabilityAssessment struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.storageContainerPath) || (has(self.initProvider) && has(self.initProvider.storageContainerPath))",message="spec.forProvider.storageContainerPath is a required parameter" - Spec MSSQLServerVulnerabilityAssessmentSpec `json:"spec"` - Status MSSQLServerVulnerabilityAssessmentStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.storageContainerPath) || (has(self.initProvider) && has(self.initProvider.storageContainerPath))",message="spec.forProvider.storageContainerPath is a required parameter" + Spec MSSQLServerVulnerabilityAssessmentSpec `json:"spec"` + Status MSSQLServerVulnerabilityAssessmentStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/sql/v1alpha1/zz_mssqlvirtualnetworkrule_types.go b/apis/sql/v1alpha1/zz_mssqlvirtualnetworkrule_types.go index 9227a73..f3d907c 100755 --- a/apis/sql/v1alpha1/zz_mssqlvirtualnetworkrule_types.go +++ b/apis/sql/v1alpha1/zz_mssqlvirtualnetworkrule_types.go @@ -15,68 +15,77 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type MSSQLVirtualNetworkRuleInitParameters struct { - // Create the virtual network rule before the subnet has the virtual network service endpoint enabled. Defaults to false. - IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty" tf:"ignore_missing_vnet_service_endpoint,omitempty"` + +// Create the virtual network rule before the subnet has the virtual network service endpoint enabled. Defaults to false. +IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty" tf:"ignore_missing_vnet_service_endpoint,omitempty"` } + type MSSQLVirtualNetworkRuleObservation struct { - // The ID of the SQL virtual network rule. - ID *string `json:"id,omitempty" tf:"id,omitempty"` - // Create the virtual network rule before the subnet has the virtual network service endpoint enabled. Defaults to false. - IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty" tf:"ignore_missing_vnet_service_endpoint,omitempty"` +// The ID of the SQL virtual network rule. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The resource ID of the SQL Server to which this SQL virtual network rule will be applied. Changing this forces a new resource to be created. - ServerID *string `json:"serverId,omitempty" tf:"server_id,omitempty"` +// Create the virtual network rule before the subnet has the virtual network service endpoint enabled. Defaults to false. +IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty" tf:"ignore_missing_vnet_service_endpoint,omitempty"` - // The ID of the subnet from which the SQL server will accept communications. - SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"` +// The resource ID of the SQL Server to which this SQL virtual network rule will be applied. Changing this forces a new resource to be created. +ServerID *string `json:"serverId,omitempty" tf:"server_id,omitempty"` + +// The ID of the subnet from which the SQL server will accept communications. +SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"` } + type MSSQLVirtualNetworkRuleParameters struct { - // Create the virtual network rule before the subnet has the virtual network service endpoint enabled. Defaults to false. - // +kubebuilder:validation:Optional - IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty" tf:"ignore_missing_vnet_service_endpoint,omitempty"` - - // The resource ID of the SQL Server to which this SQL virtual network rule will be applied. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=MSSQLServer - // +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() - // +kubebuilder:validation:Optional - ServerID *string `json:"serverId,omitempty" tf:"server_id,omitempty"` - - // Reference to a MSSQLServer to populate serverId. - // +kubebuilder:validation:Optional - ServerIDRef *v1.Reference `json:"serverIdRef,omitempty" tf:"-"` - - // Selector for a MSSQLServer to populate serverId. - // +kubebuilder:validation:Optional - ServerIDSelector *v1.Selector `json:"serverIdSelector,omitempty" tf:"-"` - - // The ID of the subnet from which the SQL server will accept communications. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/network/v1alpha1.Subnet - // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() - // +kubebuilder:validation:Optional - SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"` - - // Reference to a Subnet in network to populate subnetId. - // +kubebuilder:validation:Optional - SubnetIDRef *v1.Reference `json:"subnetIdRef,omitempty" tf:"-"` - - // Selector for a Subnet in network to populate subnetId. - // +kubebuilder:validation:Optional - SubnetIDSelector *v1.Selector `json:"subnetIdSelector,omitempty" tf:"-"` + +// Create the virtual network rule before the subnet has the virtual network service endpoint enabled. Defaults to false. +// +kubebuilder:validation:Optional +IgnoreMissingVnetServiceEndpoint *bool `json:"ignoreMissingVnetServiceEndpoint,omitempty" tf:"ignore_missing_vnet_service_endpoint,omitempty"` + +// The resource ID of the SQL Server to which this SQL virtual network rule will be applied. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=MSSQLServer +// +crossplane:generate:reference:extractor=kubedb.dev/provider-azure/apis/rconfig.ExtractResourceID() +// +kubebuilder:validation:Optional +ServerID *string `json:"serverId,omitempty" tf:"server_id,omitempty"` + +// Reference to a MSSQLServer to populate serverId. +// +kubebuilder:validation:Optional +ServerIDRef *v1.Reference `json:"serverIdRef,omitempty" tf:"-"` + +// Selector for a MSSQLServer to populate serverId. +// +kubebuilder:validation:Optional +ServerIDSelector *v1.Selector `json:"serverIdSelector,omitempty" tf:"-"` + +// The ID of the subnet from which the SQL server will accept communications. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/network/v1alpha1.Subnet +// +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() +// +kubebuilder:validation:Optional +SubnetID *string `json:"subnetId,omitempty" tf:"subnet_id,omitempty"` + +// Reference to a Subnet in network to populate subnetId. +// +kubebuilder:validation:Optional +SubnetIDRef *v1.Reference `json:"subnetIdRef,omitempty" tf:"-"` + +// Selector for a Subnet in network to populate subnetId. +// +kubebuilder:validation:Optional +SubnetIDSelector *v1.Selector `json:"subnetIdSelector,omitempty" tf:"-"` } // MSSQLVirtualNetworkRuleSpec defines the desired state of MSSQLVirtualNetworkRule type MSSQLVirtualNetworkRuleSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider MSSQLVirtualNetworkRuleParameters `json:"forProvider"` + ForProvider MSSQLVirtualNetworkRuleParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -87,13 +96,13 @@ type MSSQLVirtualNetworkRuleSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider MSSQLVirtualNetworkRuleInitParameters `json:"initProvider,omitempty"` + InitProvider MSSQLVirtualNetworkRuleInitParameters `json:"initProvider,omitempty"` } // MSSQLVirtualNetworkRuleStatus defines the observed state of MSSQLVirtualNetworkRule. type MSSQLVirtualNetworkRuleStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider MSSQLVirtualNetworkRuleObservation `json:"atProvider,omitempty"` + AtProvider MSSQLVirtualNetworkRuleObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/storage/v1alpha1/zz_account_types.go b/apis/storage/v1alpha1/zz_account_types.go index ca95991..acadae8 100755 --- a/apis/storage/v1alpha1/zz_account_types.go +++ b/apis/storage/v1alpha1/zz_account_types.go @@ -15,1538 +15,1697 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type AccountInitParameters struct { - // Defines the access tier for BlobStorage, FileStorage and StorageV2 accounts. Valid options are Hot and Cool, defaults to Hot. - AccessTier *string `json:"accessTier,omitempty" tf:"access_tier,omitempty"` - // Defines the Kind of account. Valid options are BlobStorage, BlockBlobStorage, FileStorage, Storage and StorageV2. Defaults to StorageV2. - AccountKind *string `json:"accountKind,omitempty" tf:"account_kind,omitempty"` +// Defines the access tier for BlobStorage, FileStorage and StorageV2 accounts. Valid options are Hot and Cool, defaults to Hot. +AccessTier *string `json:"accessTier,omitempty" tf:"access_tier,omitempty"` + +// Defines the Kind of account. Valid options are BlobStorage, BlockBlobStorage, FileStorage, Storage and StorageV2. Defaults to StorageV2. +AccountKind *string `json:"accountKind,omitempty" tf:"account_kind,omitempty"` - // Defines the type of replication to use for this storage account. Valid options are LRS, GRS, RAGRS, ZRS, GZRS and RAGZRS. - AccountReplicationType *string `json:"accountReplicationType,omitempty" tf:"account_replication_type,omitempty"` +// Defines the type of replication to use for this storage account. Valid options are LRS, GRS, RAGRS, ZRS, GZRS and RAGZRS. +AccountReplicationType *string `json:"accountReplicationType,omitempty" tf:"account_replication_type,omitempty"` - // Defines the Tier to use for this storage account. Valid options are Standard and Premium. For BlockBlobStorage and FileStorage accounts only Premium is valid. Changing this forces a new resource to be created. - AccountTier *string `json:"accountTier,omitempty" tf:"account_tier,omitempty"` +// Defines the Tier to use for this storage account. Valid options are Standard and Premium. For BlockBlobStorage and FileStorage accounts only Premium is valid. Changing this forces a new resource to be created. +AccountTier *string `json:"accountTier,omitempty" tf:"account_tier,omitempty"` - // Allow or disallow nested items within this Account to opt into being public. Defaults to true. - AllowNestedItemsToBePublic *bool `json:"allowNestedItemsToBePublic,omitempty" tf:"allow_nested_items_to_be_public,omitempty"` +// Allow or disallow nested items within this Account to opt into being public. Defaults to true. +AllowNestedItemsToBePublic *bool `json:"allowNestedItemsToBePublic,omitempty" tf:"allow_nested_items_to_be_public,omitempty"` - // Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet. Possible values are AAD and PrivateLink. - AllowedCopyScope *string `json:"allowedCopyScope,omitempty" tf:"allowed_copy_scope,omitempty"` +// Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet. Possible values are AAD and PrivateLink. +AllowedCopyScope *string `json:"allowedCopyScope,omitempty" tf:"allowed_copy_scope,omitempty"` - // A azure_files_authentication block as defined below. - AzureFilesAuthentication []AzureFilesAuthenticationInitParameters `json:"azureFilesAuthentication,omitempty" tf:"azure_files_authentication,omitempty"` +// A azure_files_authentication block as defined below. +AzureFilesAuthentication []AzureFilesAuthenticationInitParameters `json:"azureFilesAuthentication,omitempty" tf:"azure_files_authentication,omitempty"` - // A blob_properties block as defined below. - BlobProperties []BlobPropertiesInitParameters `json:"blobProperties,omitempty" tf:"blob_properties,omitempty"` +// A blob_properties block as defined below. +BlobProperties []BlobPropertiesInitParameters `json:"blobProperties,omitempty" tf:"blob_properties,omitempty"` - // Should cross Tenant replication be enabled? Defaults to true. - CrossTenantReplicationEnabled *bool `json:"crossTenantReplicationEnabled,omitempty" tf:"cross_tenant_replication_enabled,omitempty"` +// Should cross Tenant replication be enabled? Defaults to true. +CrossTenantReplicationEnabled *bool `json:"crossTenantReplicationEnabled,omitempty" tf:"cross_tenant_replication_enabled,omitempty"` - // A custom_domain block as documented below. - CustomDomain []CustomDomainInitParameters `json:"customDomain,omitempty" tf:"custom_domain,omitempty"` +// A custom_domain block as documented below. +CustomDomain []CustomDomainInitParameters `json:"customDomain,omitempty" tf:"custom_domain,omitempty"` - // A customer_managed_key block as documented below. - CustomerManagedKey []CustomerManagedKeyInitParameters `json:"customerManagedKey,omitempty" tf:"customer_managed_key,omitempty"` +// A customer_managed_key block as documented below. +CustomerManagedKey []CustomerManagedKeyInitParameters `json:"customerManagedKey,omitempty" tf:"customer_managed_key,omitempty"` - // Default to Azure Active Directory authorization in the Azure portal when accessing the Storage Account. The default value is false - DefaultToOauthAuthentication *bool `json:"defaultToOauthAuthentication,omitempty" tf:"default_to_oauth_authentication,omitempty"` +// Default to Azure Active Directory authorization in the Azure portal when accessing the Storage Account. The default value is false +DefaultToOauthAuthentication *bool `json:"defaultToOauthAuthentication,omitempty" tf:"default_to_oauth_authentication,omitempty"` - // Specifies the Edge Zone within the Azure Region where this Storage Account should exist. Changing this forces a new Storage Account to be created. - EdgeZone *string `json:"edgeZone,omitempty" tf:"edge_zone,omitempty"` +// Specifies the Edge Zone within the Azure Region where this Storage Account should exist. Changing this forces a new Storage Account to be created. +EdgeZone *string `json:"edgeZone,omitempty" tf:"edge_zone,omitempty"` - // Boolean flag which forces HTTPS if enabled, see here for more information. Defaults to true. - EnableHTTPSTrafficOnly *bool `json:"enableHttpsTrafficOnly,omitempty" tf:"enable_https_traffic_only,omitempty"` +// Boolean flag which forces HTTPS if enabled, see here for more information. Defaults to true. +EnableHTTPSTrafficOnly *bool `json:"enableHttpsTrafficOnly,omitempty" tf:"enable_https_traffic_only,omitempty"` - // An identity block as defined below. - Identity []IdentityInitParameters `json:"identity,omitempty" tf:"identity,omitempty"` +// An identity block as defined below. +Identity []IdentityInitParameters `json:"identity,omitempty" tf:"identity,omitempty"` - // An immutability_policy block as defined below. Changing this forces a new resource to be created. - ImmutabilityPolicy []ImmutabilityPolicyInitParameters `json:"immutabilityPolicy,omitempty" tf:"immutability_policy,omitempty"` +// An immutability_policy block as defined below. Changing this forces a new resource to be created. +ImmutabilityPolicy []ImmutabilityPolicyInitParameters `json:"immutabilityPolicy,omitempty" tf:"immutability_policy,omitempty"` - // Is infrastructure encryption enabled? Changing this forces a new resource to be created. Defaults to false. - InfrastructureEncryptionEnabled *bool `json:"infrastructureEncryptionEnabled,omitempty" tf:"infrastructure_encryption_enabled,omitempty"` +// Is infrastructure encryption enabled? Changing this forces a new resource to be created. Defaults to false. +InfrastructureEncryptionEnabled *bool `json:"infrastructureEncryptionEnabled,omitempty" tf:"infrastructure_encryption_enabled,omitempty"` - // Is Hierarchical Namespace enabled? This can be used with Azure Data Lake Storage Gen 2 (see here for more information). Changing this forces a new resource to be created. - IsHnsEnabled *bool `json:"isHnsEnabled,omitempty" tf:"is_hns_enabled,omitempty"` +// Is Hierarchical Namespace enabled? This can be used with Azure Data Lake Storage Gen 2 (see here for more information). Changing this forces a new resource to be created. +IsHnsEnabled *bool `json:"isHnsEnabled,omitempty" tf:"is_hns_enabled,omitempty"` - // Is Large File Share Enabled? - LargeFileShareEnabled *bool `json:"largeFileShareEnabled,omitempty" tf:"large_file_share_enabled,omitempty"` +// Is Large File Share Enabled? +LargeFileShareEnabled *bool `json:"largeFileShareEnabled,omitempty" tf:"large_file_share_enabled,omitempty"` - // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // The minimum supported TLS version for the storage account. Possible values are TLS1_0, TLS1_1, and TLS1_2. Defaults to TLS1_2 for new storage accounts. - MinTLSVersion *string `json:"minTlsVersion,omitempty" tf:"min_tls_version,omitempty"` +// The minimum supported TLS version for the storage account. Possible values are TLS1_0, TLS1_1, and TLS1_2. Defaults to TLS1_2 for new storage accounts. +MinTLSVersion *string `json:"minTlsVersion,omitempty" tf:"min_tls_version,omitempty"` - // A network_rules block as documented below. - NetworkRules []NetworkRulesInitParameters `json:"networkRules,omitempty" tf:"network_rules,omitempty"` +// A network_rules block as documented below. +NetworkRules []NetworkRulesInitParameters `json:"networkRules,omitempty" tf:"network_rules,omitempty"` - // Is NFSv3 protocol enabled? Changing this forces a new resource to be created. Defaults to false. - Nfsv3Enabled *bool `json:"nfsv3Enabled,omitempty" tf:"nfsv3_enabled,omitempty"` +// Is NFSv3 protocol enabled? Changing this forces a new resource to be created. Defaults to false. +Nfsv3Enabled *bool `json:"nfsv3Enabled,omitempty" tf:"nfsv3_enabled,omitempty"` - // Whether the public network access is enabled? Defaults to true. - PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` +// Whether the public network access is enabled? Defaults to true. +PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` - // The encryption type of the queue service. Possible values are Service and Account. Changing this forces a new resource to be created. Default value is Service. - QueueEncryptionKeyType *string `json:"queueEncryptionKeyType,omitempty" tf:"queue_encryption_key_type,omitempty"` +// The encryption type of the queue service. Possible values are Service and Account. Changing this forces a new resource to be created. Default value is Service. +QueueEncryptionKeyType *string `json:"queueEncryptionKeyType,omitempty" tf:"queue_encryption_key_type,omitempty"` - // A queue_properties block as defined below. - QueueProperties []QueuePropertiesInitParameters `json:"queueProperties,omitempty" tf:"queue_properties,omitempty"` +// A queue_properties block as defined below. +QueueProperties []QueuePropertiesInitParameters `json:"queueProperties,omitempty" tf:"queue_properties,omitempty"` - // A routing block as defined below. - Routing []RoutingInitParameters `json:"routing,omitempty" tf:"routing,omitempty"` +// A routing block as defined below. +Routing []RoutingInitParameters `json:"routing,omitempty" tf:"routing,omitempty"` - // A sas_policy block as defined below. - SasPolicy []SasPolicyInitParameters `json:"sasPolicy,omitempty" tf:"sas_policy,omitempty"` +// A sas_policy block as defined below. +SasPolicy []SasPolicyInitParameters `json:"sasPolicy,omitempty" tf:"sas_policy,omitempty"` - // Boolean, enable SFTP for the storage account - SftpEnabled *bool `json:"sftpEnabled,omitempty" tf:"sftp_enabled,omitempty"` +// Boolean, enable SFTP for the storage account +SftpEnabled *bool `json:"sftpEnabled,omitempty" tf:"sftp_enabled,omitempty"` - // A share_properties block as defined below. - ShareProperties []SharePropertiesInitParameters `json:"shareProperties,omitempty" tf:"share_properties,omitempty"` +// A share_properties block as defined below. +ShareProperties []SharePropertiesInitParameters `json:"shareProperties,omitempty" tf:"share_properties,omitempty"` - // Indicates whether the storage account permits requests to be authorized with the account access key via Shared Key. If false, then all requests, including shared access signatures, must be authorized with Azure Active Directory (Azure AD). The default value is true. - SharedAccessKeyEnabled *bool `json:"sharedAccessKeyEnabled,omitempty" tf:"shared_access_key_enabled,omitempty"` +// Indicates whether the storage account permits requests to be authorized with the account access key via Shared Key. If false, then all requests, including shared access signatures, must be authorized with Azure Active Directory (Azure AD). The default value is true. +SharedAccessKeyEnabled *bool `json:"sharedAccessKeyEnabled,omitempty" tf:"shared_access_key_enabled,omitempty"` - // A static_website block as defined below. - StaticWebsite []StaticWebsiteInitParameters `json:"staticWebsite,omitempty" tf:"static_website,omitempty"` +// A static_website block as defined below. +StaticWebsite []StaticWebsiteInitParameters `json:"staticWebsite,omitempty" tf:"static_website,omitempty"` - // The encryption type of the table service. Possible values are Service and Account. Changing this forces a new resource to be created. Default value is Service. - TableEncryptionKeyType *string `json:"tableEncryptionKeyType,omitempty" tf:"table_encryption_key_type,omitempty"` +// The encryption type of the table service. Possible values are Service and Account. Changing this forces a new resource to be created. Default value is Service. +TableEncryptionKeyType *string `json:"tableEncryptionKeyType,omitempty" tf:"table_encryption_key_type,omitempty"` - // A mapping of tags to assign to the resource. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A mapping of tags to assign to the resource. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` } + type AccountObservation struct { - // Defines the access tier for BlobStorage, FileStorage and StorageV2 accounts. Valid options are Hot and Cool, defaults to Hot. - AccessTier *string `json:"accessTier,omitempty" tf:"access_tier,omitempty"` - // Defines the Kind of account. Valid options are BlobStorage, BlockBlobStorage, FileStorage, Storage and StorageV2. Defaults to StorageV2. - AccountKind *string `json:"accountKind,omitempty" tf:"account_kind,omitempty"` +// Defines the access tier for BlobStorage, FileStorage and StorageV2 accounts. Valid options are Hot and Cool, defaults to Hot. +AccessTier *string `json:"accessTier,omitempty" tf:"access_tier,omitempty"` + +// Defines the Kind of account. Valid options are BlobStorage, BlockBlobStorage, FileStorage, Storage and StorageV2. Defaults to StorageV2. +AccountKind *string `json:"accountKind,omitempty" tf:"account_kind,omitempty"` - // Defines the type of replication to use for this storage account. Valid options are LRS, GRS, RAGRS, ZRS, GZRS and RAGZRS. - AccountReplicationType *string `json:"accountReplicationType,omitempty" tf:"account_replication_type,omitempty"` +// Defines the type of replication to use for this storage account. Valid options are LRS, GRS, RAGRS, ZRS, GZRS and RAGZRS. +AccountReplicationType *string `json:"accountReplicationType,omitempty" tf:"account_replication_type,omitempty"` - // Defines the Tier to use for this storage account. Valid options are Standard and Premium. For BlockBlobStorage and FileStorage accounts only Premium is valid. Changing this forces a new resource to be created. - AccountTier *string `json:"accountTier,omitempty" tf:"account_tier,omitempty"` +// Defines the Tier to use for this storage account. Valid options are Standard and Premium. For BlockBlobStorage and FileStorage accounts only Premium is valid. Changing this forces a new resource to be created. +AccountTier *string `json:"accountTier,omitempty" tf:"account_tier,omitempty"` - // Allow or disallow nested items within this Account to opt into being public. Defaults to true. - AllowNestedItemsToBePublic *bool `json:"allowNestedItemsToBePublic,omitempty" tf:"allow_nested_items_to_be_public,omitempty"` +// Allow or disallow nested items within this Account to opt into being public. Defaults to true. +AllowNestedItemsToBePublic *bool `json:"allowNestedItemsToBePublic,omitempty" tf:"allow_nested_items_to_be_public,omitempty"` - // Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet. Possible values are AAD and PrivateLink. - AllowedCopyScope *string `json:"allowedCopyScope,omitempty" tf:"allowed_copy_scope,omitempty"` +// Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet. Possible values are AAD and PrivateLink. +AllowedCopyScope *string `json:"allowedCopyScope,omitempty" tf:"allowed_copy_scope,omitempty"` - // A azure_files_authentication block as defined below. - AzureFilesAuthentication []AzureFilesAuthenticationObservation `json:"azureFilesAuthentication,omitempty" tf:"azure_files_authentication,omitempty"` +// A azure_files_authentication block as defined below. +AzureFilesAuthentication []AzureFilesAuthenticationObservation `json:"azureFilesAuthentication,omitempty" tf:"azure_files_authentication,omitempty"` - // A blob_properties block as defined below. - BlobProperties []BlobPropertiesObservation `json:"blobProperties,omitempty" tf:"blob_properties,omitempty"` +// A blob_properties block as defined below. +BlobProperties []BlobPropertiesObservation `json:"blobProperties,omitempty" tf:"blob_properties,omitempty"` - // Should cross Tenant replication be enabled? Defaults to true. - CrossTenantReplicationEnabled *bool `json:"crossTenantReplicationEnabled,omitempty" tf:"cross_tenant_replication_enabled,omitempty"` +// Should cross Tenant replication be enabled? Defaults to true. +CrossTenantReplicationEnabled *bool `json:"crossTenantReplicationEnabled,omitempty" tf:"cross_tenant_replication_enabled,omitempty"` - // A custom_domain block as documented below. - CustomDomain []CustomDomainObservation `json:"customDomain,omitempty" tf:"custom_domain,omitempty"` +// A custom_domain block as documented below. +CustomDomain []CustomDomainObservation `json:"customDomain,omitempty" tf:"custom_domain,omitempty"` - // A customer_managed_key block as documented below. - CustomerManagedKey []CustomerManagedKeyObservation `json:"customerManagedKey,omitempty" tf:"customer_managed_key,omitempty"` +// A customer_managed_key block as documented below. +CustomerManagedKey []CustomerManagedKeyObservation `json:"customerManagedKey,omitempty" tf:"customer_managed_key,omitempty"` - // Default to Azure Active Directory authorization in the Azure portal when accessing the Storage Account. The default value is false - DefaultToOauthAuthentication *bool `json:"defaultToOauthAuthentication,omitempty" tf:"default_to_oauth_authentication,omitempty"` +// Default to Azure Active Directory authorization in the Azure portal when accessing the Storage Account. The default value is false +DefaultToOauthAuthentication *bool `json:"defaultToOauthAuthentication,omitempty" tf:"default_to_oauth_authentication,omitempty"` - // Specifies the Edge Zone within the Azure Region where this Storage Account should exist. Changing this forces a new Storage Account to be created. - EdgeZone *string `json:"edgeZone,omitempty" tf:"edge_zone,omitempty"` +// Specifies the Edge Zone within the Azure Region where this Storage Account should exist. Changing this forces a new Storage Account to be created. +EdgeZone *string `json:"edgeZone,omitempty" tf:"edge_zone,omitempty"` - // Boolean flag which forces HTTPS if enabled, see here for more information. Defaults to true. - EnableHTTPSTrafficOnly *bool `json:"enableHttpsTrafficOnly,omitempty" tf:"enable_https_traffic_only,omitempty"` +// Boolean flag which forces HTTPS if enabled, see here for more information. Defaults to true. +EnableHTTPSTrafficOnly *bool `json:"enableHttpsTrafficOnly,omitempty" tf:"enable_https_traffic_only,omitempty"` - // The ID of the Storage Account. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// The ID of the Storage Account. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // An identity block as defined below. - Identity []IdentityObservation `json:"identity,omitempty" tf:"identity,omitempty"` +// An identity block as defined below. +Identity []IdentityObservation `json:"identity,omitempty" tf:"identity,omitempty"` - // An immutability_policy block as defined below. Changing this forces a new resource to be created. - ImmutabilityPolicy []ImmutabilityPolicyObservation `json:"immutabilityPolicy,omitempty" tf:"immutability_policy,omitempty"` +// An immutability_policy block as defined below. Changing this forces a new resource to be created. +ImmutabilityPolicy []ImmutabilityPolicyObservation `json:"immutabilityPolicy,omitempty" tf:"immutability_policy,omitempty"` - // Is infrastructure encryption enabled? Changing this forces a new resource to be created. Defaults to false. - InfrastructureEncryptionEnabled *bool `json:"infrastructureEncryptionEnabled,omitempty" tf:"infrastructure_encryption_enabled,omitempty"` +// Is infrastructure encryption enabled? Changing this forces a new resource to be created. Defaults to false. +InfrastructureEncryptionEnabled *bool `json:"infrastructureEncryptionEnabled,omitempty" tf:"infrastructure_encryption_enabled,omitempty"` - // Is Hierarchical Namespace enabled? This can be used with Azure Data Lake Storage Gen 2 (see here for more information). Changing this forces a new resource to be created. - IsHnsEnabled *bool `json:"isHnsEnabled,omitempty" tf:"is_hns_enabled,omitempty"` +// Is Hierarchical Namespace enabled? This can be used with Azure Data Lake Storage Gen 2 (see here for more information). Changing this forces a new resource to be created. +IsHnsEnabled *bool `json:"isHnsEnabled,omitempty" tf:"is_hns_enabled,omitempty"` - // Is Large File Share Enabled? - LargeFileShareEnabled *bool `json:"largeFileShareEnabled,omitempty" tf:"large_file_share_enabled,omitempty"` +// Is Large File Share Enabled? +LargeFileShareEnabled *bool `json:"largeFileShareEnabled,omitempty" tf:"large_file_share_enabled,omitempty"` - // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // The minimum supported TLS version for the storage account. Possible values are TLS1_0, TLS1_1, and TLS1_2. Defaults to TLS1_2 for new storage accounts. - MinTLSVersion *string `json:"minTlsVersion,omitempty" tf:"min_tls_version,omitempty"` +// The minimum supported TLS version for the storage account. Possible values are TLS1_0, TLS1_1, and TLS1_2. Defaults to TLS1_2 for new storage accounts. +MinTLSVersion *string `json:"minTlsVersion,omitempty" tf:"min_tls_version,omitempty"` - // A network_rules block as documented below. - NetworkRules []NetworkRulesObservation `json:"networkRules,omitempty" tf:"network_rules,omitempty"` +// A network_rules block as documented below. +NetworkRules []NetworkRulesObservation `json:"networkRules,omitempty" tf:"network_rules,omitempty"` - // Is NFSv3 protocol enabled? Changing this forces a new resource to be created. Defaults to false. - Nfsv3Enabled *bool `json:"nfsv3Enabled,omitempty" tf:"nfsv3_enabled,omitempty"` +// Is NFSv3 protocol enabled? Changing this forces a new resource to be created. Defaults to false. +Nfsv3Enabled *bool `json:"nfsv3Enabled,omitempty" tf:"nfsv3_enabled,omitempty"` - // The endpoint URL for blob storage in the primary location. - PrimaryBlobEndpoint *string `json:"primaryBlobEndpoint,omitempty" tf:"primary_blob_endpoint,omitempty"` +// The endpoint URL for blob storage in the primary location. +PrimaryBlobEndpoint *string `json:"primaryBlobEndpoint,omitempty" tf:"primary_blob_endpoint,omitempty"` - // The hostname with port if applicable for blob storage in the primary location. - PrimaryBlobHost *string `json:"primaryBlobHost,omitempty" tf:"primary_blob_host,omitempty"` +// The hostname with port if applicable for blob storage in the primary location. +PrimaryBlobHost *string `json:"primaryBlobHost,omitempty" tf:"primary_blob_host,omitempty"` - // The endpoint URL for DFS storage in the primary location. - PrimaryDfsEndpoint *string `json:"primaryDfsEndpoint,omitempty" tf:"primary_dfs_endpoint,omitempty"` +// The endpoint URL for DFS storage in the primary location. +PrimaryDfsEndpoint *string `json:"primaryDfsEndpoint,omitempty" tf:"primary_dfs_endpoint,omitempty"` - // The hostname with port if applicable for DFS storage in the primary location. - PrimaryDfsHost *string `json:"primaryDfsHost,omitempty" tf:"primary_dfs_host,omitempty"` +// The hostname with port if applicable for DFS storage in the primary location. +PrimaryDfsHost *string `json:"primaryDfsHost,omitempty" tf:"primary_dfs_host,omitempty"` - // The endpoint URL for file storage in the primary location. - PrimaryFileEndpoint *string `json:"primaryFileEndpoint,omitempty" tf:"primary_file_endpoint,omitempty"` +// The endpoint URL for file storage in the primary location. +PrimaryFileEndpoint *string `json:"primaryFileEndpoint,omitempty" tf:"primary_file_endpoint,omitempty"` - // The hostname with port if applicable for file storage in the primary location. - PrimaryFileHost *string `json:"primaryFileHost,omitempty" tf:"primary_file_host,omitempty"` +// The hostname with port if applicable for file storage in the primary location. +PrimaryFileHost *string `json:"primaryFileHost,omitempty" tf:"primary_file_host,omitempty"` - // The primary location of the storage account. - PrimaryLocation *string `json:"primaryLocation,omitempty" tf:"primary_location,omitempty"` +// The primary location of the storage account. +PrimaryLocation *string `json:"primaryLocation,omitempty" tf:"primary_location,omitempty"` - // The endpoint URL for queue storage in the primary location. - PrimaryQueueEndpoint *string `json:"primaryQueueEndpoint,omitempty" tf:"primary_queue_endpoint,omitempty"` +// The endpoint URL for queue storage in the primary location. +PrimaryQueueEndpoint *string `json:"primaryQueueEndpoint,omitempty" tf:"primary_queue_endpoint,omitempty"` - // The hostname with port if applicable for queue storage in the primary location. - PrimaryQueueHost *string `json:"primaryQueueHost,omitempty" tf:"primary_queue_host,omitempty"` +// The hostname with port if applicable for queue storage in the primary location. +PrimaryQueueHost *string `json:"primaryQueueHost,omitempty" tf:"primary_queue_host,omitempty"` - // The endpoint URL for table storage in the primary location. - PrimaryTableEndpoint *string `json:"primaryTableEndpoint,omitempty" tf:"primary_table_endpoint,omitempty"` +// The endpoint URL for table storage in the primary location. +PrimaryTableEndpoint *string `json:"primaryTableEndpoint,omitempty" tf:"primary_table_endpoint,omitempty"` - // The hostname with port if applicable for table storage in the primary location. - PrimaryTableHost *string `json:"primaryTableHost,omitempty" tf:"primary_table_host,omitempty"` +// The hostname with port if applicable for table storage in the primary location. +PrimaryTableHost *string `json:"primaryTableHost,omitempty" tf:"primary_table_host,omitempty"` - // The endpoint URL for web storage in the primary location. - PrimaryWebEndpoint *string `json:"primaryWebEndpoint,omitempty" tf:"primary_web_endpoint,omitempty"` +// The endpoint URL for web storage in the primary location. +PrimaryWebEndpoint *string `json:"primaryWebEndpoint,omitempty" tf:"primary_web_endpoint,omitempty"` - // The hostname with port if applicable for web storage in the primary location. - PrimaryWebHost *string `json:"primaryWebHost,omitempty" tf:"primary_web_host,omitempty"` +// The hostname with port if applicable for web storage in the primary location. +PrimaryWebHost *string `json:"primaryWebHost,omitempty" tf:"primary_web_host,omitempty"` - // Whether the public network access is enabled? Defaults to true. - PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` +// Whether the public network access is enabled? Defaults to true. +PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` - // The encryption type of the queue service. Possible values are Service and Account. Changing this forces a new resource to be created. Default value is Service. - QueueEncryptionKeyType *string `json:"queueEncryptionKeyType,omitempty" tf:"queue_encryption_key_type,omitempty"` +// The encryption type of the queue service. Possible values are Service and Account. Changing this forces a new resource to be created. Default value is Service. +QueueEncryptionKeyType *string `json:"queueEncryptionKeyType,omitempty" tf:"queue_encryption_key_type,omitempty"` - // A queue_properties block as defined below. - QueueProperties []QueuePropertiesObservation `json:"queueProperties,omitempty" tf:"queue_properties,omitempty"` +// A queue_properties block as defined below. +QueueProperties []QueuePropertiesObservation `json:"queueProperties,omitempty" tf:"queue_properties,omitempty"` - // The name of the resource group in which to create the storage account. Changing this forces a new resource to be created. - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// The name of the resource group in which to create the storage account. Changing this forces a new resource to be created. +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // A routing block as defined below. - Routing []RoutingObservation `json:"routing,omitempty" tf:"routing,omitempty"` +// A routing block as defined below. +Routing []RoutingObservation `json:"routing,omitempty" tf:"routing,omitempty"` - // A sas_policy block as defined below. - SasPolicy []SasPolicyObservation `json:"sasPolicy,omitempty" tf:"sas_policy,omitempty"` +// A sas_policy block as defined below. +SasPolicy []SasPolicyObservation `json:"sasPolicy,omitempty" tf:"sas_policy,omitempty"` - // The endpoint URL for blob storage in the secondary location. - SecondaryBlobEndpoint *string `json:"secondaryBlobEndpoint,omitempty" tf:"secondary_blob_endpoint,omitempty"` +// The endpoint URL for blob storage in the secondary location. +SecondaryBlobEndpoint *string `json:"secondaryBlobEndpoint,omitempty" tf:"secondary_blob_endpoint,omitempty"` - // The hostname with port if applicable for blob storage in the secondary location. - SecondaryBlobHost *string `json:"secondaryBlobHost,omitempty" tf:"secondary_blob_host,omitempty"` +// The hostname with port if applicable for blob storage in the secondary location. +SecondaryBlobHost *string `json:"secondaryBlobHost,omitempty" tf:"secondary_blob_host,omitempty"` - // The endpoint URL for DFS storage in the secondary location. - SecondaryDfsEndpoint *string `json:"secondaryDfsEndpoint,omitempty" tf:"secondary_dfs_endpoint,omitempty"` +// The endpoint URL for DFS storage in the secondary location. +SecondaryDfsEndpoint *string `json:"secondaryDfsEndpoint,omitempty" tf:"secondary_dfs_endpoint,omitempty"` - // The hostname with port if applicable for DFS storage in the secondary location. - SecondaryDfsHost *string `json:"secondaryDfsHost,omitempty" tf:"secondary_dfs_host,omitempty"` +// The hostname with port if applicable for DFS storage in the secondary location. +SecondaryDfsHost *string `json:"secondaryDfsHost,omitempty" tf:"secondary_dfs_host,omitempty"` - // The endpoint URL for file storage in the secondary location. - SecondaryFileEndpoint *string `json:"secondaryFileEndpoint,omitempty" tf:"secondary_file_endpoint,omitempty"` +// The endpoint URL for file storage in the secondary location. +SecondaryFileEndpoint *string `json:"secondaryFileEndpoint,omitempty" tf:"secondary_file_endpoint,omitempty"` - // The hostname with port if applicable for file storage in the secondary location. - SecondaryFileHost *string `json:"secondaryFileHost,omitempty" tf:"secondary_file_host,omitempty"` +// The hostname with port if applicable for file storage in the secondary location. +SecondaryFileHost *string `json:"secondaryFileHost,omitempty" tf:"secondary_file_host,omitempty"` - // The secondary location of the storage account. - SecondaryLocation *string `json:"secondaryLocation,omitempty" tf:"secondary_location,omitempty"` +// The secondary location of the storage account. +SecondaryLocation *string `json:"secondaryLocation,omitempty" tf:"secondary_location,omitempty"` - // The endpoint URL for queue storage in the secondary location. - SecondaryQueueEndpoint *string `json:"secondaryQueueEndpoint,omitempty" tf:"secondary_queue_endpoint,omitempty"` +// The endpoint URL for queue storage in the secondary location. +SecondaryQueueEndpoint *string `json:"secondaryQueueEndpoint,omitempty" tf:"secondary_queue_endpoint,omitempty"` - // The hostname with port if applicable for queue storage in the secondary location. - SecondaryQueueHost *string `json:"secondaryQueueHost,omitempty" tf:"secondary_queue_host,omitempty"` +// The hostname with port if applicable for queue storage in the secondary location. +SecondaryQueueHost *string `json:"secondaryQueueHost,omitempty" tf:"secondary_queue_host,omitempty"` - // The endpoint URL for table storage in the secondary location. - SecondaryTableEndpoint *string `json:"secondaryTableEndpoint,omitempty" tf:"secondary_table_endpoint,omitempty"` +// The endpoint URL for table storage in the secondary location. +SecondaryTableEndpoint *string `json:"secondaryTableEndpoint,omitempty" tf:"secondary_table_endpoint,omitempty"` - // The hostname with port if applicable for table storage in the secondary location. - SecondaryTableHost *string `json:"secondaryTableHost,omitempty" tf:"secondary_table_host,omitempty"` +// The hostname with port if applicable for table storage in the secondary location. +SecondaryTableHost *string `json:"secondaryTableHost,omitempty" tf:"secondary_table_host,omitempty"` - // The endpoint URL for web storage in the secondary location. - SecondaryWebEndpoint *string `json:"secondaryWebEndpoint,omitempty" tf:"secondary_web_endpoint,omitempty"` +// The endpoint URL for web storage in the secondary location. +SecondaryWebEndpoint *string `json:"secondaryWebEndpoint,omitempty" tf:"secondary_web_endpoint,omitempty"` - // The hostname with port if applicable for web storage in the secondary location. - SecondaryWebHost *string `json:"secondaryWebHost,omitempty" tf:"secondary_web_host,omitempty"` +// The hostname with port if applicable for web storage in the secondary location. +SecondaryWebHost *string `json:"secondaryWebHost,omitempty" tf:"secondary_web_host,omitempty"` - // Boolean, enable SFTP for the storage account - SftpEnabled *bool `json:"sftpEnabled,omitempty" tf:"sftp_enabled,omitempty"` +// Boolean, enable SFTP for the storage account +SftpEnabled *bool `json:"sftpEnabled,omitempty" tf:"sftp_enabled,omitempty"` - // A share_properties block as defined below. - ShareProperties []SharePropertiesObservation `json:"shareProperties,omitempty" tf:"share_properties,omitempty"` +// A share_properties block as defined below. +ShareProperties []SharePropertiesObservation `json:"shareProperties,omitempty" tf:"share_properties,omitempty"` - // Indicates whether the storage account permits requests to be authorized with the account access key via Shared Key. If false, then all requests, including shared access signatures, must be authorized with Azure Active Directory (Azure AD). The default value is true. - SharedAccessKeyEnabled *bool `json:"sharedAccessKeyEnabled,omitempty" tf:"shared_access_key_enabled,omitempty"` +// Indicates whether the storage account permits requests to be authorized with the account access key via Shared Key. If false, then all requests, including shared access signatures, must be authorized with Azure Active Directory (Azure AD). The default value is true. +SharedAccessKeyEnabled *bool `json:"sharedAccessKeyEnabled,omitempty" tf:"shared_access_key_enabled,omitempty"` - // A static_website block as defined below. - StaticWebsite []StaticWebsiteObservation `json:"staticWebsite,omitempty" tf:"static_website,omitempty"` +// A static_website block as defined below. +StaticWebsite []StaticWebsiteObservation `json:"staticWebsite,omitempty" tf:"static_website,omitempty"` - // The encryption type of the table service. Possible values are Service and Account. Changing this forces a new resource to be created. Default value is Service. - TableEncryptionKeyType *string `json:"tableEncryptionKeyType,omitempty" tf:"table_encryption_key_type,omitempty"` +// The encryption type of the table service. Possible values are Service and Account. Changing this forces a new resource to be created. Default value is Service. +TableEncryptionKeyType *string `json:"tableEncryptionKeyType,omitempty" tf:"table_encryption_key_type,omitempty"` - // A mapping of tags to assign to the resource. - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// A mapping of tags to assign to the resource. +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` } + type AccountParameters struct { - // Defines the access tier for BlobStorage, FileStorage and StorageV2 accounts. Valid options are Hot and Cool, defaults to Hot. - // +kubebuilder:validation:Optional - AccessTier *string `json:"accessTier,omitempty" tf:"access_tier,omitempty"` - // Defines the Kind of account. Valid options are BlobStorage, BlockBlobStorage, FileStorage, Storage and StorageV2. Defaults to StorageV2. - // +kubebuilder:validation:Optional - AccountKind *string `json:"accountKind,omitempty" tf:"account_kind,omitempty"` +// Defines the access tier for BlobStorage, FileStorage and StorageV2 accounts. Valid options are Hot and Cool, defaults to Hot. +// +kubebuilder:validation:Optional +AccessTier *string `json:"accessTier,omitempty" tf:"access_tier,omitempty"` - // Defines the type of replication to use for this storage account. Valid options are LRS, GRS, RAGRS, ZRS, GZRS and RAGZRS. - // +kubebuilder:validation:Optional - AccountReplicationType *string `json:"accountReplicationType,omitempty" tf:"account_replication_type,omitempty"` +// Defines the Kind of account. Valid options are BlobStorage, BlockBlobStorage, FileStorage, Storage and StorageV2. Defaults to StorageV2. +// +kubebuilder:validation:Optional +AccountKind *string `json:"accountKind,omitempty" tf:"account_kind,omitempty"` - // Defines the Tier to use for this storage account. Valid options are Standard and Premium. For BlockBlobStorage and FileStorage accounts only Premium is valid. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - AccountTier *string `json:"accountTier,omitempty" tf:"account_tier,omitempty"` +// Defines the type of replication to use for this storage account. Valid options are LRS, GRS, RAGRS, ZRS, GZRS and RAGZRS. +// +kubebuilder:validation:Optional +AccountReplicationType *string `json:"accountReplicationType,omitempty" tf:"account_replication_type,omitempty"` - // Allow or disallow nested items within this Account to opt into being public. Defaults to true. - // +kubebuilder:validation:Optional - AllowNestedItemsToBePublic *bool `json:"allowNestedItemsToBePublic,omitempty" tf:"allow_nested_items_to_be_public,omitempty"` +// Defines the Tier to use for this storage account. Valid options are Standard and Premium. For BlockBlobStorage and FileStorage accounts only Premium is valid. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +AccountTier *string `json:"accountTier,omitempty" tf:"account_tier,omitempty"` - // Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet. Possible values are AAD and PrivateLink. - // +kubebuilder:validation:Optional - AllowedCopyScope *string `json:"allowedCopyScope,omitempty" tf:"allowed_copy_scope,omitempty"` +// Allow or disallow nested items within this Account to opt into being public. Defaults to true. +// +kubebuilder:validation:Optional +AllowNestedItemsToBePublic *bool `json:"allowNestedItemsToBePublic,omitempty" tf:"allow_nested_items_to_be_public,omitempty"` - // A azure_files_authentication block as defined below. - // +kubebuilder:validation:Optional - AzureFilesAuthentication []AzureFilesAuthenticationParameters `json:"azureFilesAuthentication,omitempty" tf:"azure_files_authentication,omitempty"` +// Restrict copy to and from Storage Accounts within an AAD tenant or with Private Links to the same VNet. Possible values are AAD and PrivateLink. +// +kubebuilder:validation:Optional +AllowedCopyScope *string `json:"allowedCopyScope,omitempty" tf:"allowed_copy_scope,omitempty"` - // A blob_properties block as defined below. - // +kubebuilder:validation:Optional - BlobProperties []BlobPropertiesParameters `json:"blobProperties,omitempty" tf:"blob_properties,omitempty"` +// A azure_files_authentication block as defined below. +// +kubebuilder:validation:Optional +AzureFilesAuthentication []AzureFilesAuthenticationParameters `json:"azureFilesAuthentication,omitempty" tf:"azure_files_authentication,omitempty"` - // Should cross Tenant replication be enabled? Defaults to true. - // +kubebuilder:validation:Optional - CrossTenantReplicationEnabled *bool `json:"crossTenantReplicationEnabled,omitempty" tf:"cross_tenant_replication_enabled,omitempty"` +// A blob_properties block as defined below. +// +kubebuilder:validation:Optional +BlobProperties []BlobPropertiesParameters `json:"blobProperties,omitempty" tf:"blob_properties,omitempty"` - // A custom_domain block as documented below. - // +kubebuilder:validation:Optional - CustomDomain []CustomDomainParameters `json:"customDomain,omitempty" tf:"custom_domain,omitempty"` +// Should cross Tenant replication be enabled? Defaults to true. +// +kubebuilder:validation:Optional +CrossTenantReplicationEnabled *bool `json:"crossTenantReplicationEnabled,omitempty" tf:"cross_tenant_replication_enabled,omitempty"` - // A customer_managed_key block as documented below. - // +kubebuilder:validation:Optional - CustomerManagedKey []CustomerManagedKeyParameters `json:"customerManagedKey,omitempty" tf:"customer_managed_key,omitempty"` +// A custom_domain block as documented below. +// +kubebuilder:validation:Optional +CustomDomain []CustomDomainParameters `json:"customDomain,omitempty" tf:"custom_domain,omitempty"` - // Default to Azure Active Directory authorization in the Azure portal when accessing the Storage Account. The default value is false - // +kubebuilder:validation:Optional - DefaultToOauthAuthentication *bool `json:"defaultToOauthAuthentication,omitempty" tf:"default_to_oauth_authentication,omitempty"` +// A customer_managed_key block as documented below. +// +kubebuilder:validation:Optional +CustomerManagedKey []CustomerManagedKeyParameters `json:"customerManagedKey,omitempty" tf:"customer_managed_key,omitempty"` - // Specifies the Edge Zone within the Azure Region where this Storage Account should exist. Changing this forces a new Storage Account to be created. - // +kubebuilder:validation:Optional - EdgeZone *string `json:"edgeZone,omitempty" tf:"edge_zone,omitempty"` +// Default to Azure Active Directory authorization in the Azure portal when accessing the Storage Account. The default value is false +// +kubebuilder:validation:Optional +DefaultToOauthAuthentication *bool `json:"defaultToOauthAuthentication,omitempty" tf:"default_to_oauth_authentication,omitempty"` - // Boolean flag which forces HTTPS if enabled, see here for more information. Defaults to true. - // +kubebuilder:validation:Optional - EnableHTTPSTrafficOnly *bool `json:"enableHttpsTrafficOnly,omitempty" tf:"enable_https_traffic_only,omitempty"` +// Specifies the Edge Zone within the Azure Region where this Storage Account should exist. Changing this forces a new Storage Account to be created. +// +kubebuilder:validation:Optional +EdgeZone *string `json:"edgeZone,omitempty" tf:"edge_zone,omitempty"` - // An identity block as defined below. - // +kubebuilder:validation:Optional - Identity []IdentityParameters `json:"identity,omitempty" tf:"identity,omitempty"` +// Boolean flag which forces HTTPS if enabled, see here for more information. Defaults to true. +// +kubebuilder:validation:Optional +EnableHTTPSTrafficOnly *bool `json:"enableHttpsTrafficOnly,omitempty" tf:"enable_https_traffic_only,omitempty"` - // An immutability_policy block as defined below. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - ImmutabilityPolicy []ImmutabilityPolicyParameters `json:"immutabilityPolicy,omitempty" tf:"immutability_policy,omitempty"` +// An identity block as defined below. +// +kubebuilder:validation:Optional +Identity []IdentityParameters `json:"identity,omitempty" tf:"identity,omitempty"` - // Is infrastructure encryption enabled? Changing this forces a new resource to be created. Defaults to false. - // +kubebuilder:validation:Optional - InfrastructureEncryptionEnabled *bool `json:"infrastructureEncryptionEnabled,omitempty" tf:"infrastructure_encryption_enabled,omitempty"` +// An immutability_policy block as defined below. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +ImmutabilityPolicy []ImmutabilityPolicyParameters `json:"immutabilityPolicy,omitempty" tf:"immutability_policy,omitempty"` - // Is Hierarchical Namespace enabled? This can be used with Azure Data Lake Storage Gen 2 (see here for more information). Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - IsHnsEnabled *bool `json:"isHnsEnabled,omitempty" tf:"is_hns_enabled,omitempty"` +// Is infrastructure encryption enabled? Changing this forces a new resource to be created. Defaults to false. +// +kubebuilder:validation:Optional +InfrastructureEncryptionEnabled *bool `json:"infrastructureEncryptionEnabled,omitempty" tf:"infrastructure_encryption_enabled,omitempty"` - // Is Large File Share Enabled? - // +kubebuilder:validation:Optional - LargeFileShareEnabled *bool `json:"largeFileShareEnabled,omitempty" tf:"large_file_share_enabled,omitempty"` +// Is Hierarchical Namespace enabled? This can be used with Azure Data Lake Storage Gen 2 (see here for more information). Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +IsHnsEnabled *bool `json:"isHnsEnabled,omitempty" tf:"is_hns_enabled,omitempty"` - // Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// Is Large File Share Enabled? +// +kubebuilder:validation:Optional +LargeFileShareEnabled *bool `json:"largeFileShareEnabled,omitempty" tf:"large_file_share_enabled,omitempty"` - // The minimum supported TLS version for the storage account. Possible values are TLS1_0, TLS1_1, and TLS1_2. Defaults to TLS1_2 for new storage accounts. - // +kubebuilder:validation:Optional - MinTLSVersion *string `json:"minTlsVersion,omitempty" tf:"min_tls_version,omitempty"` +// Specifies the supported Azure location where the resource exists. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // A network_rules block as documented below. - // +kubebuilder:validation:Optional - NetworkRules []NetworkRulesParameters `json:"networkRules,omitempty" tf:"network_rules,omitempty"` +// The minimum supported TLS version for the storage account. Possible values are TLS1_0, TLS1_1, and TLS1_2. Defaults to TLS1_2 for new storage accounts. +// +kubebuilder:validation:Optional +MinTLSVersion *string `json:"minTlsVersion,omitempty" tf:"min_tls_version,omitempty"` - // Is NFSv3 protocol enabled? Changing this forces a new resource to be created. Defaults to false. - // +kubebuilder:validation:Optional - Nfsv3Enabled *bool `json:"nfsv3Enabled,omitempty" tf:"nfsv3_enabled,omitempty"` +// A network_rules block as documented below. +// +kubebuilder:validation:Optional +NetworkRules []NetworkRulesParameters `json:"networkRules,omitempty" tf:"network_rules,omitempty"` - // Whether the public network access is enabled? Defaults to true. - // +kubebuilder:validation:Optional - PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` +// Is NFSv3 protocol enabled? Changing this forces a new resource to be created. Defaults to false. +// +kubebuilder:validation:Optional +Nfsv3Enabled *bool `json:"nfsv3Enabled,omitempty" tf:"nfsv3_enabled,omitempty"` - // The encryption type of the queue service. Possible values are Service and Account. Changing this forces a new resource to be created. Default value is Service. - // +kubebuilder:validation:Optional - QueueEncryptionKeyType *string `json:"queueEncryptionKeyType,omitempty" tf:"queue_encryption_key_type,omitempty"` +// Whether the public network access is enabled? Defaults to true. +// +kubebuilder:validation:Optional +PublicNetworkAccessEnabled *bool `json:"publicNetworkAccessEnabled,omitempty" tf:"public_network_access_enabled,omitempty"` - // A queue_properties block as defined below. - // +kubebuilder:validation:Optional - QueueProperties []QueuePropertiesParameters `json:"queueProperties,omitempty" tf:"queue_properties,omitempty"` +// The encryption type of the queue service. Possible values are Service and Account. Changing this forces a new resource to be created. Default value is Service. +// +kubebuilder:validation:Optional +QueueEncryptionKeyType *string `json:"queueEncryptionKeyType,omitempty" tf:"queue_encryption_key_type,omitempty"` - // The name of the resource group in which to create the storage account. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup - // +kubebuilder:validation:Optional - ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` +// A queue_properties block as defined below. +// +kubebuilder:validation:Optional +QueueProperties []QueuePropertiesParameters `json:"queueProperties,omitempty" tf:"queue_properties,omitempty"` - // Reference to a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` +// The name of the resource group in which to create the storage account. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=kubedb.dev/provider-azure/apis/azure/v1alpha1.ResourceGroup +// +kubebuilder:validation:Optional +ResourceGroupName *string `json:"resourceGroupName,omitempty" tf:"resource_group_name,omitempty"` - // Selector for a ResourceGroup in azure to populate resourceGroupName. - // +kubebuilder:validation:Optional - ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` +// Reference to a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameRef *v1.Reference `json:"resourceGroupNameRef,omitempty" tf:"-"` - // A routing block as defined below. - // +kubebuilder:validation:Optional - Routing []RoutingParameters `json:"routing,omitempty" tf:"routing,omitempty"` +// Selector for a ResourceGroup in azure to populate resourceGroupName. +// +kubebuilder:validation:Optional +ResourceGroupNameSelector *v1.Selector `json:"resourceGroupNameSelector,omitempty" tf:"-"` - // A sas_policy block as defined below. - // +kubebuilder:validation:Optional - SasPolicy []SasPolicyParameters `json:"sasPolicy,omitempty" tf:"sas_policy,omitempty"` +// A routing block as defined below. +// +kubebuilder:validation:Optional +Routing []RoutingParameters `json:"routing,omitempty" tf:"routing,omitempty"` - // Boolean, enable SFTP for the storage account - // +kubebuilder:validation:Optional - SftpEnabled *bool `json:"sftpEnabled,omitempty" tf:"sftp_enabled,omitempty"` +// A sas_policy block as defined below. +// +kubebuilder:validation:Optional +SasPolicy []SasPolicyParameters `json:"sasPolicy,omitempty" tf:"sas_policy,omitempty"` - // A share_properties block as defined below. - // +kubebuilder:validation:Optional - ShareProperties []SharePropertiesParameters `json:"shareProperties,omitempty" tf:"share_properties,omitempty"` +// Boolean, enable SFTP for the storage account +// +kubebuilder:validation:Optional +SftpEnabled *bool `json:"sftpEnabled,omitempty" tf:"sftp_enabled,omitempty"` - // Indicates whether the storage account permits requests to be authorized with the account access key via Shared Key. If false, then all requests, including shared access signatures, must be authorized with Azure Active Directory (Azure AD). The default value is true. - // +kubebuilder:validation:Optional - SharedAccessKeyEnabled *bool `json:"sharedAccessKeyEnabled,omitempty" tf:"shared_access_key_enabled,omitempty"` +// A share_properties block as defined below. +// +kubebuilder:validation:Optional +ShareProperties []SharePropertiesParameters `json:"shareProperties,omitempty" tf:"share_properties,omitempty"` - // A static_website block as defined below. - // +kubebuilder:validation:Optional - StaticWebsite []StaticWebsiteParameters `json:"staticWebsite,omitempty" tf:"static_website,omitempty"` +// Indicates whether the storage account permits requests to be authorized with the account access key via Shared Key. If false, then all requests, including shared access signatures, must be authorized with Azure Active Directory (Azure AD). The default value is true. +// +kubebuilder:validation:Optional +SharedAccessKeyEnabled *bool `json:"sharedAccessKeyEnabled,omitempty" tf:"shared_access_key_enabled,omitempty"` - // The encryption type of the table service. Possible values are Service and Account. Changing this forces a new resource to be created. Default value is Service. - // +kubebuilder:validation:Optional - TableEncryptionKeyType *string `json:"tableEncryptionKeyType,omitempty" tf:"table_encryption_key_type,omitempty"` +// A static_website block as defined below. +// +kubebuilder:validation:Optional +StaticWebsite []StaticWebsiteParameters `json:"staticWebsite,omitempty" tf:"static_website,omitempty"` - // A mapping of tags to assign to the resource. - // +kubebuilder:validation:Optional - Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` +// The encryption type of the table service. Possible values are Service and Account. Changing this forces a new resource to be created. Default value is Service. +// +kubebuilder:validation:Optional +TableEncryptionKeyType *string `json:"tableEncryptionKeyType,omitempty" tf:"table_encryption_key_type,omitempty"` + +// A mapping of tags to assign to the resource. +// +kubebuilder:validation:Optional +Tags map[string]*string `json:"tags,omitempty" tf:"tags,omitempty"` } + type ActiveDirectoryInitParameters struct { - // Specifies the domain GUID. - DomainGUID *string `json:"domainGuid,omitempty" tf:"domain_guid,omitempty"` - // Specifies the primary domain that the AD DNS server is authoritative for. - DomainName *string `json:"domainName,omitempty" tf:"domain_name,omitempty"` +// Specifies the domain GUID. +DomainGUID *string `json:"domainGuid,omitempty" tf:"domain_guid,omitempty"` - // Specifies the security identifier (SID). - DomainSid *string `json:"domainSid,omitempty" tf:"domain_sid,omitempty"` +// Specifies the primary domain that the AD DNS server is authoritative for. +DomainName *string `json:"domainName,omitempty" tf:"domain_name,omitempty"` - // Specifies the Active Directory forest. - ForestName *string `json:"forestName,omitempty" tf:"forest_name,omitempty"` +// Specifies the security identifier (SID). +DomainSid *string `json:"domainSid,omitempty" tf:"domain_sid,omitempty"` - // Specifies the NetBIOS domain name. - NetbiosDomainName *string `json:"netbiosDomainName,omitempty" tf:"netbios_domain_name,omitempty"` +// Specifies the Active Directory forest. +ForestName *string `json:"forestName,omitempty" tf:"forest_name,omitempty"` - // Specifies the security identifier (SID) for Azure Storage. - StorageSid *string `json:"storageSid,omitempty" tf:"storage_sid,omitempty"` +// Specifies the NetBIOS domain name. +NetbiosDomainName *string `json:"netbiosDomainName,omitempty" tf:"netbios_domain_name,omitempty"` + +// Specifies the security identifier (SID) for Azure Storage. +StorageSid *string `json:"storageSid,omitempty" tf:"storage_sid,omitempty"` } + type ActiveDirectoryObservation struct { - // Specifies the domain GUID. - DomainGUID *string `json:"domainGuid,omitempty" tf:"domain_guid,omitempty"` - // Specifies the primary domain that the AD DNS server is authoritative for. - DomainName *string `json:"domainName,omitempty" tf:"domain_name,omitempty"` +// Specifies the domain GUID. +DomainGUID *string `json:"domainGuid,omitempty" tf:"domain_guid,omitempty"` + +// Specifies the primary domain that the AD DNS server is authoritative for. +DomainName *string `json:"domainName,omitempty" tf:"domain_name,omitempty"` - // Specifies the security identifier (SID). - DomainSid *string `json:"domainSid,omitempty" tf:"domain_sid,omitempty"` +// Specifies the security identifier (SID). +DomainSid *string `json:"domainSid,omitempty" tf:"domain_sid,omitempty"` - // Specifies the Active Directory forest. - ForestName *string `json:"forestName,omitempty" tf:"forest_name,omitempty"` +// Specifies the Active Directory forest. +ForestName *string `json:"forestName,omitempty" tf:"forest_name,omitempty"` - // Specifies the NetBIOS domain name. - NetbiosDomainName *string `json:"netbiosDomainName,omitempty" tf:"netbios_domain_name,omitempty"` +// Specifies the NetBIOS domain name. +NetbiosDomainName *string `json:"netbiosDomainName,omitempty" tf:"netbios_domain_name,omitempty"` - // Specifies the security identifier (SID) for Azure Storage. - StorageSid *string `json:"storageSid,omitempty" tf:"storage_sid,omitempty"` +// Specifies the security identifier (SID) for Azure Storage. +StorageSid *string `json:"storageSid,omitempty" tf:"storage_sid,omitempty"` } + type ActiveDirectoryParameters struct { - // Specifies the domain GUID. - // +kubebuilder:validation:Optional - DomainGUID *string `json:"domainGuid" tf:"domain_guid,omitempty"` - // Specifies the primary domain that the AD DNS server is authoritative for. - // +kubebuilder:validation:Optional - DomainName *string `json:"domainName" tf:"domain_name,omitempty"` +// Specifies the domain GUID. +// +kubebuilder:validation:Optional +DomainGUID *string `json:"domainGuid" tf:"domain_guid,omitempty"` + +// Specifies the primary domain that the AD DNS server is authoritative for. +// +kubebuilder:validation:Optional +DomainName *string `json:"domainName" tf:"domain_name,omitempty"` - // Specifies the security identifier (SID). - // +kubebuilder:validation:Optional - DomainSid *string `json:"domainSid" tf:"domain_sid,omitempty"` +// Specifies the security identifier (SID). +// +kubebuilder:validation:Optional +DomainSid *string `json:"domainSid" tf:"domain_sid,omitempty"` - // Specifies the Active Directory forest. - // +kubebuilder:validation:Optional - ForestName *string `json:"forestName" tf:"forest_name,omitempty"` +// Specifies the Active Directory forest. +// +kubebuilder:validation:Optional +ForestName *string `json:"forestName" tf:"forest_name,omitempty"` - // Specifies the NetBIOS domain name. - // +kubebuilder:validation:Optional - NetbiosDomainName *string `json:"netbiosDomainName" tf:"netbios_domain_name,omitempty"` +// Specifies the NetBIOS domain name. +// +kubebuilder:validation:Optional +NetbiosDomainName *string `json:"netbiosDomainName" tf:"netbios_domain_name,omitempty"` - // Specifies the security identifier (SID) for Azure Storage. - // +kubebuilder:validation:Optional - StorageSid *string `json:"storageSid" tf:"storage_sid,omitempty"` +// Specifies the security identifier (SID) for Azure Storage. +// +kubebuilder:validation:Optional +StorageSid *string `json:"storageSid" tf:"storage_sid,omitempty"` } + type AzureFilesAuthenticationInitParameters struct { - // A active_directory block as defined below. Required when directory_type is AD. - ActiveDirectory []ActiveDirectoryInitParameters `json:"activeDirectory,omitempty" tf:"active_directory,omitempty"` - // Specifies the directory service used. Possible values are AADDS, AD and AADKERB. - DirectoryType *string `json:"directoryType,omitempty" tf:"directory_type,omitempty"` +// A active_directory block as defined below. Required when directory_type is AD. +ActiveDirectory []ActiveDirectoryInitParameters `json:"activeDirectory,omitempty" tf:"active_directory,omitempty"` + +// Specifies the directory service used. Possible values are AADDS, AD and AADKERB. +DirectoryType *string `json:"directoryType,omitempty" tf:"directory_type,omitempty"` } + type AzureFilesAuthenticationObservation struct { - // A active_directory block as defined below. Required when directory_type is AD. - ActiveDirectory []ActiveDirectoryObservation `json:"activeDirectory,omitempty" tf:"active_directory,omitempty"` - // Specifies the directory service used. Possible values are AADDS, AD and AADKERB. - DirectoryType *string `json:"directoryType,omitempty" tf:"directory_type,omitempty"` +// A active_directory block as defined below. Required when directory_type is AD. +ActiveDirectory []ActiveDirectoryObservation `json:"activeDirectory,omitempty" tf:"active_directory,omitempty"` + +// Specifies the directory service used. Possible values are AADDS, AD and AADKERB. +DirectoryType *string `json:"directoryType,omitempty" tf:"directory_type,omitempty"` } + type AzureFilesAuthenticationParameters struct { - // A active_directory block as defined below. Required when directory_type is AD. - // +kubebuilder:validation:Optional - ActiveDirectory []ActiveDirectoryParameters `json:"activeDirectory,omitempty" tf:"active_directory,omitempty"` - // Specifies the directory service used. Possible values are AADDS, AD and AADKERB. - // +kubebuilder:validation:Optional - DirectoryType *string `json:"directoryType" tf:"directory_type,omitempty"` +// A active_directory block as defined below. Required when directory_type is AD. +// +kubebuilder:validation:Optional +ActiveDirectory []ActiveDirectoryParameters `json:"activeDirectory,omitempty" tf:"active_directory,omitempty"` + +// Specifies the directory service used. Possible values are AADDS, AD and AADKERB. +// +kubebuilder:validation:Optional +DirectoryType *string `json:"directoryType" tf:"directory_type,omitempty"` } + type BlobPropertiesInitParameters struct { - // Is the blob service properties for change feed events enabled? Default to false. - ChangeFeedEnabled *bool `json:"changeFeedEnabled,omitempty" tf:"change_feed_enabled,omitempty"` - // The duration of change feed events retention in days. The possible values are between 1 and 146000 days (400 years). Setting this to null (or omit this in the configuration file) indicates an infinite retention of the change feed. - ChangeFeedRetentionInDays *float64 `json:"changeFeedRetentionInDays,omitempty" tf:"change_feed_retention_in_days,omitempty"` +// Is the blob service properties for change feed events enabled? Default to false. +ChangeFeedEnabled *bool `json:"changeFeedEnabled,omitempty" tf:"change_feed_enabled,omitempty"` + +// The duration of change feed events retention in days. The possible values are between 1 and 146000 days (400 years). Setting this to null (or omit this in the configuration file) indicates an infinite retention of the change feed. +ChangeFeedRetentionInDays *float64 `json:"changeFeedRetentionInDays,omitempty" tf:"change_feed_retention_in_days,omitempty"` - // A container_delete_retention_policy block as defined below. - ContainerDeleteRetentionPolicy []ContainerDeleteRetentionPolicyInitParameters `json:"containerDeleteRetentionPolicy,omitempty" tf:"container_delete_retention_policy,omitempty"` +// A container_delete_retention_policy block as defined below. +ContainerDeleteRetentionPolicy []ContainerDeleteRetentionPolicyInitParameters `json:"containerDeleteRetentionPolicy,omitempty" tf:"container_delete_retention_policy,omitempty"` - // A cors_rule block as defined below. - CorsRule []CorsRuleInitParameters `json:"corsRule,omitempty" tf:"cors_rule,omitempty"` +// A cors_rule block as defined below. +CorsRule []CorsRuleInitParameters `json:"corsRule,omitempty" tf:"cors_rule,omitempty"` - // The API Version which should be used by default for requests to the Data Plane API if an incoming request doesn't specify an API Version. - DefaultServiceVersion *string `json:"defaultServiceVersion,omitempty" tf:"default_service_version,omitempty"` +// The API Version which should be used by default for requests to the Data Plane API if an incoming request doesn't specify an API Version. +DefaultServiceVersion *string `json:"defaultServiceVersion,omitempty" tf:"default_service_version,omitempty"` - // A delete_retention_policy block as defined below. - DeleteRetentionPolicy []DeleteRetentionPolicyInitParameters `json:"deleteRetentionPolicy,omitempty" tf:"delete_retention_policy,omitempty"` +// A delete_retention_policy block as defined below. +DeleteRetentionPolicy []DeleteRetentionPolicyInitParameters `json:"deleteRetentionPolicy,omitempty" tf:"delete_retention_policy,omitempty"` - // Is the last access time based tracking enabled? Default to false. - LastAccessTimeEnabled *bool `json:"lastAccessTimeEnabled,omitempty" tf:"last_access_time_enabled,omitempty"` +// Is the last access time based tracking enabled? Default to false. +LastAccessTimeEnabled *bool `json:"lastAccessTimeEnabled,omitempty" tf:"last_access_time_enabled,omitempty"` - // A restore_policy block as defined below. This must be used together with delete_retention_policy set, versioning_enabled and change_feed_enabled set to true. - RestorePolicy []RestorePolicyInitParameters `json:"restorePolicy,omitempty" tf:"restore_policy,omitempty"` +// A restore_policy block as defined below. This must be used together with delete_retention_policy set, versioning_enabled and change_feed_enabled set to true. +RestorePolicy []RestorePolicyInitParameters `json:"restorePolicy,omitempty" tf:"restore_policy,omitempty"` - // Is versioning enabled? Default to false. - VersioningEnabled *bool `json:"versioningEnabled,omitempty" tf:"versioning_enabled,omitempty"` +// Is versioning enabled? Default to false. +VersioningEnabled *bool `json:"versioningEnabled,omitempty" tf:"versioning_enabled,omitempty"` } + type BlobPropertiesObservation struct { - // Is the blob service properties for change feed events enabled? Default to false. - ChangeFeedEnabled *bool `json:"changeFeedEnabled,omitempty" tf:"change_feed_enabled,omitempty"` - // The duration of change feed events retention in days. The possible values are between 1 and 146000 days (400 years). Setting this to null (or omit this in the configuration file) indicates an infinite retention of the change feed. - ChangeFeedRetentionInDays *float64 `json:"changeFeedRetentionInDays,omitempty" tf:"change_feed_retention_in_days,omitempty"` +// Is the blob service properties for change feed events enabled? Default to false. +ChangeFeedEnabled *bool `json:"changeFeedEnabled,omitempty" tf:"change_feed_enabled,omitempty"` + +// The duration of change feed events retention in days. The possible values are between 1 and 146000 days (400 years). Setting this to null (or omit this in the configuration file) indicates an infinite retention of the change feed. +ChangeFeedRetentionInDays *float64 `json:"changeFeedRetentionInDays,omitempty" tf:"change_feed_retention_in_days,omitempty"` - // A container_delete_retention_policy block as defined below. - ContainerDeleteRetentionPolicy []ContainerDeleteRetentionPolicyObservation `json:"containerDeleteRetentionPolicy,omitempty" tf:"container_delete_retention_policy,omitempty"` +// A container_delete_retention_policy block as defined below. +ContainerDeleteRetentionPolicy []ContainerDeleteRetentionPolicyObservation `json:"containerDeleteRetentionPolicy,omitempty" tf:"container_delete_retention_policy,omitempty"` - // A cors_rule block as defined below. - CorsRule []CorsRuleObservation `json:"corsRule,omitempty" tf:"cors_rule,omitempty"` +// A cors_rule block as defined below. +CorsRule []CorsRuleObservation `json:"corsRule,omitempty" tf:"cors_rule,omitempty"` - // The API Version which should be used by default for requests to the Data Plane API if an incoming request doesn't specify an API Version. - DefaultServiceVersion *string `json:"defaultServiceVersion,omitempty" tf:"default_service_version,omitempty"` +// The API Version which should be used by default for requests to the Data Plane API if an incoming request doesn't specify an API Version. +DefaultServiceVersion *string `json:"defaultServiceVersion,omitempty" tf:"default_service_version,omitempty"` - // A delete_retention_policy block as defined below. - DeleteRetentionPolicy []DeleteRetentionPolicyObservation `json:"deleteRetentionPolicy,omitempty" tf:"delete_retention_policy,omitempty"` +// A delete_retention_policy block as defined below. +DeleteRetentionPolicy []DeleteRetentionPolicyObservation `json:"deleteRetentionPolicy,omitempty" tf:"delete_retention_policy,omitempty"` - // Is the last access time based tracking enabled? Default to false. - LastAccessTimeEnabled *bool `json:"lastAccessTimeEnabled,omitempty" tf:"last_access_time_enabled,omitempty"` +// Is the last access time based tracking enabled? Default to false. +LastAccessTimeEnabled *bool `json:"lastAccessTimeEnabled,omitempty" tf:"last_access_time_enabled,omitempty"` - // A restore_policy block as defined below. This must be used together with delete_retention_policy set, versioning_enabled and change_feed_enabled set to true. - RestorePolicy []RestorePolicyObservation `json:"restorePolicy,omitempty" tf:"restore_policy,omitempty"` +// A restore_policy block as defined below. This must be used together with delete_retention_policy set, versioning_enabled and change_feed_enabled set to true. +RestorePolicy []RestorePolicyObservation `json:"restorePolicy,omitempty" tf:"restore_policy,omitempty"` - // Is versioning enabled? Default to false. - VersioningEnabled *bool `json:"versioningEnabled,omitempty" tf:"versioning_enabled,omitempty"` +// Is versioning enabled? Default to false. +VersioningEnabled *bool `json:"versioningEnabled,omitempty" tf:"versioning_enabled,omitempty"` } + type BlobPropertiesParameters struct { - // Is the blob service properties for change feed events enabled? Default to false. - // +kubebuilder:validation:Optional - ChangeFeedEnabled *bool `json:"changeFeedEnabled,omitempty" tf:"change_feed_enabled,omitempty"` - // The duration of change feed events retention in days. The possible values are between 1 and 146000 days (400 years). Setting this to null (or omit this in the configuration file) indicates an infinite retention of the change feed. - // +kubebuilder:validation:Optional - ChangeFeedRetentionInDays *float64 `json:"changeFeedRetentionInDays,omitempty" tf:"change_feed_retention_in_days,omitempty"` +// Is the blob service properties for change feed events enabled? Default to false. +// +kubebuilder:validation:Optional +ChangeFeedEnabled *bool `json:"changeFeedEnabled,omitempty" tf:"change_feed_enabled,omitempty"` + +// The duration of change feed events retention in days. The possible values are between 1 and 146000 days (400 years). Setting this to null (or omit this in the configuration file) indicates an infinite retention of the change feed. +// +kubebuilder:validation:Optional +ChangeFeedRetentionInDays *float64 `json:"changeFeedRetentionInDays,omitempty" tf:"change_feed_retention_in_days,omitempty"` - // A container_delete_retention_policy block as defined below. - // +kubebuilder:validation:Optional - ContainerDeleteRetentionPolicy []ContainerDeleteRetentionPolicyParameters `json:"containerDeleteRetentionPolicy,omitempty" tf:"container_delete_retention_policy,omitempty"` +// A container_delete_retention_policy block as defined below. +// +kubebuilder:validation:Optional +ContainerDeleteRetentionPolicy []ContainerDeleteRetentionPolicyParameters `json:"containerDeleteRetentionPolicy,omitempty" tf:"container_delete_retention_policy,omitempty"` - // A cors_rule block as defined below. - // +kubebuilder:validation:Optional - CorsRule []CorsRuleParameters `json:"corsRule,omitempty" tf:"cors_rule,omitempty"` +// A cors_rule block as defined below. +// +kubebuilder:validation:Optional +CorsRule []CorsRuleParameters `json:"corsRule,omitempty" tf:"cors_rule,omitempty"` - // The API Version which should be used by default for requests to the Data Plane API if an incoming request doesn't specify an API Version. - // +kubebuilder:validation:Optional - DefaultServiceVersion *string `json:"defaultServiceVersion,omitempty" tf:"default_service_version,omitempty"` +// The API Version which should be used by default for requests to the Data Plane API if an incoming request doesn't specify an API Version. +// +kubebuilder:validation:Optional +DefaultServiceVersion *string `json:"defaultServiceVersion,omitempty" tf:"default_service_version,omitempty"` - // A delete_retention_policy block as defined below. - // +kubebuilder:validation:Optional - DeleteRetentionPolicy []DeleteRetentionPolicyParameters `json:"deleteRetentionPolicy,omitempty" tf:"delete_retention_policy,omitempty"` +// A delete_retention_policy block as defined below. +// +kubebuilder:validation:Optional +DeleteRetentionPolicy []DeleteRetentionPolicyParameters `json:"deleteRetentionPolicy,omitempty" tf:"delete_retention_policy,omitempty"` - // Is the last access time based tracking enabled? Default to false. - // +kubebuilder:validation:Optional - LastAccessTimeEnabled *bool `json:"lastAccessTimeEnabled,omitempty" tf:"last_access_time_enabled,omitempty"` +// Is the last access time based tracking enabled? Default to false. +// +kubebuilder:validation:Optional +LastAccessTimeEnabled *bool `json:"lastAccessTimeEnabled,omitempty" tf:"last_access_time_enabled,omitempty"` - // A restore_policy block as defined below. This must be used together with delete_retention_policy set, versioning_enabled and change_feed_enabled set to true. - // +kubebuilder:validation:Optional - RestorePolicy []RestorePolicyParameters `json:"restorePolicy,omitempty" tf:"restore_policy,omitempty"` +// A restore_policy block as defined below. This must be used together with delete_retention_policy set, versioning_enabled and change_feed_enabled set to true. +// +kubebuilder:validation:Optional +RestorePolicy []RestorePolicyParameters `json:"restorePolicy,omitempty" tf:"restore_policy,omitempty"` - // Is versioning enabled? Default to false. - // +kubebuilder:validation:Optional - VersioningEnabled *bool `json:"versioningEnabled,omitempty" tf:"versioning_enabled,omitempty"` +// Is versioning enabled? Default to false. +// +kubebuilder:validation:Optional +VersioningEnabled *bool `json:"versioningEnabled,omitempty" tf:"versioning_enabled,omitempty"` } + type ContainerDeleteRetentionPolicyInitParameters struct { - // Specifies the number of days that the azurerm_storage_share should be retained, between 1 and 365 days. Defaults to 7. - Days *float64 `json:"days,omitempty" tf:"days,omitempty"` + +// Specifies the number of days that the azurerm_storage_share should be retained, between 1 and 365 days. Defaults to 7. +Days *float64 `json:"days,omitempty" tf:"days,omitempty"` } + type ContainerDeleteRetentionPolicyObservation struct { - // Specifies the number of days that the azurerm_storage_share should be retained, between 1 and 365 days. Defaults to 7. - Days *float64 `json:"days,omitempty" tf:"days,omitempty"` + +// Specifies the number of days that the azurerm_storage_share should be retained, between 1 and 365 days. Defaults to 7. +Days *float64 `json:"days,omitempty" tf:"days,omitempty"` } + type ContainerDeleteRetentionPolicyParameters struct { - // Specifies the number of days that the azurerm_storage_share should be retained, between 1 and 365 days. Defaults to 7. - // +kubebuilder:validation:Optional - Days *float64 `json:"days,omitempty" tf:"days,omitempty"` + +// Specifies the number of days that the azurerm_storage_share should be retained, between 1 and 365 days. Defaults to 7. +// +kubebuilder:validation:Optional +Days *float64 `json:"days,omitempty" tf:"days,omitempty"` } + type CorsRuleInitParameters struct { - // A list of headers that are allowed to be a part of the cross-origin request. - AllowedHeaders []*string `json:"allowedHeaders,omitempty" tf:"allowed_headers,omitempty"` - // A list of HTTP methods that are allowed to be executed by the origin. Valid options are - // DELETE, GET, HEAD, MERGE, POST, OPTIONS, PUT or PATCH. - AllowedMethods []*string `json:"allowedMethods,omitempty" tf:"allowed_methods,omitempty"` +// A list of headers that are allowed to be a part of the cross-origin request. +AllowedHeaders []*string `json:"allowedHeaders,omitempty" tf:"allowed_headers,omitempty"` + +// A list of HTTP methods that are allowed to be executed by the origin. Valid options are +// DELETE, GET, HEAD, MERGE, POST, OPTIONS, PUT or PATCH. +AllowedMethods []*string `json:"allowedMethods,omitempty" tf:"allowed_methods,omitempty"` - // A list of origin domains that will be allowed by CORS. - AllowedOrigins []*string `json:"allowedOrigins,omitempty" tf:"allowed_origins,omitempty"` +// A list of origin domains that will be allowed by CORS. +AllowedOrigins []*string `json:"allowedOrigins,omitempty" tf:"allowed_origins,omitempty"` - // A list of response headers that are exposed to CORS clients. - ExposedHeaders []*string `json:"exposedHeaders,omitempty" tf:"exposed_headers,omitempty"` +// A list of response headers that are exposed to CORS clients. +ExposedHeaders []*string `json:"exposedHeaders,omitempty" tf:"exposed_headers,omitempty"` - // The number of seconds the client should cache a preflight response. - MaxAgeInSeconds *float64 `json:"maxAgeInSeconds,omitempty" tf:"max_age_in_seconds,omitempty"` +// The number of seconds the client should cache a preflight response. +MaxAgeInSeconds *float64 `json:"maxAgeInSeconds,omitempty" tf:"max_age_in_seconds,omitempty"` } + type CorsRuleObservation struct { - // A list of headers that are allowed to be a part of the cross-origin request. - AllowedHeaders []*string `json:"allowedHeaders,omitempty" tf:"allowed_headers,omitempty"` - // A list of HTTP methods that are allowed to be executed by the origin. Valid options are - // DELETE, GET, HEAD, MERGE, POST, OPTIONS, PUT or PATCH. - AllowedMethods []*string `json:"allowedMethods,omitempty" tf:"allowed_methods,omitempty"` +// A list of headers that are allowed to be a part of the cross-origin request. +AllowedHeaders []*string `json:"allowedHeaders,omitempty" tf:"allowed_headers,omitempty"` + +// A list of HTTP methods that are allowed to be executed by the origin. Valid options are +// DELETE, GET, HEAD, MERGE, POST, OPTIONS, PUT or PATCH. +AllowedMethods []*string `json:"allowedMethods,omitempty" tf:"allowed_methods,omitempty"` - // A list of origin domains that will be allowed by CORS. - AllowedOrigins []*string `json:"allowedOrigins,omitempty" tf:"allowed_origins,omitempty"` +// A list of origin domains that will be allowed by CORS. +AllowedOrigins []*string `json:"allowedOrigins,omitempty" tf:"allowed_origins,omitempty"` - // A list of response headers that are exposed to CORS clients. - ExposedHeaders []*string `json:"exposedHeaders,omitempty" tf:"exposed_headers,omitempty"` +// A list of response headers that are exposed to CORS clients. +ExposedHeaders []*string `json:"exposedHeaders,omitempty" tf:"exposed_headers,omitempty"` - // The number of seconds the client should cache a preflight response. - MaxAgeInSeconds *float64 `json:"maxAgeInSeconds,omitempty" tf:"max_age_in_seconds,omitempty"` +// The number of seconds the client should cache a preflight response. +MaxAgeInSeconds *float64 `json:"maxAgeInSeconds,omitempty" tf:"max_age_in_seconds,omitempty"` } + type CorsRuleParameters struct { - // A list of headers that are allowed to be a part of the cross-origin request. - // +kubebuilder:validation:Optional - AllowedHeaders []*string `json:"allowedHeaders" tf:"allowed_headers,omitempty"` - // A list of HTTP methods that are allowed to be executed by the origin. Valid options are - // DELETE, GET, HEAD, MERGE, POST, OPTIONS, PUT or PATCH. - // +kubebuilder:validation:Optional - AllowedMethods []*string `json:"allowedMethods" tf:"allowed_methods,omitempty"` +// A list of headers that are allowed to be a part of the cross-origin request. +// +kubebuilder:validation:Optional +AllowedHeaders []*string `json:"allowedHeaders" tf:"allowed_headers,omitempty"` - // A list of origin domains that will be allowed by CORS. - // +kubebuilder:validation:Optional - AllowedOrigins []*string `json:"allowedOrigins" tf:"allowed_origins,omitempty"` +// A list of HTTP methods that are allowed to be executed by the origin. Valid options are +// DELETE, GET, HEAD, MERGE, POST, OPTIONS, PUT or PATCH. +// +kubebuilder:validation:Optional +AllowedMethods []*string `json:"allowedMethods" tf:"allowed_methods,omitempty"` - // A list of response headers that are exposed to CORS clients. - // +kubebuilder:validation:Optional - ExposedHeaders []*string `json:"exposedHeaders" tf:"exposed_headers,omitempty"` +// A list of origin domains that will be allowed by CORS. +// +kubebuilder:validation:Optional +AllowedOrigins []*string `json:"allowedOrigins" tf:"allowed_origins,omitempty"` - // The number of seconds the client should cache a preflight response. - // +kubebuilder:validation:Optional - MaxAgeInSeconds *float64 `json:"maxAgeInSeconds" tf:"max_age_in_seconds,omitempty"` +// A list of response headers that are exposed to CORS clients. +// +kubebuilder:validation:Optional +ExposedHeaders []*string `json:"exposedHeaders" tf:"exposed_headers,omitempty"` + +// The number of seconds the client should cache a preflight response. +// +kubebuilder:validation:Optional +MaxAgeInSeconds *float64 `json:"maxAgeInSeconds" tf:"max_age_in_seconds,omitempty"` } + type CustomDomainInitParameters struct { - // The Custom Domain Name to use for the Storage Account, which will be validated by Azure. - Name *string `json:"name,omitempty" tf:"name,omitempty"` - // Should the Custom Domain Name be validated by using indirect CNAME validation? - UseSubdomain *bool `json:"useSubdomain,omitempty" tf:"use_subdomain,omitempty"` +// The Custom Domain Name to use for the Storage Account, which will be validated by Azure. +Name *string `json:"name,omitempty" tf:"name,omitempty"` + +// Should the Custom Domain Name be validated by using indirect CNAME validation? +UseSubdomain *bool `json:"useSubdomain,omitempty" tf:"use_subdomain,omitempty"` } + type CustomDomainObservation struct { - // The Custom Domain Name to use for the Storage Account, which will be validated by Azure. - Name *string `json:"name,omitempty" tf:"name,omitempty"` - // Should the Custom Domain Name be validated by using indirect CNAME validation? - UseSubdomain *bool `json:"useSubdomain,omitempty" tf:"use_subdomain,omitempty"` +// The Custom Domain Name to use for the Storage Account, which will be validated by Azure. +Name *string `json:"name,omitempty" tf:"name,omitempty"` + +// Should the Custom Domain Name be validated by using indirect CNAME validation? +UseSubdomain *bool `json:"useSubdomain,omitempty" tf:"use_subdomain,omitempty"` } + type CustomDomainParameters struct { - // The Custom Domain Name to use for the Storage Account, which will be validated by Azure. - // +kubebuilder:validation:Optional - Name *string `json:"name" tf:"name,omitempty"` - // Should the Custom Domain Name be validated by using indirect CNAME validation? - // +kubebuilder:validation:Optional - UseSubdomain *bool `json:"useSubdomain,omitempty" tf:"use_subdomain,omitempty"` +// The Custom Domain Name to use for the Storage Account, which will be validated by Azure. +// +kubebuilder:validation:Optional +Name *string `json:"name" tf:"name,omitempty"` + +// Should the Custom Domain Name be validated by using indirect CNAME validation? +// +kubebuilder:validation:Optional +UseSubdomain *bool `json:"useSubdomain,omitempty" tf:"use_subdomain,omitempty"` } + type CustomerManagedKeyInitParameters struct { - // The ID of the Key Vault Key, supplying a version-less key ID will enable auto-rotation of this key. - KeyVaultKeyID *string `json:"keyVaultKeyId,omitempty" tf:"key_vault_key_id,omitempty"` - // The ID of a user assigned identity. - UserAssignedIdentityID *string `json:"userAssignedIdentityId,omitempty" tf:"user_assigned_identity_id,omitempty"` +// The ID of the Key Vault Key, supplying a version-less key ID will enable auto-rotation of this key. +KeyVaultKeyID *string `json:"keyVaultKeyId,omitempty" tf:"key_vault_key_id,omitempty"` + +// The ID of a user assigned identity. +UserAssignedIdentityID *string `json:"userAssignedIdentityId,omitempty" tf:"user_assigned_identity_id,omitempty"` } + type CustomerManagedKeyObservation struct { - // The ID of the Key Vault Key, supplying a version-less key ID will enable auto-rotation of this key. - KeyVaultKeyID *string `json:"keyVaultKeyId,omitempty" tf:"key_vault_key_id,omitempty"` - // The ID of a user assigned identity. - UserAssignedIdentityID *string `json:"userAssignedIdentityId,omitempty" tf:"user_assigned_identity_id,omitempty"` +// The ID of the Key Vault Key, supplying a version-less key ID will enable auto-rotation of this key. +KeyVaultKeyID *string `json:"keyVaultKeyId,omitempty" tf:"key_vault_key_id,omitempty"` + +// The ID of a user assigned identity. +UserAssignedIdentityID *string `json:"userAssignedIdentityId,omitempty" tf:"user_assigned_identity_id,omitempty"` } + type CustomerManagedKeyParameters struct { - // The ID of the Key Vault Key, supplying a version-less key ID will enable auto-rotation of this key. - // +kubebuilder:validation:Optional - KeyVaultKeyID *string `json:"keyVaultKeyId" tf:"key_vault_key_id,omitempty"` - // The ID of a user assigned identity. - // +kubebuilder:validation:Optional - UserAssignedIdentityID *string `json:"userAssignedIdentityId" tf:"user_assigned_identity_id,omitempty"` +// The ID of the Key Vault Key, supplying a version-less key ID will enable auto-rotation of this key. +// +kubebuilder:validation:Optional +KeyVaultKeyID *string `json:"keyVaultKeyId" tf:"key_vault_key_id,omitempty"` + +// The ID of a user assigned identity. +// +kubebuilder:validation:Optional +UserAssignedIdentityID *string `json:"userAssignedIdentityId" tf:"user_assigned_identity_id,omitempty"` } + type DeleteRetentionPolicyInitParameters struct { - // Specifies the number of days that the azurerm_storage_share should be retained, between 1 and 365 days. Defaults to 7. - Days *float64 `json:"days,omitempty" tf:"days,omitempty"` + +// Specifies the number of days that the azurerm_storage_share should be retained, between 1 and 365 days. Defaults to 7. +Days *float64 `json:"days,omitempty" tf:"days,omitempty"` } + type DeleteRetentionPolicyObservation struct { - // Specifies the number of days that the azurerm_storage_share should be retained, between 1 and 365 days. Defaults to 7. - Days *float64 `json:"days,omitempty" tf:"days,omitempty"` + +// Specifies the number of days that the azurerm_storage_share should be retained, between 1 and 365 days. Defaults to 7. +Days *float64 `json:"days,omitempty" tf:"days,omitempty"` } + type DeleteRetentionPolicyParameters struct { - // Specifies the number of days that the azurerm_storage_share should be retained, between 1 and 365 days. Defaults to 7. - // +kubebuilder:validation:Optional - Days *float64 `json:"days,omitempty" tf:"days,omitempty"` + +// Specifies the number of days that the azurerm_storage_share should be retained, between 1 and 365 days. Defaults to 7. +// +kubebuilder:validation:Optional +Days *float64 `json:"days,omitempty" tf:"days,omitempty"` } + type HourMetricsInitParameters struct { - // Indicates whether minute metrics are enabled for the Queue service. - Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` - // Indicates whether metrics should generate summary statistics for called API operations. - IncludeApis *bool `json:"includeApis,omitempty" tf:"include_apis,omitempty"` +// Indicates whether minute metrics are enabled for the Queue service. +Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` - // Specifies the number of days that logs will be retained. - RetentionPolicyDays *float64 `json:"retentionPolicyDays,omitempty" tf:"retention_policy_days,omitempty"` +// Indicates whether metrics should generate summary statistics for called API operations. +IncludeApis *bool `json:"includeApis,omitempty" tf:"include_apis,omitempty"` - // The version of storage analytics to configure. - Version *string `json:"version,omitempty" tf:"version,omitempty"` +// Specifies the number of days that logs will be retained. +RetentionPolicyDays *float64 `json:"retentionPolicyDays,omitempty" tf:"retention_policy_days,omitempty"` + +// The version of storage analytics to configure. +Version *string `json:"version,omitempty" tf:"version,omitempty"` } + type HourMetricsObservation struct { - // Indicates whether minute metrics are enabled for the Queue service. - Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` - // Indicates whether metrics should generate summary statistics for called API operations. - IncludeApis *bool `json:"includeApis,omitempty" tf:"include_apis,omitempty"` +// Indicates whether minute metrics are enabled for the Queue service. +Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` - // Specifies the number of days that logs will be retained. - RetentionPolicyDays *float64 `json:"retentionPolicyDays,omitempty" tf:"retention_policy_days,omitempty"` +// Indicates whether metrics should generate summary statistics for called API operations. +IncludeApis *bool `json:"includeApis,omitempty" tf:"include_apis,omitempty"` - // The version of storage analytics to configure. - Version *string `json:"version,omitempty" tf:"version,omitempty"` +// Specifies the number of days that logs will be retained. +RetentionPolicyDays *float64 `json:"retentionPolicyDays,omitempty" tf:"retention_policy_days,omitempty"` + +// The version of storage analytics to configure. +Version *string `json:"version,omitempty" tf:"version,omitempty"` } + type HourMetricsParameters struct { - // Indicates whether minute metrics are enabled for the Queue service. - // +kubebuilder:validation:Optional - Enabled *bool `json:"enabled" tf:"enabled,omitempty"` - // Indicates whether metrics should generate summary statistics for called API operations. - // +kubebuilder:validation:Optional - IncludeApis *bool `json:"includeApis,omitempty" tf:"include_apis,omitempty"` +// Indicates whether minute metrics are enabled for the Queue service. +// +kubebuilder:validation:Optional +Enabled *bool `json:"enabled" tf:"enabled,omitempty"` + +// Indicates whether metrics should generate summary statistics for called API operations. +// +kubebuilder:validation:Optional +IncludeApis *bool `json:"includeApis,omitempty" tf:"include_apis,omitempty"` - // Specifies the number of days that logs will be retained. - // +kubebuilder:validation:Optional - RetentionPolicyDays *float64 `json:"retentionPolicyDays,omitempty" tf:"retention_policy_days,omitempty"` +// Specifies the number of days that logs will be retained. +// +kubebuilder:validation:Optional +RetentionPolicyDays *float64 `json:"retentionPolicyDays,omitempty" tf:"retention_policy_days,omitempty"` - // The version of storage analytics to configure. - // +kubebuilder:validation:Optional - Version *string `json:"version" tf:"version,omitempty"` +// The version of storage analytics to configure. +// +kubebuilder:validation:Optional +Version *string `json:"version" tf:"version,omitempty"` } + type IdentityInitParameters struct { - // Specifies a list of User Assigned Managed Identity IDs to be assigned to this Storage Account. - IdentityIds []*string `json:"identityIds,omitempty" tf:"identity_ids,omitempty"` - // Specifies the type of Managed Service Identity that should be configured on this Storage Account. Possible values are SystemAssigned, UserAssigned, SystemAssigned, UserAssigned (to enable both). - Type *string `json:"type,omitempty" tf:"type,omitempty"` +// Specifies a list of User Assigned Managed Identity IDs to be assigned to this Storage Account. +IdentityIds []*string `json:"identityIds,omitempty" tf:"identity_ids,omitempty"` + +// Specifies the type of Managed Service Identity that should be configured on this Storage Account. Possible values are SystemAssigned, UserAssigned, SystemAssigned, UserAssigned (to enable both). +Type *string `json:"type,omitempty" tf:"type,omitempty"` } + type IdentityObservation struct { - // Specifies a list of User Assigned Managed Identity IDs to be assigned to this Storage Account. - IdentityIds []*string `json:"identityIds,omitempty" tf:"identity_ids,omitempty"` - // The Principal ID for the Service Principal associated with the Identity of this Storage Account. - PrincipalID *string `json:"principalId,omitempty" tf:"principal_id,omitempty"` +// Specifies a list of User Assigned Managed Identity IDs to be assigned to this Storage Account. +IdentityIds []*string `json:"identityIds,omitempty" tf:"identity_ids,omitempty"` + +// The Principal ID for the Service Principal associated with the Identity of this Storage Account. +PrincipalID *string `json:"principalId,omitempty" tf:"principal_id,omitempty"` - // The Tenant ID for the Service Principal associated with the Identity of this Storage Account. - TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` +// The Tenant ID for the Service Principal associated with the Identity of this Storage Account. +TenantID *string `json:"tenantId,omitempty" tf:"tenant_id,omitempty"` - // Specifies the type of Managed Service Identity that should be configured on this Storage Account. Possible values are SystemAssigned, UserAssigned, SystemAssigned, UserAssigned (to enable both). - Type *string `json:"type,omitempty" tf:"type,omitempty"` +// Specifies the type of Managed Service Identity that should be configured on this Storage Account. Possible values are SystemAssigned, UserAssigned, SystemAssigned, UserAssigned (to enable both). +Type *string `json:"type,omitempty" tf:"type,omitempty"` } + type IdentityParameters struct { - // Specifies a list of User Assigned Managed Identity IDs to be assigned to this Storage Account. - // +kubebuilder:validation:Optional - IdentityIds []*string `json:"identityIds,omitempty" tf:"identity_ids,omitempty"` - // Specifies the type of Managed Service Identity that should be configured on this Storage Account. Possible values are SystemAssigned, UserAssigned, SystemAssigned, UserAssigned (to enable both). - // +kubebuilder:validation:Optional - Type *string `json:"type" tf:"type,omitempty"` +// Specifies a list of User Assigned Managed Identity IDs to be assigned to this Storage Account. +// +kubebuilder:validation:Optional +IdentityIds []*string `json:"identityIds,omitempty" tf:"identity_ids,omitempty"` + +// Specifies the type of Managed Service Identity that should be configured on this Storage Account. Possible values are SystemAssigned, UserAssigned, SystemAssigned, UserAssigned (to enable both). +// +kubebuilder:validation:Optional +Type *string `json:"type" tf:"type,omitempty"` } + type ImmutabilityPolicyInitParameters struct { - // When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. - AllowProtectedAppendWrites *bool `json:"allowProtectedAppendWrites,omitempty" tf:"allow_protected_append_writes,omitempty"` - // The immutability period for the blobs in the container since the policy creation, in days. - PeriodSinceCreationInDays *float64 `json:"periodSinceCreationInDays,omitempty" tf:"period_since_creation_in_days,omitempty"` +// When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. +AllowProtectedAppendWrites *bool `json:"allowProtectedAppendWrites,omitempty" tf:"allow_protected_append_writes,omitempty"` - // Defines the mode of the policy. Disabled state disables the policy, Unlocked state allows increase and decrease of immutability retention time and also allows toggling allowProtectedAppendWrites property, Locked state only allows the increase of the immutability retention time. A policy can only be created in a Disabled or Unlocked state and can be toggled between the two states. Only a policy in an Unlocked state can transition to a Locked state which cannot be reverted. - State *string `json:"state,omitempty" tf:"state,omitempty"` +// The immutability period for the blobs in the container since the policy creation, in days. +PeriodSinceCreationInDays *float64 `json:"periodSinceCreationInDays,omitempty" tf:"period_since_creation_in_days,omitempty"` + +// Defines the mode of the policy. Disabled state disables the policy, Unlocked state allows increase and decrease of immutability retention time and also allows toggling allowProtectedAppendWrites property, Locked state only allows the increase of the immutability retention time. A policy can only be created in a Disabled or Unlocked state and can be toggled between the two states. Only a policy in an Unlocked state can transition to a Locked state which cannot be reverted. +State *string `json:"state,omitempty" tf:"state,omitempty"` } + type ImmutabilityPolicyObservation struct { - // When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. - AllowProtectedAppendWrites *bool `json:"allowProtectedAppendWrites,omitempty" tf:"allow_protected_append_writes,omitempty"` - // The immutability period for the blobs in the container since the policy creation, in days. - PeriodSinceCreationInDays *float64 `json:"periodSinceCreationInDays,omitempty" tf:"period_since_creation_in_days,omitempty"` +// When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. +AllowProtectedAppendWrites *bool `json:"allowProtectedAppendWrites,omitempty" tf:"allow_protected_append_writes,omitempty"` + +// The immutability period for the blobs in the container since the policy creation, in days. +PeriodSinceCreationInDays *float64 `json:"periodSinceCreationInDays,omitempty" tf:"period_since_creation_in_days,omitempty"` - // Defines the mode of the policy. Disabled state disables the policy, Unlocked state allows increase and decrease of immutability retention time and also allows toggling allowProtectedAppendWrites property, Locked state only allows the increase of the immutability retention time. A policy can only be created in a Disabled or Unlocked state and can be toggled between the two states. Only a policy in an Unlocked state can transition to a Locked state which cannot be reverted. - State *string `json:"state,omitempty" tf:"state,omitempty"` +// Defines the mode of the policy. Disabled state disables the policy, Unlocked state allows increase and decrease of immutability retention time and also allows toggling allowProtectedAppendWrites property, Locked state only allows the increase of the immutability retention time. A policy can only be created in a Disabled or Unlocked state and can be toggled between the two states. Only a policy in an Unlocked state can transition to a Locked state which cannot be reverted. +State *string `json:"state,omitempty" tf:"state,omitempty"` } + type ImmutabilityPolicyParameters struct { - // When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. - // +kubebuilder:validation:Optional - AllowProtectedAppendWrites *bool `json:"allowProtectedAppendWrites" tf:"allow_protected_append_writes,omitempty"` - // The immutability period for the blobs in the container since the policy creation, in days. - // +kubebuilder:validation:Optional - PeriodSinceCreationInDays *float64 `json:"periodSinceCreationInDays" tf:"period_since_creation_in_days,omitempty"` +// When enabled, new blocks can be written to an append blob while maintaining immutability protection and compliance. Only new blocks can be added and any existing blocks cannot be modified or deleted. +// +kubebuilder:validation:Optional +AllowProtectedAppendWrites *bool `json:"allowProtectedAppendWrites" tf:"allow_protected_append_writes,omitempty"` + +// The immutability period for the blobs in the container since the policy creation, in days. +// +kubebuilder:validation:Optional +PeriodSinceCreationInDays *float64 `json:"periodSinceCreationInDays" tf:"period_since_creation_in_days,omitempty"` - // Defines the mode of the policy. Disabled state disables the policy, Unlocked state allows increase and decrease of immutability retention time and also allows toggling allowProtectedAppendWrites property, Locked state only allows the increase of the immutability retention time. A policy can only be created in a Disabled or Unlocked state and can be toggled between the two states. Only a policy in an Unlocked state can transition to a Locked state which cannot be reverted. - // +kubebuilder:validation:Optional - State *string `json:"state" tf:"state,omitempty"` +// Defines the mode of the policy. Disabled state disables the policy, Unlocked state allows increase and decrease of immutability retention time and also allows toggling allowProtectedAppendWrites property, Locked state only allows the increase of the immutability retention time. A policy can only be created in a Disabled or Unlocked state and can be toggled between the two states. Only a policy in an Unlocked state can transition to a Locked state which cannot be reverted. +// +kubebuilder:validation:Optional +State *string `json:"state" tf:"state,omitempty"` } + type LoggingInitParameters struct { - // (Defaults to 60 minutes) Used when deleting the Storage Account. - Delete *bool `json:"delete,omitempty" tf:"delete,omitempty"` - // (Defaults to 5 minutes) Used when retrieving the Storage Account. - Read *bool `json:"read,omitempty" tf:"read,omitempty"` +// (Defaults to 60 minutes) Used when deleting the Storage Account. +Delete *bool `json:"delete,omitempty" tf:"delete,omitempty"` + +// (Defaults to 5 minutes) Used when retrieving the Storage Account. +Read *bool `json:"read,omitempty" tf:"read,omitempty"` - // Specifies the number of days that logs will be retained. - RetentionPolicyDays *float64 `json:"retentionPolicyDays,omitempty" tf:"retention_policy_days,omitempty"` +// Specifies the number of days that logs will be retained. +RetentionPolicyDays *float64 `json:"retentionPolicyDays,omitempty" tf:"retention_policy_days,omitempty"` - // The version of storage analytics to configure. - Version *string `json:"version,omitempty" tf:"version,omitempty"` +// The version of storage analytics to configure. +Version *string `json:"version,omitempty" tf:"version,omitempty"` - // Indicates whether all write requests should be logged. - Write *bool `json:"write,omitempty" tf:"write,omitempty"` +// Indicates whether all write requests should be logged. +Write *bool `json:"write,omitempty" tf:"write,omitempty"` } + type LoggingObservation struct { - // (Defaults to 60 minutes) Used when deleting the Storage Account. - Delete *bool `json:"delete,omitempty" tf:"delete,omitempty"` - // (Defaults to 5 minutes) Used when retrieving the Storage Account. - Read *bool `json:"read,omitempty" tf:"read,omitempty"` +// (Defaults to 60 minutes) Used when deleting the Storage Account. +Delete *bool `json:"delete,omitempty" tf:"delete,omitempty"` - // Specifies the number of days that logs will be retained. - RetentionPolicyDays *float64 `json:"retentionPolicyDays,omitempty" tf:"retention_policy_days,omitempty"` +// (Defaults to 5 minutes) Used when retrieving the Storage Account. +Read *bool `json:"read,omitempty" tf:"read,omitempty"` - // The version of storage analytics to configure. - Version *string `json:"version,omitempty" tf:"version,omitempty"` +// Specifies the number of days that logs will be retained. +RetentionPolicyDays *float64 `json:"retentionPolicyDays,omitempty" tf:"retention_policy_days,omitempty"` - // Indicates whether all write requests should be logged. - Write *bool `json:"write,omitempty" tf:"write,omitempty"` +// The version of storage analytics to configure. +Version *string `json:"version,omitempty" tf:"version,omitempty"` + +// Indicates whether all write requests should be logged. +Write *bool `json:"write,omitempty" tf:"write,omitempty"` } + type LoggingParameters struct { - // (Defaults to 60 minutes) Used when deleting the Storage Account. - // +kubebuilder:validation:Optional - Delete *bool `json:"delete" tf:"delete,omitempty"` - // (Defaults to 5 minutes) Used when retrieving the Storage Account. - // +kubebuilder:validation:Optional - Read *bool `json:"read" tf:"read,omitempty"` +// (Defaults to 60 minutes) Used when deleting the Storage Account. +// +kubebuilder:validation:Optional +Delete *bool `json:"delete" tf:"delete,omitempty"` - // Specifies the number of days that logs will be retained. - // +kubebuilder:validation:Optional - RetentionPolicyDays *float64 `json:"retentionPolicyDays,omitempty" tf:"retention_policy_days,omitempty"` +// (Defaults to 5 minutes) Used when retrieving the Storage Account. +// +kubebuilder:validation:Optional +Read *bool `json:"read" tf:"read,omitempty"` - // The version of storage analytics to configure. - // +kubebuilder:validation:Optional - Version *string `json:"version" tf:"version,omitempty"` +// Specifies the number of days that logs will be retained. +// +kubebuilder:validation:Optional +RetentionPolicyDays *float64 `json:"retentionPolicyDays,omitempty" tf:"retention_policy_days,omitempty"` - // Indicates whether all write requests should be logged. - // +kubebuilder:validation:Optional - Write *bool `json:"write" tf:"write,omitempty"` +// The version of storage analytics to configure. +// +kubebuilder:validation:Optional +Version *string `json:"version" tf:"version,omitempty"` + +// Indicates whether all write requests should be logged. +// +kubebuilder:validation:Optional +Write *bool `json:"write" tf:"write,omitempty"` } + type MinuteMetricsInitParameters struct { - // Indicates whether minute metrics are enabled for the Queue service. - Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` - // Indicates whether metrics should generate summary statistics for called API operations. - IncludeApis *bool `json:"includeApis,omitempty" tf:"include_apis,omitempty"` +// Indicates whether minute metrics are enabled for the Queue service. +Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` + +// Indicates whether metrics should generate summary statistics for called API operations. +IncludeApis *bool `json:"includeApis,omitempty" tf:"include_apis,omitempty"` - // Specifies the number of days that logs will be retained. - RetentionPolicyDays *float64 `json:"retentionPolicyDays,omitempty" tf:"retention_policy_days,omitempty"` +// Specifies the number of days that logs will be retained. +RetentionPolicyDays *float64 `json:"retentionPolicyDays,omitempty" tf:"retention_policy_days,omitempty"` - // The version of storage analytics to configure. - Version *string `json:"version,omitempty" tf:"version,omitempty"` +// The version of storage analytics to configure. +Version *string `json:"version,omitempty" tf:"version,omitempty"` } + type MinuteMetricsObservation struct { - // Indicates whether minute metrics are enabled for the Queue service. - Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` - // Indicates whether metrics should generate summary statistics for called API operations. - IncludeApis *bool `json:"includeApis,omitempty" tf:"include_apis,omitempty"` +// Indicates whether minute metrics are enabled for the Queue service. +Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` + +// Indicates whether metrics should generate summary statistics for called API operations. +IncludeApis *bool `json:"includeApis,omitempty" tf:"include_apis,omitempty"` - // Specifies the number of days that logs will be retained. - RetentionPolicyDays *float64 `json:"retentionPolicyDays,omitempty" tf:"retention_policy_days,omitempty"` +// Specifies the number of days that logs will be retained. +RetentionPolicyDays *float64 `json:"retentionPolicyDays,omitempty" tf:"retention_policy_days,omitempty"` - // The version of storage analytics to configure. - Version *string `json:"version,omitempty" tf:"version,omitempty"` +// The version of storage analytics to configure. +Version *string `json:"version,omitempty" tf:"version,omitempty"` } + type MinuteMetricsParameters struct { - // Indicates whether minute metrics are enabled for the Queue service. - // +kubebuilder:validation:Optional - Enabled *bool `json:"enabled" tf:"enabled,omitempty"` - // Indicates whether metrics should generate summary statistics for called API operations. - // +kubebuilder:validation:Optional - IncludeApis *bool `json:"includeApis,omitempty" tf:"include_apis,omitempty"` +// Indicates whether minute metrics are enabled for the Queue service. +// +kubebuilder:validation:Optional +Enabled *bool `json:"enabled" tf:"enabled,omitempty"` + +// Indicates whether metrics should generate summary statistics for called API operations. +// +kubebuilder:validation:Optional +IncludeApis *bool `json:"includeApis,omitempty" tf:"include_apis,omitempty"` - // Specifies the number of days that logs will be retained. - // +kubebuilder:validation:Optional - RetentionPolicyDays *float64 `json:"retentionPolicyDays,omitempty" tf:"retention_policy_days,omitempty"` +// Specifies the number of days that logs will be retained. +// +kubebuilder:validation:Optional +RetentionPolicyDays *float64 `json:"retentionPolicyDays,omitempty" tf:"retention_policy_days,omitempty"` - // The version of storage analytics to configure. - // +kubebuilder:validation:Optional - Version *string `json:"version" tf:"version,omitempty"` +// The version of storage analytics to configure. +// +kubebuilder:validation:Optional +Version *string `json:"version" tf:"version,omitempty"` } + type NetworkRulesInitParameters struct { - // Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Valid options are any combination of Logging, Metrics, AzureServices, or None. - Bypass []*string `json:"bypass,omitempty" tf:"bypass,omitempty"` - // Specifies the default action of allow or deny when no other rules match. Valid options are Deny or Allow. - DefaultAction *string `json:"defaultAction,omitempty" tf:"default_action,omitempty"` +// Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Valid options are any combination of Logging, Metrics, AzureServices, or None. +Bypass []*string `json:"bypass,omitempty" tf:"bypass,omitempty"` - // List of public IP or IP ranges in CIDR Format. Only IPv4 addresses are allowed. /31 CIDRs, /32 CIDRs, and Private IP address ranges (as defined in RFC 1918), are not allowed. - IPRules []*string `json:"ipRules,omitempty" tf:"ip_rules,omitempty"` +// Specifies the default action of allow or deny when no other rules match. Valid options are Deny or Allow. +DefaultAction *string `json:"defaultAction,omitempty" tf:"default_action,omitempty"` - // One or More private_link_access block as defined below. - PrivateLinkAccess []PrivateLinkAccessInitParameters `json:"privateLinkAccess,omitempty" tf:"private_link_access,omitempty"` +// List of public IP or IP ranges in CIDR Format. Only IPv4 addresses are allowed. /31 CIDRs, /32 CIDRs, and Private IP address ranges (as defined in RFC 1918), are not allowed. +IPRules []*string `json:"ipRules,omitempty" tf:"ip_rules,omitempty"` - // A list of resource ids for subnets. - VirtualNetworkSubnetIds []*string `json:"virtualNetworkSubnetIds,omitempty" tf:"virtual_network_subnet_ids,omitempty"` +// One or More private_link_access block as defined below. +PrivateLinkAccess []PrivateLinkAccessInitParameters `json:"privateLinkAccess,omitempty" tf:"private_link_access,omitempty"` + +// A list of resource ids for subnets. +VirtualNetworkSubnetIds []*string `json:"virtualNetworkSubnetIds,omitempty" tf:"virtual_network_subnet_ids,omitempty"` } + type NetworkRulesObservation struct { - // Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Valid options are any combination of Logging, Metrics, AzureServices, or None. - Bypass []*string `json:"bypass,omitempty" tf:"bypass,omitempty"` - // Specifies the default action of allow or deny when no other rules match. Valid options are Deny or Allow. - DefaultAction *string `json:"defaultAction,omitempty" tf:"default_action,omitempty"` +// Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Valid options are any combination of Logging, Metrics, AzureServices, or None. +Bypass []*string `json:"bypass,omitempty" tf:"bypass,omitempty"` - // List of public IP or IP ranges in CIDR Format. Only IPv4 addresses are allowed. /31 CIDRs, /32 CIDRs, and Private IP address ranges (as defined in RFC 1918), are not allowed. - IPRules []*string `json:"ipRules,omitempty" tf:"ip_rules,omitempty"` +// Specifies the default action of allow or deny when no other rules match. Valid options are Deny or Allow. +DefaultAction *string `json:"defaultAction,omitempty" tf:"default_action,omitempty"` - // One or More private_link_access block as defined below. - PrivateLinkAccess []PrivateLinkAccessObservation `json:"privateLinkAccess,omitempty" tf:"private_link_access,omitempty"` +// List of public IP or IP ranges in CIDR Format. Only IPv4 addresses are allowed. /31 CIDRs, /32 CIDRs, and Private IP address ranges (as defined in RFC 1918), are not allowed. +IPRules []*string `json:"ipRules,omitempty" tf:"ip_rules,omitempty"` - // A list of resource ids for subnets. - VirtualNetworkSubnetIds []*string `json:"virtualNetworkSubnetIds,omitempty" tf:"virtual_network_subnet_ids,omitempty"` +// One or More private_link_access block as defined below. +PrivateLinkAccess []PrivateLinkAccessObservation `json:"privateLinkAccess,omitempty" tf:"private_link_access,omitempty"` + +// A list of resource ids for subnets. +VirtualNetworkSubnetIds []*string `json:"virtualNetworkSubnetIds,omitempty" tf:"virtual_network_subnet_ids,omitempty"` } + type NetworkRulesParameters struct { - // Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Valid options are any combination of Logging, Metrics, AzureServices, or None. - // +kubebuilder:validation:Optional - Bypass []*string `json:"bypass,omitempty" tf:"bypass,omitempty"` - // Specifies the default action of allow or deny when no other rules match. Valid options are Deny or Allow. - // +kubebuilder:validation:Optional - DefaultAction *string `json:"defaultAction" tf:"default_action,omitempty"` +// Specifies whether traffic is bypassed for Logging/Metrics/AzureServices. Valid options are any combination of Logging, Metrics, AzureServices, or None. +// +kubebuilder:validation:Optional +Bypass []*string `json:"bypass,omitempty" tf:"bypass,omitempty"` + +// Specifies the default action of allow or deny when no other rules match. Valid options are Deny or Allow. +// +kubebuilder:validation:Optional +DefaultAction *string `json:"defaultAction" tf:"default_action,omitempty"` - // List of public IP or IP ranges in CIDR Format. Only IPv4 addresses are allowed. /31 CIDRs, /32 CIDRs, and Private IP address ranges (as defined in RFC 1918), are not allowed. - // +kubebuilder:validation:Optional - IPRules []*string `json:"ipRules,omitempty" tf:"ip_rules,omitempty"` +// List of public IP or IP ranges in CIDR Format. Only IPv4 addresses are allowed. /31 CIDRs, /32 CIDRs, and Private IP address ranges (as defined in RFC 1918), are not allowed. +// +kubebuilder:validation:Optional +IPRules []*string `json:"ipRules,omitempty" tf:"ip_rules,omitempty"` - // One or More private_link_access block as defined below. - // +kubebuilder:validation:Optional - PrivateLinkAccess []PrivateLinkAccessParameters `json:"privateLinkAccess,omitempty" tf:"private_link_access,omitempty"` +// One or More private_link_access block as defined below. +// +kubebuilder:validation:Optional +PrivateLinkAccess []PrivateLinkAccessParameters `json:"privateLinkAccess,omitempty" tf:"private_link_access,omitempty"` - // A list of resource ids for subnets. - // +kubebuilder:validation:Optional - VirtualNetworkSubnetIds []*string `json:"virtualNetworkSubnetIds,omitempty" tf:"virtual_network_subnet_ids,omitempty"` +// A list of resource ids for subnets. +// +kubebuilder:validation:Optional +VirtualNetworkSubnetIds []*string `json:"virtualNetworkSubnetIds,omitempty" tf:"virtual_network_subnet_ids,omitempty"` } + type PrivateLinkAccessInitParameters struct { - // The resource id of the resource access rule to be granted access. - EndpointResourceID *string `json:"endpointResourceId,omitempty" tf:"endpoint_resource_id,omitempty"` - // The tenant id of the resource of the resource access rule to be granted access. Defaults to the current tenant id. - EndpointTenantID *string `json:"endpointTenantId,omitempty" tf:"endpoint_tenant_id,omitempty"` +// The resource id of the resource access rule to be granted access. +EndpointResourceID *string `json:"endpointResourceId,omitempty" tf:"endpoint_resource_id,omitempty"` + +// The tenant id of the resource of the resource access rule to be granted access. Defaults to the current tenant id. +EndpointTenantID *string `json:"endpointTenantId,omitempty" tf:"endpoint_tenant_id,omitempty"` } + type PrivateLinkAccessObservation struct { - // The resource id of the resource access rule to be granted access. - EndpointResourceID *string `json:"endpointResourceId,omitempty" tf:"endpoint_resource_id,omitempty"` - // The tenant id of the resource of the resource access rule to be granted access. Defaults to the current tenant id. - EndpointTenantID *string `json:"endpointTenantId,omitempty" tf:"endpoint_tenant_id,omitempty"` +// The resource id of the resource access rule to be granted access. +EndpointResourceID *string `json:"endpointResourceId,omitempty" tf:"endpoint_resource_id,omitempty"` + +// The tenant id of the resource of the resource access rule to be granted access. Defaults to the current tenant id. +EndpointTenantID *string `json:"endpointTenantId,omitempty" tf:"endpoint_tenant_id,omitempty"` } + type PrivateLinkAccessParameters struct { - // The resource id of the resource access rule to be granted access. - // +kubebuilder:validation:Optional - EndpointResourceID *string `json:"endpointResourceId" tf:"endpoint_resource_id,omitempty"` - // The tenant id of the resource of the resource access rule to be granted access. Defaults to the current tenant id. - // +kubebuilder:validation:Optional - EndpointTenantID *string `json:"endpointTenantId,omitempty" tf:"endpoint_tenant_id,omitempty"` +// The resource id of the resource access rule to be granted access. +// +kubebuilder:validation:Optional +EndpointResourceID *string `json:"endpointResourceId" tf:"endpoint_resource_id,omitempty"` + +// The tenant id of the resource of the resource access rule to be granted access. Defaults to the current tenant id. +// +kubebuilder:validation:Optional +EndpointTenantID *string `json:"endpointTenantId,omitempty" tf:"endpoint_tenant_id,omitempty"` } + type QueuePropertiesCorsRuleInitParameters struct { - // A list of headers that are allowed to be a part of the cross-origin request. - AllowedHeaders []*string `json:"allowedHeaders,omitempty" tf:"allowed_headers,omitempty"` - // A list of HTTP methods that are allowed to be executed by the origin. Valid options are - // DELETE, GET, HEAD, MERGE, POST, OPTIONS, PUT or PATCH. - AllowedMethods []*string `json:"allowedMethods,omitempty" tf:"allowed_methods,omitempty"` +// A list of headers that are allowed to be a part of the cross-origin request. +AllowedHeaders []*string `json:"allowedHeaders,omitempty" tf:"allowed_headers,omitempty"` - // A list of origin domains that will be allowed by CORS. - AllowedOrigins []*string `json:"allowedOrigins,omitempty" tf:"allowed_origins,omitempty"` +// A list of HTTP methods that are allowed to be executed by the origin. Valid options are +// DELETE, GET, HEAD, MERGE, POST, OPTIONS, PUT or PATCH. +AllowedMethods []*string `json:"allowedMethods,omitempty" tf:"allowed_methods,omitempty"` - // A list of response headers that are exposed to CORS clients. - ExposedHeaders []*string `json:"exposedHeaders,omitempty" tf:"exposed_headers,omitempty"` +// A list of origin domains that will be allowed by CORS. +AllowedOrigins []*string `json:"allowedOrigins,omitempty" tf:"allowed_origins,omitempty"` - // The number of seconds the client should cache a preflight response. - MaxAgeInSeconds *float64 `json:"maxAgeInSeconds,omitempty" tf:"max_age_in_seconds,omitempty"` +// A list of response headers that are exposed to CORS clients. +ExposedHeaders []*string `json:"exposedHeaders,omitempty" tf:"exposed_headers,omitempty"` + +// The number of seconds the client should cache a preflight response. +MaxAgeInSeconds *float64 `json:"maxAgeInSeconds,omitempty" tf:"max_age_in_seconds,omitempty"` } + type QueuePropertiesCorsRuleObservation struct { - // A list of headers that are allowed to be a part of the cross-origin request. - AllowedHeaders []*string `json:"allowedHeaders,omitempty" tf:"allowed_headers,omitempty"` - // A list of HTTP methods that are allowed to be executed by the origin. Valid options are - // DELETE, GET, HEAD, MERGE, POST, OPTIONS, PUT or PATCH. - AllowedMethods []*string `json:"allowedMethods,omitempty" tf:"allowed_methods,omitempty"` +// A list of headers that are allowed to be a part of the cross-origin request. +AllowedHeaders []*string `json:"allowedHeaders,omitempty" tf:"allowed_headers,omitempty"` + +// A list of HTTP methods that are allowed to be executed by the origin. Valid options are +// DELETE, GET, HEAD, MERGE, POST, OPTIONS, PUT or PATCH. +AllowedMethods []*string `json:"allowedMethods,omitempty" tf:"allowed_methods,omitempty"` - // A list of origin domains that will be allowed by CORS. - AllowedOrigins []*string `json:"allowedOrigins,omitempty" tf:"allowed_origins,omitempty"` +// A list of origin domains that will be allowed by CORS. +AllowedOrigins []*string `json:"allowedOrigins,omitempty" tf:"allowed_origins,omitempty"` - // A list of response headers that are exposed to CORS clients. - ExposedHeaders []*string `json:"exposedHeaders,omitempty" tf:"exposed_headers,omitempty"` +// A list of response headers that are exposed to CORS clients. +ExposedHeaders []*string `json:"exposedHeaders,omitempty" tf:"exposed_headers,omitempty"` - // The number of seconds the client should cache a preflight response. - MaxAgeInSeconds *float64 `json:"maxAgeInSeconds,omitempty" tf:"max_age_in_seconds,omitempty"` +// The number of seconds the client should cache a preflight response. +MaxAgeInSeconds *float64 `json:"maxAgeInSeconds,omitempty" tf:"max_age_in_seconds,omitempty"` } + type QueuePropertiesCorsRuleParameters struct { - // A list of headers that are allowed to be a part of the cross-origin request. - // +kubebuilder:validation:Optional - AllowedHeaders []*string `json:"allowedHeaders" tf:"allowed_headers,omitempty"` - // A list of HTTP methods that are allowed to be executed by the origin. Valid options are - // DELETE, GET, HEAD, MERGE, POST, OPTIONS, PUT or PATCH. - // +kubebuilder:validation:Optional - AllowedMethods []*string `json:"allowedMethods" tf:"allowed_methods,omitempty"` +// A list of headers that are allowed to be a part of the cross-origin request. +// +kubebuilder:validation:Optional +AllowedHeaders []*string `json:"allowedHeaders" tf:"allowed_headers,omitempty"` + +// A list of HTTP methods that are allowed to be executed by the origin. Valid options are +// DELETE, GET, HEAD, MERGE, POST, OPTIONS, PUT or PATCH. +// +kubebuilder:validation:Optional +AllowedMethods []*string `json:"allowedMethods" tf:"allowed_methods,omitempty"` - // A list of origin domains that will be allowed by CORS. - // +kubebuilder:validation:Optional - AllowedOrigins []*string `json:"allowedOrigins" tf:"allowed_origins,omitempty"` +// A list of origin domains that will be allowed by CORS. +// +kubebuilder:validation:Optional +AllowedOrigins []*string `json:"allowedOrigins" tf:"allowed_origins,omitempty"` - // A list of response headers that are exposed to CORS clients. - // +kubebuilder:validation:Optional - ExposedHeaders []*string `json:"exposedHeaders" tf:"exposed_headers,omitempty"` +// A list of response headers that are exposed to CORS clients. +// +kubebuilder:validation:Optional +ExposedHeaders []*string `json:"exposedHeaders" tf:"exposed_headers,omitempty"` - // The number of seconds the client should cache a preflight response. - // +kubebuilder:validation:Optional - MaxAgeInSeconds *float64 `json:"maxAgeInSeconds" tf:"max_age_in_seconds,omitempty"` +// The number of seconds the client should cache a preflight response. +// +kubebuilder:validation:Optional +MaxAgeInSeconds *float64 `json:"maxAgeInSeconds" tf:"max_age_in_seconds,omitempty"` } + type QueuePropertiesInitParameters struct { - // A cors_rule block as defined above. - CorsRule []QueuePropertiesCorsRuleInitParameters `json:"corsRule,omitempty" tf:"cors_rule,omitempty"` - // A hour_metrics block as defined below. - HourMetrics []HourMetricsInitParameters `json:"hourMetrics,omitempty" tf:"hour_metrics,omitempty"` +// A cors_rule block as defined above. +CorsRule []QueuePropertiesCorsRuleInitParameters `json:"corsRule,omitempty" tf:"cors_rule,omitempty"` + +// A hour_metrics block as defined below. +HourMetrics []HourMetricsInitParameters `json:"hourMetrics,omitempty" tf:"hour_metrics,omitempty"` - // A logging block as defined below. - Logging []LoggingInitParameters `json:"logging,omitempty" tf:"logging,omitempty"` +// A logging block as defined below. +Logging []LoggingInitParameters `json:"logging,omitempty" tf:"logging,omitempty"` - // A minute_metrics block as defined below. - MinuteMetrics []MinuteMetricsInitParameters `json:"minuteMetrics,omitempty" tf:"minute_metrics,omitempty"` +// A minute_metrics block as defined below. +MinuteMetrics []MinuteMetricsInitParameters `json:"minuteMetrics,omitempty" tf:"minute_metrics,omitempty"` } + type QueuePropertiesObservation struct { - // A cors_rule block as defined above. - CorsRule []QueuePropertiesCorsRuleObservation `json:"corsRule,omitempty" tf:"cors_rule,omitempty"` - // A hour_metrics block as defined below. - HourMetrics []HourMetricsObservation `json:"hourMetrics,omitempty" tf:"hour_metrics,omitempty"` +// A cors_rule block as defined above. +CorsRule []QueuePropertiesCorsRuleObservation `json:"corsRule,omitempty" tf:"cors_rule,omitempty"` - // A logging block as defined below. - Logging []LoggingObservation `json:"logging,omitempty" tf:"logging,omitempty"` +// A hour_metrics block as defined below. +HourMetrics []HourMetricsObservation `json:"hourMetrics,omitempty" tf:"hour_metrics,omitempty"` - // A minute_metrics block as defined below. - MinuteMetrics []MinuteMetricsObservation `json:"minuteMetrics,omitempty" tf:"minute_metrics,omitempty"` +// A logging block as defined below. +Logging []LoggingObservation `json:"logging,omitempty" tf:"logging,omitempty"` + +// A minute_metrics block as defined below. +MinuteMetrics []MinuteMetricsObservation `json:"minuteMetrics,omitempty" tf:"minute_metrics,omitempty"` } + type QueuePropertiesParameters struct { - // A cors_rule block as defined above. - // +kubebuilder:validation:Optional - CorsRule []QueuePropertiesCorsRuleParameters `json:"corsRule,omitempty" tf:"cors_rule,omitempty"` - // A hour_metrics block as defined below. - // +kubebuilder:validation:Optional - HourMetrics []HourMetricsParameters `json:"hourMetrics,omitempty" tf:"hour_metrics,omitempty"` +// A cors_rule block as defined above. +// +kubebuilder:validation:Optional +CorsRule []QueuePropertiesCorsRuleParameters `json:"corsRule,omitempty" tf:"cors_rule,omitempty"` - // A logging block as defined below. - // +kubebuilder:validation:Optional - Logging []LoggingParameters `json:"logging,omitempty" tf:"logging,omitempty"` +// A hour_metrics block as defined below. +// +kubebuilder:validation:Optional +HourMetrics []HourMetricsParameters `json:"hourMetrics,omitempty" tf:"hour_metrics,omitempty"` - // A minute_metrics block as defined below. - // +kubebuilder:validation:Optional - MinuteMetrics []MinuteMetricsParameters `json:"minuteMetrics,omitempty" tf:"minute_metrics,omitempty"` +// A logging block as defined below. +// +kubebuilder:validation:Optional +Logging []LoggingParameters `json:"logging,omitempty" tf:"logging,omitempty"` + +// A minute_metrics block as defined below. +// +kubebuilder:validation:Optional +MinuteMetrics []MinuteMetricsParameters `json:"minuteMetrics,omitempty" tf:"minute_metrics,omitempty"` } + type RestorePolicyInitParameters struct { - // Specifies the number of days that the azurerm_storage_share should be retained, between 1 and 365 days. Defaults to 7. - Days *float64 `json:"days,omitempty" tf:"days,omitempty"` + +// Specifies the number of days that the azurerm_storage_share should be retained, between 1 and 365 days. Defaults to 7. +Days *float64 `json:"days,omitempty" tf:"days,omitempty"` } + type RestorePolicyObservation struct { - // Specifies the number of days that the azurerm_storage_share should be retained, between 1 and 365 days. Defaults to 7. - Days *float64 `json:"days,omitempty" tf:"days,omitempty"` + +// Specifies the number of days that the azurerm_storage_share should be retained, between 1 and 365 days. Defaults to 7. +Days *float64 `json:"days,omitempty" tf:"days,omitempty"` } + type RestorePolicyParameters struct { - // Specifies the number of days that the azurerm_storage_share should be retained, between 1 and 365 days. Defaults to 7. - // +kubebuilder:validation:Optional - Days *float64 `json:"days" tf:"days,omitempty"` + +// Specifies the number of days that the azurerm_storage_share should be retained, between 1 and 365 days. Defaults to 7. +// +kubebuilder:validation:Optional +Days *float64 `json:"days" tf:"days,omitempty"` } + type RetentionPolicyInitParameters struct { - // Specifies the number of days that the azurerm_storage_share should be retained, between 1 and 365 days. Defaults to 7. - Days *float64 `json:"days,omitempty" tf:"days,omitempty"` + +// Specifies the number of days that the azurerm_storage_share should be retained, between 1 and 365 days. Defaults to 7. +Days *float64 `json:"days,omitempty" tf:"days,omitempty"` } + type RetentionPolicyObservation struct { - // Specifies the number of days that the azurerm_storage_share should be retained, between 1 and 365 days. Defaults to 7. - Days *float64 `json:"days,omitempty" tf:"days,omitempty"` + +// Specifies the number of days that the azurerm_storage_share should be retained, between 1 and 365 days. Defaults to 7. +Days *float64 `json:"days,omitempty" tf:"days,omitempty"` } + type RetentionPolicyParameters struct { - // Specifies the number of days that the azurerm_storage_share should be retained, between 1 and 365 days. Defaults to 7. - // +kubebuilder:validation:Optional - Days *float64 `json:"days,omitempty" tf:"days,omitempty"` + +// Specifies the number of days that the azurerm_storage_share should be retained, between 1 and 365 days. Defaults to 7. +// +kubebuilder:validation:Optional +Days *float64 `json:"days,omitempty" tf:"days,omitempty"` } + type RoutingInitParameters struct { - // Specifies the kind of network routing opted by the user. Possible values are InternetRouting and MicrosoftRouting. Defaults to MicrosoftRouting. - Choice *string `json:"choice,omitempty" tf:"choice,omitempty"` - // Should internet routing storage endpoints be published? Defaults to false. - PublishInternetEndpoints *bool `json:"publishInternetEndpoints,omitempty" tf:"publish_internet_endpoints,omitempty"` +// Specifies the kind of network routing opted by the user. Possible values are InternetRouting and MicrosoftRouting. Defaults to MicrosoftRouting. +Choice *string `json:"choice,omitempty" tf:"choice,omitempty"` + +// Should internet routing storage endpoints be published? Defaults to false. +PublishInternetEndpoints *bool `json:"publishInternetEndpoints,omitempty" tf:"publish_internet_endpoints,omitempty"` - // Should Microsoft routing storage endpoints be published? Defaults to false. - PublishMicrosoftEndpoints *bool `json:"publishMicrosoftEndpoints,omitempty" tf:"publish_microsoft_endpoints,omitempty"` +// Should Microsoft routing storage endpoints be published? Defaults to false. +PublishMicrosoftEndpoints *bool `json:"publishMicrosoftEndpoints,omitempty" tf:"publish_microsoft_endpoints,omitempty"` } + type RoutingObservation struct { - // Specifies the kind of network routing opted by the user. Possible values are InternetRouting and MicrosoftRouting. Defaults to MicrosoftRouting. - Choice *string `json:"choice,omitempty" tf:"choice,omitempty"` - // Should internet routing storage endpoints be published? Defaults to false. - PublishInternetEndpoints *bool `json:"publishInternetEndpoints,omitempty" tf:"publish_internet_endpoints,omitempty"` +// Specifies the kind of network routing opted by the user. Possible values are InternetRouting and MicrosoftRouting. Defaults to MicrosoftRouting. +Choice *string `json:"choice,omitempty" tf:"choice,omitempty"` + +// Should internet routing storage endpoints be published? Defaults to false. +PublishInternetEndpoints *bool `json:"publishInternetEndpoints,omitempty" tf:"publish_internet_endpoints,omitempty"` - // Should Microsoft routing storage endpoints be published? Defaults to false. - PublishMicrosoftEndpoints *bool `json:"publishMicrosoftEndpoints,omitempty" tf:"publish_microsoft_endpoints,omitempty"` +// Should Microsoft routing storage endpoints be published? Defaults to false. +PublishMicrosoftEndpoints *bool `json:"publishMicrosoftEndpoints,omitempty" tf:"publish_microsoft_endpoints,omitempty"` } + type RoutingParameters struct { - // Specifies the kind of network routing opted by the user. Possible values are InternetRouting and MicrosoftRouting. Defaults to MicrosoftRouting. - // +kubebuilder:validation:Optional - Choice *string `json:"choice,omitempty" tf:"choice,omitempty"` - // Should internet routing storage endpoints be published? Defaults to false. - // +kubebuilder:validation:Optional - PublishInternetEndpoints *bool `json:"publishInternetEndpoints,omitempty" tf:"publish_internet_endpoints,omitempty"` +// Specifies the kind of network routing opted by the user. Possible values are InternetRouting and MicrosoftRouting. Defaults to MicrosoftRouting. +// +kubebuilder:validation:Optional +Choice *string `json:"choice,omitempty" tf:"choice,omitempty"` - // Should Microsoft routing storage endpoints be published? Defaults to false. - // +kubebuilder:validation:Optional - PublishMicrosoftEndpoints *bool `json:"publishMicrosoftEndpoints,omitempty" tf:"publish_microsoft_endpoints,omitempty"` +// Should internet routing storage endpoints be published? Defaults to false. +// +kubebuilder:validation:Optional +PublishInternetEndpoints *bool `json:"publishInternetEndpoints,omitempty" tf:"publish_internet_endpoints,omitempty"` + +// Should Microsoft routing storage endpoints be published? Defaults to false. +// +kubebuilder:validation:Optional +PublishMicrosoftEndpoints *bool `json:"publishMicrosoftEndpoints,omitempty" tf:"publish_microsoft_endpoints,omitempty"` } + type SMBInitParameters struct { - // A set of SMB authentication methods. Possible values are NTLMv2, and Kerberos. - AuthenticationTypes []*string `json:"authenticationTypes,omitempty" tf:"authentication_types,omitempty"` - // A set of SMB channel encryption. Possible values are AES-128-CCM, AES-128-GCM, and AES-256-GCM. - ChannelEncryptionType []*string `json:"channelEncryptionType,omitempty" tf:"channel_encryption_type,omitempty"` +// A set of SMB authentication methods. Possible values are NTLMv2, and Kerberos. +AuthenticationTypes []*string `json:"authenticationTypes,omitempty" tf:"authentication_types,omitempty"` - // A set of Kerberos ticket encryption. Possible values are RC4-HMAC, and AES-256. - KerberosTicketEncryptionType []*string `json:"kerberosTicketEncryptionType,omitempty" tf:"kerberos_ticket_encryption_type,omitempty"` +// A set of SMB channel encryption. Possible values are AES-128-CCM, AES-128-GCM, and AES-256-GCM. +ChannelEncryptionType []*string `json:"channelEncryptionType,omitempty" tf:"channel_encryption_type,omitempty"` - // Indicates whether multichannel is enabled. Defaults to false. This is only supported on Premium storage accounts. - MultichannelEnabled *bool `json:"multichannelEnabled,omitempty" tf:"multichannel_enabled,omitempty"` +// A set of Kerberos ticket encryption. Possible values are RC4-HMAC, and AES-256. +KerberosTicketEncryptionType []*string `json:"kerberosTicketEncryptionType,omitempty" tf:"kerberos_ticket_encryption_type,omitempty"` - // A set of SMB protocol versions. Possible values are SMB2.1, SMB3.0, and SMB3.1.1. - Versions []*string `json:"versions,omitempty" tf:"versions,omitempty"` +// Indicates whether multichannel is enabled. Defaults to false. This is only supported on Premium storage accounts. +MultichannelEnabled *bool `json:"multichannelEnabled,omitempty" tf:"multichannel_enabled,omitempty"` + +// A set of SMB protocol versions. Possible values are SMB2.1, SMB3.0, and SMB3.1.1. +Versions []*string `json:"versions,omitempty" tf:"versions,omitempty"` } + type SMBObservation struct { - // A set of SMB authentication methods. Possible values are NTLMv2, and Kerberos. - AuthenticationTypes []*string `json:"authenticationTypes,omitempty" tf:"authentication_types,omitempty"` - // A set of SMB channel encryption. Possible values are AES-128-CCM, AES-128-GCM, and AES-256-GCM. - ChannelEncryptionType []*string `json:"channelEncryptionType,omitempty" tf:"channel_encryption_type,omitempty"` +// A set of SMB authentication methods. Possible values are NTLMv2, and Kerberos. +AuthenticationTypes []*string `json:"authenticationTypes,omitempty" tf:"authentication_types,omitempty"` + +// A set of SMB channel encryption. Possible values are AES-128-CCM, AES-128-GCM, and AES-256-GCM. +ChannelEncryptionType []*string `json:"channelEncryptionType,omitempty" tf:"channel_encryption_type,omitempty"` - // A set of Kerberos ticket encryption. Possible values are RC4-HMAC, and AES-256. - KerberosTicketEncryptionType []*string `json:"kerberosTicketEncryptionType,omitempty" tf:"kerberos_ticket_encryption_type,omitempty"` +// A set of Kerberos ticket encryption. Possible values are RC4-HMAC, and AES-256. +KerberosTicketEncryptionType []*string `json:"kerberosTicketEncryptionType,omitempty" tf:"kerberos_ticket_encryption_type,omitempty"` - // Indicates whether multichannel is enabled. Defaults to false. This is only supported on Premium storage accounts. - MultichannelEnabled *bool `json:"multichannelEnabled,omitempty" tf:"multichannel_enabled,omitempty"` +// Indicates whether multichannel is enabled. Defaults to false. This is only supported on Premium storage accounts. +MultichannelEnabled *bool `json:"multichannelEnabled,omitempty" tf:"multichannel_enabled,omitempty"` - // A set of SMB protocol versions. Possible values are SMB2.1, SMB3.0, and SMB3.1.1. - Versions []*string `json:"versions,omitempty" tf:"versions,omitempty"` +// A set of SMB protocol versions. Possible values are SMB2.1, SMB3.0, and SMB3.1.1. +Versions []*string `json:"versions,omitempty" tf:"versions,omitempty"` } + type SMBParameters struct { - // A set of SMB authentication methods. Possible values are NTLMv2, and Kerberos. - // +kubebuilder:validation:Optional - AuthenticationTypes []*string `json:"authenticationTypes,omitempty" tf:"authentication_types,omitempty"` - // A set of SMB channel encryption. Possible values are AES-128-CCM, AES-128-GCM, and AES-256-GCM. - // +kubebuilder:validation:Optional - ChannelEncryptionType []*string `json:"channelEncryptionType,omitempty" tf:"channel_encryption_type,omitempty"` +// A set of SMB authentication methods. Possible values are NTLMv2, and Kerberos. +// +kubebuilder:validation:Optional +AuthenticationTypes []*string `json:"authenticationTypes,omitempty" tf:"authentication_types,omitempty"` + +// A set of SMB channel encryption. Possible values are AES-128-CCM, AES-128-GCM, and AES-256-GCM. +// +kubebuilder:validation:Optional +ChannelEncryptionType []*string `json:"channelEncryptionType,omitempty" tf:"channel_encryption_type,omitempty"` - // A set of Kerberos ticket encryption. Possible values are RC4-HMAC, and AES-256. - // +kubebuilder:validation:Optional - KerberosTicketEncryptionType []*string `json:"kerberosTicketEncryptionType,omitempty" tf:"kerberos_ticket_encryption_type,omitempty"` +// A set of Kerberos ticket encryption. Possible values are RC4-HMAC, and AES-256. +// +kubebuilder:validation:Optional +KerberosTicketEncryptionType []*string `json:"kerberosTicketEncryptionType,omitempty" tf:"kerberos_ticket_encryption_type,omitempty"` - // Indicates whether multichannel is enabled. Defaults to false. This is only supported on Premium storage accounts. - // +kubebuilder:validation:Optional - MultichannelEnabled *bool `json:"multichannelEnabled,omitempty" tf:"multichannel_enabled,omitempty"` +// Indicates whether multichannel is enabled. Defaults to false. This is only supported on Premium storage accounts. +// +kubebuilder:validation:Optional +MultichannelEnabled *bool `json:"multichannelEnabled,omitempty" tf:"multichannel_enabled,omitempty"` - // A set of SMB protocol versions. Possible values are SMB2.1, SMB3.0, and SMB3.1.1. - // +kubebuilder:validation:Optional - Versions []*string `json:"versions,omitempty" tf:"versions,omitempty"` +// A set of SMB protocol versions. Possible values are SMB2.1, SMB3.0, and SMB3.1.1. +// +kubebuilder:validation:Optional +Versions []*string `json:"versions,omitempty" tf:"versions,omitempty"` } + type SasPolicyInitParameters struct { - // The SAS expiration action. The only possible value is Log at this moment. Defaults to Log. - ExpirationAction *string `json:"expirationAction,omitempty" tf:"expiration_action,omitempty"` - // The SAS expiration period in format of DD.HH:MM:SS. - ExpirationPeriod *string `json:"expirationPeriod,omitempty" tf:"expiration_period,omitempty"` +// The SAS expiration action. The only possible value is Log at this moment. Defaults to Log. +ExpirationAction *string `json:"expirationAction,omitempty" tf:"expiration_action,omitempty"` + +// The SAS expiration period in format of DD.HH:MM:SS. +ExpirationPeriod *string `json:"expirationPeriod,omitempty" tf:"expiration_period,omitempty"` } + type SasPolicyObservation struct { - // The SAS expiration action. The only possible value is Log at this moment. Defaults to Log. - ExpirationAction *string `json:"expirationAction,omitempty" tf:"expiration_action,omitempty"` - // The SAS expiration period in format of DD.HH:MM:SS. - ExpirationPeriod *string `json:"expirationPeriod,omitempty" tf:"expiration_period,omitempty"` +// The SAS expiration action. The only possible value is Log at this moment. Defaults to Log. +ExpirationAction *string `json:"expirationAction,omitempty" tf:"expiration_action,omitempty"` + +// The SAS expiration period in format of DD.HH:MM:SS. +ExpirationPeriod *string `json:"expirationPeriod,omitempty" tf:"expiration_period,omitempty"` } + type SasPolicyParameters struct { - // The SAS expiration action. The only possible value is Log at this moment. Defaults to Log. - // +kubebuilder:validation:Optional - ExpirationAction *string `json:"expirationAction,omitempty" tf:"expiration_action,omitempty"` - // The SAS expiration period in format of DD.HH:MM:SS. - // +kubebuilder:validation:Optional - ExpirationPeriod *string `json:"expirationPeriod" tf:"expiration_period,omitempty"` +// The SAS expiration action. The only possible value is Log at this moment. Defaults to Log. +// +kubebuilder:validation:Optional +ExpirationAction *string `json:"expirationAction,omitempty" tf:"expiration_action,omitempty"` + +// The SAS expiration period in format of DD.HH:MM:SS. +// +kubebuilder:validation:Optional +ExpirationPeriod *string `json:"expirationPeriod" tf:"expiration_period,omitempty"` } + type SharePropertiesCorsRuleInitParameters struct { - // A list of headers that are allowed to be a part of the cross-origin request. - AllowedHeaders []*string `json:"allowedHeaders,omitempty" tf:"allowed_headers,omitempty"` - // A list of HTTP methods that are allowed to be executed by the origin. Valid options are - // DELETE, GET, HEAD, MERGE, POST, OPTIONS, PUT or PATCH. - AllowedMethods []*string `json:"allowedMethods,omitempty" tf:"allowed_methods,omitempty"` +// A list of headers that are allowed to be a part of the cross-origin request. +AllowedHeaders []*string `json:"allowedHeaders,omitempty" tf:"allowed_headers,omitempty"` + +// A list of HTTP methods that are allowed to be executed by the origin. Valid options are +// DELETE, GET, HEAD, MERGE, POST, OPTIONS, PUT or PATCH. +AllowedMethods []*string `json:"allowedMethods,omitempty" tf:"allowed_methods,omitempty"` - // A list of origin domains that will be allowed by CORS. - AllowedOrigins []*string `json:"allowedOrigins,omitempty" tf:"allowed_origins,omitempty"` +// A list of origin domains that will be allowed by CORS. +AllowedOrigins []*string `json:"allowedOrigins,omitempty" tf:"allowed_origins,omitempty"` - // A list of response headers that are exposed to CORS clients. - ExposedHeaders []*string `json:"exposedHeaders,omitempty" tf:"exposed_headers,omitempty"` +// A list of response headers that are exposed to CORS clients. +ExposedHeaders []*string `json:"exposedHeaders,omitempty" tf:"exposed_headers,omitempty"` - // The number of seconds the client should cache a preflight response. - MaxAgeInSeconds *float64 `json:"maxAgeInSeconds,omitempty" tf:"max_age_in_seconds,omitempty"` +// The number of seconds the client should cache a preflight response. +MaxAgeInSeconds *float64 `json:"maxAgeInSeconds,omitempty" tf:"max_age_in_seconds,omitempty"` } + type SharePropertiesCorsRuleObservation struct { - // A list of headers that are allowed to be a part of the cross-origin request. - AllowedHeaders []*string `json:"allowedHeaders,omitempty" tf:"allowed_headers,omitempty"` - // A list of HTTP methods that are allowed to be executed by the origin. Valid options are - // DELETE, GET, HEAD, MERGE, POST, OPTIONS, PUT or PATCH. - AllowedMethods []*string `json:"allowedMethods,omitempty" tf:"allowed_methods,omitempty"` +// A list of headers that are allowed to be a part of the cross-origin request. +AllowedHeaders []*string `json:"allowedHeaders,omitempty" tf:"allowed_headers,omitempty"` + +// A list of HTTP methods that are allowed to be executed by the origin. Valid options are +// DELETE, GET, HEAD, MERGE, POST, OPTIONS, PUT or PATCH. +AllowedMethods []*string `json:"allowedMethods,omitempty" tf:"allowed_methods,omitempty"` - // A list of origin domains that will be allowed by CORS. - AllowedOrigins []*string `json:"allowedOrigins,omitempty" tf:"allowed_origins,omitempty"` +// A list of origin domains that will be allowed by CORS. +AllowedOrigins []*string `json:"allowedOrigins,omitempty" tf:"allowed_origins,omitempty"` - // A list of response headers that are exposed to CORS clients. - ExposedHeaders []*string `json:"exposedHeaders,omitempty" tf:"exposed_headers,omitempty"` +// A list of response headers that are exposed to CORS clients. +ExposedHeaders []*string `json:"exposedHeaders,omitempty" tf:"exposed_headers,omitempty"` - // The number of seconds the client should cache a preflight response. - MaxAgeInSeconds *float64 `json:"maxAgeInSeconds,omitempty" tf:"max_age_in_seconds,omitempty"` +// The number of seconds the client should cache a preflight response. +MaxAgeInSeconds *float64 `json:"maxAgeInSeconds,omitempty" tf:"max_age_in_seconds,omitempty"` } + type SharePropertiesCorsRuleParameters struct { - // A list of headers that are allowed to be a part of the cross-origin request. - // +kubebuilder:validation:Optional - AllowedHeaders []*string `json:"allowedHeaders" tf:"allowed_headers,omitempty"` - // A list of HTTP methods that are allowed to be executed by the origin. Valid options are - // DELETE, GET, HEAD, MERGE, POST, OPTIONS, PUT or PATCH. - // +kubebuilder:validation:Optional - AllowedMethods []*string `json:"allowedMethods" tf:"allowed_methods,omitempty"` +// A list of headers that are allowed to be a part of the cross-origin request. +// +kubebuilder:validation:Optional +AllowedHeaders []*string `json:"allowedHeaders" tf:"allowed_headers,omitempty"` + +// A list of HTTP methods that are allowed to be executed by the origin. Valid options are +// DELETE, GET, HEAD, MERGE, POST, OPTIONS, PUT or PATCH. +// +kubebuilder:validation:Optional +AllowedMethods []*string `json:"allowedMethods" tf:"allowed_methods,omitempty"` - // A list of origin domains that will be allowed by CORS. - // +kubebuilder:validation:Optional - AllowedOrigins []*string `json:"allowedOrigins" tf:"allowed_origins,omitempty"` +// A list of origin domains that will be allowed by CORS. +// +kubebuilder:validation:Optional +AllowedOrigins []*string `json:"allowedOrigins" tf:"allowed_origins,omitempty"` - // A list of response headers that are exposed to CORS clients. - // +kubebuilder:validation:Optional - ExposedHeaders []*string `json:"exposedHeaders" tf:"exposed_headers,omitempty"` +// A list of response headers that are exposed to CORS clients. +// +kubebuilder:validation:Optional +ExposedHeaders []*string `json:"exposedHeaders" tf:"exposed_headers,omitempty"` - // The number of seconds the client should cache a preflight response. - // +kubebuilder:validation:Optional - MaxAgeInSeconds *float64 `json:"maxAgeInSeconds" tf:"max_age_in_seconds,omitempty"` +// The number of seconds the client should cache a preflight response. +// +kubebuilder:validation:Optional +MaxAgeInSeconds *float64 `json:"maxAgeInSeconds" tf:"max_age_in_seconds,omitempty"` } + type SharePropertiesInitParameters struct { - // A cors_rule block as defined below. - CorsRule []SharePropertiesCorsRuleInitParameters `json:"corsRule,omitempty" tf:"cors_rule,omitempty"` - // A retention_policy block as defined below. - RetentionPolicy []RetentionPolicyInitParameters `json:"retentionPolicy,omitempty" tf:"retention_policy,omitempty"` +// A cors_rule block as defined below. +CorsRule []SharePropertiesCorsRuleInitParameters `json:"corsRule,omitempty" tf:"cors_rule,omitempty"` - // A smb block as defined below. - SMB []SMBInitParameters `json:"smb,omitempty" tf:"smb,omitempty"` +// A retention_policy block as defined below. +RetentionPolicy []RetentionPolicyInitParameters `json:"retentionPolicy,omitempty" tf:"retention_policy,omitempty"` + +// A smb block as defined below. +SMB []SMBInitParameters `json:"smb,omitempty" tf:"smb,omitempty"` } + type SharePropertiesObservation struct { - // A cors_rule block as defined below. - CorsRule []SharePropertiesCorsRuleObservation `json:"corsRule,omitempty" tf:"cors_rule,omitempty"` - // A retention_policy block as defined below. - RetentionPolicy []RetentionPolicyObservation `json:"retentionPolicy,omitempty" tf:"retention_policy,omitempty"` +// A cors_rule block as defined below. +CorsRule []SharePropertiesCorsRuleObservation `json:"corsRule,omitempty" tf:"cors_rule,omitempty"` - // A smb block as defined below. - SMB []SMBObservation `json:"smb,omitempty" tf:"smb,omitempty"` +// A retention_policy block as defined below. +RetentionPolicy []RetentionPolicyObservation `json:"retentionPolicy,omitempty" tf:"retention_policy,omitempty"` + +// A smb block as defined below. +SMB []SMBObservation `json:"smb,omitempty" tf:"smb,omitempty"` } + type SharePropertiesParameters struct { - // A cors_rule block as defined below. - // +kubebuilder:validation:Optional - CorsRule []SharePropertiesCorsRuleParameters `json:"corsRule,omitempty" tf:"cors_rule,omitempty"` - // A retention_policy block as defined below. - // +kubebuilder:validation:Optional - RetentionPolicy []RetentionPolicyParameters `json:"retentionPolicy,omitempty" tf:"retention_policy,omitempty"` +// A cors_rule block as defined below. +// +kubebuilder:validation:Optional +CorsRule []SharePropertiesCorsRuleParameters `json:"corsRule,omitempty" tf:"cors_rule,omitempty"` + +// A retention_policy block as defined below. +// +kubebuilder:validation:Optional +RetentionPolicy []RetentionPolicyParameters `json:"retentionPolicy,omitempty" tf:"retention_policy,omitempty"` - // A smb block as defined below. - // +kubebuilder:validation:Optional - SMB []SMBParameters `json:"smb,omitempty" tf:"smb,omitempty"` +// A smb block as defined below. +// +kubebuilder:validation:Optional +SMB []SMBParameters `json:"smb,omitempty" tf:"smb,omitempty"` } + type StaticWebsiteInitParameters struct { - // The absolute path to a custom webpage that should be used when a request is made which does not correspond to an existing file. - Error404Document *string `json:"error404Document,omitempty" tf:"error_404_document,omitempty"` - // The webpage that Azure Storage serves for requests to the root of a website or any subfolder. For example, index.html. The value is case-sensitive. - IndexDocument *string `json:"indexDocument,omitempty" tf:"index_document,omitempty"` +// The absolute path to a custom webpage that should be used when a request is made which does not correspond to an existing file. +Error404Document *string `json:"error404Document,omitempty" tf:"error_404_document,omitempty"` + +// The webpage that Azure Storage serves for requests to the root of a website or any subfolder. For example, index.html. The value is case-sensitive. +IndexDocument *string `json:"indexDocument,omitempty" tf:"index_document,omitempty"` } + type StaticWebsiteObservation struct { - // The absolute path to a custom webpage that should be used when a request is made which does not correspond to an existing file. - Error404Document *string `json:"error404Document,omitempty" tf:"error_404_document,omitempty"` - // The webpage that Azure Storage serves for requests to the root of a website or any subfolder. For example, index.html. The value is case-sensitive. - IndexDocument *string `json:"indexDocument,omitempty" tf:"index_document,omitempty"` +// The absolute path to a custom webpage that should be used when a request is made which does not correspond to an existing file. +Error404Document *string `json:"error404Document,omitempty" tf:"error_404_document,omitempty"` + +// The webpage that Azure Storage serves for requests to the root of a website or any subfolder. For example, index.html. The value is case-sensitive. +IndexDocument *string `json:"indexDocument,omitempty" tf:"index_document,omitempty"` } + type StaticWebsiteParameters struct { - // The absolute path to a custom webpage that should be used when a request is made which does not correspond to an existing file. - // +kubebuilder:validation:Optional - Error404Document *string `json:"error404Document,omitempty" tf:"error_404_document,omitempty"` - // The webpage that Azure Storage serves for requests to the root of a website or any subfolder. For example, index.html. The value is case-sensitive. - // +kubebuilder:validation:Optional - IndexDocument *string `json:"indexDocument,omitempty" tf:"index_document,omitempty"` +// The absolute path to a custom webpage that should be used when a request is made which does not correspond to an existing file. +// +kubebuilder:validation:Optional +Error404Document *string `json:"error404Document,omitempty" tf:"error_404_document,omitempty"` + +// The webpage that Azure Storage serves for requests to the root of a website or any subfolder. For example, index.html. The value is case-sensitive. +// +kubebuilder:validation:Optional +IndexDocument *string `json:"indexDocument,omitempty" tf:"index_document,omitempty"` } // AccountSpec defines the desired state of Account type AccountSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider AccountParameters `json:"forProvider"` + ForProvider AccountParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -1557,13 +1716,13 @@ type AccountSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider AccountInitParameters `json:"initProvider,omitempty"` + InitProvider AccountInitParameters `json:"initProvider,omitempty"` } // AccountStatus defines the observed state of Account. type AccountStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider AccountObservation `json:"atProvider,omitempty"` + AtProvider AccountObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -1578,11 +1737,11 @@ type AccountStatus struct { type Account struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.accountReplicationType) || (has(self.initProvider) && has(self.initProvider.accountReplicationType))",message="spec.forProvider.accountReplicationType is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.accountTier) || (has(self.initProvider) && has(self.initProvider.accountTier))",message="spec.forProvider.accountTier is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" - Spec AccountSpec `json:"spec"` - Status AccountStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.accountReplicationType) || (has(self.initProvider) && has(self.initProvider.accountReplicationType))",message="spec.forProvider.accountReplicationType is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.accountTier) || (has(self.initProvider) && has(self.initProvider.accountTier))",message="spec.forProvider.accountTier is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.location) || (has(self.initProvider) && has(self.initProvider.location))",message="spec.forProvider.location is a required parameter" + Spec AccountSpec `json:"spec"` + Status AccountStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/storage/v1alpha1/zz_container_types.go b/apis/storage/v1alpha1/zz_container_types.go index 72b4f31..871a422 100755 --- a/apis/storage/v1alpha1/zz_container_types.go +++ b/apis/storage/v1alpha1/zz_container_types.go @@ -15,69 +15,78 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type ContainerInitParameters struct { - // The Access Level configured for this Container. Possible values are blob, container or private. Defaults to private. - ContainerAccessType *string `json:"containerAccessType,omitempty" tf:"container_access_type,omitempty"` - // A mapping of MetaData for this Container. All metadata keys should be lowercase. - Metadata map[string]*string `json:"metadata,omitempty" tf:"metadata,omitempty"` +// The Access Level configured for this Container. Possible values are blob, container or private. Defaults to private. +ContainerAccessType *string `json:"containerAccessType,omitempty" tf:"container_access_type,omitempty"` + +// A mapping of MetaData for this Container. All metadata keys should be lowercase. +Metadata map[string]*string `json:"metadata,omitempty" tf:"metadata,omitempty"` } + type ContainerObservation struct { - // The Access Level configured for this Container. Possible values are blob, container or private. Defaults to private. - ContainerAccessType *string `json:"containerAccessType,omitempty" tf:"container_access_type,omitempty"` - // Is there an Immutability Policy configured on this Storage Container? - HasImmutabilityPolicy *bool `json:"hasImmutabilityPolicy,omitempty" tf:"has_immutability_policy,omitempty"` +// The Access Level configured for this Container. Possible values are blob, container or private. Defaults to private. +ContainerAccessType *string `json:"containerAccessType,omitempty" tf:"container_access_type,omitempty"` + +// Is there an Immutability Policy configured on this Storage Container? +HasImmutabilityPolicy *bool `json:"hasImmutabilityPolicy,omitempty" tf:"has_immutability_policy,omitempty"` - // Is there a Legal Hold configured on this Storage Container? - HasLegalHold *bool `json:"hasLegalHold,omitempty" tf:"has_legal_hold,omitempty"` +// Is there a Legal Hold configured on this Storage Container? +HasLegalHold *bool `json:"hasLegalHold,omitempty" tf:"has_legal_hold,omitempty"` - // The ID of the Storage Container. - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// The ID of the Storage Container. +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // A mapping of MetaData for this Container. All metadata keys should be lowercase. - Metadata map[string]*string `json:"metadata,omitempty" tf:"metadata,omitempty"` +// A mapping of MetaData for this Container. All metadata keys should be lowercase. +Metadata map[string]*string `json:"metadata,omitempty" tf:"metadata,omitempty"` - // The Resource Manager ID of this Storage Container. - ResourceManagerID *string `json:"resourceManagerId,omitempty" tf:"resource_manager_id,omitempty"` +// The Resource Manager ID of this Storage Container. +ResourceManagerID *string `json:"resourceManagerId,omitempty" tf:"resource_manager_id,omitempty"` - // The name of the Storage Account where the Container should be created. Changing this forces a new resource to be created. - StorageAccountName *string `json:"storageAccountName,omitempty" tf:"storage_account_name,omitempty"` +// The name of the Storage Account where the Container should be created. Changing this forces a new resource to be created. +StorageAccountName *string `json:"storageAccountName,omitempty" tf:"storage_account_name,omitempty"` } + type ContainerParameters struct { - // The Access Level configured for this Container. Possible values are blob, container or private. Defaults to private. - // +kubebuilder:validation:Optional - ContainerAccessType *string `json:"containerAccessType,omitempty" tf:"container_access_type,omitempty"` - // A mapping of MetaData for this Container. All metadata keys should be lowercase. - // +kubebuilder:validation:Optional - Metadata map[string]*string `json:"metadata,omitempty" tf:"metadata,omitempty"` +// The Access Level configured for this Container. Possible values are blob, container or private. Defaults to private. +// +kubebuilder:validation:Optional +ContainerAccessType *string `json:"containerAccessType,omitempty" tf:"container_access_type,omitempty"` + +// A mapping of MetaData for this Container. All metadata keys should be lowercase. +// +kubebuilder:validation:Optional +Metadata map[string]*string `json:"metadata,omitempty" tf:"metadata,omitempty"` - // The name of the Storage Account where the Container should be created. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=Account - // +kubebuilder:validation:Optional - StorageAccountName *string `json:"storageAccountName,omitempty" tf:"storage_account_name,omitempty"` +// The name of the Storage Account where the Container should be created. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=Account +// +kubebuilder:validation:Optional +StorageAccountName *string `json:"storageAccountName,omitempty" tf:"storage_account_name,omitempty"` - // Reference to a Account to populate storageAccountName. - // +kubebuilder:validation:Optional - StorageAccountNameRef *v1.Reference `json:"storageAccountNameRef,omitempty" tf:"-"` +// Reference to a Account to populate storageAccountName. +// +kubebuilder:validation:Optional +StorageAccountNameRef *v1.Reference `json:"storageAccountNameRef,omitempty" tf:"-"` - // Selector for a Account to populate storageAccountName. - // +kubebuilder:validation:Optional - StorageAccountNameSelector *v1.Selector `json:"storageAccountNameSelector,omitempty" tf:"-"` +// Selector for a Account to populate storageAccountName. +// +kubebuilder:validation:Optional +StorageAccountNameSelector *v1.Selector `json:"storageAccountNameSelector,omitempty" tf:"-"` } // ContainerSpec defines the desired state of Container type ContainerSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider ContainerParameters `json:"forProvider"` + ForProvider ContainerParameters `json:"forProvider"` // THIS IS A BETA FIELD. It will be honored // unless the Management Policies feature flag is disabled. // InitProvider holds the same fields as ForProvider, with the exception @@ -88,13 +97,13 @@ type ContainerSpec struct { // required on creation, but we do not desire to update them after creation, // for example because of an external controller is managing them, like an // autoscaler. - InitProvider ContainerInitParameters `json:"initProvider,omitempty"` + InitProvider ContainerInitParameters `json:"initProvider,omitempty"` } // ContainerStatus defines the observed state of Container. type ContainerStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider ContainerObservation `json:"atProvider,omitempty"` + AtProvider ContainerObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/storage/v1alpha1/zz_generated_terraformed.go b/apis/storage/v1alpha1/zz_generated_terraformed.go index df8317a..1f7359b 100755 --- a/apis/storage/v1alpha1/zz_generated_terraformed.go +++ b/apis/storage/v1alpha1/zz_generated_terraformed.go @@ -11,6 +11,7 @@ Copyright 2022 Upbound Inc. package v1alpha1 import ( + "dario.cat/mergo" "github.com/pkg/errors" "github.com/crossplane/upjet/pkg/resource" @@ -83,6 +84,36 @@ func (tr *Account) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this Account +func (tr *Account) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Account using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Account) LateInitialize(attrs []byte) (bool, error) { @@ -167,6 +198,36 @@ func (tr *Container) GetInitParameters() (map[string]any, error) { return base, json.TFParser.Unmarshal(p, &base) } +// GetInitParameters of this Container +func (tr *Container) GetMergedParameters(shouldMergeInitProvider bool) (map[string]any, error) { + params, err := tr.GetParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get parameters for resource '%q'", tr.GetName()) + } + if !shouldMergeInitProvider { + return params, nil + } + + initParams, err := tr.GetInitParameters() + if err != nil { + return nil, errors.Wrapf(err, "cannot get init parameters for resource '%q'", tr.GetName()) + } + + // Note(lsviben): mergo.WithSliceDeepCopy is needed to merge the + // slices from the initProvider to forProvider. As it also sets + // overwrite to true, we need to set it back to false, we don't + // want to overwrite the forProvider fields with the initProvider + // fields. + err = mergo.Merge(¶ms, initParams, mergo.WithSliceDeepCopy, func(c *mergo.Config) { + c.Overwrite = false + }) + if err != nil { + return nil, errors.Wrapf(err, "cannot merge spec.initProvider and spec.forProvider parameters for resource '%q'", tr.GetName()) + } + + return params, nil +} + // LateInitialize this Container using its observed tfState. // returns True if there are any spec changes for the resource. func (tr *Container) LateInitialize(attrs []byte) (bool, error) { diff --git a/cmd/dynamic-controller/generate_dynamic_controller.go b/cmd/dynamic-controller/generate_dynamic_controller.go new file mode 100644 index 0000000..68c60f3 --- /dev/null +++ b/cmd/dynamic-controller/generate_dynamic_controller.go @@ -0,0 +1,142 @@ +package dynamic_controller + +import ( + "fmt" + "github.com/crossplane/crossplane-runtime/pkg/errors" + "github.com/crossplane/upjet/pkg/config" + "github.com/crossplane/upjet/pkg/examples" + "github.com/crossplane/upjet/pkg/pipeline" + "os" + "os/exec" + "path/filepath" + "sort" + "strings" +) + +var ( + groupKind map[string]string +) + +func GenerateController(pc *config.Provider, absRootDir string) { + groupKind = make(map[string]string) + if len(os.Args) < 2 || os.Args[1] == "" { + panic("root directory is required to be given as argument") + } + rootDir := os.Args[1] + rootDir, err := filepath.Abs(rootDir) + if err != nil { + panic(fmt.Sprintf("cannot calculate the absolute path with %s", rootDir)) + } + resourcesGroups := map[string]map[string]map[string]*config.Resource{} + for name, resource := range pc.Resources { + group := pc.RootGroup + if resource.ShortGroup != "" { + group = strings.ToLower(resource.ShortGroup) + "." + pc.RootGroup + } + if len(resourcesGroups[group]) == 0 { + resourcesGroups[group] = map[string]map[string]*config.Resource{} + } + if len(resourcesGroups[group][resource.Version]) == 0 { + resourcesGroups[group][resource.Version] = map[string]*config.Resource{} + } + resourcesGroups[group][resource.Version][name] = resource + kind := strings.ToLower(resource.Kind) + groupKind[kind] = resource.Kind + } + + exampleGen := examples.NewGenerator(rootDir, pc.ModulePath, pc.ShortName, pc.Resources) + if err := exampleGen.SetReferenceTypes(pc.Resources); err != nil { + panic(errors.Wrap(err, "cannot set reference types for resources")) + } + // Add ProviderConfig API package to the list of API version packages. + apiVersionPkgList := make([]string, 0) + for _, p := range pc.BasePackages.APIVersion { + + apiVersionPkgList = append(apiVersionPkgList, filepath.Join(pc.ModulePath, p)) + } + // Add ProviderConfig controller package to the list of controller packages. + controllerPkgMap := make(map[string][]string) + // new API takes precedence + for p, g := range pc.BasePackages.ControllerMap { + path := filepath.Join(pc.ModulePath, p) + controllerPkgMap[g] = append(controllerPkgMap[g], path) + controllerPkgMap[config.PackageNameMonolith] = append(controllerPkgMap[config.PackageNameMonolith], path) + } + //nolint:staticcheck + for _, p := range pc.BasePackages.Controller { + path := filepath.Join(pc.ModulePath, p) + found := false + for _, p := range controllerPkgMap[config.PackageNameConfig] { + if path == p { + found = true + break + } + } + if !found { + controllerPkgMap[config.PackageNameConfig] = append(controllerPkgMap[config.PackageNameConfig], path) + } + found = false + for _, p := range controllerPkgMap[config.PackageNameMonolith] { + if path == p { + found = true + break + } + } + if !found { + controllerPkgMap[config.PackageNameMonolith] = append(controllerPkgMap[config.PackageNameMonolith], path) + } + } + count := 0 + for group, versions := range resourcesGroups { + for version, resources := range versions { + versionGen := pipeline.NewVersionGenerator(rootDir, pc.ModulePath, group, version) + crdGen := pipeline.NewCRDGenerator(versionGen.Package(), rootDir, pc.ShortName, group, version) + var _ = pipeline.NewTerraformedGenerator(versionGen.Package(), rootDir, group, version) + ctrlGen := pipeline.NewControllerGenerator(rootDir, pc.ModulePath, group) + + for _, name := range sortedResources(resources) { + _, err := crdGen.Generate(resources[name]) + if err != nil { + panic(errors.Wrapf(err, "cannot generate crd for resource %s", name)) + } + featuresPkgPath := "" + if pc.FeaturesPackage != "" { + featuresPkgPath = filepath.Join(pc.ModulePath, pc.FeaturesPackage) + } + ctrlPkgPath, err := ctrlGen.Generate(resources[name], versionGen.Package().Path(), featuresPkgPath) + if err != nil { + panic(errors.Wrapf(err, "cannot generate controller for resource %s", name)) + } + sGroup := strings.Split(group, ".")[0] + controllerPkgMap[sGroup] = append(controllerPkgMap[sGroup], ctrlPkgPath) + controllerPkgMap[config.PackageNameMonolith] = append(controllerPkgMap[config.PackageNameMonolith], ctrlPkgPath) + + count++ + } + if err := versionGen.Generate(); err != nil { + panic(errors.Wrap(err, "cannot generate version files")) + } + apiVersionPkgList = append(apiVersionPkgList, versionGen.Package().Path()) + } + } + if err := NewProviderGenerator(rootDir, pc.ModulePath).Generate(controllerPkgMap, pc.MainTemplate, pc.ShortName, pc.RootGroup, absRootDir); err != nil { + panic(errors.Wrap(err, "cannot generate setup file")) + } + + internalCmd := exec.Command("bash", "-c", "goimports -w $(find . -iname 'zz_*')") + internalCmd.Dir = filepath.Clean(filepath.Join(rootDir, "internal")) + if out, err := internalCmd.CombinedOutput(); err != nil { + panic(errors.Wrap(err, "cannot run goimports for internal folder: "+string(out))) + } +} + +func sortedResources(m map[string]*config.Resource) []string { + result := make([]string, len(m)) + i := 0 + for g := range m { + result[i] = g + i++ + } + sort.Strings(result) + return result +} diff --git a/cmd/dynamic-controller/setup.go b/cmd/dynamic-controller/setup.go new file mode 100644 index 0000000..0174da6 --- /dev/null +++ b/cmd/dynamic-controller/setup.go @@ -0,0 +1,170 @@ +// SPDX-FileCopyrightText: 2023 The Crossplane Authors +// +// SPDX-License-Identifier: Apache-2.0 + +package dynamic_controller + +import ( + "fmt" + "github.com/crossplane/upjet/pkg/pipeline" + "io/ioutil" + "log" + "os" + "path/filepath" + "sort" + "strings" + "text/template" + + "github.com/crossplane/upjet/pkg/config" + "github.com/crossplane/upjet/pkg/pipeline/templates" + "github.com/muvaf/typewriter/pkg/wrapper" + "github.com/pkg/errors" +) + +// NewProviderGenerator returns a new ProviderGenerator. +func NewProviderGenerator(rootDir, modulePath string) *ProviderGenerator { + return &ProviderGenerator{ + ProviderPath: filepath.Join(rootDir, "cmd", "provider"), + LocalDirectoryPath: filepath.Join(rootDir, "internal", "controller"), + LicenseHeaderPath: filepath.Join(rootDir, "hack", "boilerplate.go.txt"), + ModulePath: modulePath, + } +} + +// ProviderGenerator generates controller setup file. +type ProviderGenerator struct { + ProviderPath string + LocalDirectoryPath string + LicenseHeaderPath string + ModulePath string +} + +// Generate writes the setup file and the corresponding provider main file +// using the given list of version packages. +func (sg *ProviderGenerator) Generate(versionPkgMap map[string][]string, mainTemplate string, shortName string, rootGroup string, absRootDir string) error { + var t *template.Template + if len(mainTemplate) != 0 { + tmpl, err := template.New("main").Parse(mainTemplate) + if err != nil { + return errors.Wrap(err, "failed to parse the provider main program template") + } + t = tmpl + } + if t == nil { + return errors.Wrap(sg.generate(rootGroup, versionPkgMap[config.PackageNameMonolith], shortName, absRootDir), "failed to generate the controller setup file") + } + for g, versionPkgList := range versionPkgMap { + + if err := sg.generate(rootGroup, versionPkgList, shortName, absRootDir); err != nil { + return errors.Wrapf(err, "failed to generate the controller setup file for group: %s", g) + } + if err := generateProviderMain(sg.ProviderPath, g, t); err != nil { + return errors.Wrapf(err, "failed to write main program for group: %s", g) + } + } + return nil +} + +func generateProviderMain(providerPath, group string, t *template.Template) error { + f := filepath.Join(providerPath, group) + if err := os.MkdirAll(f, 0750); err != nil { + return errors.Wrapf(err, "failed to mkdir provider main program path: %s", f) + } + m, err := os.OpenFile(filepath.Join(filepath.Clean(f), "zz_main.go"), os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0600) + if err != nil { + return errors.Wrap(err, "failed to open provider main program file") + } + defer func() { + if err := m.Close(); err != nil { + log.Fatalf("Failed to close the templated main %q: %s", f, err.Error()) + } + }() + if err := t.Execute(m, map[string]any{ + "Group": group, + }); err != nil { + return errors.Wrap(err, "failed to execute provider main program template") + } + return nil +} + +func (sg *ProviderGenerator) generate(rootGroup string, versionPkgList []string, shortName string, absRootDir string) error { + setupFile := wrapper.NewFile(filepath.Join(sg.ModulePath, "apis"), "apis", templates.SetupTemplate, + wrapper.WithGenStatement(pipeline.GenStatement), + wrapper.WithHeaderPath(sg.LicenseHeaderPath), + ) + sort.Strings(versionPkgList) + aliases := make([]string, len(versionPkgList)) + var importData string + var kindMapData string + importData += "package controller\n\nimport (\n" + importData += "\"context\"\n\t\"github.com/crossplane/upjet/pkg/controller\"\n\tapiextensions \"k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1\"\n\t\"k8s.io/apimachinery/pkg/runtime/schema\"\n\tctrl \"sigs.k8s.io/controller-runtime\"\n\t\"sigs.k8s.io/controller-runtime/pkg/client\"\n\t\"sigs.k8s.io/controller-runtime/pkg/log\"\n\t\"sync\"\n" + kindMapData += "\n\nvar (\n" + kindMapData += "setupFns = map[schema.GroupKind]func(ctrl.Manager, controller.Options) error{\n" + for i, pkgPath := range versionPkgList { + aliases[i] = setupFile.Imports.UsePackage(pkgPath) + rmDot := strings.Split(aliases[i], ".") + words := strings.Split(pkgPath, "/") + siz := len(words) + group := words[siz-2] + kind := words[siz-1] + importData += rmDot[0] + " " + "\"" + pkgPath + "\"\n" + if group == shortName { + kindMapData += "schema.GroupKind{\"" + rootGroup + "\", " + } else if group == "controller" { + kindMapData += "schema.GroupKind{\"" + kind + "." + rootGroup + "\", " + } else { + kindMapData += "schema.GroupKind{\"" + group + "." + rootGroup + "\", " + } + kindMapData += "\"" + groupKind[kind] + "\"}: " + aliases[i] + "Setup,\n" + } + importData += ")\n\n" + kindMapData += "}\n)\n\n" + if err := generateControllerFile(importData, kindMapData, absRootDir); err != nil { + panic(errors.Wrap(err, "cannot create controller")) + } + return nil +} + +func generateControllerFile(importData string, kindMapData string, absRootDir string) error { + importData += kindMapData + + filePath := absRootDir + "/internal/controller/zz_dynamic_crd_controller.go" // Replace with the path to your file + + // Attempt to remove the file + os.Remove(filePath) + + filePath = absRootDir + "/cmd/generator/crd_controller.go.txt" // Replace with the path to your file + // Read the entire file content + content, err := ioutil.ReadFile(filePath) + if err != nil { + return err + } + // Convert byte slice to string for printing + fileContent := string(content) + importData += fileContent + + filePath = absRootDir + "/internal/controller/zz_dynamic_crd_controller.go" + + // Open or create the file for writing + file, err := os.OpenFile(filePath, os.O_CREATE|os.O_WRONLY, 0644) + if err != nil { + return err + } + defer file.Close() + + // Writing data into the file + _, err = fmt.Fprintf(file, "%s\n", importData) + if err != nil { + return err + } + return nil +} + +/* +var ( + setupFns = map[schema.GroupKind]func(ctrl.Manager, controller.Options) error{ + schema.GroupKind{"azure.kubedb.com", "ResourceGroup"}: resourcegroup.Setup, + schema.GroupKind{"azure.kubedb.com", "ProviderConfig"}: providerregistration.Setup, + } +) +*/ diff --git a/cmd/generator/crd_controller.go.txt b/cmd/generator/crd_controller.go.txt new file mode 100644 index 0000000..52e1879 --- /dev/null +++ b/cmd/generator/crd_controller.go.txt @@ -0,0 +1,48 @@ +//package controller + +var ( + + setupDone = map[schema.GroupKind]bool{} + mu sync.RWMutex +) + +type CustomResourceReconciler struct { + mgr ctrl.Manager + o controller.Options +} + +func NewCustomResourceReconciler(mgr ctrl.Manager, o controller.Options) *CustomResourceReconciler { + return &CustomResourceReconciler{mgr: mgr, o: o} +} + +func (r *CustomResourceReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { + log := log.FromContext(ctx) + var crd apiextensions.CustomResourceDefinition + if err := r.mgr.GetClient().Get(ctx, req.NamespacedName, &crd); err != nil { + log.Error(err, "unable to fetch CustomResourceDefinition") + return ctrl.Result{}, client.IgnoreNotFound(err) + } + gk := schema.GroupKind{ + Group: crd.Spec.Group, + Kind: crd.Spec.Names.Kind, + } + mu.Lock() + defer mu.Unlock() + _, found := setupDone[gk] + if found { + return ctrl.Result{}, nil + } + setup, found := setupFns[gk] + if found { + setup(r.mgr, r.o) + setupDone[gk] = true + } + + return ctrl.Result{}, nil +} + +func (r *CustomResourceReconciler) SetupWithManager(mgr ctrl.Manager) error { + return ctrl.NewControllerManagedBy(mgr). + For(&apiextensions.CustomResourceDefinition{}). + Complete(r) +} diff --git a/cmd/generator/main.go b/cmd/generator/main.go index bb015bb..1852a7e 100644 --- a/cmd/generator/main.go +++ b/cmd/generator/main.go @@ -6,12 +6,11 @@ package main import ( "fmt" + "github.com/crossplane/upjet/pkg/pipeline" + dynamic_controller "kubedb.dev/provider-azure/cmd/dynamic-controller" + pconfig "kubedb.dev/provider-azure/config" "os" "path/filepath" - - "github.com/crossplane/upjet/pkg/pipeline" - - "kubedb.dev/provider-azure/config" ) func main() { @@ -23,5 +22,7 @@ func main() { if err != nil { panic(fmt.Sprintf("cannot calculate the absolute path with %s", rootDir)) } - pipeline.Run(config.GetProvider(), absRootDir) + pc := pconfig.GetProvider() + pipeline.Run(pc, absRootDir) + dynamic_controller.GenerateController(pc, absRootDir) } diff --git a/cmd/provider/main.go b/cmd/provider/main.go index 132a12f..6e37b83 100644 --- a/cmd/provider/main.go +++ b/cmd/provider/main.go @@ -6,6 +6,7 @@ package main import ( "context" + "k8s.io/klog/v2" "os" "path/filepath" "sigs.k8s.io/controller-runtime/pkg/cache" @@ -77,6 +78,7 @@ func main() { }) kingpin.FatalIfError(err, "Cannot create controller manager") kingpin.FatalIfError(apis.AddToScheme(mgr.GetScheme()), "Cannot add Azure APIs to scheme") + kingpin.FatalIfError(apis.AddToSchemeCrd(mgr.GetScheme()), "Cannot add Azure APIs to scheme") o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, @@ -115,6 +117,10 @@ func main() { log.Info("Alpha feature enabled", "flag", features.EnableBetaManagementPolicies) } - kingpin.FatalIfError(controller.Setup(mgr, o), "Cannot setup Azure controllers") + if err := controller.NewCustomResourceReconciler(mgr, o).SetupWithManager(mgr); err != nil { + klog.Error(err, "unable to create controller", "controller", "CustomResourceReconciler") + os.Exit(1) + } + //kingpin.FatalIfError(controller.Setup(mgr, o), "Cannot setup Azure controllers") kingpin.FatalIfError(mgr.Start(ctrl.SetupSignalHandler()), "Cannot start controller manager") } diff --git a/config/provider.go b/config/provider.go index 307e088..b269e8e 100644 --- a/config/provider.go +++ b/config/provider.go @@ -49,9 +49,9 @@ func GetProvider() *ujconfig.Provider { // We need to include the controllers for this group into the base packages // list to get their controllers packaged together with the config package // controllers (provider family config package). - for _, c := range []string{"internal/controller/azure/resourcegroup", "internal/controller/azure/providerregistration", "internal/controller/azure/subscription"} { - pc.BasePackages.ControllerMap[c] = "config" - } + //for _, c := range []string{"internal/controller/azure/resourcegroup", "internal/controller/azure/providerregistration", "internal/controller/azure/subscription"} { + // pc.BasePackages.ControllerMap[c] = "config" + //} // API group overrides from Terraform import statements for _, r := range pc.Resources { diff --git a/examples/providerconfig/providerconfig.yaml b/examples/providerconfig/providerconfig.yaml index 02e691e..df3b691 100644 --- a/examples/providerconfig/providerconfig.yaml +++ b/examples/providerconfig/providerconfig.yaml @@ -1,11 +1,13 @@ apiVersion: azure.kubedb.com/v1beta1 -kind: ProviderConfig metadata: name: default +kind: ProviderConfig spec: credentials: source: Secret secretRef: - name: example-creds + name: azure-secret + key: creds namespace: crossplane-system - key: credentials +#az ad sp create-for-rbac --sdk-auth --role Owner --scopes +#kubectl create secret generic azure-secret -n crossplane-system --from-file=creds=./azure-credentials.json \ No newline at end of file diff --git a/go.mod b/go.mod index 1579540..72cb0ef 100644 --- a/go.mod +++ b/go.mod @@ -3,21 +3,24 @@ module kubedb.dev/provider-azure go 1.19 require ( + dario.cat/mergo v1.0.0 github.com/crossplane/crossplane-runtime v1.14.0-rc.0.0.20231011070344-cc691421c2e5 github.com/crossplane/crossplane-tools v0.0.0-20230925130601-628280f8bf79 - github.com/crossplane/upjet v0.11.0-rc.0.0.20231012093706-c4a76d2a7505 + github.com/crossplane/upjet v1.0.0 github.com/hashicorp/terraform-plugin-sdk/v2 v2.24.0 + github.com/muvaf/typewriter v0.0.0-20210910160850-80e49fe1eb32 github.com/pkg/errors v0.9.1 gopkg.in/alecthomas/kingpin.v2 v2.2.6 k8s.io/api v0.28.2 + k8s.io/apiextensions-apiserver v0.28.2 k8s.io/apimachinery v0.28.2 k8s.io/client-go v0.28.2 + k8s.io/klog/v2 v2.100.1 sigs.k8s.io/controller-runtime v0.16.2 sigs.k8s.io/controller-tools v0.13.0 ) require ( - dario.cat/mergo v1.0.0 // indirect github.com/agext/levenshtein v1.2.3 // indirect github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect @@ -76,7 +79,6 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/muvaf/typewriter v0.0.0-20210910160850-80e49fe1eb32 // indirect github.com/prometheus/client_golang v1.16.0 // indirect github.com/prometheus/client_model v0.4.0 // indirect github.com/prometheus/common v0.44.0 // indirect @@ -90,6 +92,7 @@ require ( github.com/vmihailenco/tagparser v0.1.1 // indirect github.com/yuin/goldmark v1.4.13 // indirect github.com/zclconf/go-cty v1.11.0 // indirect + github.com/zclconf/go-cty-yaml v1.0.3 // indirect go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.26.0 // indirect golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect @@ -109,9 +112,7 @@ require ( gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - k8s.io/apiextensions-apiserver v0.28.2 // indirect k8s.io/component-base v0.28.2 // indirect - k8s.io/klog/v2 v2.100.1 // indirect k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect diff --git a/go.sum b/go.sum index a77b420..e3bee4c 100644 --- a/go.sum +++ b/go.sum @@ -77,8 +77,8 @@ github.com/crossplane/crossplane-runtime v1.14.0-rc.0.0.20231011070344-cc691421c github.com/crossplane/crossplane-runtime v1.14.0-rc.0.0.20231011070344-cc691421c2e5/go.mod h1:kCS5576be8g++HhiDGEBUw+8nkW8p4jhURYeC0zx8jM= github.com/crossplane/crossplane-tools v0.0.0-20230925130601-628280f8bf79 h1:HigXs5tEQxWz0fcj8hzbU2UAZgEM7wPe0XRFOsrtF8Y= github.com/crossplane/crossplane-tools v0.0.0-20230925130601-628280f8bf79/go.mod h1:+e4OaFlOcmr0JvINHl/yvEYBrZawzTgj6pQumOH1SS0= -github.com/crossplane/upjet v0.11.0-rc.0.0.20231012093706-c4a76d2a7505 h1:eCmYgfRopVn6r8RM1Ra4XQAPwVsjTGfktBj2Dk7yy+Y= -github.com/crossplane/upjet v0.11.0-rc.0.0.20231012093706-c4a76d2a7505/go.mod h1:Ov+eoYS2n0Zge/E50zm65meOTYbAHnU6jPt27fQrpbc= +github.com/crossplane/upjet v1.0.0 h1:/R509m+c5XTLsd9oXTEaLj2yIbM/EUmG34XOou1dugM= +github.com/crossplane/upjet v1.0.0/go.mod h1:t9etxIdYaxgyvFPBToikm5zBHi8RIpX8N4mTH77lQFM= github.com/dave/jennifer v1.4.1 h1:XyqG6cn5RQsTj3qlWQTKlRGAyrTcsk1kUmWdZBzRjDw= github.com/dave/jennifer v1.4.1/go.mod h1:7jEdnm+qBcxl8PC0zyp7vxcpSRnzXSt9r39tpTVGlwA= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -315,6 +315,7 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sebdah/goldie v1.0.0/go.mod h1:jXP4hmWywNEwZzhMuv2ccnqTSFpuq8iyQhtQdkkZBH4= +github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/spf13/afero v1.10.0 h1:EaGW2JJh15aKOejeuJ+wpFSHnbd7GE6Wvp3TsNhb6LY= github.com/spf13/afero v1.10.0/go.mod h1:UBogFpq8E9Hx+xc5CNTTEpTnuHVmXDwZcZcE1eb/UhQ= @@ -359,6 +360,8 @@ github.com/zclconf/go-cty v1.10.0/go.mod h1:vVKLxnk3puL4qRAv72AO+W99LUD4da90g3uU github.com/zclconf/go-cty v1.11.0 h1:726SxLdi2SDnjY+BStqB9J1hNp4+2WlzyXLuimibIe0= github.com/zclconf/go-cty v1.11.0/go.mod h1:s9IfD1LK5ccNMSWCVFCE2rJfHiZgi7JijgeWIMfhLvA= github.com/zclconf/go-cty-debug v0.0.0-20191215020915-b22d67c1ba0b/go.mod h1:ZRKQfBXbGkpdV6QMzT3rU1kSTAnfu1dO8dPKjYprgj8= +github.com/zclconf/go-cty-yaml v1.0.3 h1:og/eOQ7lvA/WWhHGFETVWNduJM7Rjsv2RRpx1sdFMLc= +github.com/zclconf/go-cty-yaml v1.0.3/go.mod h1:9YLUH4g7lOhVWqUbctnVlZ5KLpg7JAprQNgxSZ1Gyxs= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= diff --git a/internal/controller/zz_dynamic_crd_controller.go b/internal/controller/zz_dynamic_crd_controller.go new file mode 100644 index 0000000..d154943 --- /dev/null +++ b/internal/controller/zz_dynamic_crd_controller.go @@ -0,0 +1,240 @@ +package controller + +import ( + "context" + "sync" + + "github.com/crossplane/upjet/pkg/controller" + apiextensions "k8s.io/apiextensions-apiserver/pkg/apis/apiextensions/v1" + "k8s.io/apimachinery/pkg/runtime/schema" + roleassignment "kubedb.dev/provider-azure/internal/controller/authorization/roleassignment" + providerregistration "kubedb.dev/provider-azure/internal/controller/azure/providerregistration" + resourcegroup "kubedb.dev/provider-azure/internal/controller/azure/resourcegroup" + subscription "kubedb.dev/provider-azure/internal/controller/azure/subscription" + rediscache "kubedb.dev/provider-azure/internal/controller/cache/rediscache" + redisenterprisecluster "kubedb.dev/provider-azure/internal/controller/cache/redisenterprisecluster" + redisenterprisedatabase "kubedb.dev/provider-azure/internal/controller/cache/redisenterprisedatabase" + redisfirewallrule "kubedb.dev/provider-azure/internal/controller/cache/redisfirewallrule" + redislinkedserver "kubedb.dev/provider-azure/internal/controller/cache/redislinkedserver" + account "kubedb.dev/provider-azure/internal/controller/cosmosdb/account" + cassandracluster "kubedb.dev/provider-azure/internal/controller/cosmosdb/cassandracluster" + cassandradatacenter "kubedb.dev/provider-azure/internal/controller/cosmosdb/cassandradatacenter" + cassandrakeyspace "kubedb.dev/provider-azure/internal/controller/cosmosdb/cassandrakeyspace" + cassandratable "kubedb.dev/provider-azure/internal/controller/cosmosdb/cassandratable" + gremlindatabase "kubedb.dev/provider-azure/internal/controller/cosmosdb/gremlindatabase" + gremlingraph "kubedb.dev/provider-azure/internal/controller/cosmosdb/gremlingraph" + mongocollection "kubedb.dev/provider-azure/internal/controller/cosmosdb/mongocollection" + mongodatabase "kubedb.dev/provider-azure/internal/controller/cosmosdb/mongodatabase" + sqlcontainer "kubedb.dev/provider-azure/internal/controller/cosmosdb/sqlcontainer" + sqldatabase "kubedb.dev/provider-azure/internal/controller/cosmosdb/sqldatabase" + sqldedicatedgateway "kubedb.dev/provider-azure/internal/controller/cosmosdb/sqldedicatedgateway" + sqlfunction "kubedb.dev/provider-azure/internal/controller/cosmosdb/sqlfunction" + sqlroleassignment "kubedb.dev/provider-azure/internal/controller/cosmosdb/sqlroleassignment" + sqlroledefinition "kubedb.dev/provider-azure/internal/controller/cosmosdb/sqlroledefinition" + sqlstoredprocedure "kubedb.dev/provider-azure/internal/controller/cosmosdb/sqlstoredprocedure" + sqltrigger "kubedb.dev/provider-azure/internal/controller/cosmosdb/sqltrigger" + table "kubedb.dev/provider-azure/internal/controller/cosmosdb/table" + configuration "kubedb.dev/provider-azure/internal/controller/dbformariadb/configuration" + database "kubedb.dev/provider-azure/internal/controller/dbformariadb/database" + firewallrule "kubedb.dev/provider-azure/internal/controller/dbformariadb/firewallrule" + server "kubedb.dev/provider-azure/internal/controller/dbformariadb/server" + virtualnetworkrule "kubedb.dev/provider-azure/internal/controller/dbformariadb/virtualnetworkrule" + activedirectoryadministrator "kubedb.dev/provider-azure/internal/controller/dbformysql/activedirectoryadministrator" + configurationdbformysql "kubedb.dev/provider-azure/internal/controller/dbformysql/configuration" + databasedbformysql "kubedb.dev/provider-azure/internal/controller/dbformysql/database" + firewallruledbformysql "kubedb.dev/provider-azure/internal/controller/dbformysql/firewallrule" + flexibledatabase "kubedb.dev/provider-azure/internal/controller/dbformysql/flexibledatabase" + flexibleserver "kubedb.dev/provider-azure/internal/controller/dbformysql/flexibleserver" + flexibleserverconfiguration "kubedb.dev/provider-azure/internal/controller/dbformysql/flexibleserverconfiguration" + flexibleserverfirewallrule "kubedb.dev/provider-azure/internal/controller/dbformysql/flexibleserverfirewallrule" + serverdbformysql "kubedb.dev/provider-azure/internal/controller/dbformysql/server" + virtualnetworkruledbformysql "kubedb.dev/provider-azure/internal/controller/dbformysql/virtualnetworkrule" + activedirectoryadministratordbforpostgresql "kubedb.dev/provider-azure/internal/controller/dbforpostgresql/activedirectoryadministrator" + configurationdbforpostgresql "kubedb.dev/provider-azure/internal/controller/dbforpostgresql/configuration" + databasedbforpostgresql "kubedb.dev/provider-azure/internal/controller/dbforpostgresql/database" + firewallruledbforpostgresql "kubedb.dev/provider-azure/internal/controller/dbforpostgresql/firewallrule" + flexibleserverdbforpostgresql "kubedb.dev/provider-azure/internal/controller/dbforpostgresql/flexibleserver" + flexibleserverconfigurationdbforpostgresql "kubedb.dev/provider-azure/internal/controller/dbforpostgresql/flexibleserverconfiguration" + flexibleserverdatabase "kubedb.dev/provider-azure/internal/controller/dbforpostgresql/flexibleserverdatabase" + flexibleserverfirewallruledbforpostgresql "kubedb.dev/provider-azure/internal/controller/dbforpostgresql/flexibleserverfirewallrule" + serverdbforpostgresql "kubedb.dev/provider-azure/internal/controller/dbforpostgresql/server" + serverkey "kubedb.dev/provider-azure/internal/controller/dbforpostgresql/serverkey" + virtualnetworkruledbforpostgresql "kubedb.dev/provider-azure/internal/controller/dbforpostgresql/virtualnetworkrule" + key "kubedb.dev/provider-azure/internal/controller/keyvault/key" + vault "kubedb.dev/provider-azure/internal/controller/keyvault/vault" + privatednszone "kubedb.dev/provider-azure/internal/controller/network/privatednszone" + privatednszonevirtualnetworklink "kubedb.dev/provider-azure/internal/controller/network/privatednszonevirtualnetworklink" + routetable "kubedb.dev/provider-azure/internal/controller/network/routetable" + securitygroup "kubedb.dev/provider-azure/internal/controller/network/securitygroup" + subnet "kubedb.dev/provider-azure/internal/controller/network/subnet" + subnetnetworksecuritygroupassociation "kubedb.dev/provider-azure/internal/controller/network/subnetnetworksecuritygroupassociation" + subnetroutetableassociation "kubedb.dev/provider-azure/internal/controller/network/subnetroutetableassociation" + virtualnetwork "kubedb.dev/provider-azure/internal/controller/network/virtualnetwork" + virtualnetworkpeering "kubedb.dev/provider-azure/internal/controller/network/virtualnetworkpeering" + providerconfig "kubedb.dev/provider-azure/internal/controller/providerconfig" + mssqldatabase "kubedb.dev/provider-azure/internal/controller/sql/mssqldatabase" + mssqldatabasevulnerabilityassessmentrulebaseline "kubedb.dev/provider-azure/internal/controller/sql/mssqldatabasevulnerabilityassessmentrulebaseline" + mssqlelasticpool "kubedb.dev/provider-azure/internal/controller/sql/mssqlelasticpool" + mssqlfailovergroup "kubedb.dev/provider-azure/internal/controller/sql/mssqlfailovergroup" + mssqlfirewallrule "kubedb.dev/provider-azure/internal/controller/sql/mssqlfirewallrule" + mssqljobagent "kubedb.dev/provider-azure/internal/controller/sql/mssqljobagent" + mssqljobcredential "kubedb.dev/provider-azure/internal/controller/sql/mssqljobcredential" + mssqlmanageddatabase "kubedb.dev/provider-azure/internal/controller/sql/mssqlmanageddatabase" + mssqlmanagedinstance "kubedb.dev/provider-azure/internal/controller/sql/mssqlmanagedinstance" + mssqlmanagedinstanceactivedirectoryadministrator "kubedb.dev/provider-azure/internal/controller/sql/mssqlmanagedinstanceactivedirectoryadministrator" + mssqlmanagedinstancefailovergroup "kubedb.dev/provider-azure/internal/controller/sql/mssqlmanagedinstancefailovergroup" + mssqlmanagedinstancevulnerabilityassessment "kubedb.dev/provider-azure/internal/controller/sql/mssqlmanagedinstancevulnerabilityassessment" + mssqloutboundfirewallrule "kubedb.dev/provider-azure/internal/controller/sql/mssqloutboundfirewallrule" + mssqlserver "kubedb.dev/provider-azure/internal/controller/sql/mssqlserver" + mssqlserverdnsalias "kubedb.dev/provider-azure/internal/controller/sql/mssqlserverdnsalias" + mssqlservermicrosoftsupportauditingpolicy "kubedb.dev/provider-azure/internal/controller/sql/mssqlservermicrosoftsupportauditingpolicy" + mssqlserversecurityalertpolicy "kubedb.dev/provider-azure/internal/controller/sql/mssqlserversecurityalertpolicy" + mssqlservertransparentdataencryption "kubedb.dev/provider-azure/internal/controller/sql/mssqlservertransparentdataencryption" + mssqlservervulnerabilityassessment "kubedb.dev/provider-azure/internal/controller/sql/mssqlservervulnerabilityassessment" + mssqlvirtualnetworkrule "kubedb.dev/provider-azure/internal/controller/sql/mssqlvirtualnetworkrule" + accountstorage "kubedb.dev/provider-azure/internal/controller/storage/account" + container "kubedb.dev/provider-azure/internal/controller/storage/container" + ctrl "sigs.k8s.io/controller-runtime" + "sigs.k8s.io/controller-runtime/pkg/client" + "sigs.k8s.io/controller-runtime/pkg/log" +) + +var ( + setupFns = map[schema.GroupKind]func(ctrl.Manager, controller.Options) error{ + schema.GroupKind{"authorization.azure.kubedb.com", "RoleAssignment"}: roleassignment.Setup, + schema.GroupKind{"azure.kubedb.com", "ProviderRegistration"}: providerregistration.Setup, + schema.GroupKind{"azure.kubedb.com", "ResourceGroup"}: resourcegroup.Setup, + schema.GroupKind{"azure.kubedb.com", "Subscription"}: subscription.Setup, + schema.GroupKind{"cache.azure.kubedb.com", "RedisCache"}: rediscache.Setup, + schema.GroupKind{"cache.azure.kubedb.com", "RedisEnterpriseCluster"}: redisenterprisecluster.Setup, + schema.GroupKind{"cache.azure.kubedb.com", "RedisEnterpriseDatabase"}: redisenterprisedatabase.Setup, + schema.GroupKind{"cache.azure.kubedb.com", "RedisFirewallRule"}: redisfirewallrule.Setup, + schema.GroupKind{"cache.azure.kubedb.com", "RedisLinkedServer"}: redislinkedserver.Setup, + schema.GroupKind{"cosmosdb.azure.kubedb.com", "Account"}: account.Setup, + schema.GroupKind{"cosmosdb.azure.kubedb.com", "CassandraCluster"}: cassandracluster.Setup, + schema.GroupKind{"cosmosdb.azure.kubedb.com", "CassandraDatacenter"}: cassandradatacenter.Setup, + schema.GroupKind{"cosmosdb.azure.kubedb.com", "CassandraKeySpace"}: cassandrakeyspace.Setup, + schema.GroupKind{"cosmosdb.azure.kubedb.com", "CassandraTable"}: cassandratable.Setup, + schema.GroupKind{"cosmosdb.azure.kubedb.com", "GremlinDatabase"}: gremlindatabase.Setup, + schema.GroupKind{"cosmosdb.azure.kubedb.com", "GremlinGraph"}: gremlingraph.Setup, + schema.GroupKind{"cosmosdb.azure.kubedb.com", "MongoCollection"}: mongocollection.Setup, + schema.GroupKind{"cosmosdb.azure.kubedb.com", "MongoDatabase"}: mongodatabase.Setup, + schema.GroupKind{"cosmosdb.azure.kubedb.com", "SQLContainer"}: sqlcontainer.Setup, + schema.GroupKind{"cosmosdb.azure.kubedb.com", "SQLDatabase"}: sqldatabase.Setup, + schema.GroupKind{"cosmosdb.azure.kubedb.com", "SQLDedicatedGateway"}: sqldedicatedgateway.Setup, + schema.GroupKind{"cosmosdb.azure.kubedb.com", "SQLFunction"}: sqlfunction.Setup, + schema.GroupKind{"cosmosdb.azure.kubedb.com", "SQLRoleAssignment"}: sqlroleassignment.Setup, + schema.GroupKind{"cosmosdb.azure.kubedb.com", "SQLRoleDefinition"}: sqlroledefinition.Setup, + schema.GroupKind{"cosmosdb.azure.kubedb.com", "SQLStoredProcedure"}: sqlstoredprocedure.Setup, + schema.GroupKind{"cosmosdb.azure.kubedb.com", "SQLTrigger"}: sqltrigger.Setup, + schema.GroupKind{"cosmosdb.azure.kubedb.com", "Table"}: table.Setup, + schema.GroupKind{"dbformariadb.azure.kubedb.com", "Configuration"}: configuration.Setup, + schema.GroupKind{"dbformariadb.azure.kubedb.com", "Database"}: database.Setup, + schema.GroupKind{"dbformariadb.azure.kubedb.com", "FirewallRule"}: firewallrule.Setup, + schema.GroupKind{"dbformariadb.azure.kubedb.com", "Server"}: server.Setup, + schema.GroupKind{"dbformariadb.azure.kubedb.com", "VirtualNetworkRule"}: virtualnetworkrule.Setup, + schema.GroupKind{"dbformysql.azure.kubedb.com", "ActiveDirectoryAdministrator"}: activedirectoryadministrator.Setup, + schema.GroupKind{"dbformysql.azure.kubedb.com", "Configuration"}: configurationdbformysql.Setup, + schema.GroupKind{"dbformysql.azure.kubedb.com", "Database"}: databasedbformysql.Setup, + schema.GroupKind{"dbformysql.azure.kubedb.com", "FirewallRule"}: firewallruledbformysql.Setup, + schema.GroupKind{"dbformysql.azure.kubedb.com", "FlexibleDatabase"}: flexibledatabase.Setup, + schema.GroupKind{"dbformysql.azure.kubedb.com", "FlexibleServer"}: flexibleserver.Setup, + schema.GroupKind{"dbformysql.azure.kubedb.com", "FlexibleServerConfiguration"}: flexibleserverconfiguration.Setup, + schema.GroupKind{"dbformysql.azure.kubedb.com", "FlexibleServerFirewallRule"}: flexibleserverfirewallrule.Setup, + schema.GroupKind{"dbformysql.azure.kubedb.com", "Server"}: serverdbformysql.Setup, + schema.GroupKind{"dbformysql.azure.kubedb.com", "VirtualNetworkRule"}: virtualnetworkruledbformysql.Setup, + schema.GroupKind{"dbforpostgresql.azure.kubedb.com", "ActiveDirectoryAdministrator"}: activedirectoryadministratordbforpostgresql.Setup, + schema.GroupKind{"dbforpostgresql.azure.kubedb.com", "Configuration"}: configurationdbforpostgresql.Setup, + schema.GroupKind{"dbforpostgresql.azure.kubedb.com", "Database"}: databasedbforpostgresql.Setup, + schema.GroupKind{"dbforpostgresql.azure.kubedb.com", "FirewallRule"}: firewallruledbforpostgresql.Setup, + schema.GroupKind{"dbforpostgresql.azure.kubedb.com", "FlexibleServer"}: flexibleserverdbforpostgresql.Setup, + schema.GroupKind{"dbforpostgresql.azure.kubedb.com", "FlexibleServerConfiguration"}: flexibleserverconfigurationdbforpostgresql.Setup, + schema.GroupKind{"dbforpostgresql.azure.kubedb.com", "FlexibleServerDatabase"}: flexibleserverdatabase.Setup, + schema.GroupKind{"dbforpostgresql.azure.kubedb.com", "FlexibleServerFirewallRule"}: flexibleserverfirewallruledbforpostgresql.Setup, + schema.GroupKind{"dbforpostgresql.azure.kubedb.com", "Server"}: serverdbforpostgresql.Setup, + schema.GroupKind{"dbforpostgresql.azure.kubedb.com", "ServerKey"}: serverkey.Setup, + schema.GroupKind{"dbforpostgresql.azure.kubedb.com", "VirtualNetworkRule"}: virtualnetworkruledbforpostgresql.Setup, + schema.GroupKind{"keyvault.azure.kubedb.com", "Key"}: key.Setup, + schema.GroupKind{"keyvault.azure.kubedb.com", "Vault"}: vault.Setup, + schema.GroupKind{"network.azure.kubedb.com", "PrivateDNSZone"}: privatednszone.Setup, + schema.GroupKind{"network.azure.kubedb.com", "PrivateDNSZoneVirtualNetworkLink"}: privatednszonevirtualnetworklink.Setup, + schema.GroupKind{"network.azure.kubedb.com", "RouteTable"}: routetable.Setup, + schema.GroupKind{"network.azure.kubedb.com", "SecurityGroup"}: securitygroup.Setup, + schema.GroupKind{"network.azure.kubedb.com", "Subnet"}: subnet.Setup, + schema.GroupKind{"network.azure.kubedb.com", "SubnetNetworkSecurityGroupAssociation"}: subnetnetworksecuritygroupassociation.Setup, + schema.GroupKind{"network.azure.kubedb.com", "SubnetRouteTableAssociation"}: subnetroutetableassociation.Setup, + schema.GroupKind{"network.azure.kubedb.com", "VirtualNetwork"}: virtualnetwork.Setup, + schema.GroupKind{"network.azure.kubedb.com", "VirtualNetworkPeering"}: virtualnetworkpeering.Setup, + schema.GroupKind{"providerconfig.azure.kubedb.com", ""}: providerconfig.Setup, + schema.GroupKind{"sql.azure.kubedb.com", "MSSQLDatabase"}: mssqldatabase.Setup, + schema.GroupKind{"sql.azure.kubedb.com", "MSSQLDatabaseVulnerabilityAssessmentRuleBaseline"}: mssqldatabasevulnerabilityassessmentrulebaseline.Setup, + schema.GroupKind{"sql.azure.kubedb.com", "MSSQLElasticPool"}: mssqlelasticpool.Setup, + schema.GroupKind{"sql.azure.kubedb.com", "MSSQLFailoverGroup"}: mssqlfailovergroup.Setup, + schema.GroupKind{"sql.azure.kubedb.com", "MSSQLFirewallRule"}: mssqlfirewallrule.Setup, + schema.GroupKind{"sql.azure.kubedb.com", "MSSQLJobAgent"}: mssqljobagent.Setup, + schema.GroupKind{"sql.azure.kubedb.com", "MSSQLJobCredential"}: mssqljobcredential.Setup, + schema.GroupKind{"sql.azure.kubedb.com", "MSSQLManagedDatabase"}: mssqlmanageddatabase.Setup, + schema.GroupKind{"sql.azure.kubedb.com", "MSSQLManagedInstance"}: mssqlmanagedinstance.Setup, + schema.GroupKind{"sql.azure.kubedb.com", "MSSQLManagedInstanceActiveDirectoryAdministrator"}: mssqlmanagedinstanceactivedirectoryadministrator.Setup, + schema.GroupKind{"sql.azure.kubedb.com", "MSSQLManagedInstanceFailoverGroup"}: mssqlmanagedinstancefailovergroup.Setup, + schema.GroupKind{"sql.azure.kubedb.com", "MSSQLManagedInstanceVulnerabilityAssessment"}: mssqlmanagedinstancevulnerabilityassessment.Setup, + schema.GroupKind{"sql.azure.kubedb.com", "MSSQLOutboundFirewallRule"}: mssqloutboundfirewallrule.Setup, + schema.GroupKind{"sql.azure.kubedb.com", "MSSQLServer"}: mssqlserver.Setup, + schema.GroupKind{"sql.azure.kubedb.com", "MSSQLServerDNSAlias"}: mssqlserverdnsalias.Setup, + schema.GroupKind{"sql.azure.kubedb.com", "MSSQLServerMicrosoftSupportAuditingPolicy"}: mssqlservermicrosoftsupportauditingpolicy.Setup, + schema.GroupKind{"sql.azure.kubedb.com", "MSSQLServerSecurityAlertPolicy"}: mssqlserversecurityalertpolicy.Setup, + schema.GroupKind{"sql.azure.kubedb.com", "MSSQLServerTransparentDataEncryption"}: mssqlservertransparentdataencryption.Setup, + schema.GroupKind{"sql.azure.kubedb.com", "MSSQLServerVulnerabilityAssessment"}: mssqlservervulnerabilityassessment.Setup, + schema.GroupKind{"sql.azure.kubedb.com", "MSSQLVirtualNetworkRule"}: mssqlvirtualnetworkrule.Setup, + schema.GroupKind{"storage.azure.kubedb.com", "Account"}: accountstorage.Setup, + schema.GroupKind{"storage.azure.kubedb.com", "Container"}: container.Setup, + } +) + +//package controller + +var ( + setupDone = map[schema.GroupKind]bool{} + mu sync.RWMutex +) + +type CustomResourceReconciler struct { + mgr ctrl.Manager + o controller.Options +} + +func NewCustomResourceReconciler(mgr ctrl.Manager, o controller.Options) *CustomResourceReconciler { + return &CustomResourceReconciler{mgr: mgr, o: o} +} + +func (r *CustomResourceReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error) { + log := log.FromContext(ctx) + var crd apiextensions.CustomResourceDefinition + if err := r.mgr.GetClient().Get(ctx, req.NamespacedName, &crd); err != nil { + log.Error(err, "unable to fetch CustomResourceDefinition") + return ctrl.Result{}, client.IgnoreNotFound(err) + } + gk := schema.GroupKind{ + Group: crd.Spec.Group, + Kind: crd.Spec.Names.Kind, + } + mu.Lock() + defer mu.Unlock() + _, found := setupDone[gk] + if found { + return ctrl.Result{}, nil + } + setup, found := setupFns[gk] + if found { + setup(r.mgr, r.o) + setupDone[gk] = true + } + + return ctrl.Result{}, nil +} + +func (r *CustomResourceReconciler) SetupWithManager(mgr ctrl.Manager) error { + return ctrl.NewControllerManagedBy(mgr). + For(&apiextensions.CustomResourceDefinition{}). + Complete(r) +} diff --git a/internal/controller/zz_setup.go b/internal/controller/zz_setup.go index 8c8675b..e32599b 100755 --- a/internal/controller/zz_setup.go +++ b/internal/controller/zz_setup.go @@ -104,11 +104,8 @@ func Setup(mgr ctrl.Manager, o controller.Options) error { for _, setup := range []func(ctrl.Manager, controller.Options) error{ roleassignment.Setup, providerregistration.Setup, - providerregistration.Setup, - resourcegroup.Setup, resourcegroup.Setup, subscription.Setup, - subscription.Setup, rediscache.Setup, redisenterprisecluster.Setup, redisenterprisedatabase.Setup,