From a3de663e6f3066806d5249cea5ba8bf8a51386a2 Mon Sep 17 00:00:00 2001 From: SK Ali Arman Date: Wed, 27 Dec 2023 20:42:00 +0600 Subject: [PATCH] Add dynamically start crd reconciler (#3) Signed-off-by: SK Ali Arman --- apis/compute/v1alpha1/zz_firewall_types.go | 1463 +++++----- apis/compute/v1alpha1/zz_network_types.go | 519 ++-- .../v1alpha1/zz_networkpeering_types.go | 205 +- apis/redis/v1alpha1/zz_instance_types.go | 1845 ++++++------ apis/register_crd.go | 18 + apis/spanner/v1alpha1/zz_database_types.go | 349 +-- .../v1alpha1/zz_databaseiammember_types.go | 137 +- apis/spanner/v1alpha1/zz_instance_types.go | 309 +- .../v1alpha1/zz_instanceiammember_types.go | 115 +- apis/sql/v1alpha1/zz_database_types.go | 301 +- .../sql/v1alpha1/zz_databaseinstance_types.go | 2559 +++++++++-------- .../zz_sourcerepresentationinstance_types.go | 325 ++- apis/sql/v1alpha1/zz_sslcert_types.go | 155 +- apis/sql/v1alpha1/zz_user_types.go | 372 +-- .../generate_dynamic_controller.go | 142 + cmd/dynamic-controller/setup.go | 170 ++ cmd/generator/crd_controller.go.txt | 48 + cmd/generator/main.go | 7 +- cmd/provider/main.go | 9 +- examples/providerconfig/provider-config.yaml | 4 +- go.mod | 6 +- .../controller/zz_dynamic_crd_controller.go | 94 + 22 files changed, 4984 insertions(+), 4168 deletions(-) create mode 100644 apis/register_crd.go create mode 100644 cmd/dynamic-controller/generate_dynamic_controller.go create mode 100644 cmd/dynamic-controller/setup.go create mode 100644 cmd/generator/crd_controller.go.txt create mode 100644 internal/controller/zz_dynamic_crd_controller.go diff --git a/apis/compute/v1alpha1/zz_firewall_types.go b/apis/compute/v1alpha1/zz_firewall_types.go index e0ec326..675aad3 100755 --- a/apis/compute/v1alpha1/zz_firewall_types.go +++ b/apis/compute/v1alpha1/zz_firewall_types.go @@ -15,775 +15,802 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type AllowInitParameters struct { - // An optional list of ports to which this rule applies. This field - // is only applicable for UDP or TCP protocol. Each entry must be - // either an integer or a range. If not specified, this rule - // applies to connections through any port. - // Example inputs include: ["22"], ["80","443"], and - // ["12345-12349"]. - // An optional list of ports to which this rule applies. This field - // is only applicable for UDP or TCP protocol. Each entry must be - // either an integer or a range. If not specified, this rule - // applies to connections through any port. - // - // Example inputs include: ["22"], ["80","443"], and - // ["12345-12349"]. - Ports []*string `json:"ports,omitempty" tf:"ports,omitempty"` - - // The IP protocol to which this rule applies. The protocol type is - // required when creating a firewall rule. This value can either be - // one of the following well known protocol strings (tcp, udp, - // icmp, esp, ah, sctp, ipip, all), or the IP protocol number. - // The IP protocol to which this rule applies. The protocol type is - // required when creating a firewall rule. This value can either be - // one of the following well known protocol strings (tcp, udp, - // icmp, esp, ah, sctp, ipip, all), or the IP protocol number. - Protocol *string `json:"protocol,omitempty" tf:"protocol,omitempty"` + +// An optional list of ports to which this rule applies. This field +// is only applicable for UDP or TCP protocol. Each entry must be +// either an integer or a range. If not specified, this rule +// applies to connections through any port. +// Example inputs include: ["22"], ["80","443"], and +// ["12345-12349"]. +// An optional list of ports to which this rule applies. This field +// is only applicable for UDP or TCP protocol. Each entry must be +// either an integer or a range. If not specified, this rule +// applies to connections through any port. +// +// Example inputs include: ["22"], ["80","443"], and +// ["12345-12349"]. +Ports []*string `json:"ports,omitempty" tf:"ports,omitempty"` + +// The IP protocol to which this rule applies. The protocol type is +// required when creating a firewall rule. This value can either be +// one of the following well known protocol strings (tcp, udp, +// icmp, esp, ah, sctp, ipip, all), or the IP protocol number. +// The IP protocol to which this rule applies. The protocol type is +// required when creating a firewall rule. This value can either be +// one of the following well known protocol strings (tcp, udp, +// icmp, esp, ah, sctp, ipip, all), or the IP protocol number. +Protocol *string `json:"protocol,omitempty" tf:"protocol,omitempty"` } + type AllowObservation struct { - // An optional list of ports to which this rule applies. This field - // is only applicable for UDP or TCP protocol. Each entry must be - // either an integer or a range. If not specified, this rule - // applies to connections through any port. - // Example inputs include: ["22"], ["80","443"], and - // ["12345-12349"]. - // An optional list of ports to which this rule applies. This field - // is only applicable for UDP or TCP protocol. Each entry must be - // either an integer or a range. If not specified, this rule - // applies to connections through any port. - // - // Example inputs include: ["22"], ["80","443"], and - // ["12345-12349"]. - Ports []*string `json:"ports,omitempty" tf:"ports,omitempty"` - - // The IP protocol to which this rule applies. The protocol type is - // required when creating a firewall rule. This value can either be - // one of the following well known protocol strings (tcp, udp, - // icmp, esp, ah, sctp, ipip, all), or the IP protocol number. - // The IP protocol to which this rule applies. The protocol type is - // required when creating a firewall rule. This value can either be - // one of the following well known protocol strings (tcp, udp, - // icmp, esp, ah, sctp, ipip, all), or the IP protocol number. - Protocol *string `json:"protocol,omitempty" tf:"protocol,omitempty"` + +// An optional list of ports to which this rule applies. This field +// is only applicable for UDP or TCP protocol. Each entry must be +// either an integer or a range. If not specified, this rule +// applies to connections through any port. +// Example inputs include: ["22"], ["80","443"], and +// ["12345-12349"]. +// An optional list of ports to which this rule applies. This field +// is only applicable for UDP or TCP protocol. Each entry must be +// either an integer or a range. If not specified, this rule +// applies to connections through any port. +// +// Example inputs include: ["22"], ["80","443"], and +// ["12345-12349"]. +Ports []*string `json:"ports,omitempty" tf:"ports,omitempty"` + +// The IP protocol to which this rule applies. The protocol type is +// required when creating a firewall rule. This value can either be +// one of the following well known protocol strings (tcp, udp, +// icmp, esp, ah, sctp, ipip, all), or the IP protocol number. +// The IP protocol to which this rule applies. The protocol type is +// required when creating a firewall rule. This value can either be +// one of the following well known protocol strings (tcp, udp, +// icmp, esp, ah, sctp, ipip, all), or the IP protocol number. +Protocol *string `json:"protocol,omitempty" tf:"protocol,omitempty"` } + type AllowParameters struct { - // An optional list of ports to which this rule applies. This field - // is only applicable for UDP or TCP protocol. Each entry must be - // either an integer or a range. If not specified, this rule - // applies to connections through any port. - // Example inputs include: ["22"], ["80","443"], and - // ["12345-12349"]. - // An optional list of ports to which this rule applies. This field - // is only applicable for UDP or TCP protocol. Each entry must be - // either an integer or a range. If not specified, this rule - // applies to connections through any port. - // - // Example inputs include: ["22"], ["80","443"], and - // ["12345-12349"]. - // +kubebuilder:validation:Optional - Ports []*string `json:"ports,omitempty" tf:"ports,omitempty"` - - // The IP protocol to which this rule applies. The protocol type is - // required when creating a firewall rule. This value can either be - // one of the following well known protocol strings (tcp, udp, - // icmp, esp, ah, sctp, ipip, all), or the IP protocol number. - // The IP protocol to which this rule applies. The protocol type is - // required when creating a firewall rule. This value can either be - // one of the following well known protocol strings (tcp, udp, - // icmp, esp, ah, sctp, ipip, all), or the IP protocol number. - // +kubebuilder:validation:Optional - Protocol *string `json:"protocol" tf:"protocol,omitempty"` + +// An optional list of ports to which this rule applies. This field +// is only applicable for UDP or TCP protocol. Each entry must be +// either an integer or a range. If not specified, this rule +// applies to connections through any port. +// Example inputs include: ["22"], ["80","443"], and +// ["12345-12349"]. +// An optional list of ports to which this rule applies. This field +// is only applicable for UDP or TCP protocol. Each entry must be +// either an integer or a range. If not specified, this rule +// applies to connections through any port. +// +// Example inputs include: ["22"], ["80","443"], and +// ["12345-12349"]. +// +kubebuilder:validation:Optional +Ports []*string `json:"ports,omitempty" tf:"ports,omitempty"` + +// The IP protocol to which this rule applies. The protocol type is +// required when creating a firewall rule. This value can either be +// one of the following well known protocol strings (tcp, udp, +// icmp, esp, ah, sctp, ipip, all), or the IP protocol number. +// The IP protocol to which this rule applies. The protocol type is +// required when creating a firewall rule. This value can either be +// one of the following well known protocol strings (tcp, udp, +// icmp, esp, ah, sctp, ipip, all), or the IP protocol number. +// +kubebuilder:validation:Optional +Protocol *string `json:"protocol" tf:"protocol,omitempty"` } + type DenyInitParameters struct { - // An optional list of ports to which this rule applies. This field - // is only applicable for UDP or TCP protocol. Each entry must be - // either an integer or a range. If not specified, this rule - // applies to connections through any port. - // Example inputs include: ["22"], ["80","443"], and - // ["12345-12349"]. - // An optional list of ports to which this rule applies. This field - // is only applicable for UDP or TCP protocol. Each entry must be - // either an integer or a range. If not specified, this rule - // applies to connections through any port. - // - // Example inputs include: ["22"], ["80","443"], and - // ["12345-12349"]. - Ports []*string `json:"ports,omitempty" tf:"ports,omitempty"` - - // The IP protocol to which this rule applies. The protocol type is - // required when creating a firewall rule. This value can either be - // one of the following well known protocol strings (tcp, udp, - // icmp, esp, ah, sctp, ipip, all), or the IP protocol number. - // The IP protocol to which this rule applies. The protocol type is - // required when creating a firewall rule. This value can either be - // one of the following well known protocol strings (tcp, udp, - // icmp, esp, ah, sctp, ipip, all), or the IP protocol number. - Protocol *string `json:"protocol,omitempty" tf:"protocol,omitempty"` + +// An optional list of ports to which this rule applies. This field +// is only applicable for UDP or TCP protocol. Each entry must be +// either an integer or a range. If not specified, this rule +// applies to connections through any port. +// Example inputs include: ["22"], ["80","443"], and +// ["12345-12349"]. +// An optional list of ports to which this rule applies. This field +// is only applicable for UDP or TCP protocol. Each entry must be +// either an integer or a range. If not specified, this rule +// applies to connections through any port. +// +// Example inputs include: ["22"], ["80","443"], and +// ["12345-12349"]. +Ports []*string `json:"ports,omitempty" tf:"ports,omitempty"` + +// The IP protocol to which this rule applies. The protocol type is +// required when creating a firewall rule. This value can either be +// one of the following well known protocol strings (tcp, udp, +// icmp, esp, ah, sctp, ipip, all), or the IP protocol number. +// The IP protocol to which this rule applies. The protocol type is +// required when creating a firewall rule. This value can either be +// one of the following well known protocol strings (tcp, udp, +// icmp, esp, ah, sctp, ipip, all), or the IP protocol number. +Protocol *string `json:"protocol,omitempty" tf:"protocol,omitempty"` } + type DenyObservation struct { - // An optional list of ports to which this rule applies. This field - // is only applicable for UDP or TCP protocol. Each entry must be - // either an integer or a range. If not specified, this rule - // applies to connections through any port. - // Example inputs include: ["22"], ["80","443"], and - // ["12345-12349"]. - // An optional list of ports to which this rule applies. This field - // is only applicable for UDP or TCP protocol. Each entry must be - // either an integer or a range. If not specified, this rule - // applies to connections through any port. - // - // Example inputs include: ["22"], ["80","443"], and - // ["12345-12349"]. - Ports []*string `json:"ports,omitempty" tf:"ports,omitempty"` - - // The IP protocol to which this rule applies. The protocol type is - // required when creating a firewall rule. This value can either be - // one of the following well known protocol strings (tcp, udp, - // icmp, esp, ah, sctp, ipip, all), or the IP protocol number. - // The IP protocol to which this rule applies. The protocol type is - // required when creating a firewall rule. This value can either be - // one of the following well known protocol strings (tcp, udp, - // icmp, esp, ah, sctp, ipip, all), or the IP protocol number. - Protocol *string `json:"protocol,omitempty" tf:"protocol,omitempty"` + +// An optional list of ports to which this rule applies. This field +// is only applicable for UDP or TCP protocol. Each entry must be +// either an integer or a range. If not specified, this rule +// applies to connections through any port. +// Example inputs include: ["22"], ["80","443"], and +// ["12345-12349"]. +// An optional list of ports to which this rule applies. This field +// is only applicable for UDP or TCP protocol. Each entry must be +// either an integer or a range. If not specified, this rule +// applies to connections through any port. +// +// Example inputs include: ["22"], ["80","443"], and +// ["12345-12349"]. +Ports []*string `json:"ports,omitempty" tf:"ports,omitempty"` + +// The IP protocol to which this rule applies. The protocol type is +// required when creating a firewall rule. This value can either be +// one of the following well known protocol strings (tcp, udp, +// icmp, esp, ah, sctp, ipip, all), or the IP protocol number. +// The IP protocol to which this rule applies. The protocol type is +// required when creating a firewall rule. This value can either be +// one of the following well known protocol strings (tcp, udp, +// icmp, esp, ah, sctp, ipip, all), or the IP protocol number. +Protocol *string `json:"protocol,omitempty" tf:"protocol,omitempty"` } + type DenyParameters struct { - // An optional list of ports to which this rule applies. This field - // is only applicable for UDP or TCP protocol. Each entry must be - // either an integer or a range. If not specified, this rule - // applies to connections through any port. - // Example inputs include: ["22"], ["80","443"], and - // ["12345-12349"]. - // An optional list of ports to which this rule applies. This field - // is only applicable for UDP or TCP protocol. Each entry must be - // either an integer or a range. If not specified, this rule - // applies to connections through any port. - // - // Example inputs include: ["22"], ["80","443"], and - // ["12345-12349"]. - // +kubebuilder:validation:Optional - Ports []*string `json:"ports,omitempty" tf:"ports,omitempty"` - - // The IP protocol to which this rule applies. The protocol type is - // required when creating a firewall rule. This value can either be - // one of the following well known protocol strings (tcp, udp, - // icmp, esp, ah, sctp, ipip, all), or the IP protocol number. - // The IP protocol to which this rule applies. The protocol type is - // required when creating a firewall rule. This value can either be - // one of the following well known protocol strings (tcp, udp, - // icmp, esp, ah, sctp, ipip, all), or the IP protocol number. - // +kubebuilder:validation:Optional - Protocol *string `json:"protocol" tf:"protocol,omitempty"` + +// An optional list of ports to which this rule applies. This field +// is only applicable for UDP or TCP protocol. Each entry must be +// either an integer or a range. If not specified, this rule +// applies to connections through any port. +// Example inputs include: ["22"], ["80","443"], and +// ["12345-12349"]. +// An optional list of ports to which this rule applies. This field +// is only applicable for UDP or TCP protocol. Each entry must be +// either an integer or a range. If not specified, this rule +// applies to connections through any port. +// +// Example inputs include: ["22"], ["80","443"], and +// ["12345-12349"]. +// +kubebuilder:validation:Optional +Ports []*string `json:"ports,omitempty" tf:"ports,omitempty"` + +// The IP protocol to which this rule applies. The protocol type is +// required when creating a firewall rule. This value can either be +// one of the following well known protocol strings (tcp, udp, +// icmp, esp, ah, sctp, ipip, all), or the IP protocol number. +// The IP protocol to which this rule applies. The protocol type is +// required when creating a firewall rule. This value can either be +// one of the following well known protocol strings (tcp, udp, +// icmp, esp, ah, sctp, ipip, all), or the IP protocol number. +// +kubebuilder:validation:Optional +Protocol *string `json:"protocol" tf:"protocol,omitempty"` } + type FirewallInitParameters struct { - // The list of ALLOW rules specified by this firewall. Each rule - // specifies a protocol and port-range tuple that describes a permitted - // connection. - // Structure is documented below. - // The list of ALLOW rules specified by this firewall. Each rule - // specifies a protocol and port-range tuple that describes a permitted - // connection. - Allow []AllowInitParameters `json:"allow,omitempty" tf:"allow,omitempty"` - - // The list of DENY rules specified by this firewall. Each rule specifies - // a protocol and port-range tuple that describes a denied connection. - // Structure is documented below. - // The list of DENY rules specified by this firewall. Each rule specifies - // a protocol and port-range tuple that describes a denied connection. - Deny []DenyInitParameters `json:"deny,omitempty" tf:"deny,omitempty"` - - // An optional description of this resource. Provide this property when - // you create the resource. - // An optional description of this resource. Provide this property when - // you create the resource. - Description *string `json:"description,omitempty" tf:"description,omitempty"` - - // If destination ranges are specified, the firewall will apply only to - // traffic that has destination IP address in these ranges. These ranges - // must be expressed in CIDR format. IPv4 or IPv6 ranges are supported. - // If destination ranges are specified, the firewall will apply only to - // traffic that has destination IP address in these ranges. These ranges - // must be expressed in CIDR format. IPv4 or IPv6 ranges are supported. - DestinationRanges []*string `json:"destinationRanges,omitempty" tf:"destination_ranges,omitempty"` - - // Direction of traffic to which this firewall applies; default is - // INGRESS. Note: For INGRESS traffic, one of source_ranges, - // source_tags or source_service_accounts is required. - // Possible values are: INGRESS, EGRESS. - // Direction of traffic to which this firewall applies; default is - // INGRESS. Note: For INGRESS traffic, one of 'source_ranges', - // 'source_tags' or 'source_service_accounts' is required. Possible values: ["INGRESS", "EGRESS"] - Direction *string `json:"direction,omitempty" tf:"direction,omitempty"` - - // Denotes whether the firewall rule is disabled, i.e not applied to the - // network it is associated with. When set to true, the firewall rule is - // not enforced and the network behaves as if it did not exist. If this - // is unspecified, the firewall rule will be enabled. - // Denotes whether the firewall rule is disabled, i.e not applied to the - // network it is associated with. When set to true, the firewall rule is - // not enforced and the network behaves as if it did not exist. If this - // is unspecified, the firewall rule will be enabled. - Disabled *bool `json:"disabled,omitempty" tf:"disabled,omitempty"` - - // This field denotes whether to enable logging for a particular firewall rule. - // If logging is enabled, logs will be exported to Stackdriver. Deprecated in favor of log_config - // This field denotes whether to enable logging for a particular firewall rule. If logging is enabled, logs will be exported to Stackdriver. - EnableLogging *bool `json:"enableLogging,omitempty" tf:"enable_logging,omitempty"` - - // This field denotes the logging options for a particular firewall rule. - // If defined, logging is enabled, and logs will be exported to Cloud Logging. - // Structure is documented below. - // This field denotes the logging options for a particular firewall rule. - // If defined, logging is enabled, and logs will be exported to Cloud Logging. - LogConfig []LogConfigInitParameters `json:"logConfig,omitempty" tf:"log_config,omitempty"` - - // Priority for this rule. This is an integer between 0 and 65535, both - // inclusive. When not specified, the value assumed is 1000. Relative - // priorities determine precedence of conflicting rules. Lower value of - // priority implies higher precedence (eg, a rule with priority 0 has - // higher precedence than a rule with priority 1). DENY rules take - // precedence over ALLOW rules having equal priority. - // Priority for this rule. This is an integer between 0 and 65535, both - // inclusive. When not specified, the value assumed is 1000. Relative - // priorities determine precedence of conflicting rules. Lower value of - // priority implies higher precedence (eg, a rule with priority 0 has - // higher precedence than a rule with priority 1). DENY rules take - // precedence over ALLOW rules having equal priority. - Priority *float64 `json:"priority,omitempty" tf:"priority,omitempty"` - - // The ID of the project in which the resource belongs. - // If it is not provided, the provider project is used. - Project *string `json:"project,omitempty" tf:"project,omitempty"` - - // If source ranges are specified, the firewall will apply only to - // traffic that has source IP address in these ranges. These ranges must - // be expressed in CIDR format. One or both of sourceRanges and - // sourceTags may be set. If both properties are set, the firewall will - // apply to traffic that has source IP address within sourceRanges OR the - // source IP that belongs to a tag listed in the sourceTags property. The - // connection does not need to match both properties for the firewall to - // apply. IPv4 or IPv6 ranges are supported. For INGRESS traffic, one of - // source_ranges, source_tags or source_service_accounts is required. - // If source ranges are specified, the firewall will apply only to - // traffic that has source IP address in these ranges. These ranges must - // be expressed in CIDR format. One or both of sourceRanges and - // sourceTags may be set. If both properties are set, the firewall will - // apply to traffic that has source IP address within sourceRanges OR the - // source IP that belongs to a tag listed in the sourceTags property. The - // connection does not need to match both properties for the firewall to - // apply. IPv4 or IPv6 ranges are supported. For INGRESS traffic, one of - // 'source_ranges', 'source_tags' or 'source_service_accounts' is required. - SourceRanges []*string `json:"sourceRanges,omitempty" tf:"source_ranges,omitempty"` - - // If source service accounts are specified, the firewall will apply only - // to traffic originating from an instance with a service account in this - // list. Source service accounts cannot be used to control traffic to an - // instance's external IP address because service accounts are associated - // with an instance, not an IP address. sourceRanges can be set at the - // same time as sourceServiceAccounts. If both are set, the firewall will - // apply to traffic that has source IP address within sourceRanges OR the - // source IP belongs to an instance with service account listed in - // sourceServiceAccount. The connection does not need to match both - // properties for the firewall to apply. sourceServiceAccounts cannot be - // used at the same time as sourceTags or targetTags. For INGRESS traffic, - // one of source_ranges, source_tags or source_service_accounts is required. - // If source service accounts are specified, the firewall will apply only - // to traffic originating from an instance with a service account in this - // list. Source service accounts cannot be used to control traffic to an - // instance's external IP address because service accounts are associated - // with an instance, not an IP address. sourceRanges can be set at the - // same time as sourceServiceAccounts. If both are set, the firewall will - // apply to traffic that has source IP address within sourceRanges OR the - // source IP belongs to an instance with service account listed in - // sourceServiceAccount. The connection does not need to match both - // properties for the firewall to apply. sourceServiceAccounts cannot be - // used at the same time as sourceTags or targetTags. For INGRESS traffic, - // one of 'source_ranges', 'source_tags' or 'source_service_accounts' is required. - SourceServiceAccounts []*string `json:"sourceServiceAccounts,omitempty" tf:"source_service_accounts,omitempty"` - - // If source tags are specified, the firewall will apply only to traffic - // with source IP that belongs to a tag listed in source tags. Source - // tags cannot be used to control traffic to an instance's external IP - // address. Because tags are associated with an instance, not an IP - // address. One or both of sourceRanges and sourceTags may be set. If - // both properties are set, the firewall will apply to traffic that has - // source IP address within sourceRanges OR the source IP that belongs to - // a tag listed in the sourceTags property. The connection does not need - // to match both properties for the firewall to apply. For INGRESS traffic, - // one of source_ranges, source_tags or source_service_accounts is required. - // If source tags are specified, the firewall will apply only to traffic - // with source IP that belongs to a tag listed in source tags. Source - // tags cannot be used to control traffic to an instance's external IP - // address. Because tags are associated with an instance, not an IP - // address. One or both of sourceRanges and sourceTags may be set. If - // both properties are set, the firewall will apply to traffic that has - // source IP address within sourceRanges OR the source IP that belongs to - // a tag listed in the sourceTags property. The connection does not need - // to match both properties for the firewall to apply. For INGRESS traffic, - // one of 'source_ranges', 'source_tags' or 'source_service_accounts' is required. - SourceTags []*string `json:"sourceTags,omitempty" tf:"source_tags,omitempty"` - - // A list of service accounts indicating sets of instances located in the - // network that may make network connections as specified in allowed[]. - // targetServiceAccounts cannot be used at the same time as targetTags or - // sourceTags. If neither targetServiceAccounts nor targetTags are - // specified, the firewall rule applies to all instances on the specified - // network. - // A list of service accounts indicating sets of instances located in the - // network that may make network connections as specified in allowed[]. - // targetServiceAccounts cannot be used at the same time as targetTags or - // sourceTags. If neither targetServiceAccounts nor targetTags are - // specified, the firewall rule applies to all instances on the specified - // network. - TargetServiceAccounts []*string `json:"targetServiceAccounts,omitempty" tf:"target_service_accounts,omitempty"` - - // A list of instance tags indicating sets of instances located in the - // network that may make network connections as specified in allowed[]. - // If no targetTags are specified, the firewall rule applies to all - // instances on the specified network. - // A list of instance tags indicating sets of instances located in the - // network that may make network connections as specified in allowed[]. - // If no targetTags are specified, the firewall rule applies to all - // instances on the specified network. - TargetTags []*string `json:"targetTags,omitempty" tf:"target_tags,omitempty"` + +// The list of ALLOW rules specified by this firewall. Each rule +// specifies a protocol and port-range tuple that describes a permitted +// connection. +// Structure is documented below. +// The list of ALLOW rules specified by this firewall. Each rule +// specifies a protocol and port-range tuple that describes a permitted +// connection. +Allow []AllowInitParameters `json:"allow,omitempty" tf:"allow,omitempty"` + +// The list of DENY rules specified by this firewall. Each rule specifies +// a protocol and port-range tuple that describes a denied connection. +// Structure is documented below. +// The list of DENY rules specified by this firewall. Each rule specifies +// a protocol and port-range tuple that describes a denied connection. +Deny []DenyInitParameters `json:"deny,omitempty" tf:"deny,omitempty"` + +// An optional description of this resource. Provide this property when +// you create the resource. +// An optional description of this resource. Provide this property when +// you create the resource. +Description *string `json:"description,omitempty" tf:"description,omitempty"` + +// If destination ranges are specified, the firewall will apply only to +// traffic that has destination IP address in these ranges. These ranges +// must be expressed in CIDR format. IPv4 or IPv6 ranges are supported. +// If destination ranges are specified, the firewall will apply only to +// traffic that has destination IP address in these ranges. These ranges +// must be expressed in CIDR format. IPv4 or IPv6 ranges are supported. +DestinationRanges []*string `json:"destinationRanges,omitempty" tf:"destination_ranges,omitempty"` + +// Direction of traffic to which this firewall applies; default is +// INGRESS. Note: For INGRESS traffic, one of source_ranges, +// source_tags or source_service_accounts is required. +// Possible values are: INGRESS, EGRESS. +// Direction of traffic to which this firewall applies; default is +// INGRESS. Note: For INGRESS traffic, one of 'source_ranges', +// 'source_tags' or 'source_service_accounts' is required. Possible values: ["INGRESS", "EGRESS"] +Direction *string `json:"direction,omitempty" tf:"direction,omitempty"` + +// Denotes whether the firewall rule is disabled, i.e not applied to the +// network it is associated with. When set to true, the firewall rule is +// not enforced and the network behaves as if it did not exist. If this +// is unspecified, the firewall rule will be enabled. +// Denotes whether the firewall rule is disabled, i.e not applied to the +// network it is associated with. When set to true, the firewall rule is +// not enforced and the network behaves as if it did not exist. If this +// is unspecified, the firewall rule will be enabled. +Disabled *bool `json:"disabled,omitempty" tf:"disabled,omitempty"` + +// This field denotes whether to enable logging for a particular firewall rule. +// If logging is enabled, logs will be exported to Stackdriver. Deprecated in favor of log_config +// This field denotes whether to enable logging for a particular firewall rule. If logging is enabled, logs will be exported to Stackdriver. +EnableLogging *bool `json:"enableLogging,omitempty" tf:"enable_logging,omitempty"` + +// This field denotes the logging options for a particular firewall rule. +// If defined, logging is enabled, and logs will be exported to Cloud Logging. +// Structure is documented below. +// This field denotes the logging options for a particular firewall rule. +// If defined, logging is enabled, and logs will be exported to Cloud Logging. +LogConfig []LogConfigInitParameters `json:"logConfig,omitempty" tf:"log_config,omitempty"` + +// Priority for this rule. This is an integer between 0 and 65535, both +// inclusive. When not specified, the value assumed is 1000. Relative +// priorities determine precedence of conflicting rules. Lower value of +// priority implies higher precedence (eg, a rule with priority 0 has +// higher precedence than a rule with priority 1). DENY rules take +// precedence over ALLOW rules having equal priority. +// Priority for this rule. This is an integer between 0 and 65535, both +// inclusive. When not specified, the value assumed is 1000. Relative +// priorities determine precedence of conflicting rules. Lower value of +// priority implies higher precedence (eg, a rule with priority 0 has +// higher precedence than a rule with priority 1). DENY rules take +// precedence over ALLOW rules having equal priority. +Priority *float64 `json:"priority,omitempty" tf:"priority,omitempty"` + +// The ID of the project in which the resource belongs. +// If it is not provided, the provider project is used. +Project *string `json:"project,omitempty" tf:"project,omitempty"` + +// If source ranges are specified, the firewall will apply only to +// traffic that has source IP address in these ranges. These ranges must +// be expressed in CIDR format. One or both of sourceRanges and +// sourceTags may be set. If both properties are set, the firewall will +// apply to traffic that has source IP address within sourceRanges OR the +// source IP that belongs to a tag listed in the sourceTags property. The +// connection does not need to match both properties for the firewall to +// apply. IPv4 or IPv6 ranges are supported. For INGRESS traffic, one of +// source_ranges, source_tags or source_service_accounts is required. +// If source ranges are specified, the firewall will apply only to +// traffic that has source IP address in these ranges. These ranges must +// be expressed in CIDR format. One or both of sourceRanges and +// sourceTags may be set. If both properties are set, the firewall will +// apply to traffic that has source IP address within sourceRanges OR the +// source IP that belongs to a tag listed in the sourceTags property. The +// connection does not need to match both properties for the firewall to +// apply. IPv4 or IPv6 ranges are supported. For INGRESS traffic, one of +// 'source_ranges', 'source_tags' or 'source_service_accounts' is required. +SourceRanges []*string `json:"sourceRanges,omitempty" tf:"source_ranges,omitempty"` + +// If source service accounts are specified, the firewall will apply only +// to traffic originating from an instance with a service account in this +// list. Source service accounts cannot be used to control traffic to an +// instance's external IP address because service accounts are associated +// with an instance, not an IP address. sourceRanges can be set at the +// same time as sourceServiceAccounts. If both are set, the firewall will +// apply to traffic that has source IP address within sourceRanges OR the +// source IP belongs to an instance with service account listed in +// sourceServiceAccount. The connection does not need to match both +// properties for the firewall to apply. sourceServiceAccounts cannot be +// used at the same time as sourceTags or targetTags. For INGRESS traffic, +// one of source_ranges, source_tags or source_service_accounts is required. +// If source service accounts are specified, the firewall will apply only +// to traffic originating from an instance with a service account in this +// list. Source service accounts cannot be used to control traffic to an +// instance's external IP address because service accounts are associated +// with an instance, not an IP address. sourceRanges can be set at the +// same time as sourceServiceAccounts. If both are set, the firewall will +// apply to traffic that has source IP address within sourceRanges OR the +// source IP belongs to an instance with service account listed in +// sourceServiceAccount. The connection does not need to match both +// properties for the firewall to apply. sourceServiceAccounts cannot be +// used at the same time as sourceTags or targetTags. For INGRESS traffic, +// one of 'source_ranges', 'source_tags' or 'source_service_accounts' is required. +SourceServiceAccounts []*string `json:"sourceServiceAccounts,omitempty" tf:"source_service_accounts,omitempty"` + +// If source tags are specified, the firewall will apply only to traffic +// with source IP that belongs to a tag listed in source tags. Source +// tags cannot be used to control traffic to an instance's external IP +// address. Because tags are associated with an instance, not an IP +// address. One or both of sourceRanges and sourceTags may be set. If +// both properties are set, the firewall will apply to traffic that has +// source IP address within sourceRanges OR the source IP that belongs to +// a tag listed in the sourceTags property. The connection does not need +// to match both properties for the firewall to apply. For INGRESS traffic, +// one of source_ranges, source_tags or source_service_accounts is required. +// If source tags are specified, the firewall will apply only to traffic +// with source IP that belongs to a tag listed in source tags. Source +// tags cannot be used to control traffic to an instance's external IP +// address. Because tags are associated with an instance, not an IP +// address. One or both of sourceRanges and sourceTags may be set. If +// both properties are set, the firewall will apply to traffic that has +// source IP address within sourceRanges OR the source IP that belongs to +// a tag listed in the sourceTags property. The connection does not need +// to match both properties for the firewall to apply. For INGRESS traffic, +// one of 'source_ranges', 'source_tags' or 'source_service_accounts' is required. +SourceTags []*string `json:"sourceTags,omitempty" tf:"source_tags,omitempty"` + +// A list of service accounts indicating sets of instances located in the +// network that may make network connections as specified in allowed[]. +// targetServiceAccounts cannot be used at the same time as targetTags or +// sourceTags. If neither targetServiceAccounts nor targetTags are +// specified, the firewall rule applies to all instances on the specified +// network. +// A list of service accounts indicating sets of instances located in the +// network that may make network connections as specified in allowed[]. +// targetServiceAccounts cannot be used at the same time as targetTags or +// sourceTags. If neither targetServiceAccounts nor targetTags are +// specified, the firewall rule applies to all instances on the specified +// network. +TargetServiceAccounts []*string `json:"targetServiceAccounts,omitempty" tf:"target_service_accounts,omitempty"` + +// A list of instance tags indicating sets of instances located in the +// network that may make network connections as specified in allowed[]. +// If no targetTags are specified, the firewall rule applies to all +// instances on the specified network. +// A list of instance tags indicating sets of instances located in the +// network that may make network connections as specified in allowed[]. +// If no targetTags are specified, the firewall rule applies to all +// instances on the specified network. +TargetTags []*string `json:"targetTags,omitempty" tf:"target_tags,omitempty"` } + type FirewallObservation struct { - // The list of ALLOW rules specified by this firewall. Each rule - // specifies a protocol and port-range tuple that describes a permitted - // connection. - // Structure is documented below. - // The list of ALLOW rules specified by this firewall. Each rule - // specifies a protocol and port-range tuple that describes a permitted - // connection. - Allow []AllowObservation `json:"allow,omitempty" tf:"allow,omitempty"` - - // Creation timestamp in RFC3339 text format. - // Creation timestamp in RFC3339 text format. - CreationTimestamp *string `json:"creationTimestamp,omitempty" tf:"creation_timestamp,omitempty"` - - // The list of DENY rules specified by this firewall. Each rule specifies - // a protocol and port-range tuple that describes a denied connection. - // Structure is documented below. - // The list of DENY rules specified by this firewall. Each rule specifies - // a protocol and port-range tuple that describes a denied connection. - Deny []DenyObservation `json:"deny,omitempty" tf:"deny,omitempty"` - - // An optional description of this resource. Provide this property when - // you create the resource. - // An optional description of this resource. Provide this property when - // you create the resource. - Description *string `json:"description,omitempty" tf:"description,omitempty"` - - // If destination ranges are specified, the firewall will apply only to - // traffic that has destination IP address in these ranges. These ranges - // must be expressed in CIDR format. IPv4 or IPv6 ranges are supported. - // If destination ranges are specified, the firewall will apply only to - // traffic that has destination IP address in these ranges. These ranges - // must be expressed in CIDR format. IPv4 or IPv6 ranges are supported. - DestinationRanges []*string `json:"destinationRanges,omitempty" tf:"destination_ranges,omitempty"` - - // Direction of traffic to which this firewall applies; default is - // INGRESS. Note: For INGRESS traffic, one of source_ranges, - // source_tags or source_service_accounts is required. - // Possible values are: INGRESS, EGRESS. - // Direction of traffic to which this firewall applies; default is - // INGRESS. Note: For INGRESS traffic, one of 'source_ranges', - // 'source_tags' or 'source_service_accounts' is required. Possible values: ["INGRESS", "EGRESS"] - Direction *string `json:"direction,omitempty" tf:"direction,omitempty"` - - // Denotes whether the firewall rule is disabled, i.e not applied to the - // network it is associated with. When set to true, the firewall rule is - // not enforced and the network behaves as if it did not exist. If this - // is unspecified, the firewall rule will be enabled. - // Denotes whether the firewall rule is disabled, i.e not applied to the - // network it is associated with. When set to true, the firewall rule is - // not enforced and the network behaves as if it did not exist. If this - // is unspecified, the firewall rule will be enabled. - Disabled *bool `json:"disabled,omitempty" tf:"disabled,omitempty"` - - // This field denotes whether to enable logging for a particular firewall rule. - // If logging is enabled, logs will be exported to Stackdriver. Deprecated in favor of log_config - // This field denotes whether to enable logging for a particular firewall rule. If logging is enabled, logs will be exported to Stackdriver. - EnableLogging *bool `json:"enableLogging,omitempty" tf:"enable_logging,omitempty"` - - // an identifier for the resource with format projects/{{project}}/global/firewalls/{{name}} - ID *string `json:"id,omitempty" tf:"id,omitempty"` - - // This field denotes the logging options for a particular firewall rule. - // If defined, logging is enabled, and logs will be exported to Cloud Logging. - // Structure is documented below. - // This field denotes the logging options for a particular firewall rule. - // If defined, logging is enabled, and logs will be exported to Cloud Logging. - LogConfig []LogConfigObservation `json:"logConfig,omitempty" tf:"log_config,omitempty"` - - // The name or self_link of the network to attach this firewall to. - // The name or self_link of the network to attach this firewall to. - Network *string `json:"network,omitempty" tf:"network,omitempty"` - - // Priority for this rule. This is an integer between 0 and 65535, both - // inclusive. When not specified, the value assumed is 1000. Relative - // priorities determine precedence of conflicting rules. Lower value of - // priority implies higher precedence (eg, a rule with priority 0 has - // higher precedence than a rule with priority 1). DENY rules take - // precedence over ALLOW rules having equal priority. - // Priority for this rule. This is an integer between 0 and 65535, both - // inclusive. When not specified, the value assumed is 1000. Relative - // priorities determine precedence of conflicting rules. Lower value of - // priority implies higher precedence (eg, a rule with priority 0 has - // higher precedence than a rule with priority 1). DENY rules take - // precedence over ALLOW rules having equal priority. - Priority *float64 `json:"priority,omitempty" tf:"priority,omitempty"` - - // The ID of the project in which the resource belongs. - // If it is not provided, the provider project is used. - Project *string `json:"project,omitempty" tf:"project,omitempty"` - - // The URI of the created resource. - SelfLink *string `json:"selfLink,omitempty" tf:"self_link,omitempty"` - - // If source ranges are specified, the firewall will apply only to - // traffic that has source IP address in these ranges. These ranges must - // be expressed in CIDR format. One or both of sourceRanges and - // sourceTags may be set. If both properties are set, the firewall will - // apply to traffic that has source IP address within sourceRanges OR the - // source IP that belongs to a tag listed in the sourceTags property. The - // connection does not need to match both properties for the firewall to - // apply. IPv4 or IPv6 ranges are supported. For INGRESS traffic, one of - // source_ranges, source_tags or source_service_accounts is required. - // If source ranges are specified, the firewall will apply only to - // traffic that has source IP address in these ranges. These ranges must - // be expressed in CIDR format. One or both of sourceRanges and - // sourceTags may be set. If both properties are set, the firewall will - // apply to traffic that has source IP address within sourceRanges OR the - // source IP that belongs to a tag listed in the sourceTags property. The - // connection does not need to match both properties for the firewall to - // apply. IPv4 or IPv6 ranges are supported. For INGRESS traffic, one of - // 'source_ranges', 'source_tags' or 'source_service_accounts' is required. - SourceRanges []*string `json:"sourceRanges,omitempty" tf:"source_ranges,omitempty"` - - // If source service accounts are specified, the firewall will apply only - // to traffic originating from an instance with a service account in this - // list. Source service accounts cannot be used to control traffic to an - // instance's external IP address because service accounts are associated - // with an instance, not an IP address. sourceRanges can be set at the - // same time as sourceServiceAccounts. If both are set, the firewall will - // apply to traffic that has source IP address within sourceRanges OR the - // source IP belongs to an instance with service account listed in - // sourceServiceAccount. The connection does not need to match both - // properties for the firewall to apply. sourceServiceAccounts cannot be - // used at the same time as sourceTags or targetTags. For INGRESS traffic, - // one of source_ranges, source_tags or source_service_accounts is required. - // If source service accounts are specified, the firewall will apply only - // to traffic originating from an instance with a service account in this - // list. Source service accounts cannot be used to control traffic to an - // instance's external IP address because service accounts are associated - // with an instance, not an IP address. sourceRanges can be set at the - // same time as sourceServiceAccounts. If both are set, the firewall will - // apply to traffic that has source IP address within sourceRanges OR the - // source IP belongs to an instance with service account listed in - // sourceServiceAccount. The connection does not need to match both - // properties for the firewall to apply. sourceServiceAccounts cannot be - // used at the same time as sourceTags or targetTags. For INGRESS traffic, - // one of 'source_ranges', 'source_tags' or 'source_service_accounts' is required. - SourceServiceAccounts []*string `json:"sourceServiceAccounts,omitempty" tf:"source_service_accounts,omitempty"` - - // If source tags are specified, the firewall will apply only to traffic - // with source IP that belongs to a tag listed in source tags. Source - // tags cannot be used to control traffic to an instance's external IP - // address. Because tags are associated with an instance, not an IP - // address. One or both of sourceRanges and sourceTags may be set. If - // both properties are set, the firewall will apply to traffic that has - // source IP address within sourceRanges OR the source IP that belongs to - // a tag listed in the sourceTags property. The connection does not need - // to match both properties for the firewall to apply. For INGRESS traffic, - // one of source_ranges, source_tags or source_service_accounts is required. - // If source tags are specified, the firewall will apply only to traffic - // with source IP that belongs to a tag listed in source tags. Source - // tags cannot be used to control traffic to an instance's external IP - // address. Because tags are associated with an instance, not an IP - // address. One or both of sourceRanges and sourceTags may be set. If - // both properties are set, the firewall will apply to traffic that has - // source IP address within sourceRanges OR the source IP that belongs to - // a tag listed in the sourceTags property. The connection does not need - // to match both properties for the firewall to apply. For INGRESS traffic, - // one of 'source_ranges', 'source_tags' or 'source_service_accounts' is required. - SourceTags []*string `json:"sourceTags,omitempty" tf:"source_tags,omitempty"` - - // A list of service accounts indicating sets of instances located in the - // network that may make network connections as specified in allowed[]. - // targetServiceAccounts cannot be used at the same time as targetTags or - // sourceTags. If neither targetServiceAccounts nor targetTags are - // specified, the firewall rule applies to all instances on the specified - // network. - // A list of service accounts indicating sets of instances located in the - // network that may make network connections as specified in allowed[]. - // targetServiceAccounts cannot be used at the same time as targetTags or - // sourceTags. If neither targetServiceAccounts nor targetTags are - // specified, the firewall rule applies to all instances on the specified - // network. - TargetServiceAccounts []*string `json:"targetServiceAccounts,omitempty" tf:"target_service_accounts,omitempty"` - - // A list of instance tags indicating sets of instances located in the - // network that may make network connections as specified in allowed[]. - // If no targetTags are specified, the firewall rule applies to all - // instances on the specified network. - // A list of instance tags indicating sets of instances located in the - // network that may make network connections as specified in allowed[]. - // If no targetTags are specified, the firewall rule applies to all - // instances on the specified network. - TargetTags []*string `json:"targetTags,omitempty" tf:"target_tags,omitempty"` + +// The list of ALLOW rules specified by this firewall. Each rule +// specifies a protocol and port-range tuple that describes a permitted +// connection. +// Structure is documented below. +// The list of ALLOW rules specified by this firewall. Each rule +// specifies a protocol and port-range tuple that describes a permitted +// connection. +Allow []AllowObservation `json:"allow,omitempty" tf:"allow,omitempty"` + +// Creation timestamp in RFC3339 text format. +// Creation timestamp in RFC3339 text format. +CreationTimestamp *string `json:"creationTimestamp,omitempty" tf:"creation_timestamp,omitempty"` + +// The list of DENY rules specified by this firewall. Each rule specifies +// a protocol and port-range tuple that describes a denied connection. +// Structure is documented below. +// The list of DENY rules specified by this firewall. Each rule specifies +// a protocol and port-range tuple that describes a denied connection. +Deny []DenyObservation `json:"deny,omitempty" tf:"deny,omitempty"` + +// An optional description of this resource. Provide this property when +// you create the resource. +// An optional description of this resource. Provide this property when +// you create the resource. +Description *string `json:"description,omitempty" tf:"description,omitempty"` + +// If destination ranges are specified, the firewall will apply only to +// traffic that has destination IP address in these ranges. These ranges +// must be expressed in CIDR format. IPv4 or IPv6 ranges are supported. +// If destination ranges are specified, the firewall will apply only to +// traffic that has destination IP address in these ranges. These ranges +// must be expressed in CIDR format. IPv4 or IPv6 ranges are supported. +DestinationRanges []*string `json:"destinationRanges,omitempty" tf:"destination_ranges,omitempty"` + +// Direction of traffic to which this firewall applies; default is +// INGRESS. Note: For INGRESS traffic, one of source_ranges, +// source_tags or source_service_accounts is required. +// Possible values are: INGRESS, EGRESS. +// Direction of traffic to which this firewall applies; default is +// INGRESS. Note: For INGRESS traffic, one of 'source_ranges', +// 'source_tags' or 'source_service_accounts' is required. Possible values: ["INGRESS", "EGRESS"] +Direction *string `json:"direction,omitempty" tf:"direction,omitempty"` + +// Denotes whether the firewall rule is disabled, i.e not applied to the +// network it is associated with. When set to true, the firewall rule is +// not enforced and the network behaves as if it did not exist. If this +// is unspecified, the firewall rule will be enabled. +// Denotes whether the firewall rule is disabled, i.e not applied to the +// network it is associated with. When set to true, the firewall rule is +// not enforced and the network behaves as if it did not exist. If this +// is unspecified, the firewall rule will be enabled. +Disabled *bool `json:"disabled,omitempty" tf:"disabled,omitempty"` + +// This field denotes whether to enable logging for a particular firewall rule. +// If logging is enabled, logs will be exported to Stackdriver. Deprecated in favor of log_config +// This field denotes whether to enable logging for a particular firewall rule. If logging is enabled, logs will be exported to Stackdriver. +EnableLogging *bool `json:"enableLogging,omitempty" tf:"enable_logging,omitempty"` + +// an identifier for the resource with format projects/{{project}}/global/firewalls/{{name}} +ID *string `json:"id,omitempty" tf:"id,omitempty"` + +// This field denotes the logging options for a particular firewall rule. +// If defined, logging is enabled, and logs will be exported to Cloud Logging. +// Structure is documented below. +// This field denotes the logging options for a particular firewall rule. +// If defined, logging is enabled, and logs will be exported to Cloud Logging. +LogConfig []LogConfigObservation `json:"logConfig,omitempty" tf:"log_config,omitempty"` + +// The name or self_link of the network to attach this firewall to. +// The name or self_link of the network to attach this firewall to. +Network *string `json:"network,omitempty" tf:"network,omitempty"` + +// Priority for this rule. This is an integer between 0 and 65535, both +// inclusive. When not specified, the value assumed is 1000. Relative +// priorities determine precedence of conflicting rules. Lower value of +// priority implies higher precedence (eg, a rule with priority 0 has +// higher precedence than a rule with priority 1). DENY rules take +// precedence over ALLOW rules having equal priority. +// Priority for this rule. This is an integer between 0 and 65535, both +// inclusive. When not specified, the value assumed is 1000. Relative +// priorities determine precedence of conflicting rules. Lower value of +// priority implies higher precedence (eg, a rule with priority 0 has +// higher precedence than a rule with priority 1). DENY rules take +// precedence over ALLOW rules having equal priority. +Priority *float64 `json:"priority,omitempty" tf:"priority,omitempty"` + +// The ID of the project in which the resource belongs. +// If it is not provided, the provider project is used. +Project *string `json:"project,omitempty" tf:"project,omitempty"` + +// The URI of the created resource. +SelfLink *string `json:"selfLink,omitempty" tf:"self_link,omitempty"` + +// If source ranges are specified, the firewall will apply only to +// traffic that has source IP address in these ranges. These ranges must +// be expressed in CIDR format. One or both of sourceRanges and +// sourceTags may be set. If both properties are set, the firewall will +// apply to traffic that has source IP address within sourceRanges OR the +// source IP that belongs to a tag listed in the sourceTags property. The +// connection does not need to match both properties for the firewall to +// apply. IPv4 or IPv6 ranges are supported. For INGRESS traffic, one of +// source_ranges, source_tags or source_service_accounts is required. +// If source ranges are specified, the firewall will apply only to +// traffic that has source IP address in these ranges. These ranges must +// be expressed in CIDR format. One or both of sourceRanges and +// sourceTags may be set. If both properties are set, the firewall will +// apply to traffic that has source IP address within sourceRanges OR the +// source IP that belongs to a tag listed in the sourceTags property. The +// connection does not need to match both properties for the firewall to +// apply. IPv4 or IPv6 ranges are supported. For INGRESS traffic, one of +// 'source_ranges', 'source_tags' or 'source_service_accounts' is required. +SourceRanges []*string `json:"sourceRanges,omitempty" tf:"source_ranges,omitempty"` + +// If source service accounts are specified, the firewall will apply only +// to traffic originating from an instance with a service account in this +// list. Source service accounts cannot be used to control traffic to an +// instance's external IP address because service accounts are associated +// with an instance, not an IP address. sourceRanges can be set at the +// same time as sourceServiceAccounts. If both are set, the firewall will +// apply to traffic that has source IP address within sourceRanges OR the +// source IP belongs to an instance with service account listed in +// sourceServiceAccount. The connection does not need to match both +// properties for the firewall to apply. sourceServiceAccounts cannot be +// used at the same time as sourceTags or targetTags. For INGRESS traffic, +// one of source_ranges, source_tags or source_service_accounts is required. +// If source service accounts are specified, the firewall will apply only +// to traffic originating from an instance with a service account in this +// list. Source service accounts cannot be used to control traffic to an +// instance's external IP address because service accounts are associated +// with an instance, not an IP address. sourceRanges can be set at the +// same time as sourceServiceAccounts. If both are set, the firewall will +// apply to traffic that has source IP address within sourceRanges OR the +// source IP belongs to an instance with service account listed in +// sourceServiceAccount. The connection does not need to match both +// properties for the firewall to apply. sourceServiceAccounts cannot be +// used at the same time as sourceTags or targetTags. For INGRESS traffic, +// one of 'source_ranges', 'source_tags' or 'source_service_accounts' is required. +SourceServiceAccounts []*string `json:"sourceServiceAccounts,omitempty" tf:"source_service_accounts,omitempty"` + +// If source tags are specified, the firewall will apply only to traffic +// with source IP that belongs to a tag listed in source tags. Source +// tags cannot be used to control traffic to an instance's external IP +// address. Because tags are associated with an instance, not an IP +// address. One or both of sourceRanges and sourceTags may be set. If +// both properties are set, the firewall will apply to traffic that has +// source IP address within sourceRanges OR the source IP that belongs to +// a tag listed in the sourceTags property. The connection does not need +// to match both properties for the firewall to apply. For INGRESS traffic, +// one of source_ranges, source_tags or source_service_accounts is required. +// If source tags are specified, the firewall will apply only to traffic +// with source IP that belongs to a tag listed in source tags. Source +// tags cannot be used to control traffic to an instance's external IP +// address. Because tags are associated with an instance, not an IP +// address. One or both of sourceRanges and sourceTags may be set. If +// both properties are set, the firewall will apply to traffic that has +// source IP address within sourceRanges OR the source IP that belongs to +// a tag listed in the sourceTags property. The connection does not need +// to match both properties for the firewall to apply. For INGRESS traffic, +// one of 'source_ranges', 'source_tags' or 'source_service_accounts' is required. +SourceTags []*string `json:"sourceTags,omitempty" tf:"source_tags,omitempty"` + +// A list of service accounts indicating sets of instances located in the +// network that may make network connections as specified in allowed[]. +// targetServiceAccounts cannot be used at the same time as targetTags or +// sourceTags. If neither targetServiceAccounts nor targetTags are +// specified, the firewall rule applies to all instances on the specified +// network. +// A list of service accounts indicating sets of instances located in the +// network that may make network connections as specified in allowed[]. +// targetServiceAccounts cannot be used at the same time as targetTags or +// sourceTags. If neither targetServiceAccounts nor targetTags are +// specified, the firewall rule applies to all instances on the specified +// network. +TargetServiceAccounts []*string `json:"targetServiceAccounts,omitempty" tf:"target_service_accounts,omitempty"` + +// A list of instance tags indicating sets of instances located in the +// network that may make network connections as specified in allowed[]. +// If no targetTags are specified, the firewall rule applies to all +// instances on the specified network. +// A list of instance tags indicating sets of instances located in the +// network that may make network connections as specified in allowed[]. +// If no targetTags are specified, the firewall rule applies to all +// instances on the specified network. +TargetTags []*string `json:"targetTags,omitempty" tf:"target_tags,omitempty"` } + type FirewallParameters struct { - // The list of ALLOW rules specified by this firewall. Each rule - // specifies a protocol and port-range tuple that describes a permitted - // connection. - // Structure is documented below. - // The list of ALLOW rules specified by this firewall. Each rule - // specifies a protocol and port-range tuple that describes a permitted - // connection. - // +kubebuilder:validation:Optional - Allow []AllowParameters `json:"allow,omitempty" tf:"allow,omitempty"` - - // The list of DENY rules specified by this firewall. Each rule specifies - // a protocol and port-range tuple that describes a denied connection. - // Structure is documented below. - // The list of DENY rules specified by this firewall. Each rule specifies - // a protocol and port-range tuple that describes a denied connection. - // +kubebuilder:validation:Optional - Deny []DenyParameters `json:"deny,omitempty" tf:"deny,omitempty"` - - // An optional description of this resource. Provide this property when - // you create the resource. - // An optional description of this resource. Provide this property when - // you create the resource. - // +kubebuilder:validation:Optional - Description *string `json:"description,omitempty" tf:"description,omitempty"` - - // If destination ranges are specified, the firewall will apply only to - // traffic that has destination IP address in these ranges. These ranges - // must be expressed in CIDR format. IPv4 or IPv6 ranges are supported. - // If destination ranges are specified, the firewall will apply only to - // traffic that has destination IP address in these ranges. These ranges - // must be expressed in CIDR format. IPv4 or IPv6 ranges are supported. - // +kubebuilder:validation:Optional - DestinationRanges []*string `json:"destinationRanges,omitempty" tf:"destination_ranges,omitempty"` - - // Direction of traffic to which this firewall applies; default is - // INGRESS. Note: For INGRESS traffic, one of source_ranges, - // source_tags or source_service_accounts is required. - // Possible values are: INGRESS, EGRESS. - // Direction of traffic to which this firewall applies; default is - // INGRESS. Note: For INGRESS traffic, one of 'source_ranges', - // 'source_tags' or 'source_service_accounts' is required. Possible values: ["INGRESS", "EGRESS"] - // +kubebuilder:validation:Optional - Direction *string `json:"direction,omitempty" tf:"direction,omitempty"` - - // Denotes whether the firewall rule is disabled, i.e not applied to the - // network it is associated with. When set to true, the firewall rule is - // not enforced and the network behaves as if it did not exist. If this - // is unspecified, the firewall rule will be enabled. - // Denotes whether the firewall rule is disabled, i.e not applied to the - // network it is associated with. When set to true, the firewall rule is - // not enforced and the network behaves as if it did not exist. If this - // is unspecified, the firewall rule will be enabled. - // +kubebuilder:validation:Optional - Disabled *bool `json:"disabled,omitempty" tf:"disabled,omitempty"` - - // This field denotes whether to enable logging for a particular firewall rule. - // If logging is enabled, logs will be exported to Stackdriver. Deprecated in favor of log_config - // This field denotes whether to enable logging for a particular firewall rule. If logging is enabled, logs will be exported to Stackdriver. - // +kubebuilder:validation:Optional - EnableLogging *bool `json:"enableLogging,omitempty" tf:"enable_logging,omitempty"` - - // This field denotes the logging options for a particular firewall rule. - // If defined, logging is enabled, and logs will be exported to Cloud Logging. - // Structure is documented below. - // This field denotes the logging options for a particular firewall rule. - // If defined, logging is enabled, and logs will be exported to Cloud Logging. - // +kubebuilder:validation:Optional - LogConfig []LogConfigParameters `json:"logConfig,omitempty" tf:"log_config,omitempty"` - - // The name or self_link of the network to attach this firewall to. - // The name or self_link of the network to attach this firewall to. - // +crossplane:generate:reference:type=Network - // +crossplane:generate:reference:extractor=kubedb.dev/provider-gcp/config/common.SelfLinkExtractor() - // +kubebuilder:validation:Optional - Network *string `json:"network,omitempty" tf:"network,omitempty"` - - // Reference to a Network to populate network. - // +kubebuilder:validation:Optional - NetworkRef *v1.Reference `json:"networkRef,omitempty" tf:"-"` - - // Selector for a Network to populate network. - // +kubebuilder:validation:Optional - NetworkSelector *v1.Selector `json:"networkSelector,omitempty" tf:"-"` - - // Priority for this rule. This is an integer between 0 and 65535, both - // inclusive. When not specified, the value assumed is 1000. Relative - // priorities determine precedence of conflicting rules. Lower value of - // priority implies higher precedence (eg, a rule with priority 0 has - // higher precedence than a rule with priority 1). DENY rules take - // precedence over ALLOW rules having equal priority. - // Priority for this rule. This is an integer between 0 and 65535, both - // inclusive. When not specified, the value assumed is 1000. Relative - // priorities determine precedence of conflicting rules. Lower value of - // priority implies higher precedence (eg, a rule with priority 0 has - // higher precedence than a rule with priority 1). DENY rules take - // precedence over ALLOW rules having equal priority. - // +kubebuilder:validation:Optional - Priority *float64 `json:"priority,omitempty" tf:"priority,omitempty"` - - // The ID of the project in which the resource belongs. - // If it is not provided, the provider project is used. - // +kubebuilder:validation:Optional - Project *string `json:"project,omitempty" tf:"project,omitempty"` - - // If source ranges are specified, the firewall will apply only to - // traffic that has source IP address in these ranges. These ranges must - // be expressed in CIDR format. One or both of sourceRanges and - // sourceTags may be set. If both properties are set, the firewall will - // apply to traffic that has source IP address within sourceRanges OR the - // source IP that belongs to a tag listed in the sourceTags property. The - // connection does not need to match both properties for the firewall to - // apply. IPv4 or IPv6 ranges are supported. For INGRESS traffic, one of - // source_ranges, source_tags or source_service_accounts is required. - // If source ranges are specified, the firewall will apply only to - // traffic that has source IP address in these ranges. These ranges must - // be expressed in CIDR format. One or both of sourceRanges and - // sourceTags may be set. If both properties are set, the firewall will - // apply to traffic that has source IP address within sourceRanges OR the - // source IP that belongs to a tag listed in the sourceTags property. The - // connection does not need to match both properties for the firewall to - // apply. IPv4 or IPv6 ranges are supported. For INGRESS traffic, one of - // 'source_ranges', 'source_tags' or 'source_service_accounts' is required. - // +kubebuilder:validation:Optional - SourceRanges []*string `json:"sourceRanges,omitempty" tf:"source_ranges,omitempty"` - - // If source service accounts are specified, the firewall will apply only - // to traffic originating from an instance with a service account in this - // list. Source service accounts cannot be used to control traffic to an - // instance's external IP address because service accounts are associated - // with an instance, not an IP address. sourceRanges can be set at the - // same time as sourceServiceAccounts. If both are set, the firewall will - // apply to traffic that has source IP address within sourceRanges OR the - // source IP belongs to an instance with service account listed in - // sourceServiceAccount. The connection does not need to match both - // properties for the firewall to apply. sourceServiceAccounts cannot be - // used at the same time as sourceTags or targetTags. For INGRESS traffic, - // one of source_ranges, source_tags or source_service_accounts is required. - // If source service accounts are specified, the firewall will apply only - // to traffic originating from an instance with a service account in this - // list. Source service accounts cannot be used to control traffic to an - // instance's external IP address because service accounts are associated - // with an instance, not an IP address. sourceRanges can be set at the - // same time as sourceServiceAccounts. If both are set, the firewall will - // apply to traffic that has source IP address within sourceRanges OR the - // source IP belongs to an instance with service account listed in - // sourceServiceAccount. The connection does not need to match both - // properties for the firewall to apply. sourceServiceAccounts cannot be - // used at the same time as sourceTags or targetTags. For INGRESS traffic, - // one of 'source_ranges', 'source_tags' or 'source_service_accounts' is required. - // +kubebuilder:validation:Optional - SourceServiceAccounts []*string `json:"sourceServiceAccounts,omitempty" tf:"source_service_accounts,omitempty"` - - // If source tags are specified, the firewall will apply only to traffic - // with source IP that belongs to a tag listed in source tags. Source - // tags cannot be used to control traffic to an instance's external IP - // address. Because tags are associated with an instance, not an IP - // address. One or both of sourceRanges and sourceTags may be set. If - // both properties are set, the firewall will apply to traffic that has - // source IP address within sourceRanges OR the source IP that belongs to - // a tag listed in the sourceTags property. The connection does not need - // to match both properties for the firewall to apply. For INGRESS traffic, - // one of source_ranges, source_tags or source_service_accounts is required. - // If source tags are specified, the firewall will apply only to traffic - // with source IP that belongs to a tag listed in source tags. Source - // tags cannot be used to control traffic to an instance's external IP - // address. Because tags are associated with an instance, not an IP - // address. One or both of sourceRanges and sourceTags may be set. If - // both properties are set, the firewall will apply to traffic that has - // source IP address within sourceRanges OR the source IP that belongs to - // a tag listed in the sourceTags property. The connection does not need - // to match both properties for the firewall to apply. For INGRESS traffic, - // one of 'source_ranges', 'source_tags' or 'source_service_accounts' is required. - // +kubebuilder:validation:Optional - SourceTags []*string `json:"sourceTags,omitempty" tf:"source_tags,omitempty"` - - // A list of service accounts indicating sets of instances located in the - // network that may make network connections as specified in allowed[]. - // targetServiceAccounts cannot be used at the same time as targetTags or - // sourceTags. If neither targetServiceAccounts nor targetTags are - // specified, the firewall rule applies to all instances on the specified - // network. - // A list of service accounts indicating sets of instances located in the - // network that may make network connections as specified in allowed[]. - // targetServiceAccounts cannot be used at the same time as targetTags or - // sourceTags. If neither targetServiceAccounts nor targetTags are - // specified, the firewall rule applies to all instances on the specified - // network. - // +kubebuilder:validation:Optional - TargetServiceAccounts []*string `json:"targetServiceAccounts,omitempty" tf:"target_service_accounts,omitempty"` - - // A list of instance tags indicating sets of instances located in the - // network that may make network connections as specified in allowed[]. - // If no targetTags are specified, the firewall rule applies to all - // instances on the specified network. - // A list of instance tags indicating sets of instances located in the - // network that may make network connections as specified in allowed[]. - // If no targetTags are specified, the firewall rule applies to all - // instances on the specified network. - // +kubebuilder:validation:Optional - TargetTags []*string `json:"targetTags,omitempty" tf:"target_tags,omitempty"` + +// The list of ALLOW rules specified by this firewall. Each rule +// specifies a protocol and port-range tuple that describes a permitted +// connection. +// Structure is documented below. +// The list of ALLOW rules specified by this firewall. Each rule +// specifies a protocol and port-range tuple that describes a permitted +// connection. +// +kubebuilder:validation:Optional +Allow []AllowParameters `json:"allow,omitempty" tf:"allow,omitempty"` + +// The list of DENY rules specified by this firewall. Each rule specifies +// a protocol and port-range tuple that describes a denied connection. +// Structure is documented below. +// The list of DENY rules specified by this firewall. Each rule specifies +// a protocol and port-range tuple that describes a denied connection. +// +kubebuilder:validation:Optional +Deny []DenyParameters `json:"deny,omitempty" tf:"deny,omitempty"` + +// An optional description of this resource. Provide this property when +// you create the resource. +// An optional description of this resource. Provide this property when +// you create the resource. +// +kubebuilder:validation:Optional +Description *string `json:"description,omitempty" tf:"description,omitempty"` + +// If destination ranges are specified, the firewall will apply only to +// traffic that has destination IP address in these ranges. These ranges +// must be expressed in CIDR format. IPv4 or IPv6 ranges are supported. +// If destination ranges are specified, the firewall will apply only to +// traffic that has destination IP address in these ranges. These ranges +// must be expressed in CIDR format. IPv4 or IPv6 ranges are supported. +// +kubebuilder:validation:Optional +DestinationRanges []*string `json:"destinationRanges,omitempty" tf:"destination_ranges,omitempty"` + +// Direction of traffic to which this firewall applies; default is +// INGRESS. Note: For INGRESS traffic, one of source_ranges, +// source_tags or source_service_accounts is required. +// Possible values are: INGRESS, EGRESS. +// Direction of traffic to which this firewall applies; default is +// INGRESS. Note: For INGRESS traffic, one of 'source_ranges', +// 'source_tags' or 'source_service_accounts' is required. Possible values: ["INGRESS", "EGRESS"] +// +kubebuilder:validation:Optional +Direction *string `json:"direction,omitempty" tf:"direction,omitempty"` + +// Denotes whether the firewall rule is disabled, i.e not applied to the +// network it is associated with. When set to true, the firewall rule is +// not enforced and the network behaves as if it did not exist. If this +// is unspecified, the firewall rule will be enabled. +// Denotes whether the firewall rule is disabled, i.e not applied to the +// network it is associated with. When set to true, the firewall rule is +// not enforced and the network behaves as if it did not exist. If this +// is unspecified, the firewall rule will be enabled. +// +kubebuilder:validation:Optional +Disabled *bool `json:"disabled,omitempty" tf:"disabled,omitempty"` + +// This field denotes whether to enable logging for a particular firewall rule. +// If logging is enabled, logs will be exported to Stackdriver. Deprecated in favor of log_config +// This field denotes whether to enable logging for a particular firewall rule. If logging is enabled, logs will be exported to Stackdriver. +// +kubebuilder:validation:Optional +EnableLogging *bool `json:"enableLogging,omitempty" tf:"enable_logging,omitempty"` + +// This field denotes the logging options for a particular firewall rule. +// If defined, logging is enabled, and logs will be exported to Cloud Logging. +// Structure is documented below. +// This field denotes the logging options for a particular firewall rule. +// If defined, logging is enabled, and logs will be exported to Cloud Logging. +// +kubebuilder:validation:Optional +LogConfig []LogConfigParameters `json:"logConfig,omitempty" tf:"log_config,omitempty"` + +// The name or self_link of the network to attach this firewall to. +// The name or self_link of the network to attach this firewall to. +// +crossplane:generate:reference:type=Network +// +crossplane:generate:reference:extractor=kubedb.dev/provider-gcp/config/common.SelfLinkExtractor() +// +kubebuilder:validation:Optional +Network *string `json:"network,omitempty" tf:"network,omitempty"` + +// Reference to a Network to populate network. +// +kubebuilder:validation:Optional +NetworkRef *v1.Reference `json:"networkRef,omitempty" tf:"-"` + +// Selector for a Network to populate network. +// +kubebuilder:validation:Optional +NetworkSelector *v1.Selector `json:"networkSelector,omitempty" tf:"-"` + +// Priority for this rule. This is an integer between 0 and 65535, both +// inclusive. When not specified, the value assumed is 1000. Relative +// priorities determine precedence of conflicting rules. Lower value of +// priority implies higher precedence (eg, a rule with priority 0 has +// higher precedence than a rule with priority 1). DENY rules take +// precedence over ALLOW rules having equal priority. +// Priority for this rule. This is an integer between 0 and 65535, both +// inclusive. When not specified, the value assumed is 1000. Relative +// priorities determine precedence of conflicting rules. Lower value of +// priority implies higher precedence (eg, a rule with priority 0 has +// higher precedence than a rule with priority 1). DENY rules take +// precedence over ALLOW rules having equal priority. +// +kubebuilder:validation:Optional +Priority *float64 `json:"priority,omitempty" tf:"priority,omitempty"` + +// The ID of the project in which the resource belongs. +// If it is not provided, the provider project is used. +// +kubebuilder:validation:Optional +Project *string `json:"project,omitempty" tf:"project,omitempty"` + +// If source ranges are specified, the firewall will apply only to +// traffic that has source IP address in these ranges. These ranges must +// be expressed in CIDR format. One or both of sourceRanges and +// sourceTags may be set. If both properties are set, the firewall will +// apply to traffic that has source IP address within sourceRanges OR the +// source IP that belongs to a tag listed in the sourceTags property. The +// connection does not need to match both properties for the firewall to +// apply. IPv4 or IPv6 ranges are supported. For INGRESS traffic, one of +// source_ranges, source_tags or source_service_accounts is required. +// If source ranges are specified, the firewall will apply only to +// traffic that has source IP address in these ranges. These ranges must +// be expressed in CIDR format. One or both of sourceRanges and +// sourceTags may be set. If both properties are set, the firewall will +// apply to traffic that has source IP address within sourceRanges OR the +// source IP that belongs to a tag listed in the sourceTags property. The +// connection does not need to match both properties for the firewall to +// apply. IPv4 or IPv6 ranges are supported. For INGRESS traffic, one of +// 'source_ranges', 'source_tags' or 'source_service_accounts' is required. +// +kubebuilder:validation:Optional +SourceRanges []*string `json:"sourceRanges,omitempty" tf:"source_ranges,omitempty"` + +// If source service accounts are specified, the firewall will apply only +// to traffic originating from an instance with a service account in this +// list. Source service accounts cannot be used to control traffic to an +// instance's external IP address because service accounts are associated +// with an instance, not an IP address. sourceRanges can be set at the +// same time as sourceServiceAccounts. If both are set, the firewall will +// apply to traffic that has source IP address within sourceRanges OR the +// source IP belongs to an instance with service account listed in +// sourceServiceAccount. The connection does not need to match both +// properties for the firewall to apply. sourceServiceAccounts cannot be +// used at the same time as sourceTags or targetTags. For INGRESS traffic, +// one of source_ranges, source_tags or source_service_accounts is required. +// If source service accounts are specified, the firewall will apply only +// to traffic originating from an instance with a service account in this +// list. Source service accounts cannot be used to control traffic to an +// instance's external IP address because service accounts are associated +// with an instance, not an IP address. sourceRanges can be set at the +// same time as sourceServiceAccounts. If both are set, the firewall will +// apply to traffic that has source IP address within sourceRanges OR the +// source IP belongs to an instance with service account listed in +// sourceServiceAccount. The connection does not need to match both +// properties for the firewall to apply. sourceServiceAccounts cannot be +// used at the same time as sourceTags or targetTags. For INGRESS traffic, +// one of 'source_ranges', 'source_tags' or 'source_service_accounts' is required. +// +kubebuilder:validation:Optional +SourceServiceAccounts []*string `json:"sourceServiceAccounts,omitempty" tf:"source_service_accounts,omitempty"` + +// If source tags are specified, the firewall will apply only to traffic +// with source IP that belongs to a tag listed in source tags. Source +// tags cannot be used to control traffic to an instance's external IP +// address. Because tags are associated with an instance, not an IP +// address. One or both of sourceRanges and sourceTags may be set. If +// both properties are set, the firewall will apply to traffic that has +// source IP address within sourceRanges OR the source IP that belongs to +// a tag listed in the sourceTags property. The connection does not need +// to match both properties for the firewall to apply. For INGRESS traffic, +// one of source_ranges, source_tags or source_service_accounts is required. +// If source tags are specified, the firewall will apply only to traffic +// with source IP that belongs to a tag listed in source tags. Source +// tags cannot be used to control traffic to an instance's external IP +// address. Because tags are associated with an instance, not an IP +// address. One or both of sourceRanges and sourceTags may be set. If +// both properties are set, the firewall will apply to traffic that has +// source IP address within sourceRanges OR the source IP that belongs to +// a tag listed in the sourceTags property. The connection does not need +// to match both properties for the firewall to apply. For INGRESS traffic, +// one of 'source_ranges', 'source_tags' or 'source_service_accounts' is required. +// +kubebuilder:validation:Optional +SourceTags []*string `json:"sourceTags,omitempty" tf:"source_tags,omitempty"` + +// A list of service accounts indicating sets of instances located in the +// network that may make network connections as specified in allowed[]. +// targetServiceAccounts cannot be used at the same time as targetTags or +// sourceTags. If neither targetServiceAccounts nor targetTags are +// specified, the firewall rule applies to all instances on the specified +// network. +// A list of service accounts indicating sets of instances located in the +// network that may make network connections as specified in allowed[]. +// targetServiceAccounts cannot be used at the same time as targetTags or +// sourceTags. If neither targetServiceAccounts nor targetTags are +// specified, the firewall rule applies to all instances on the specified +// network. +// +kubebuilder:validation:Optional +TargetServiceAccounts []*string `json:"targetServiceAccounts,omitempty" tf:"target_service_accounts,omitempty"` + +// A list of instance tags indicating sets of instances located in the +// network that may make network connections as specified in allowed[]. +// If no targetTags are specified, the firewall rule applies to all +// instances on the specified network. +// A list of instance tags indicating sets of instances located in the +// network that may make network connections as specified in allowed[]. +// If no targetTags are specified, the firewall rule applies to all +// instances on the specified network. +// +kubebuilder:validation:Optional +TargetTags []*string `json:"targetTags,omitempty" tf:"target_tags,omitempty"` } + type LogConfigInitParameters struct { - // This field denotes whether to include or exclude metadata for firewall logs. - // Possible values are: EXCLUDE_ALL_METADATA, INCLUDE_ALL_METADATA. - // This field denotes whether to include or exclude metadata for firewall logs. Possible values: ["EXCLUDE_ALL_METADATA", "INCLUDE_ALL_METADATA"] - Metadata *string `json:"metadata,omitempty" tf:"metadata,omitempty"` + +// This field denotes whether to include or exclude metadata for firewall logs. +// Possible values are: EXCLUDE_ALL_METADATA, INCLUDE_ALL_METADATA. +// This field denotes whether to include or exclude metadata for firewall logs. Possible values: ["EXCLUDE_ALL_METADATA", "INCLUDE_ALL_METADATA"] +Metadata *string `json:"metadata,omitempty" tf:"metadata,omitempty"` } + type LogConfigObservation struct { - // This field denotes whether to include or exclude metadata for firewall logs. - // Possible values are: EXCLUDE_ALL_METADATA, INCLUDE_ALL_METADATA. - // This field denotes whether to include or exclude metadata for firewall logs. Possible values: ["EXCLUDE_ALL_METADATA", "INCLUDE_ALL_METADATA"] - Metadata *string `json:"metadata,omitempty" tf:"metadata,omitempty"` + +// This field denotes whether to include or exclude metadata for firewall logs. +// Possible values are: EXCLUDE_ALL_METADATA, INCLUDE_ALL_METADATA. +// This field denotes whether to include or exclude metadata for firewall logs. Possible values: ["EXCLUDE_ALL_METADATA", "INCLUDE_ALL_METADATA"] +Metadata *string `json:"metadata,omitempty" tf:"metadata,omitempty"` } + type LogConfigParameters struct { - // This field denotes whether to include or exclude metadata for firewall logs. - // Possible values are: EXCLUDE_ALL_METADATA, INCLUDE_ALL_METADATA. - // This field denotes whether to include or exclude metadata for firewall logs. Possible values: ["EXCLUDE_ALL_METADATA", "INCLUDE_ALL_METADATA"] - // +kubebuilder:validation:Optional - Metadata *string `json:"metadata" tf:"metadata,omitempty"` + +// This field denotes whether to include or exclude metadata for firewall logs. +// Possible values are: EXCLUDE_ALL_METADATA, INCLUDE_ALL_METADATA. +// This field denotes whether to include or exclude metadata for firewall logs. Possible values: ["EXCLUDE_ALL_METADATA", "INCLUDE_ALL_METADATA"] +// +kubebuilder:validation:Optional +Metadata *string `json:"metadata" tf:"metadata,omitempty"` } // FirewallSpec defines the desired state of Firewall type FirewallSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider FirewallParameters `json:"forProvider"` + ForProvider FirewallParameters `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 @@ -794,13 +821,13 @@ type FirewallSpec 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 FirewallInitParameters `json:"initProvider,omitempty"` + InitProvider FirewallInitParameters `json:"initProvider,omitempty"` } // FirewallStatus defines the observed state of Firewall. type FirewallStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider FirewallObservation `json:"atProvider,omitempty"` + AtProvider FirewallObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/compute/v1alpha1/zz_network_types.go b/apis/compute/v1alpha1/zz_network_types.go index 34ebc83..8b1852d 100755 --- a/apis/compute/v1alpha1/zz_network_types.go +++ b/apis/compute/v1alpha1/zz_network_types.go @@ -15,276 +15,285 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type NetworkInitParameters struct { - // When set to true, the network is created in "auto subnet mode" and - // it will create a subnet for each region automatically across the - // 10.128.0.0/9 address range. - // When set to false, the network is created in "custom subnet mode" so - // the user can explicitly connect subnetwork resources. - // When set to 'true', the network is created in "auto subnet mode" and - // it will create a subnet for each region automatically across the - // '10.128.0.0/9' address range. - // - // When set to 'false', the network is created in "custom subnet mode" so - // the user can explicitly connect subnetwork resources. - AutoCreateSubnetworks *bool `json:"autoCreateSubnetworks,omitempty" tf:"auto_create_subnetworks,omitempty"` - - // If set to true, default routes (0.0.0.0/0) will be deleted - // immediately after network creation. Defaults to false. - // If set to 'true', default routes ('0.0.0.0/0') will be deleted - // immediately after network creation. Defaults to 'false'. - DeleteDefaultRoutesOnCreate *bool `json:"deleteDefaultRoutesOnCreate,omitempty" tf:"delete_default_routes_on_create,omitempty"` - - // An optional description of this resource. The resource must be - // recreated to modify this field. - // An optional description of this resource. The resource must be - // recreated to modify this field. - Description *string `json:"description,omitempty" tf:"description,omitempty"` - - // Enable ULA internal ipv6 on this network. Enabling this feature will assign - // a /48 from google defined ULA prefix fd20::/20. - // Enable ULA internal ipv6 on this network. Enabling this feature will assign - // a /48 from google defined ULA prefix fd20::/20. - EnableUlaInternalIPv6 *bool `json:"enableUlaInternalIpv6,omitempty" tf:"enable_ula_internal_ipv6,omitempty"` - - // When enabling ula internal ipv6, caller optionally can specify the /48 range - // they want from the google defined ULA prefix fd20::/20. The input must be a - // valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will - // fail if the speficied /48 is already in used by another resource. - // If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field. - // When enabling ula internal ipv6, caller optionally can specify the /48 range - // they want from the google defined ULA prefix fd20::/20. The input must be a - // valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will - // fail if the speficied /48 is already in used by another resource. - // If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field. - InternalIPv6Range *string `json:"internalIpv6Range,omitempty" tf:"internal_ipv6_range,omitempty"` - - // Maximum Transmission Unit in bytes. The default value is 1460 bytes. - // The minimum value for this field is 1300 and the maximum value is 8896 bytes (jumbo frames). - // Note that packets larger than 1500 bytes (standard Ethernet) can be subject to TCP-MSS clamping or dropped - // with an ICMP Fragmentation-Needed message if the packets are routed to the Internet or other VPCs - // with varying MTUs. - // Maximum Transmission Unit in bytes. The default value is 1460 bytes. - // The minimum value for this field is 1300 and the maximum value is 8896 bytes (jumbo frames). - // Note that packets larger than 1500 bytes (standard Ethernet) can be subject to TCP-MSS clamping or dropped - // with an ICMP 'Fragmentation-Needed' message if the packets are routed to the Internet or other VPCs - // with varying MTUs. - Mtu *float64 `json:"mtu,omitempty" tf:"mtu,omitempty"` - - // Set the order that Firewall Rules and Firewall Policies are evaluated. - // Default value is AFTER_CLASSIC_FIREWALL. - // Possible values are: BEFORE_CLASSIC_FIREWALL, AFTER_CLASSIC_FIREWALL. - // Set the order that Firewall Rules and Firewall Policies are evaluated. Default value: "AFTER_CLASSIC_FIREWALL" Possible values: ["BEFORE_CLASSIC_FIREWALL", "AFTER_CLASSIC_FIREWALL"] - NetworkFirewallPolicyEnforcementOrder *string `json:"networkFirewallPolicyEnforcementOrder,omitempty" tf:"network_firewall_policy_enforcement_order,omitempty"` - - // The ID of the project in which the resource belongs. - // If it is not provided, the provider project is used. - Project *string `json:"project,omitempty" tf:"project,omitempty"` - - // The network-wide routing mode to use. If set to REGIONAL, this - // network's cloud routers will only advertise routes with subnetworks - // of this network in the same region as the router. If set to GLOBAL, - // this network's cloud routers will advertise routes with all - // subnetworks of this network, across regions. - // Possible values are: REGIONAL, GLOBAL. - // The network-wide routing mode to use. If set to 'REGIONAL', this - // network's cloud routers will only advertise routes with subnetworks - // of this network in the same region as the router. If set to 'GLOBAL', - // this network's cloud routers will advertise routes with all - // subnetworks of this network, across regions. Possible values: ["REGIONAL", "GLOBAL"] - RoutingMode *string `json:"routingMode,omitempty" tf:"routing_mode,omitempty"` + +// When set to true, the network is created in "auto subnet mode" and +// it will create a subnet for each region automatically across the +// 10.128.0.0/9 address range. +// When set to false, the network is created in "custom subnet mode" so +// the user can explicitly connect subnetwork resources. +// When set to 'true', the network is created in "auto subnet mode" and +// it will create a subnet for each region automatically across the +// '10.128.0.0/9' address range. +// +// When set to 'false', the network is created in "custom subnet mode" so +// the user can explicitly connect subnetwork resources. +AutoCreateSubnetworks *bool `json:"autoCreateSubnetworks,omitempty" tf:"auto_create_subnetworks,omitempty"` + +// If set to true, default routes (0.0.0.0/0) will be deleted +// immediately after network creation. Defaults to false. +// If set to 'true', default routes ('0.0.0.0/0') will be deleted +// immediately after network creation. Defaults to 'false'. +DeleteDefaultRoutesOnCreate *bool `json:"deleteDefaultRoutesOnCreate,omitempty" tf:"delete_default_routes_on_create,omitempty"` + +// An optional description of this resource. The resource must be +// recreated to modify this field. +// An optional description of this resource. The resource must be +// recreated to modify this field. +Description *string `json:"description,omitempty" tf:"description,omitempty"` + +// Enable ULA internal ipv6 on this network. Enabling this feature will assign +// a /48 from google defined ULA prefix fd20::/20. +// Enable ULA internal ipv6 on this network. Enabling this feature will assign +// a /48 from google defined ULA prefix fd20::/20. +EnableUlaInternalIPv6 *bool `json:"enableUlaInternalIpv6,omitempty" tf:"enable_ula_internal_ipv6,omitempty"` + +// When enabling ula internal ipv6, caller optionally can specify the /48 range +// they want from the google defined ULA prefix fd20::/20. The input must be a +// valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will +// fail if the speficied /48 is already in used by another resource. +// If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field. +// When enabling ula internal ipv6, caller optionally can specify the /48 range +// they want from the google defined ULA prefix fd20::/20. The input must be a +// valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will +// fail if the speficied /48 is already in used by another resource. +// If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field. +InternalIPv6Range *string `json:"internalIpv6Range,omitempty" tf:"internal_ipv6_range,omitempty"` + +// Maximum Transmission Unit in bytes. The default value is 1460 bytes. +// The minimum value for this field is 1300 and the maximum value is 8896 bytes (jumbo frames). +// Note that packets larger than 1500 bytes (standard Ethernet) can be subject to TCP-MSS clamping or dropped +// with an ICMP Fragmentation-Needed message if the packets are routed to the Internet or other VPCs +// with varying MTUs. +// Maximum Transmission Unit in bytes. The default value is 1460 bytes. +// The minimum value for this field is 1300 and the maximum value is 8896 bytes (jumbo frames). +// Note that packets larger than 1500 bytes (standard Ethernet) can be subject to TCP-MSS clamping or dropped +// with an ICMP 'Fragmentation-Needed' message if the packets are routed to the Internet or other VPCs +// with varying MTUs. +Mtu *float64 `json:"mtu,omitempty" tf:"mtu,omitempty"` + +// Set the order that Firewall Rules and Firewall Policies are evaluated. +// Default value is AFTER_CLASSIC_FIREWALL. +// Possible values are: BEFORE_CLASSIC_FIREWALL, AFTER_CLASSIC_FIREWALL. +// Set the order that Firewall Rules and Firewall Policies are evaluated. Default value: "AFTER_CLASSIC_FIREWALL" Possible values: ["BEFORE_CLASSIC_FIREWALL", "AFTER_CLASSIC_FIREWALL"] +NetworkFirewallPolicyEnforcementOrder *string `json:"networkFirewallPolicyEnforcementOrder,omitempty" tf:"network_firewall_policy_enforcement_order,omitempty"` + +// The ID of the project in which the resource belongs. +// If it is not provided, the provider project is used. +Project *string `json:"project,omitempty" tf:"project,omitempty"` + +// The network-wide routing mode to use. If set to REGIONAL, this +// network's cloud routers will only advertise routes with subnetworks +// of this network in the same region as the router. If set to GLOBAL, +// this network's cloud routers will advertise routes with all +// subnetworks of this network, across regions. +// Possible values are: REGIONAL, GLOBAL. +// The network-wide routing mode to use. If set to 'REGIONAL', this +// network's cloud routers will only advertise routes with subnetworks +// of this network in the same region as the router. If set to 'GLOBAL', +// this network's cloud routers will advertise routes with all +// subnetworks of this network, across regions. Possible values: ["REGIONAL", "GLOBAL"] +RoutingMode *string `json:"routingMode,omitempty" tf:"routing_mode,omitempty"` } + type NetworkObservation struct { - // When set to true, the network is created in "auto subnet mode" and - // it will create a subnet for each region automatically across the - // 10.128.0.0/9 address range. - // When set to false, the network is created in "custom subnet mode" so - // the user can explicitly connect subnetwork resources. - // When set to 'true', the network is created in "auto subnet mode" and - // it will create a subnet for each region automatically across the - // '10.128.0.0/9' address range. - // - // When set to 'false', the network is created in "custom subnet mode" so - // the user can explicitly connect subnetwork resources. - AutoCreateSubnetworks *bool `json:"autoCreateSubnetworks,omitempty" tf:"auto_create_subnetworks,omitempty"` - - // If set to true, default routes (0.0.0.0/0) will be deleted - // immediately after network creation. Defaults to false. - // If set to 'true', default routes ('0.0.0.0/0') will be deleted - // immediately after network creation. Defaults to 'false'. - DeleteDefaultRoutesOnCreate *bool `json:"deleteDefaultRoutesOnCreate,omitempty" tf:"delete_default_routes_on_create,omitempty"` - - // An optional description of this resource. The resource must be - // recreated to modify this field. - // An optional description of this resource. The resource must be - // recreated to modify this field. - Description *string `json:"description,omitempty" tf:"description,omitempty"` - - // Enable ULA internal ipv6 on this network. Enabling this feature will assign - // a /48 from google defined ULA prefix fd20::/20. - // Enable ULA internal ipv6 on this network. Enabling this feature will assign - // a /48 from google defined ULA prefix fd20::/20. - EnableUlaInternalIPv6 *bool `json:"enableUlaInternalIpv6,omitempty" tf:"enable_ula_internal_ipv6,omitempty"` - - // The gateway address for default routing out of the network. This value - // is selected by GCP. - // The gateway address for default routing out of the network. This value - // is selected by GCP. - GatewayIPv4 *string `json:"gatewayIpv4,omitempty" tf:"gateway_ipv4,omitempty"` - - // an identifier for the resource with format projects/{{project}}/global/networks/{{name}} - ID *string `json:"id,omitempty" tf:"id,omitempty"` - - // When enabling ula internal ipv6, caller optionally can specify the /48 range - // they want from the google defined ULA prefix fd20::/20. The input must be a - // valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will - // fail if the speficied /48 is already in used by another resource. - // If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field. - // When enabling ula internal ipv6, caller optionally can specify the /48 range - // they want from the google defined ULA prefix fd20::/20. The input must be a - // valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will - // fail if the speficied /48 is already in used by another resource. - // If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field. - InternalIPv6Range *string `json:"internalIpv6Range,omitempty" tf:"internal_ipv6_range,omitempty"` - - // Maximum Transmission Unit in bytes. The default value is 1460 bytes. - // The minimum value for this field is 1300 and the maximum value is 8896 bytes (jumbo frames). - // Note that packets larger than 1500 bytes (standard Ethernet) can be subject to TCP-MSS clamping or dropped - // with an ICMP Fragmentation-Needed message if the packets are routed to the Internet or other VPCs - // with varying MTUs. - // Maximum Transmission Unit in bytes. The default value is 1460 bytes. - // The minimum value for this field is 1300 and the maximum value is 8896 bytes (jumbo frames). - // Note that packets larger than 1500 bytes (standard Ethernet) can be subject to TCP-MSS clamping or dropped - // with an ICMP 'Fragmentation-Needed' message if the packets are routed to the Internet or other VPCs - // with varying MTUs. - Mtu *float64 `json:"mtu,omitempty" tf:"mtu,omitempty"` - - // Set the order that Firewall Rules and Firewall Policies are evaluated. - // Default value is AFTER_CLASSIC_FIREWALL. - // Possible values are: BEFORE_CLASSIC_FIREWALL, AFTER_CLASSIC_FIREWALL. - // Set the order that Firewall Rules and Firewall Policies are evaluated. Default value: "AFTER_CLASSIC_FIREWALL" Possible values: ["BEFORE_CLASSIC_FIREWALL", "AFTER_CLASSIC_FIREWALL"] - NetworkFirewallPolicyEnforcementOrder *string `json:"networkFirewallPolicyEnforcementOrder,omitempty" tf:"network_firewall_policy_enforcement_order,omitempty"` - - // The ID of the project in which the resource belongs. - // If it is not provided, the provider project is used. - Project *string `json:"project,omitempty" tf:"project,omitempty"` - - // The network-wide routing mode to use. If set to REGIONAL, this - // network's cloud routers will only advertise routes with subnetworks - // of this network in the same region as the router. If set to GLOBAL, - // this network's cloud routers will advertise routes with all - // subnetworks of this network, across regions. - // Possible values are: REGIONAL, GLOBAL. - // The network-wide routing mode to use. If set to 'REGIONAL', this - // network's cloud routers will only advertise routes with subnetworks - // of this network in the same region as the router. If set to 'GLOBAL', - // this network's cloud routers will advertise routes with all - // subnetworks of this network, across regions. Possible values: ["REGIONAL", "GLOBAL"] - RoutingMode *string `json:"routingMode,omitempty" tf:"routing_mode,omitempty"` - - // The URI of the created resource. - SelfLink *string `json:"selfLink,omitempty" tf:"self_link,omitempty"` + +// When set to true, the network is created in "auto subnet mode" and +// it will create a subnet for each region automatically across the +// 10.128.0.0/9 address range. +// When set to false, the network is created in "custom subnet mode" so +// the user can explicitly connect subnetwork resources. +// When set to 'true', the network is created in "auto subnet mode" and +// it will create a subnet for each region automatically across the +// '10.128.0.0/9' address range. +// +// When set to 'false', the network is created in "custom subnet mode" so +// the user can explicitly connect subnetwork resources. +AutoCreateSubnetworks *bool `json:"autoCreateSubnetworks,omitempty" tf:"auto_create_subnetworks,omitempty"` + +// If set to true, default routes (0.0.0.0/0) will be deleted +// immediately after network creation. Defaults to false. +// If set to 'true', default routes ('0.0.0.0/0') will be deleted +// immediately after network creation. Defaults to 'false'. +DeleteDefaultRoutesOnCreate *bool `json:"deleteDefaultRoutesOnCreate,omitempty" tf:"delete_default_routes_on_create,omitempty"` + +// An optional description of this resource. The resource must be +// recreated to modify this field. +// An optional description of this resource. The resource must be +// recreated to modify this field. +Description *string `json:"description,omitempty" tf:"description,omitempty"` + +// Enable ULA internal ipv6 on this network. Enabling this feature will assign +// a /48 from google defined ULA prefix fd20::/20. +// Enable ULA internal ipv6 on this network. Enabling this feature will assign +// a /48 from google defined ULA prefix fd20::/20. +EnableUlaInternalIPv6 *bool `json:"enableUlaInternalIpv6,omitempty" tf:"enable_ula_internal_ipv6,omitempty"` + +// The gateway address for default routing out of the network. This value +// is selected by GCP. +// The gateway address for default routing out of the network. This value +// is selected by GCP. +GatewayIPv4 *string `json:"gatewayIpv4,omitempty" tf:"gateway_ipv4,omitempty"` + +// an identifier for the resource with format projects/{{project}}/global/networks/{{name}} +ID *string `json:"id,omitempty" tf:"id,omitempty"` + +// When enabling ula internal ipv6, caller optionally can specify the /48 range +// they want from the google defined ULA prefix fd20::/20. The input must be a +// valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will +// fail if the speficied /48 is already in used by another resource. +// If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field. +// When enabling ula internal ipv6, caller optionally can specify the /48 range +// they want from the google defined ULA prefix fd20::/20. The input must be a +// valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will +// fail if the speficied /48 is already in used by another resource. +// If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field. +InternalIPv6Range *string `json:"internalIpv6Range,omitempty" tf:"internal_ipv6_range,omitempty"` + +// Maximum Transmission Unit in bytes. The default value is 1460 bytes. +// The minimum value for this field is 1300 and the maximum value is 8896 bytes (jumbo frames). +// Note that packets larger than 1500 bytes (standard Ethernet) can be subject to TCP-MSS clamping or dropped +// with an ICMP Fragmentation-Needed message if the packets are routed to the Internet or other VPCs +// with varying MTUs. +// Maximum Transmission Unit in bytes. The default value is 1460 bytes. +// The minimum value for this field is 1300 and the maximum value is 8896 bytes (jumbo frames). +// Note that packets larger than 1500 bytes (standard Ethernet) can be subject to TCP-MSS clamping or dropped +// with an ICMP 'Fragmentation-Needed' message if the packets are routed to the Internet or other VPCs +// with varying MTUs. +Mtu *float64 `json:"mtu,omitempty" tf:"mtu,omitempty"` + +// Set the order that Firewall Rules and Firewall Policies are evaluated. +// Default value is AFTER_CLASSIC_FIREWALL. +// Possible values are: BEFORE_CLASSIC_FIREWALL, AFTER_CLASSIC_FIREWALL. +// Set the order that Firewall Rules and Firewall Policies are evaluated. Default value: "AFTER_CLASSIC_FIREWALL" Possible values: ["BEFORE_CLASSIC_FIREWALL", "AFTER_CLASSIC_FIREWALL"] +NetworkFirewallPolicyEnforcementOrder *string `json:"networkFirewallPolicyEnforcementOrder,omitempty" tf:"network_firewall_policy_enforcement_order,omitempty"` + +// The ID of the project in which the resource belongs. +// If it is not provided, the provider project is used. +Project *string `json:"project,omitempty" tf:"project,omitempty"` + +// The network-wide routing mode to use. If set to REGIONAL, this +// network's cloud routers will only advertise routes with subnetworks +// of this network in the same region as the router. If set to GLOBAL, +// this network's cloud routers will advertise routes with all +// subnetworks of this network, across regions. +// Possible values are: REGIONAL, GLOBAL. +// The network-wide routing mode to use. If set to 'REGIONAL', this +// network's cloud routers will only advertise routes with subnetworks +// of this network in the same region as the router. If set to 'GLOBAL', +// this network's cloud routers will advertise routes with all +// subnetworks of this network, across regions. Possible values: ["REGIONAL", "GLOBAL"] +RoutingMode *string `json:"routingMode,omitempty" tf:"routing_mode,omitempty"` + +// The URI of the created resource. +SelfLink *string `json:"selfLink,omitempty" tf:"self_link,omitempty"` } + type NetworkParameters struct { - // When set to true, the network is created in "auto subnet mode" and - // it will create a subnet for each region automatically across the - // 10.128.0.0/9 address range. - // When set to false, the network is created in "custom subnet mode" so - // the user can explicitly connect subnetwork resources. - // When set to 'true', the network is created in "auto subnet mode" and - // it will create a subnet for each region automatically across the - // '10.128.0.0/9' address range. - // - // When set to 'false', the network is created in "custom subnet mode" so - // the user can explicitly connect subnetwork resources. - // +kubebuilder:validation:Optional - AutoCreateSubnetworks *bool `json:"autoCreateSubnetworks,omitempty" tf:"auto_create_subnetworks,omitempty"` - - // If set to true, default routes (0.0.0.0/0) will be deleted - // immediately after network creation. Defaults to false. - // If set to 'true', default routes ('0.0.0.0/0') will be deleted - // immediately after network creation. Defaults to 'false'. - // +kubebuilder:validation:Optional - DeleteDefaultRoutesOnCreate *bool `json:"deleteDefaultRoutesOnCreate,omitempty" tf:"delete_default_routes_on_create,omitempty"` - - // An optional description of this resource. The resource must be - // recreated to modify this field. - // An optional description of this resource. The resource must be - // recreated to modify this field. - // +kubebuilder:validation:Optional - Description *string `json:"description,omitempty" tf:"description,omitempty"` - - // Enable ULA internal ipv6 on this network. Enabling this feature will assign - // a /48 from google defined ULA prefix fd20::/20. - // Enable ULA internal ipv6 on this network. Enabling this feature will assign - // a /48 from google defined ULA prefix fd20::/20. - // +kubebuilder:validation:Optional - EnableUlaInternalIPv6 *bool `json:"enableUlaInternalIpv6,omitempty" tf:"enable_ula_internal_ipv6,omitempty"` - - // When enabling ula internal ipv6, caller optionally can specify the /48 range - // they want from the google defined ULA prefix fd20::/20. The input must be a - // valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will - // fail if the speficied /48 is already in used by another resource. - // If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field. - // When enabling ula internal ipv6, caller optionally can specify the /48 range - // they want from the google defined ULA prefix fd20::/20. The input must be a - // valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will - // fail if the speficied /48 is already in used by another resource. - // If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field. - // +kubebuilder:validation:Optional - InternalIPv6Range *string `json:"internalIpv6Range,omitempty" tf:"internal_ipv6_range,omitempty"` - - // Maximum Transmission Unit in bytes. The default value is 1460 bytes. - // The minimum value for this field is 1300 and the maximum value is 8896 bytes (jumbo frames). - // Note that packets larger than 1500 bytes (standard Ethernet) can be subject to TCP-MSS clamping or dropped - // with an ICMP Fragmentation-Needed message if the packets are routed to the Internet or other VPCs - // with varying MTUs. - // Maximum Transmission Unit in bytes. The default value is 1460 bytes. - // The minimum value for this field is 1300 and the maximum value is 8896 bytes (jumbo frames). - // Note that packets larger than 1500 bytes (standard Ethernet) can be subject to TCP-MSS clamping or dropped - // with an ICMP 'Fragmentation-Needed' message if the packets are routed to the Internet or other VPCs - // with varying MTUs. - // +kubebuilder:validation:Optional - Mtu *float64 `json:"mtu,omitempty" tf:"mtu,omitempty"` - - // Set the order that Firewall Rules and Firewall Policies are evaluated. - // Default value is AFTER_CLASSIC_FIREWALL. - // Possible values are: BEFORE_CLASSIC_FIREWALL, AFTER_CLASSIC_FIREWALL. - // Set the order that Firewall Rules and Firewall Policies are evaluated. Default value: "AFTER_CLASSIC_FIREWALL" Possible values: ["BEFORE_CLASSIC_FIREWALL", "AFTER_CLASSIC_FIREWALL"] - // +kubebuilder:validation:Optional - NetworkFirewallPolicyEnforcementOrder *string `json:"networkFirewallPolicyEnforcementOrder,omitempty" tf:"network_firewall_policy_enforcement_order,omitempty"` - - // The ID of the project in which the resource belongs. - // If it is not provided, the provider project is used. - // +kubebuilder:validation:Optional - Project *string `json:"project,omitempty" tf:"project,omitempty"` - - // The network-wide routing mode to use. If set to REGIONAL, this - // network's cloud routers will only advertise routes with subnetworks - // of this network in the same region as the router. If set to GLOBAL, - // this network's cloud routers will advertise routes with all - // subnetworks of this network, across regions. - // Possible values are: REGIONAL, GLOBAL. - // The network-wide routing mode to use. If set to 'REGIONAL', this - // network's cloud routers will only advertise routes with subnetworks - // of this network in the same region as the router. If set to 'GLOBAL', - // this network's cloud routers will advertise routes with all - // subnetworks of this network, across regions. Possible values: ["REGIONAL", "GLOBAL"] - // +kubebuilder:validation:Optional - RoutingMode *string `json:"routingMode,omitempty" tf:"routing_mode,omitempty"` + +// When set to true, the network is created in "auto subnet mode" and +// it will create a subnet for each region automatically across the +// 10.128.0.0/9 address range. +// When set to false, the network is created in "custom subnet mode" so +// the user can explicitly connect subnetwork resources. +// When set to 'true', the network is created in "auto subnet mode" and +// it will create a subnet for each region automatically across the +// '10.128.0.0/9' address range. +// +// When set to 'false', the network is created in "custom subnet mode" so +// the user can explicitly connect subnetwork resources. +// +kubebuilder:validation:Optional +AutoCreateSubnetworks *bool `json:"autoCreateSubnetworks,omitempty" tf:"auto_create_subnetworks,omitempty"` + +// If set to true, default routes (0.0.0.0/0) will be deleted +// immediately after network creation. Defaults to false. +// If set to 'true', default routes ('0.0.0.0/0') will be deleted +// immediately after network creation. Defaults to 'false'. +// +kubebuilder:validation:Optional +DeleteDefaultRoutesOnCreate *bool `json:"deleteDefaultRoutesOnCreate,omitempty" tf:"delete_default_routes_on_create,omitempty"` + +// An optional description of this resource. The resource must be +// recreated to modify this field. +// An optional description of this resource. The resource must be +// recreated to modify this field. +// +kubebuilder:validation:Optional +Description *string `json:"description,omitempty" tf:"description,omitempty"` + +// Enable ULA internal ipv6 on this network. Enabling this feature will assign +// a /48 from google defined ULA prefix fd20::/20. +// Enable ULA internal ipv6 on this network. Enabling this feature will assign +// a /48 from google defined ULA prefix fd20::/20. +// +kubebuilder:validation:Optional +EnableUlaInternalIPv6 *bool `json:"enableUlaInternalIpv6,omitempty" tf:"enable_ula_internal_ipv6,omitempty"` + +// When enabling ula internal ipv6, caller optionally can specify the /48 range +// they want from the google defined ULA prefix fd20::/20. The input must be a +// valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will +// fail if the speficied /48 is already in used by another resource. +// If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field. +// When enabling ula internal ipv6, caller optionally can specify the /48 range +// they want from the google defined ULA prefix fd20::/20. The input must be a +// valid /48 ULA IPv6 address and must be within the fd20::/20. Operation will +// fail if the speficied /48 is already in used by another resource. +// If the field is not speficied, then a /48 range will be randomly allocated from fd20::/20 and returned via this field. +// +kubebuilder:validation:Optional +InternalIPv6Range *string `json:"internalIpv6Range,omitempty" tf:"internal_ipv6_range,omitempty"` + +// Maximum Transmission Unit in bytes. The default value is 1460 bytes. +// The minimum value for this field is 1300 and the maximum value is 8896 bytes (jumbo frames). +// Note that packets larger than 1500 bytes (standard Ethernet) can be subject to TCP-MSS clamping or dropped +// with an ICMP Fragmentation-Needed message if the packets are routed to the Internet or other VPCs +// with varying MTUs. +// Maximum Transmission Unit in bytes. The default value is 1460 bytes. +// The minimum value for this field is 1300 and the maximum value is 8896 bytes (jumbo frames). +// Note that packets larger than 1500 bytes (standard Ethernet) can be subject to TCP-MSS clamping or dropped +// with an ICMP 'Fragmentation-Needed' message if the packets are routed to the Internet or other VPCs +// with varying MTUs. +// +kubebuilder:validation:Optional +Mtu *float64 `json:"mtu,omitempty" tf:"mtu,omitempty"` + +// Set the order that Firewall Rules and Firewall Policies are evaluated. +// Default value is AFTER_CLASSIC_FIREWALL. +// Possible values are: BEFORE_CLASSIC_FIREWALL, AFTER_CLASSIC_FIREWALL. +// Set the order that Firewall Rules and Firewall Policies are evaluated. Default value: "AFTER_CLASSIC_FIREWALL" Possible values: ["BEFORE_CLASSIC_FIREWALL", "AFTER_CLASSIC_FIREWALL"] +// +kubebuilder:validation:Optional +NetworkFirewallPolicyEnforcementOrder *string `json:"networkFirewallPolicyEnforcementOrder,omitempty" tf:"network_firewall_policy_enforcement_order,omitempty"` + +// The ID of the project in which the resource belongs. +// If it is not provided, the provider project is used. +// +kubebuilder:validation:Optional +Project *string `json:"project,omitempty" tf:"project,omitempty"` + +// The network-wide routing mode to use. If set to REGIONAL, this +// network's cloud routers will only advertise routes with subnetworks +// of this network in the same region as the router. If set to GLOBAL, +// this network's cloud routers will advertise routes with all +// subnetworks of this network, across regions. +// Possible values are: REGIONAL, GLOBAL. +// The network-wide routing mode to use. If set to 'REGIONAL', this +// network's cloud routers will only advertise routes with subnetworks +// of this network in the same region as the router. If set to 'GLOBAL', +// this network's cloud routers will advertise routes with all +// subnetworks of this network, across regions. Possible values: ["REGIONAL", "GLOBAL"] +// +kubebuilder:validation:Optional +RoutingMode *string `json:"routingMode,omitempty" tf:"routing_mode,omitempty"` } // NetworkSpec defines the desired state of Network type NetworkSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider NetworkParameters `json:"forProvider"` + ForProvider NetworkParameters `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 @@ -295,13 +304,13 @@ type NetworkSpec 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 NetworkInitParameters `json:"initProvider,omitempty"` + InitProvider NetworkInitParameters `json:"initProvider,omitempty"` } // NetworkStatus defines the observed state of Network. type NetworkStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider NetworkObservation `json:"atProvider,omitempty"` + AtProvider NetworkObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/compute/v1alpha1/zz_networkpeering_types.go b/apis/compute/v1alpha1/zz_networkpeering_types.go index ff9f71b..3e9affc 100755 --- a/apis/compute/v1alpha1/zz_networkpeering_types.go +++ b/apis/compute/v1alpha1/zz_networkpeering_types.go @@ -15,132 +15,141 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type NetworkPeeringInitParameters struct { - // Whether to export the custom routes to the peer network. Defaults to false. - // Whether to export the custom routes to the peer network. Defaults to false. - ExportCustomRoutes *bool `json:"exportCustomRoutes,omitempty" tf:"export_custom_routes,omitempty"` - // Whether subnet routes with public IP range are exported. The default value is true, all subnet routes are exported. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always exported to peers and are not controlled by this field. - ExportSubnetRoutesWithPublicIP *bool `json:"exportSubnetRoutesWithPublicIp,omitempty" tf:"export_subnet_routes_with_public_ip,omitempty"` +// Whether to export the custom routes to the peer network. Defaults to false. +// Whether to export the custom routes to the peer network. Defaults to false. +ExportCustomRoutes *bool `json:"exportCustomRoutes,omitempty" tf:"export_custom_routes,omitempty"` + +// Whether subnet routes with public IP range are exported. The default value is true, all subnet routes are exported. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always exported to peers and are not controlled by this field. +ExportSubnetRoutesWithPublicIP *bool `json:"exportSubnetRoutesWithPublicIp,omitempty" tf:"export_subnet_routes_with_public_ip,omitempty"` - // Whether to import the custom routes from the peer network. Defaults to false. - // Whether to export the custom routes from the peer network. Defaults to false. - ImportCustomRoutes *bool `json:"importCustomRoutes,omitempty" tf:"import_custom_routes,omitempty"` +// Whether to import the custom routes from the peer network. Defaults to false. +// Whether to export the custom routes from the peer network. Defaults to false. +ImportCustomRoutes *bool `json:"importCustomRoutes,omitempty" tf:"import_custom_routes,omitempty"` - // Whether subnet routes with public IP range are imported. The default value is false. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always imported from peers and are not controlled by this field. - ImportSubnetRoutesWithPublicIP *bool `json:"importSubnetRoutesWithPublicIp,omitempty" tf:"import_subnet_routes_with_public_ip,omitempty"` +// Whether subnet routes with public IP range are imported. The default value is false. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always imported from peers and are not controlled by this field. +ImportSubnetRoutesWithPublicIP *bool `json:"importSubnetRoutesWithPublicIp,omitempty" tf:"import_subnet_routes_with_public_ip,omitempty"` - // Which IP version(s) of traffic and routes are allowed to be imported or exported between peer networks. The default value is IPV4_ONLY. Possible values: ["IPV4_ONLY", "IPV4_IPV6"]. - // Which IP version(s) of traffic and routes are allowed to be imported or exported between peer networks. The default value is IPV4_ONLY. Possible values: ["IPV4_ONLY", "IPV4_IPV6"] - StackType *string `json:"stackType,omitempty" tf:"stack_type,omitempty"` +// Which IP version(s) of traffic and routes are allowed to be imported or exported between peer networks. The default value is IPV4_ONLY. Possible values: ["IPV4_ONLY", "IPV4_IPV6"]. +// Which IP version(s) of traffic and routes are allowed to be imported or exported between peer networks. The default value is IPV4_ONLY. Possible values: ["IPV4_ONLY", "IPV4_IPV6"] +StackType *string `json:"stackType,omitempty" tf:"stack_type,omitempty"` } + type NetworkPeeringObservation struct { - // Whether to export the custom routes to the peer network. Defaults to false. - // Whether to export the custom routes to the peer network. Defaults to false. - ExportCustomRoutes *bool `json:"exportCustomRoutes,omitempty" tf:"export_custom_routes,omitempty"` - // Whether subnet routes with public IP range are exported. The default value is true, all subnet routes are exported. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always exported to peers and are not controlled by this field. - ExportSubnetRoutesWithPublicIP *bool `json:"exportSubnetRoutesWithPublicIp,omitempty" tf:"export_subnet_routes_with_public_ip,omitempty"` +// Whether to export the custom routes to the peer network. Defaults to false. +// Whether to export the custom routes to the peer network. Defaults to false. +ExportCustomRoutes *bool `json:"exportCustomRoutes,omitempty" tf:"export_custom_routes,omitempty"` + +// Whether subnet routes with public IP range are exported. The default value is true, all subnet routes are exported. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always exported to peers and are not controlled by this field. +ExportSubnetRoutesWithPublicIP *bool `json:"exportSubnetRoutesWithPublicIp,omitempty" tf:"export_subnet_routes_with_public_ip,omitempty"` - // an identifier for the resource with format {{network}}/{{name}} - ID *string `json:"id,omitempty" tf:"id,omitempty"` +// an identifier for the resource with format {{network}}/{{name}} +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // Whether to import the custom routes from the peer network. Defaults to false. - // Whether to export the custom routes from the peer network. Defaults to false. - ImportCustomRoutes *bool `json:"importCustomRoutes,omitempty" tf:"import_custom_routes,omitempty"` +// Whether to import the custom routes from the peer network. Defaults to false. +// Whether to export the custom routes from the peer network. Defaults to false. +ImportCustomRoutes *bool `json:"importCustomRoutes,omitempty" tf:"import_custom_routes,omitempty"` - // Whether subnet routes with public IP range are imported. The default value is false. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always imported from peers and are not controlled by this field. - ImportSubnetRoutesWithPublicIP *bool `json:"importSubnetRoutesWithPublicIp,omitempty" tf:"import_subnet_routes_with_public_ip,omitempty"` +// Whether subnet routes with public IP range are imported. The default value is false. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always imported from peers and are not controlled by this field. +ImportSubnetRoutesWithPublicIP *bool `json:"importSubnetRoutesWithPublicIp,omitempty" tf:"import_subnet_routes_with_public_ip,omitempty"` - // The primary network of the peering. - // The primary network of the peering. - Network *string `json:"network,omitempty" tf:"network,omitempty"` +// The primary network of the peering. +// The primary network of the peering. +Network *string `json:"network,omitempty" tf:"network,omitempty"` - // The peer network in the peering. The peer network - // may belong to a different project. - // The peer network in the peering. The peer network may belong to a different project. - PeerNetwork *string `json:"peerNetwork,omitempty" tf:"peer_network,omitempty"` +// The peer network in the peering. The peer network +// may belong to a different project. +// The peer network in the peering. The peer network may belong to a different project. +PeerNetwork *string `json:"peerNetwork,omitempty" tf:"peer_network,omitempty"` - // Which IP version(s) of traffic and routes are allowed to be imported or exported between peer networks. The default value is IPV4_ONLY. Possible values: ["IPV4_ONLY", "IPV4_IPV6"]. - // Which IP version(s) of traffic and routes are allowed to be imported or exported between peer networks. The default value is IPV4_ONLY. Possible values: ["IPV4_ONLY", "IPV4_IPV6"] - StackType *string `json:"stackType,omitempty" tf:"stack_type,omitempty"` +// Which IP version(s) of traffic and routes are allowed to be imported or exported between peer networks. The default value is IPV4_ONLY. Possible values: ["IPV4_ONLY", "IPV4_IPV6"]. +// Which IP version(s) of traffic and routes are allowed to be imported or exported between peer networks. The default value is IPV4_ONLY. Possible values: ["IPV4_ONLY", "IPV4_IPV6"] +StackType *string `json:"stackType,omitempty" tf:"stack_type,omitempty"` - // State for the peering, either ACTIVE or INACTIVE. The peering is - // ACTIVE when there's a matching configuration in the peer network. - // State for the peering, either ACTIVE or INACTIVE. The peering is ACTIVE when there's a matching configuration in the peer network. - State *string `json:"state,omitempty" tf:"state,omitempty"` +// State for the peering, either ACTIVE or INACTIVE. The peering is +// ACTIVE when there's a matching configuration in the peer network. +// State for the peering, either ACTIVE or INACTIVE. The peering is ACTIVE when there's a matching configuration in the peer network. +State *string `json:"state,omitempty" tf:"state,omitempty"` - // Details about the current state of the peering. - // Details about the current state of the peering. - StateDetails *string `json:"stateDetails,omitempty" tf:"state_details,omitempty"` +// Details about the current state of the peering. +// Details about the current state of the peering. +StateDetails *string `json:"stateDetails,omitempty" tf:"state_details,omitempty"` } + type NetworkPeeringParameters struct { - // Whether to export the custom routes to the peer network. Defaults to false. - // Whether to export the custom routes to the peer network. Defaults to false. - // +kubebuilder:validation:Optional - ExportCustomRoutes *bool `json:"exportCustomRoutes,omitempty" tf:"export_custom_routes,omitempty"` - - // Whether subnet routes with public IP range are exported. The default value is true, all subnet routes are exported. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always exported to peers and are not controlled by this field. - // +kubebuilder:validation:Optional - ExportSubnetRoutesWithPublicIP *bool `json:"exportSubnetRoutesWithPublicIp,omitempty" tf:"export_subnet_routes_with_public_ip,omitempty"` - - // Whether to import the custom routes from the peer network. Defaults to false. - // Whether to export the custom routes from the peer network. Defaults to false. - // +kubebuilder:validation:Optional - ImportCustomRoutes *bool `json:"importCustomRoutes,omitempty" tf:"import_custom_routes,omitempty"` - - // Whether subnet routes with public IP range are imported. The default value is false. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always imported from peers and are not controlled by this field. - // +kubebuilder:validation:Optional - ImportSubnetRoutesWithPublicIP *bool `json:"importSubnetRoutesWithPublicIp,omitempty" tf:"import_subnet_routes_with_public_ip,omitempty"` - - // The primary network of the peering. - // The primary network of the peering. - // +crossplane:generate:reference:type=kubedb.dev/provider-gcp/apis/compute/v1alpha1.Network - // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractParamPath("self_link",true) - // +kubebuilder:validation:Optional - Network *string `json:"network,omitempty" tf:"network,omitempty"` - - // Reference to a Network in compute to populate network. - // +kubebuilder:validation:Optional - NetworkRef *v1.Reference `json:"networkRef,omitempty" tf:"-"` - - // Selector for a Network in compute to populate network. - // +kubebuilder:validation:Optional - NetworkSelector *v1.Selector `json:"networkSelector,omitempty" tf:"-"` - - // The peer network in the peering. The peer network - // may belong to a different project. - // The peer network in the peering. The peer network may belong to a different project. - // +crossplane:generate:reference:type=kubedb.dev/provider-gcp/apis/compute/v1alpha1.Network - // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractParamPath("self_link",true) - // +kubebuilder:validation:Optional - PeerNetwork *string `json:"peerNetwork,omitempty" tf:"peer_network,omitempty"` - - // Reference to a Network in compute to populate peerNetwork. - // +kubebuilder:validation:Optional - PeerNetworkRef *v1.Reference `json:"peerNetworkRef,omitempty" tf:"-"` - - // Selector for a Network in compute to populate peerNetwork. - // +kubebuilder:validation:Optional - PeerNetworkSelector *v1.Selector `json:"peerNetworkSelector,omitempty" tf:"-"` - - // Which IP version(s) of traffic and routes are allowed to be imported or exported between peer networks. The default value is IPV4_ONLY. Possible values: ["IPV4_ONLY", "IPV4_IPV6"]. - // Which IP version(s) of traffic and routes are allowed to be imported or exported between peer networks. The default value is IPV4_ONLY. Possible values: ["IPV4_ONLY", "IPV4_IPV6"] - // +kubebuilder:validation:Optional - StackType *string `json:"stackType,omitempty" tf:"stack_type,omitempty"` + +// Whether to export the custom routes to the peer network. Defaults to false. +// Whether to export the custom routes to the peer network. Defaults to false. +// +kubebuilder:validation:Optional +ExportCustomRoutes *bool `json:"exportCustomRoutes,omitempty" tf:"export_custom_routes,omitempty"` + +// Whether subnet routes with public IP range are exported. The default value is true, all subnet routes are exported. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always exported to peers and are not controlled by this field. +// +kubebuilder:validation:Optional +ExportSubnetRoutesWithPublicIP *bool `json:"exportSubnetRoutesWithPublicIp,omitempty" tf:"export_subnet_routes_with_public_ip,omitempty"` + +// Whether to import the custom routes from the peer network. Defaults to false. +// Whether to export the custom routes from the peer network. Defaults to false. +// +kubebuilder:validation:Optional +ImportCustomRoutes *bool `json:"importCustomRoutes,omitempty" tf:"import_custom_routes,omitempty"` + +// Whether subnet routes with public IP range are imported. The default value is false. The IPv4 special-use ranges (https://en.wikipedia.org/wiki/IPv4#Special_addresses) are always imported from peers and are not controlled by this field. +// +kubebuilder:validation:Optional +ImportSubnetRoutesWithPublicIP *bool `json:"importSubnetRoutesWithPublicIp,omitempty" tf:"import_subnet_routes_with_public_ip,omitempty"` + +// The primary network of the peering. +// The primary network of the peering. +// +crossplane:generate:reference:type=kubedb.dev/provider-gcp/apis/compute/v1alpha1.Network +// +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractParamPath("self_link",true) +// +kubebuilder:validation:Optional +Network *string `json:"network,omitempty" tf:"network,omitempty"` + +// Reference to a Network in compute to populate network. +// +kubebuilder:validation:Optional +NetworkRef *v1.Reference `json:"networkRef,omitempty" tf:"-"` + +// Selector for a Network in compute to populate network. +// +kubebuilder:validation:Optional +NetworkSelector *v1.Selector `json:"networkSelector,omitempty" tf:"-"` + +// The peer network in the peering. The peer network +// may belong to a different project. +// The peer network in the peering. The peer network may belong to a different project. +// +crossplane:generate:reference:type=kubedb.dev/provider-gcp/apis/compute/v1alpha1.Network +// +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractParamPath("self_link",true) +// +kubebuilder:validation:Optional +PeerNetwork *string `json:"peerNetwork,omitempty" tf:"peer_network,omitempty"` + +// Reference to a Network in compute to populate peerNetwork. +// +kubebuilder:validation:Optional +PeerNetworkRef *v1.Reference `json:"peerNetworkRef,omitempty" tf:"-"` + +// Selector for a Network in compute to populate peerNetwork. +// +kubebuilder:validation:Optional +PeerNetworkSelector *v1.Selector `json:"peerNetworkSelector,omitempty" tf:"-"` + +// Which IP version(s) of traffic and routes are allowed to be imported or exported between peer networks. The default value is IPV4_ONLY. Possible values: ["IPV4_ONLY", "IPV4_IPV6"]. +// Which IP version(s) of traffic and routes are allowed to be imported or exported between peer networks. The default value is IPV4_ONLY. Possible values: ["IPV4_ONLY", "IPV4_IPV6"] +// +kubebuilder:validation:Optional +StackType *string `json:"stackType,omitempty" tf:"stack_type,omitempty"` } // NetworkPeeringSpec defines the desired state of NetworkPeering type NetworkPeeringSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider NetworkPeeringParameters `json:"forProvider"` + ForProvider NetworkPeeringParameters `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 +160,13 @@ type NetworkPeeringSpec 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 NetworkPeeringInitParameters `json:"initProvider,omitempty"` + InitProvider NetworkPeeringInitParameters `json:"initProvider,omitempty"` } // NetworkPeeringStatus defines the observed state of NetworkPeering. type NetworkPeeringStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider NetworkPeeringObservation `json:"atProvider,omitempty"` + AtProvider NetworkPeeringObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/redis/v1alpha1/zz_instance_types.go b/apis/redis/v1alpha1/zz_instance_types.go index 3b290a0..45b78b9 100755 --- a/apis/redis/v1alpha1/zz_instance_types.go +++ b/apis/redis/v1alpha1/zz_instance_types.go @@ -15,998 +15,1049 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type InstanceInitParameters struct { - // Only applicable to STANDARD_HA tier which protects the instance - // against zonal failures by provisioning it across two zones. - // If provided, it must be a different zone from the one provided in - // [locationId]. - // Only applicable to STANDARD_HA tier which protects the instance - // against zonal failures by provisioning it across two zones. - // If provided, it must be a different zone from the one provided in - // [locationId]. - AlternativeLocationID *string `json:"alternativeLocationId,omitempty" tf:"alternative_location_id,omitempty"` - - // Optional. Indicates whether OSS Redis AUTH is enabled for the - // instance. If set to "true" AUTH is enabled on the instance. - // Default value is "false" meaning AUTH is disabled. - // Optional. Indicates whether OSS Redis AUTH is enabled for the - // instance. If set to "true" AUTH is enabled on the instance. - // Default value is "false" meaning AUTH is disabled. - AuthEnabled *bool `json:"authEnabled,omitempty" tf:"auth_enabled,omitempty"` - - // The full name of the Google Compute Engine network to which the - // instance is connected. If left unspecified, the default network - // will be used. - // The full name of the Google Compute Engine network to which the - // instance is connected. If left unspecified, the default network - // will be used. - AuthorizedNetwork *string `json:"authorizedNetwork,omitempty" tf:"authorized_network,omitempty"` - - // The connection mode of the Redis instance. - // Default value is DIRECT_PEERING. - // Possible values are: DIRECT_PEERING, PRIVATE_SERVICE_ACCESS. - // The connection mode of the Redis instance. Default value: "DIRECT_PEERING" Possible values: ["DIRECT_PEERING", "PRIVATE_SERVICE_ACCESS"] - ConnectMode *string `json:"connectMode,omitempty" tf:"connect_mode,omitempty"` - - // Optional. The KMS key reference that you want to use to encrypt the data at rest for this Redis - // instance. If this is provided, CMEK is enabled. - // Optional. The KMS key reference that you want to use to encrypt the data at rest for this Redis - // instance. If this is provided, CMEK is enabled. - CustomerManagedKey *string `json:"customerManagedKey,omitempty" tf:"customer_managed_key,omitempty"` - - // An arbitrary and optional user-provided name for the instance. - // An arbitrary and optional user-provided name for the instance. - DisplayName *string `json:"displayName,omitempty" tf:"display_name,omitempty"` - - // Resource labels to represent user provided metadata. - // Resource labels to represent user provided metadata. - Labels map[string]*string `json:"labels,omitempty" tf:"labels,omitempty"` - - // The zone where the instance will be provisioned. If not provided, - // the service will choose a zone for the instance. For STANDARD_HA tier, - // instances will be created across two zones for protection against - // zonal failures. If [alternativeLocationId] is also provided, it must - // be different from [locationId]. - // The zone where the instance will be provisioned. If not provided, - // the service will choose a zone for the instance. For STANDARD_HA tier, - // instances will be created across two zones for protection against - // zonal failures. If [alternativeLocationId] is also provided, it must - // be different from [locationId]. - LocationID *string `json:"locationId,omitempty" tf:"location_id,omitempty"` - - // Maintenance policy for an instance. - // Structure is documented below. - // Maintenance policy for an instance. - MaintenancePolicy []MaintenancePolicyInitParameters `json:"maintenancePolicy,omitempty" tf:"maintenance_policy,omitempty"` - - // Upcoming maintenance schedule. - // Structure is documented below. - // Upcoming maintenance schedule. - MaintenanceSchedule []MaintenanceScheduleInitParameters `json:"maintenanceSchedule,omitempty" tf:"maintenance_schedule,omitempty"` - - // Redis memory size in GiB. - // Redis memory size in GiB. - MemorySizeGb *float64 `json:"memorySizeGb,omitempty" tf:"memory_size_gb,omitempty"` - - // Persistence configuration for an instance. - // Structure is documented below. - // Persistence configuration for an instance. - PersistenceConfig []PersistenceConfigInitParameters `json:"persistenceConfig,omitempty" tf:"persistence_config,omitempty"` - - // The ID of the project in which the resource belongs. - // If it is not provided, the provider project is used. - Project *string `json:"project,omitempty" tf:"project,omitempty"` - - // Optional. Read replica mode. Can only be specified when trying to create the instance. - // If not set, Memorystore Redis backend will default to READ_REPLICAS_DISABLED. - // Optional. Read replica mode. Can only be specified when trying to create the instance. - // If not set, Memorystore Redis backend will default to READ_REPLICAS_DISABLED. - // - READ_REPLICAS_DISABLED: If disabled, read endpoint will not be provided and the - // instance cannot scale up or down the number of replicas. - // - READ_REPLICAS_ENABLED: If enabled, read endpoint will be provided and the instance - // can scale up and down the number of replicas. Possible values: ["READ_REPLICAS_DISABLED", "READ_REPLICAS_ENABLED"] - ReadReplicasMode *string `json:"readReplicasMode,omitempty" tf:"read_replicas_mode,omitempty"` - - // Redis configuration parameters, according to http://redis.io/topics/config. - // Please check Memorystore documentation for the list of supported parameters: - // https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#Instance.FIELDS.redis_configs - // Redis configuration parameters, according to http://redis.io/topics/config. - // Please check Memorystore documentation for the list of supported parameters: - // https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#Instance.FIELDS.redis_configs - RedisConfigs map[string]*string `json:"redisConfigs,omitempty" tf:"redis_configs,omitempty"` - - // The version of Redis software. If not provided, latest supported - // version will be used. Please check the API documentation linked - // at the top for the latest valid values. - // The version of Redis software. If not provided, latest supported - // version will be used. Please check the API documentation linked - // at the top for the latest valid values. - RedisVersion *string `json:"redisVersion,omitempty" tf:"redis_version,omitempty"` - - // Optional. The number of replica nodes. The valid range for the Standard Tier with - // read replicas enabled is [1-5] and defaults to 2. If read replicas are not enabled - // for a Standard Tier instance, the only valid value is 1 and the default is 1. - // The valid value for basic tier is 0 and the default is also 0. - // Optional. The number of replica nodes. The valid range for the Standard Tier with - // read replicas enabled is [1-5] and defaults to 2. If read replicas are not enabled - // for a Standard Tier instance, the only valid value is 1 and the default is 1. - // The valid value for basic tier is 0 and the default is also 0. - ReplicaCount *float64 `json:"replicaCount,omitempty" tf:"replica_count,omitempty"` - - // The CIDR range of internal addresses that are reserved for this - // instance. If not provided, the service will choose an unused /29 - // block, for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be - // unique and non-overlapping with existing subnets in an authorized - // network. - // The CIDR range of internal addresses that are reserved for this - // instance. If not provided, the service will choose an unused /29 - // block, for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be - // unique and non-overlapping with existing subnets in an authorized - // network. - ReservedIPRange *string `json:"reservedIpRange,omitempty" tf:"reserved_ip_range,omitempty"` - - // Optional. Additional IP range for node placement. Required when enabling read replicas on - // an existing instance. For DIRECT_PEERING mode value must be a CIDR range of size /28, or - // "auto". For PRIVATE_SERVICE_ACCESS mode value must be the name of an allocated address - // range associated with the private service access connection, or "auto". - // Optional. Additional IP range for node placement. Required when enabling read replicas on - // an existing instance. For DIRECT_PEERING mode value must be a CIDR range of size /28, or - // "auto". For PRIVATE_SERVICE_ACCESS mode value must be the name of an allocated address - // range associated with the private service access connection, or "auto". - SecondaryIPRange *string `json:"secondaryIpRange,omitempty" tf:"secondary_ip_range,omitempty"` - - // The service tier of the instance. Must be one of these values: - // The service tier of the instance. Must be one of these values: - // - // - BASIC: standalone instance - // - STANDARD_HA: highly available primary/replica instances Default value: "BASIC" Possible values: ["BASIC", "STANDARD_HA"] - Tier *string `json:"tier,omitempty" tf:"tier,omitempty"` - - // The TLS mode of the Redis instance, If not provided, TLS is disabled for the instance. - // The TLS mode of the Redis instance, If not provided, TLS is disabled for the instance. - // - // - SERVER_AUTHENTICATION: Client to Server traffic encryption enabled with server authentication Default value: "DISABLED" Possible values: ["SERVER_AUTHENTICATION", "DISABLED"] - TransitEncryptionMode *string `json:"transitEncryptionMode,omitempty" tf:"transit_encryption_mode,omitempty"` + +// Only applicable to STANDARD_HA tier which protects the instance +// against zonal failures by provisioning it across two zones. +// If provided, it must be a different zone from the one provided in +// [locationId]. +// Only applicable to STANDARD_HA tier which protects the instance +// against zonal failures by provisioning it across two zones. +// If provided, it must be a different zone from the one provided in +// [locationId]. +AlternativeLocationID *string `json:"alternativeLocationId,omitempty" tf:"alternative_location_id,omitempty"` + +// Optional. Indicates whether OSS Redis AUTH is enabled for the +// instance. If set to "true" AUTH is enabled on the instance. +// Default value is "false" meaning AUTH is disabled. +// Optional. Indicates whether OSS Redis AUTH is enabled for the +// instance. If set to "true" AUTH is enabled on the instance. +// Default value is "false" meaning AUTH is disabled. +AuthEnabled *bool `json:"authEnabled,omitempty" tf:"auth_enabled,omitempty"` + +// The full name of the Google Compute Engine network to which the +// instance is connected. If left unspecified, the default network +// will be used. +// The full name of the Google Compute Engine network to which the +// instance is connected. If left unspecified, the default network +// will be used. +AuthorizedNetwork *string `json:"authorizedNetwork,omitempty" tf:"authorized_network,omitempty"` + +// The connection mode of the Redis instance. +// Default value is DIRECT_PEERING. +// Possible values are: DIRECT_PEERING, PRIVATE_SERVICE_ACCESS. +// The connection mode of the Redis instance. Default value: "DIRECT_PEERING" Possible values: ["DIRECT_PEERING", "PRIVATE_SERVICE_ACCESS"] +ConnectMode *string `json:"connectMode,omitempty" tf:"connect_mode,omitempty"` + +// Optional. The KMS key reference that you want to use to encrypt the data at rest for this Redis +// instance. If this is provided, CMEK is enabled. +// Optional. The KMS key reference that you want to use to encrypt the data at rest for this Redis +// instance. If this is provided, CMEK is enabled. +CustomerManagedKey *string `json:"customerManagedKey,omitempty" tf:"customer_managed_key,omitempty"` + +// An arbitrary and optional user-provided name for the instance. +// An arbitrary and optional user-provided name for the instance. +DisplayName *string `json:"displayName,omitempty" tf:"display_name,omitempty"` + +// Resource labels to represent user provided metadata. +// Resource labels to represent user provided metadata. +Labels map[string]*string `json:"labels,omitempty" tf:"labels,omitempty"` + +// The zone where the instance will be provisioned. If not provided, +// the service will choose a zone for the instance. For STANDARD_HA tier, +// instances will be created across two zones for protection against +// zonal failures. If [alternativeLocationId] is also provided, it must +// be different from [locationId]. +// The zone where the instance will be provisioned. If not provided, +// the service will choose a zone for the instance. For STANDARD_HA tier, +// instances will be created across two zones for protection against +// zonal failures. If [alternativeLocationId] is also provided, it must +// be different from [locationId]. +LocationID *string `json:"locationId,omitempty" tf:"location_id,omitempty"` + +// Maintenance policy for an instance. +// Structure is documented below. +// Maintenance policy for an instance. +MaintenancePolicy []MaintenancePolicyInitParameters `json:"maintenancePolicy,omitempty" tf:"maintenance_policy,omitempty"` + +// Upcoming maintenance schedule. +// Structure is documented below. +// Upcoming maintenance schedule. +MaintenanceSchedule []MaintenanceScheduleInitParameters `json:"maintenanceSchedule,omitempty" tf:"maintenance_schedule,omitempty"` + +// Redis memory size in GiB. +// Redis memory size in GiB. +MemorySizeGb *float64 `json:"memorySizeGb,omitempty" tf:"memory_size_gb,omitempty"` + +// Persistence configuration for an instance. +// Structure is documented below. +// Persistence configuration for an instance. +PersistenceConfig []PersistenceConfigInitParameters `json:"persistenceConfig,omitempty" tf:"persistence_config,omitempty"` + +// The ID of the project in which the resource belongs. +// If it is not provided, the provider project is used. +Project *string `json:"project,omitempty" tf:"project,omitempty"` + +// Optional. Read replica mode. Can only be specified when trying to create the instance. +// If not set, Memorystore Redis backend will default to READ_REPLICAS_DISABLED. +// Optional. Read replica mode. Can only be specified when trying to create the instance. +// If not set, Memorystore Redis backend will default to READ_REPLICAS_DISABLED. +// - READ_REPLICAS_DISABLED: If disabled, read endpoint will not be provided and the +// instance cannot scale up or down the number of replicas. +// - READ_REPLICAS_ENABLED: If enabled, read endpoint will be provided and the instance +// can scale up and down the number of replicas. Possible values: ["READ_REPLICAS_DISABLED", "READ_REPLICAS_ENABLED"] +ReadReplicasMode *string `json:"readReplicasMode,omitempty" tf:"read_replicas_mode,omitempty"` + +// Redis configuration parameters, according to http://redis.io/topics/config. +// Please check Memorystore documentation for the list of supported parameters: +// https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#Instance.FIELDS.redis_configs +// Redis configuration parameters, according to http://redis.io/topics/config. +// Please check Memorystore documentation for the list of supported parameters: +// https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#Instance.FIELDS.redis_configs +RedisConfigs map[string]*string `json:"redisConfigs,omitempty" tf:"redis_configs,omitempty"` + +// The version of Redis software. If not provided, latest supported +// version will be used. Please check the API documentation linked +// at the top for the latest valid values. +// The version of Redis software. If not provided, latest supported +// version will be used. Please check the API documentation linked +// at the top for the latest valid values. +RedisVersion *string `json:"redisVersion,omitempty" tf:"redis_version,omitempty"` + +// Optional. The number of replica nodes. The valid range for the Standard Tier with +// read replicas enabled is [1-5] and defaults to 2. If read replicas are not enabled +// for a Standard Tier instance, the only valid value is 1 and the default is 1. +// The valid value for basic tier is 0 and the default is also 0. +// Optional. The number of replica nodes. The valid range for the Standard Tier with +// read replicas enabled is [1-5] and defaults to 2. If read replicas are not enabled +// for a Standard Tier instance, the only valid value is 1 and the default is 1. +// The valid value for basic tier is 0 and the default is also 0. +ReplicaCount *float64 `json:"replicaCount,omitempty" tf:"replica_count,omitempty"` + +// The CIDR range of internal addresses that are reserved for this +// instance. If not provided, the service will choose an unused /29 +// block, for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be +// unique and non-overlapping with existing subnets in an authorized +// network. +// The CIDR range of internal addresses that are reserved for this +// instance. If not provided, the service will choose an unused /29 +// block, for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be +// unique and non-overlapping with existing subnets in an authorized +// network. +ReservedIPRange *string `json:"reservedIpRange,omitempty" tf:"reserved_ip_range,omitempty"` + +// Optional. Additional IP range for node placement. Required when enabling read replicas on +// an existing instance. For DIRECT_PEERING mode value must be a CIDR range of size /28, or +// "auto". For PRIVATE_SERVICE_ACCESS mode value must be the name of an allocated address +// range associated with the private service access connection, or "auto". +// Optional. Additional IP range for node placement. Required when enabling read replicas on +// an existing instance. For DIRECT_PEERING mode value must be a CIDR range of size /28, or +// "auto". For PRIVATE_SERVICE_ACCESS mode value must be the name of an allocated address +// range associated with the private service access connection, or "auto". +SecondaryIPRange *string `json:"secondaryIpRange,omitempty" tf:"secondary_ip_range,omitempty"` + +// The service tier of the instance. Must be one of these values: +// The service tier of the instance. Must be one of these values: +// +// - BASIC: standalone instance +// - STANDARD_HA: highly available primary/replica instances Default value: "BASIC" Possible values: ["BASIC", "STANDARD_HA"] +Tier *string `json:"tier,omitempty" tf:"tier,omitempty"` + +// The TLS mode of the Redis instance, If not provided, TLS is disabled for the instance. +// The TLS mode of the Redis instance, If not provided, TLS is disabled for the instance. +// +// - SERVER_AUTHENTICATION: Client to Server traffic encryption enabled with server authentication Default value: "DISABLED" Possible values: ["SERVER_AUTHENTICATION", "DISABLED"] +TransitEncryptionMode *string `json:"transitEncryptionMode,omitempty" tf:"transit_encryption_mode,omitempty"` } + type InstanceObservation struct { - // Only applicable to STANDARD_HA tier which protects the instance - // against zonal failures by provisioning it across two zones. - // If provided, it must be a different zone from the one provided in - // [locationId]. - // Only applicable to STANDARD_HA tier which protects the instance - // against zonal failures by provisioning it across two zones. - // If provided, it must be a different zone from the one provided in - // [locationId]. - AlternativeLocationID *string `json:"alternativeLocationId,omitempty" tf:"alternative_location_id,omitempty"` - - // Optional. Indicates whether OSS Redis AUTH is enabled for the - // instance. If set to "true" AUTH is enabled on the instance. - // Default value is "false" meaning AUTH is disabled. - // Optional. Indicates whether OSS Redis AUTH is enabled for the - // instance. If set to "true" AUTH is enabled on the instance. - // Default value is "false" meaning AUTH is disabled. - AuthEnabled *bool `json:"authEnabled,omitempty" tf:"auth_enabled,omitempty"` - - // The full name of the Google Compute Engine network to which the - // instance is connected. If left unspecified, the default network - // will be used. - // The full name of the Google Compute Engine network to which the - // instance is connected. If left unspecified, the default network - // will be used. - AuthorizedNetwork *string `json:"authorizedNetwork,omitempty" tf:"authorized_network,omitempty"` - - // The connection mode of the Redis instance. - // Default value is DIRECT_PEERING. - // Possible values are: DIRECT_PEERING, PRIVATE_SERVICE_ACCESS. - // The connection mode of the Redis instance. Default value: "DIRECT_PEERING" Possible values: ["DIRECT_PEERING", "PRIVATE_SERVICE_ACCESS"] - ConnectMode *string `json:"connectMode,omitempty" tf:"connect_mode,omitempty"` - - // The time the instance was created in RFC3339 UTC "Zulu" format, - // accurate to nanoseconds. - // The time the instance was created in RFC3339 UTC "Zulu" format, - // accurate to nanoseconds. - CreateTime *string `json:"createTime,omitempty" tf:"create_time,omitempty"` - - // The current zone where the Redis endpoint is placed. - // For Basic Tier instances, this will always be the same as the - // [locationId] provided by the user at creation time. For Standard Tier - // instances, this can be either [locationId] or [alternativeLocationId] - // and can change after a failover event. - // The current zone where the Redis endpoint is placed. - // For Basic Tier instances, this will always be the same as the - // [locationId] provided by the user at creation time. For Standard Tier - // instances, this can be either [locationId] or [alternativeLocationId] - // and can change after a failover event. - CurrentLocationID *string `json:"currentLocationId,omitempty" tf:"current_location_id,omitempty"` - - // Optional. The KMS key reference that you want to use to encrypt the data at rest for this Redis - // instance. If this is provided, CMEK is enabled. - // Optional. The KMS key reference that you want to use to encrypt the data at rest for this Redis - // instance. If this is provided, CMEK is enabled. - CustomerManagedKey *string `json:"customerManagedKey,omitempty" tf:"customer_managed_key,omitempty"` - - // An arbitrary and optional user-provided name for the instance. - // An arbitrary and optional user-provided name for the instance. - DisplayName *string `json:"displayName,omitempty" tf:"display_name,omitempty"` - - // Hostname or IP address of the exposed Redis endpoint used by clients - // to connect to the service. - // Hostname or IP address of the exposed Redis endpoint used by clients - // to connect to the service. - Host *string `json:"host,omitempty" tf:"host,omitempty"` - - // an identifier for the resource with format projects/{{project}}/locations/{{region}}/instances/{{name}} - ID *string `json:"id,omitempty" tf:"id,omitempty"` - - // Resource labels to represent user provided metadata. - // Resource labels to represent user provided metadata. - Labels map[string]*string `json:"labels,omitempty" tf:"labels,omitempty"` - - // The zone where the instance will be provisioned. If not provided, - // the service will choose a zone for the instance. For STANDARD_HA tier, - // instances will be created across two zones for protection against - // zonal failures. If [alternativeLocationId] is also provided, it must - // be different from [locationId]. - // The zone where the instance will be provisioned. If not provided, - // the service will choose a zone for the instance. For STANDARD_HA tier, - // instances will be created across two zones for protection against - // zonal failures. If [alternativeLocationId] is also provided, it must - // be different from [locationId]. - LocationID *string `json:"locationId,omitempty" tf:"location_id,omitempty"` - - // Maintenance policy for an instance. - // Structure is documented below. - // Maintenance policy for an instance. - MaintenancePolicy []MaintenancePolicyObservation `json:"maintenancePolicy,omitempty" tf:"maintenance_policy,omitempty"` - - // Upcoming maintenance schedule. - // Structure is documented below. - // Upcoming maintenance schedule. - MaintenanceSchedule []MaintenanceScheduleObservation `json:"maintenanceSchedule,omitempty" tf:"maintenance_schedule,omitempty"` - - // Redis memory size in GiB. - // Redis memory size in GiB. - MemorySizeGb *float64 `json:"memorySizeGb,omitempty" tf:"memory_size_gb,omitempty"` - - // Output only. Info per node. - // Structure is documented below. - // Output only. Info per node. - Nodes []NodesObservation `json:"nodes,omitempty" tf:"nodes,omitempty"` - - // Persistence configuration for an instance. - // Structure is documented below. - // Persistence configuration for an instance. - PersistenceConfig []PersistenceConfigObservation `json:"persistenceConfig,omitempty" tf:"persistence_config,omitempty"` - - // Output only. Cloud IAM identity used by import / export operations - // to transfer data to/from Cloud Storage. Format is "serviceAccount:". - // The value may change over time for a given instance so should be - // checked before each import/export operation. - // Output only. Cloud IAM identity used by import / export operations - // to transfer data to/from Cloud Storage. Format is "serviceAccount:". - // The value may change over time for a given instance so should be - // checked before each import/export operation. - PersistenceIAMIdentity *string `json:"persistenceIamIdentity,omitempty" tf:"persistence_iam_identity,omitempty"` - - // The port number of the exposed Redis endpoint. - // The port number of the exposed Redis endpoint. - Port *float64 `json:"port,omitempty" tf:"port,omitempty"` - - // The ID of the project in which the resource belongs. - // If it is not provided, the provider project is used. - Project *string `json:"project,omitempty" tf:"project,omitempty"` - - // Output only. Hostname or IP address of the exposed readonly Redis endpoint. Standard tier only. - // Targets all healthy replica nodes in instance. Replication is asynchronous and replica nodes - // will exhibit some lag behind the primary. Write requests must target 'host'. - // Output only. Hostname or IP address of the exposed readonly Redis endpoint. Standard tier only. - // Targets all healthy replica nodes in instance. Replication is asynchronous and replica nodes - // will exhibit some lag behind the primary. Write requests must target 'host'. - ReadEndpoint *string `json:"readEndpoint,omitempty" tf:"read_endpoint,omitempty"` - - // Output only. The port number of the exposed readonly redis endpoint. Standard tier only. - // Write requests should target 'port'. - // Output only. The port number of the exposed readonly redis endpoint. Standard tier only. - // Write requests should target 'port'. - ReadEndpointPort *float64 `json:"readEndpointPort,omitempty" tf:"read_endpoint_port,omitempty"` - - // Optional. Read replica mode. Can only be specified when trying to create the instance. - // If not set, Memorystore Redis backend will default to READ_REPLICAS_DISABLED. - // Optional. Read replica mode. Can only be specified when trying to create the instance. - // If not set, Memorystore Redis backend will default to READ_REPLICAS_DISABLED. - // - READ_REPLICAS_DISABLED: If disabled, read endpoint will not be provided and the - // instance cannot scale up or down the number of replicas. - // - READ_REPLICAS_ENABLED: If enabled, read endpoint will be provided and the instance - // can scale up and down the number of replicas. Possible values: ["READ_REPLICAS_DISABLED", "READ_REPLICAS_ENABLED"] - ReadReplicasMode *string `json:"readReplicasMode,omitempty" tf:"read_replicas_mode,omitempty"` - - // Redis configuration parameters, according to http://redis.io/topics/config. - // Please check Memorystore documentation for the list of supported parameters: - // https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#Instance.FIELDS.redis_configs - // Redis configuration parameters, according to http://redis.io/topics/config. - // Please check Memorystore documentation for the list of supported parameters: - // https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#Instance.FIELDS.redis_configs - RedisConfigs map[string]*string `json:"redisConfigs,omitempty" tf:"redis_configs,omitempty"` - - // The version of Redis software. If not provided, latest supported - // version will be used. Please check the API documentation linked - // at the top for the latest valid values. - // The version of Redis software. If not provided, latest supported - // version will be used. Please check the API documentation linked - // at the top for the latest valid values. - RedisVersion *string `json:"redisVersion,omitempty" tf:"redis_version,omitempty"` - - // The name of the Redis region of the instance. - // The name of the Redis region of the instance. - Region *string `json:"region,omitempty" tf:"region,omitempty"` - - // Optional. The number of replica nodes. The valid range for the Standard Tier with - // read replicas enabled is [1-5] and defaults to 2. If read replicas are not enabled - // for a Standard Tier instance, the only valid value is 1 and the default is 1. - // The valid value for basic tier is 0 and the default is also 0. - // Optional. The number of replica nodes. The valid range for the Standard Tier with - // read replicas enabled is [1-5] and defaults to 2. If read replicas are not enabled - // for a Standard Tier instance, the only valid value is 1 and the default is 1. - // The valid value for basic tier is 0 and the default is also 0. - ReplicaCount *float64 `json:"replicaCount,omitempty" tf:"replica_count,omitempty"` - - // The CIDR range of internal addresses that are reserved for this - // instance. If not provided, the service will choose an unused /29 - // block, for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be - // unique and non-overlapping with existing subnets in an authorized - // network. - // The CIDR range of internal addresses that are reserved for this - // instance. If not provided, the service will choose an unused /29 - // block, for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be - // unique and non-overlapping with existing subnets in an authorized - // network. - ReservedIPRange *string `json:"reservedIpRange,omitempty" tf:"reserved_ip_range,omitempty"` - - // Optional. Additional IP range for node placement. Required when enabling read replicas on - // an existing instance. For DIRECT_PEERING mode value must be a CIDR range of size /28, or - // "auto". For PRIVATE_SERVICE_ACCESS mode value must be the name of an allocated address - // range associated with the private service access connection, or "auto". - // Optional. Additional IP range for node placement. Required when enabling read replicas on - // an existing instance. For DIRECT_PEERING mode value must be a CIDR range of size /28, or - // "auto". For PRIVATE_SERVICE_ACCESS mode value must be the name of an allocated address - // range associated with the private service access connection, or "auto". - SecondaryIPRange *string `json:"secondaryIpRange,omitempty" tf:"secondary_ip_range,omitempty"` - - // List of server CA certificates for the instance. - // Structure is documented below. - // List of server CA certificates for the instance. - ServerCACerts []ServerCACertsObservation `json:"serverCaCerts,omitempty" tf:"server_ca_certs,omitempty"` - - // The service tier of the instance. Must be one of these values: - // The service tier of the instance. Must be one of these values: - // - // - BASIC: standalone instance - // - STANDARD_HA: highly available primary/replica instances Default value: "BASIC" Possible values: ["BASIC", "STANDARD_HA"] - Tier *string `json:"tier,omitempty" tf:"tier,omitempty"` - - // The TLS mode of the Redis instance, If not provided, TLS is disabled for the instance. - // The TLS mode of the Redis instance, If not provided, TLS is disabled for the instance. - // - // - SERVER_AUTHENTICATION: Client to Server traffic encryption enabled with server authentication Default value: "DISABLED" Possible values: ["SERVER_AUTHENTICATION", "DISABLED"] - TransitEncryptionMode *string `json:"transitEncryptionMode,omitempty" tf:"transit_encryption_mode,omitempty"` + +// Only applicable to STANDARD_HA tier which protects the instance +// against zonal failures by provisioning it across two zones. +// If provided, it must be a different zone from the one provided in +// [locationId]. +// Only applicable to STANDARD_HA tier which protects the instance +// against zonal failures by provisioning it across two zones. +// If provided, it must be a different zone from the one provided in +// [locationId]. +AlternativeLocationID *string `json:"alternativeLocationId,omitempty" tf:"alternative_location_id,omitempty"` + +// Optional. Indicates whether OSS Redis AUTH is enabled for the +// instance. If set to "true" AUTH is enabled on the instance. +// Default value is "false" meaning AUTH is disabled. +// Optional. Indicates whether OSS Redis AUTH is enabled for the +// instance. If set to "true" AUTH is enabled on the instance. +// Default value is "false" meaning AUTH is disabled. +AuthEnabled *bool `json:"authEnabled,omitempty" tf:"auth_enabled,omitempty"` + +// The full name of the Google Compute Engine network to which the +// instance is connected. If left unspecified, the default network +// will be used. +// The full name of the Google Compute Engine network to which the +// instance is connected. If left unspecified, the default network +// will be used. +AuthorizedNetwork *string `json:"authorizedNetwork,omitempty" tf:"authorized_network,omitempty"` + +// The connection mode of the Redis instance. +// Default value is DIRECT_PEERING. +// Possible values are: DIRECT_PEERING, PRIVATE_SERVICE_ACCESS. +// The connection mode of the Redis instance. Default value: "DIRECT_PEERING" Possible values: ["DIRECT_PEERING", "PRIVATE_SERVICE_ACCESS"] +ConnectMode *string `json:"connectMode,omitempty" tf:"connect_mode,omitempty"` + +// The time the instance was created in RFC3339 UTC "Zulu" format, +// accurate to nanoseconds. +// The time the instance was created in RFC3339 UTC "Zulu" format, +// accurate to nanoseconds. +CreateTime *string `json:"createTime,omitempty" tf:"create_time,omitempty"` + +// The current zone where the Redis endpoint is placed. +// For Basic Tier instances, this will always be the same as the +// [locationId] provided by the user at creation time. For Standard Tier +// instances, this can be either [locationId] or [alternativeLocationId] +// and can change after a failover event. +// The current zone where the Redis endpoint is placed. +// For Basic Tier instances, this will always be the same as the +// [locationId] provided by the user at creation time. For Standard Tier +// instances, this can be either [locationId] or [alternativeLocationId] +// and can change after a failover event. +CurrentLocationID *string `json:"currentLocationId,omitempty" tf:"current_location_id,omitempty"` + +// Optional. The KMS key reference that you want to use to encrypt the data at rest for this Redis +// instance. If this is provided, CMEK is enabled. +// Optional. The KMS key reference that you want to use to encrypt the data at rest for this Redis +// instance. If this is provided, CMEK is enabled. +CustomerManagedKey *string `json:"customerManagedKey,omitempty" tf:"customer_managed_key,omitempty"` + +// An arbitrary and optional user-provided name for the instance. +// An arbitrary and optional user-provided name for the instance. +DisplayName *string `json:"displayName,omitempty" tf:"display_name,omitempty"` + +// Hostname or IP address of the exposed Redis endpoint used by clients +// to connect to the service. +// Hostname or IP address of the exposed Redis endpoint used by clients +// to connect to the service. +Host *string `json:"host,omitempty" tf:"host,omitempty"` + +// an identifier for the resource with format projects/{{project}}/locations/{{region}}/instances/{{name}} +ID *string `json:"id,omitempty" tf:"id,omitempty"` + +// Resource labels to represent user provided metadata. +// Resource labels to represent user provided metadata. +Labels map[string]*string `json:"labels,omitempty" tf:"labels,omitempty"` + +// The zone where the instance will be provisioned. If not provided, +// the service will choose a zone for the instance. For STANDARD_HA tier, +// instances will be created across two zones for protection against +// zonal failures. If [alternativeLocationId] is also provided, it must +// be different from [locationId]. +// The zone where the instance will be provisioned. If not provided, +// the service will choose a zone for the instance. For STANDARD_HA tier, +// instances will be created across two zones for protection against +// zonal failures. If [alternativeLocationId] is also provided, it must +// be different from [locationId]. +LocationID *string `json:"locationId,omitempty" tf:"location_id,omitempty"` + +// Maintenance policy for an instance. +// Structure is documented below. +// Maintenance policy for an instance. +MaintenancePolicy []MaintenancePolicyObservation `json:"maintenancePolicy,omitempty" tf:"maintenance_policy,omitempty"` + +// Upcoming maintenance schedule. +// Structure is documented below. +// Upcoming maintenance schedule. +MaintenanceSchedule []MaintenanceScheduleObservation `json:"maintenanceSchedule,omitempty" tf:"maintenance_schedule,omitempty"` + +// Redis memory size in GiB. +// Redis memory size in GiB. +MemorySizeGb *float64 `json:"memorySizeGb,omitempty" tf:"memory_size_gb,omitempty"` + +// Output only. Info per node. +// Structure is documented below. +// Output only. Info per node. +Nodes []NodesObservation `json:"nodes,omitempty" tf:"nodes,omitempty"` + +// Persistence configuration for an instance. +// Structure is documented below. +// Persistence configuration for an instance. +PersistenceConfig []PersistenceConfigObservation `json:"persistenceConfig,omitempty" tf:"persistence_config,omitempty"` + +// Output only. Cloud IAM identity used by import / export operations +// to transfer data to/from Cloud Storage. Format is "serviceAccount:". +// The value may change over time for a given instance so should be +// checked before each import/export operation. +// Output only. Cloud IAM identity used by import / export operations +// to transfer data to/from Cloud Storage. Format is "serviceAccount:". +// The value may change over time for a given instance so should be +// checked before each import/export operation. +PersistenceIAMIdentity *string `json:"persistenceIamIdentity,omitempty" tf:"persistence_iam_identity,omitempty"` + +// The port number of the exposed Redis endpoint. +// The port number of the exposed Redis endpoint. +Port *float64 `json:"port,omitempty" tf:"port,omitempty"` + +// The ID of the project in which the resource belongs. +// If it is not provided, the provider project is used. +Project *string `json:"project,omitempty" tf:"project,omitempty"` + +// Output only. Hostname or IP address of the exposed readonly Redis endpoint. Standard tier only. +// Targets all healthy replica nodes in instance. Replication is asynchronous and replica nodes +// will exhibit some lag behind the primary. Write requests must target 'host'. +// Output only. Hostname or IP address of the exposed readonly Redis endpoint. Standard tier only. +// Targets all healthy replica nodes in instance. Replication is asynchronous and replica nodes +// will exhibit some lag behind the primary. Write requests must target 'host'. +ReadEndpoint *string `json:"readEndpoint,omitempty" tf:"read_endpoint,omitempty"` + +// Output only. The port number of the exposed readonly redis endpoint. Standard tier only. +// Write requests should target 'port'. +// Output only. The port number of the exposed readonly redis endpoint. Standard tier only. +// Write requests should target 'port'. +ReadEndpointPort *float64 `json:"readEndpointPort,omitempty" tf:"read_endpoint_port,omitempty"` + +// Optional. Read replica mode. Can only be specified when trying to create the instance. +// If not set, Memorystore Redis backend will default to READ_REPLICAS_DISABLED. +// Optional. Read replica mode. Can only be specified when trying to create the instance. +// If not set, Memorystore Redis backend will default to READ_REPLICAS_DISABLED. +// - READ_REPLICAS_DISABLED: If disabled, read endpoint will not be provided and the +// instance cannot scale up or down the number of replicas. +// - READ_REPLICAS_ENABLED: If enabled, read endpoint will be provided and the instance +// can scale up and down the number of replicas. Possible values: ["READ_REPLICAS_DISABLED", "READ_REPLICAS_ENABLED"] +ReadReplicasMode *string `json:"readReplicasMode,omitempty" tf:"read_replicas_mode,omitempty"` + +// Redis configuration parameters, according to http://redis.io/topics/config. +// Please check Memorystore documentation for the list of supported parameters: +// https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#Instance.FIELDS.redis_configs +// Redis configuration parameters, according to http://redis.io/topics/config. +// Please check Memorystore documentation for the list of supported parameters: +// https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#Instance.FIELDS.redis_configs +RedisConfigs map[string]*string `json:"redisConfigs,omitempty" tf:"redis_configs,omitempty"` + +// The version of Redis software. If not provided, latest supported +// version will be used. Please check the API documentation linked +// at the top for the latest valid values. +// The version of Redis software. If not provided, latest supported +// version will be used. Please check the API documentation linked +// at the top for the latest valid values. +RedisVersion *string `json:"redisVersion,omitempty" tf:"redis_version,omitempty"` + +// The name of the Redis region of the instance. +// The name of the Redis region of the instance. +Region *string `json:"region,omitempty" tf:"region,omitempty"` + +// Optional. The number of replica nodes. The valid range for the Standard Tier with +// read replicas enabled is [1-5] and defaults to 2. If read replicas are not enabled +// for a Standard Tier instance, the only valid value is 1 and the default is 1. +// The valid value for basic tier is 0 and the default is also 0. +// Optional. The number of replica nodes. The valid range for the Standard Tier with +// read replicas enabled is [1-5] and defaults to 2. If read replicas are not enabled +// for a Standard Tier instance, the only valid value is 1 and the default is 1. +// The valid value for basic tier is 0 and the default is also 0. +ReplicaCount *float64 `json:"replicaCount,omitempty" tf:"replica_count,omitempty"` + +// The CIDR range of internal addresses that are reserved for this +// instance. If not provided, the service will choose an unused /29 +// block, for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be +// unique and non-overlapping with existing subnets in an authorized +// network. +// The CIDR range of internal addresses that are reserved for this +// instance. If not provided, the service will choose an unused /29 +// block, for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be +// unique and non-overlapping with existing subnets in an authorized +// network. +ReservedIPRange *string `json:"reservedIpRange,omitempty" tf:"reserved_ip_range,omitempty"` + +// Optional. Additional IP range for node placement. Required when enabling read replicas on +// an existing instance. For DIRECT_PEERING mode value must be a CIDR range of size /28, or +// "auto". For PRIVATE_SERVICE_ACCESS mode value must be the name of an allocated address +// range associated with the private service access connection, or "auto". +// Optional. Additional IP range for node placement. Required when enabling read replicas on +// an existing instance. For DIRECT_PEERING mode value must be a CIDR range of size /28, or +// "auto". For PRIVATE_SERVICE_ACCESS mode value must be the name of an allocated address +// range associated with the private service access connection, or "auto". +SecondaryIPRange *string `json:"secondaryIpRange,omitempty" tf:"secondary_ip_range,omitempty"` + +// List of server CA certificates for the instance. +// Structure is documented below. +// List of server CA certificates for the instance. +ServerCACerts []ServerCACertsObservation `json:"serverCaCerts,omitempty" tf:"server_ca_certs,omitempty"` + +// The service tier of the instance. Must be one of these values: +// The service tier of the instance. Must be one of these values: +// +// - BASIC: standalone instance +// - STANDARD_HA: highly available primary/replica instances Default value: "BASIC" Possible values: ["BASIC", "STANDARD_HA"] +Tier *string `json:"tier,omitempty" tf:"tier,omitempty"` + +// The TLS mode of the Redis instance, If not provided, TLS is disabled for the instance. +// The TLS mode of the Redis instance, If not provided, TLS is disabled for the instance. +// +// - SERVER_AUTHENTICATION: Client to Server traffic encryption enabled with server authentication Default value: "DISABLED" Possible values: ["SERVER_AUTHENTICATION", "DISABLED"] +TransitEncryptionMode *string `json:"transitEncryptionMode,omitempty" tf:"transit_encryption_mode,omitempty"` } + type InstanceParameters struct { - // Only applicable to STANDARD_HA tier which protects the instance - // against zonal failures by provisioning it across two zones. - // If provided, it must be a different zone from the one provided in - // [locationId]. - // Only applicable to STANDARD_HA tier which protects the instance - // against zonal failures by provisioning it across two zones. - // If provided, it must be a different zone from the one provided in - // [locationId]. - // +kubebuilder:validation:Optional - AlternativeLocationID *string `json:"alternativeLocationId,omitempty" tf:"alternative_location_id,omitempty"` - - // Optional. Indicates whether OSS Redis AUTH is enabled for the - // instance. If set to "true" AUTH is enabled on the instance. - // Default value is "false" meaning AUTH is disabled. - // Optional. Indicates whether OSS Redis AUTH is enabled for the - // instance. If set to "true" AUTH is enabled on the instance. - // Default value is "false" meaning AUTH is disabled. - // +kubebuilder:validation:Optional - AuthEnabled *bool `json:"authEnabled,omitempty" tf:"auth_enabled,omitempty"` - - // The full name of the Google Compute Engine network to which the - // instance is connected. If left unspecified, the default network - // will be used. - // The full name of the Google Compute Engine network to which the - // instance is connected. If left unspecified, the default network - // will be used. - // +kubebuilder:validation:Optional - AuthorizedNetwork *string `json:"authorizedNetwork,omitempty" tf:"authorized_network,omitempty"` - - // The connection mode of the Redis instance. - // Default value is DIRECT_PEERING. - // Possible values are: DIRECT_PEERING, PRIVATE_SERVICE_ACCESS. - // The connection mode of the Redis instance. Default value: "DIRECT_PEERING" Possible values: ["DIRECT_PEERING", "PRIVATE_SERVICE_ACCESS"] - // +kubebuilder:validation:Optional - ConnectMode *string `json:"connectMode,omitempty" tf:"connect_mode,omitempty"` - - // Optional. The KMS key reference that you want to use to encrypt the data at rest for this Redis - // instance. If this is provided, CMEK is enabled. - // Optional. The KMS key reference that you want to use to encrypt the data at rest for this Redis - // instance. If this is provided, CMEK is enabled. - // +kubebuilder:validation:Optional - CustomerManagedKey *string `json:"customerManagedKey,omitempty" tf:"customer_managed_key,omitempty"` - - // An arbitrary and optional user-provided name for the instance. - // An arbitrary and optional user-provided name for the instance. - // +kubebuilder:validation:Optional - DisplayName *string `json:"displayName,omitempty" tf:"display_name,omitempty"` - - // Resource labels to represent user provided metadata. - // Resource labels to represent user provided metadata. - // +kubebuilder:validation:Optional - Labels map[string]*string `json:"labels,omitempty" tf:"labels,omitempty"` - - // The zone where the instance will be provisioned. If not provided, - // the service will choose a zone for the instance. For STANDARD_HA tier, - // instances will be created across two zones for protection against - // zonal failures. If [alternativeLocationId] is also provided, it must - // be different from [locationId]. - // The zone where the instance will be provisioned. If not provided, - // the service will choose a zone for the instance. For STANDARD_HA tier, - // instances will be created across two zones for protection against - // zonal failures. If [alternativeLocationId] is also provided, it must - // be different from [locationId]. - // +kubebuilder:validation:Optional - LocationID *string `json:"locationId,omitempty" tf:"location_id,omitempty"` - - // Maintenance policy for an instance. - // Structure is documented below. - // Maintenance policy for an instance. - // +kubebuilder:validation:Optional - MaintenancePolicy []MaintenancePolicyParameters `json:"maintenancePolicy,omitempty" tf:"maintenance_policy,omitempty"` - - // Upcoming maintenance schedule. - // Structure is documented below. - // Upcoming maintenance schedule. - // +kubebuilder:validation:Optional - MaintenanceSchedule []MaintenanceScheduleParameters `json:"maintenanceSchedule,omitempty" tf:"maintenance_schedule,omitempty"` - - // Redis memory size in GiB. - // Redis memory size in GiB. - // +kubebuilder:validation:Optional - MemorySizeGb *float64 `json:"memorySizeGb,omitempty" tf:"memory_size_gb,omitempty"` - - // Persistence configuration for an instance. - // Structure is documented below. - // Persistence configuration for an instance. - // +kubebuilder:validation:Optional - PersistenceConfig []PersistenceConfigParameters `json:"persistenceConfig,omitempty" tf:"persistence_config,omitempty"` - - // The ID of the project in which the resource belongs. - // If it is not provided, the provider project is used. - // +kubebuilder:validation:Optional - Project *string `json:"project,omitempty" tf:"project,omitempty"` - - // Optional. Read replica mode. Can only be specified when trying to create the instance. - // If not set, Memorystore Redis backend will default to READ_REPLICAS_DISABLED. - // Optional. Read replica mode. Can only be specified when trying to create the instance. - // If not set, Memorystore Redis backend will default to READ_REPLICAS_DISABLED. - // - READ_REPLICAS_DISABLED: If disabled, read endpoint will not be provided and the - // instance cannot scale up or down the number of replicas. - // - READ_REPLICAS_ENABLED: If enabled, read endpoint will be provided and the instance - // can scale up and down the number of replicas. Possible values: ["READ_REPLICAS_DISABLED", "READ_REPLICAS_ENABLED"] - // +kubebuilder:validation:Optional - ReadReplicasMode *string `json:"readReplicasMode,omitempty" tf:"read_replicas_mode,omitempty"` - - // Redis configuration parameters, according to http://redis.io/topics/config. - // Please check Memorystore documentation for the list of supported parameters: - // https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#Instance.FIELDS.redis_configs - // Redis configuration parameters, according to http://redis.io/topics/config. - // Please check Memorystore documentation for the list of supported parameters: - // https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#Instance.FIELDS.redis_configs - // +kubebuilder:validation:Optional - RedisConfigs map[string]*string `json:"redisConfigs,omitempty" tf:"redis_configs,omitempty"` - - // The version of Redis software. If not provided, latest supported - // version will be used. Please check the API documentation linked - // at the top for the latest valid values. - // The version of Redis software. If not provided, latest supported - // version will be used. Please check the API documentation linked - // at the top for the latest valid values. - // +kubebuilder:validation:Optional - RedisVersion *string `json:"redisVersion,omitempty" tf:"redis_version,omitempty"` - - // The name of the Redis region of the instance. - // The name of the Redis region of the instance. - // +kubebuilder:validation:Required - Region *string `json:"region" tf:"region,omitempty"` - - // Optional. The number of replica nodes. The valid range for the Standard Tier with - // read replicas enabled is [1-5] and defaults to 2. If read replicas are not enabled - // for a Standard Tier instance, the only valid value is 1 and the default is 1. - // The valid value for basic tier is 0 and the default is also 0. - // Optional. The number of replica nodes. The valid range for the Standard Tier with - // read replicas enabled is [1-5] and defaults to 2. If read replicas are not enabled - // for a Standard Tier instance, the only valid value is 1 and the default is 1. - // The valid value for basic tier is 0 and the default is also 0. - // +kubebuilder:validation:Optional - ReplicaCount *float64 `json:"replicaCount,omitempty" tf:"replica_count,omitempty"` - - // The CIDR range of internal addresses that are reserved for this - // instance. If not provided, the service will choose an unused /29 - // block, for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be - // unique and non-overlapping with existing subnets in an authorized - // network. - // The CIDR range of internal addresses that are reserved for this - // instance. If not provided, the service will choose an unused /29 - // block, for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be - // unique and non-overlapping with existing subnets in an authorized - // network. - // +kubebuilder:validation:Optional - ReservedIPRange *string `json:"reservedIpRange,omitempty" tf:"reserved_ip_range,omitempty"` - - // Optional. Additional IP range for node placement. Required when enabling read replicas on - // an existing instance. For DIRECT_PEERING mode value must be a CIDR range of size /28, or - // "auto". For PRIVATE_SERVICE_ACCESS mode value must be the name of an allocated address - // range associated with the private service access connection, or "auto". - // Optional. Additional IP range for node placement. Required when enabling read replicas on - // an existing instance. For DIRECT_PEERING mode value must be a CIDR range of size /28, or - // "auto". For PRIVATE_SERVICE_ACCESS mode value must be the name of an allocated address - // range associated with the private service access connection, or "auto". - // +kubebuilder:validation:Optional - SecondaryIPRange *string `json:"secondaryIpRange,omitempty" tf:"secondary_ip_range,omitempty"` - - // The service tier of the instance. Must be one of these values: - // The service tier of the instance. Must be one of these values: - // - // - BASIC: standalone instance - // - STANDARD_HA: highly available primary/replica instances Default value: "BASIC" Possible values: ["BASIC", "STANDARD_HA"] - // +kubebuilder:validation:Optional - Tier *string `json:"tier,omitempty" tf:"tier,omitempty"` - - // The TLS mode of the Redis instance, If not provided, TLS is disabled for the instance. - // The TLS mode of the Redis instance, If not provided, TLS is disabled for the instance. - // - // - SERVER_AUTHENTICATION: Client to Server traffic encryption enabled with server authentication Default value: "DISABLED" Possible values: ["SERVER_AUTHENTICATION", "DISABLED"] - // +kubebuilder:validation:Optional - TransitEncryptionMode *string `json:"transitEncryptionMode,omitempty" tf:"transit_encryption_mode,omitempty"` + +// Only applicable to STANDARD_HA tier which protects the instance +// against zonal failures by provisioning it across two zones. +// If provided, it must be a different zone from the one provided in +// [locationId]. +// Only applicable to STANDARD_HA tier which protects the instance +// against zonal failures by provisioning it across two zones. +// If provided, it must be a different zone from the one provided in +// [locationId]. +// +kubebuilder:validation:Optional +AlternativeLocationID *string `json:"alternativeLocationId,omitempty" tf:"alternative_location_id,omitempty"` + +// Optional. Indicates whether OSS Redis AUTH is enabled for the +// instance. If set to "true" AUTH is enabled on the instance. +// Default value is "false" meaning AUTH is disabled. +// Optional. Indicates whether OSS Redis AUTH is enabled for the +// instance. If set to "true" AUTH is enabled on the instance. +// Default value is "false" meaning AUTH is disabled. +// +kubebuilder:validation:Optional +AuthEnabled *bool `json:"authEnabled,omitempty" tf:"auth_enabled,omitempty"` + +// The full name of the Google Compute Engine network to which the +// instance is connected. If left unspecified, the default network +// will be used. +// The full name of the Google Compute Engine network to which the +// instance is connected. If left unspecified, the default network +// will be used. +// +kubebuilder:validation:Optional +AuthorizedNetwork *string `json:"authorizedNetwork,omitempty" tf:"authorized_network,omitempty"` + +// The connection mode of the Redis instance. +// Default value is DIRECT_PEERING. +// Possible values are: DIRECT_PEERING, PRIVATE_SERVICE_ACCESS. +// The connection mode of the Redis instance. Default value: "DIRECT_PEERING" Possible values: ["DIRECT_PEERING", "PRIVATE_SERVICE_ACCESS"] +// +kubebuilder:validation:Optional +ConnectMode *string `json:"connectMode,omitempty" tf:"connect_mode,omitempty"` + +// Optional. The KMS key reference that you want to use to encrypt the data at rest for this Redis +// instance. If this is provided, CMEK is enabled. +// Optional. The KMS key reference that you want to use to encrypt the data at rest for this Redis +// instance. If this is provided, CMEK is enabled. +// +kubebuilder:validation:Optional +CustomerManagedKey *string `json:"customerManagedKey,omitempty" tf:"customer_managed_key,omitempty"` + +// An arbitrary and optional user-provided name for the instance. +// An arbitrary and optional user-provided name for the instance. +// +kubebuilder:validation:Optional +DisplayName *string `json:"displayName,omitempty" tf:"display_name,omitempty"` + +// Resource labels to represent user provided metadata. +// Resource labels to represent user provided metadata. +// +kubebuilder:validation:Optional +Labels map[string]*string `json:"labels,omitempty" tf:"labels,omitempty"` + +// The zone where the instance will be provisioned. If not provided, +// the service will choose a zone for the instance. For STANDARD_HA tier, +// instances will be created across two zones for protection against +// zonal failures. If [alternativeLocationId] is also provided, it must +// be different from [locationId]. +// The zone where the instance will be provisioned. If not provided, +// the service will choose a zone for the instance. For STANDARD_HA tier, +// instances will be created across two zones for protection against +// zonal failures. If [alternativeLocationId] is also provided, it must +// be different from [locationId]. +// +kubebuilder:validation:Optional +LocationID *string `json:"locationId,omitempty" tf:"location_id,omitempty"` + +// Maintenance policy for an instance. +// Structure is documented below. +// Maintenance policy for an instance. +// +kubebuilder:validation:Optional +MaintenancePolicy []MaintenancePolicyParameters `json:"maintenancePolicy,omitempty" tf:"maintenance_policy,omitempty"` + +// Upcoming maintenance schedule. +// Structure is documented below. +// Upcoming maintenance schedule. +// +kubebuilder:validation:Optional +MaintenanceSchedule []MaintenanceScheduleParameters `json:"maintenanceSchedule,omitempty" tf:"maintenance_schedule,omitempty"` + +// Redis memory size in GiB. +// Redis memory size in GiB. +// +kubebuilder:validation:Optional +MemorySizeGb *float64 `json:"memorySizeGb,omitempty" tf:"memory_size_gb,omitempty"` + +// Persistence configuration for an instance. +// Structure is documented below. +// Persistence configuration for an instance. +// +kubebuilder:validation:Optional +PersistenceConfig []PersistenceConfigParameters `json:"persistenceConfig,omitempty" tf:"persistence_config,omitempty"` + +// The ID of the project in which the resource belongs. +// If it is not provided, the provider project is used. +// +kubebuilder:validation:Optional +Project *string `json:"project,omitempty" tf:"project,omitempty"` + +// Optional. Read replica mode. Can only be specified when trying to create the instance. +// If not set, Memorystore Redis backend will default to READ_REPLICAS_DISABLED. +// Optional. Read replica mode. Can only be specified when trying to create the instance. +// If not set, Memorystore Redis backend will default to READ_REPLICAS_DISABLED. +// - READ_REPLICAS_DISABLED: If disabled, read endpoint will not be provided and the +// instance cannot scale up or down the number of replicas. +// - READ_REPLICAS_ENABLED: If enabled, read endpoint will be provided and the instance +// can scale up and down the number of replicas. Possible values: ["READ_REPLICAS_DISABLED", "READ_REPLICAS_ENABLED"] +// +kubebuilder:validation:Optional +ReadReplicasMode *string `json:"readReplicasMode,omitempty" tf:"read_replicas_mode,omitempty"` + +// Redis configuration parameters, according to http://redis.io/topics/config. +// Please check Memorystore documentation for the list of supported parameters: +// https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#Instance.FIELDS.redis_configs +// Redis configuration parameters, according to http://redis.io/topics/config. +// Please check Memorystore documentation for the list of supported parameters: +// https://cloud.google.com/memorystore/docs/redis/reference/rest/v1/projects.locations.instances#Instance.FIELDS.redis_configs +// +kubebuilder:validation:Optional +RedisConfigs map[string]*string `json:"redisConfigs,omitempty" tf:"redis_configs,omitempty"` + +// The version of Redis software. If not provided, latest supported +// version will be used. Please check the API documentation linked +// at the top for the latest valid values. +// The version of Redis software. If not provided, latest supported +// version will be used. Please check the API documentation linked +// at the top for the latest valid values. +// +kubebuilder:validation:Optional +RedisVersion *string `json:"redisVersion,omitempty" tf:"redis_version,omitempty"` + +// The name of the Redis region of the instance. +// The name of the Redis region of the instance. +// +kubebuilder:validation:Required +Region *string `json:"region" tf:"region,omitempty"` + +// Optional. The number of replica nodes. The valid range for the Standard Tier with +// read replicas enabled is [1-5] and defaults to 2. If read replicas are not enabled +// for a Standard Tier instance, the only valid value is 1 and the default is 1. +// The valid value for basic tier is 0 and the default is also 0. +// Optional. The number of replica nodes. The valid range for the Standard Tier with +// read replicas enabled is [1-5] and defaults to 2. If read replicas are not enabled +// for a Standard Tier instance, the only valid value is 1 and the default is 1. +// The valid value for basic tier is 0 and the default is also 0. +// +kubebuilder:validation:Optional +ReplicaCount *float64 `json:"replicaCount,omitempty" tf:"replica_count,omitempty"` + +// The CIDR range of internal addresses that are reserved for this +// instance. If not provided, the service will choose an unused /29 +// block, for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be +// unique and non-overlapping with existing subnets in an authorized +// network. +// The CIDR range of internal addresses that are reserved for this +// instance. If not provided, the service will choose an unused /29 +// block, for example, 10.0.0.0/29 or 192.168.0.0/29. Ranges must be +// unique and non-overlapping with existing subnets in an authorized +// network. +// +kubebuilder:validation:Optional +ReservedIPRange *string `json:"reservedIpRange,omitempty" tf:"reserved_ip_range,omitempty"` + +// Optional. Additional IP range for node placement. Required when enabling read replicas on +// an existing instance. For DIRECT_PEERING mode value must be a CIDR range of size /28, or +// "auto". For PRIVATE_SERVICE_ACCESS mode value must be the name of an allocated address +// range associated with the private service access connection, or "auto". +// Optional. Additional IP range for node placement. Required when enabling read replicas on +// an existing instance. For DIRECT_PEERING mode value must be a CIDR range of size /28, or +// "auto". For PRIVATE_SERVICE_ACCESS mode value must be the name of an allocated address +// range associated with the private service access connection, or "auto". +// +kubebuilder:validation:Optional +SecondaryIPRange *string `json:"secondaryIpRange,omitempty" tf:"secondary_ip_range,omitempty"` + +// The service tier of the instance. Must be one of these values: +// The service tier of the instance. Must be one of these values: +// +// - BASIC: standalone instance +// - STANDARD_HA: highly available primary/replica instances Default value: "BASIC" Possible values: ["BASIC", "STANDARD_HA"] +// +kubebuilder:validation:Optional +Tier *string `json:"tier,omitempty" tf:"tier,omitempty"` + +// The TLS mode of the Redis instance, If not provided, TLS is disabled for the instance. +// The TLS mode of the Redis instance, If not provided, TLS is disabled for the instance. +// +// - SERVER_AUTHENTICATION: Client to Server traffic encryption enabled with server authentication Default value: "DISABLED" Possible values: ["SERVER_AUTHENTICATION", "DISABLED"] +// +kubebuilder:validation:Optional +TransitEncryptionMode *string `json:"transitEncryptionMode,omitempty" tf:"transit_encryption_mode,omitempty"` } + type MaintenancePolicyInitParameters struct { - // Optional. Description of what this policy is for. - // Create/Update methods return INVALID_ARGUMENT if the - // length is greater than 512. - // Optional. Description of what this policy is for. - // Create/Update methods return INVALID_ARGUMENT if the - // length is greater than 512. - Description *string `json:"description,omitempty" tf:"description,omitempty"` - - // Optional. Maintenance window that is applied to resources covered by this policy. - // Minimum 1. For the current version, the maximum number - // of weekly_window is expected to be one. - // Structure is documented below. - // Optional. Maintenance window that is applied to resources covered by this policy. - // Minimum 1. For the current version, the maximum number - // of weekly_window is expected to be one. - WeeklyMaintenanceWindow []WeeklyMaintenanceWindowInitParameters `json:"weeklyMaintenanceWindow,omitempty" tf:"weekly_maintenance_window,omitempty"` + +// Optional. Description of what this policy is for. +// Create/Update methods return INVALID_ARGUMENT if the +// length is greater than 512. +// Optional. Description of what this policy is for. +// Create/Update methods return INVALID_ARGUMENT if the +// length is greater than 512. +Description *string `json:"description,omitempty" tf:"description,omitempty"` + +// Optional. Maintenance window that is applied to resources covered by this policy. +// Minimum 1. For the current version, the maximum number +// of weekly_window is expected to be one. +// Structure is documented below. +// Optional. Maintenance window that is applied to resources covered by this policy. +// Minimum 1. For the current version, the maximum number +// of weekly_window is expected to be one. +WeeklyMaintenanceWindow []WeeklyMaintenanceWindowInitParameters `json:"weeklyMaintenanceWindow,omitempty" tf:"weekly_maintenance_window,omitempty"` } + type MaintenancePolicyObservation struct { - // (Output) - // Output only. The time when the policy was created. - // A timestamp in RFC3339 UTC "Zulu" format, with nanosecond - // resolution and up to nine fractional digits. - // Output only. The time when the policy was created. - // A timestamp in RFC3339 UTC "Zulu" format, with nanosecond - // resolution and up to nine fractional digits. - CreateTime *string `json:"createTime,omitempty" tf:"create_time,omitempty"` - - // Optional. Description of what this policy is for. - // Create/Update methods return INVALID_ARGUMENT if the - // length is greater than 512. - // Optional. Description of what this policy is for. - // Create/Update methods return INVALID_ARGUMENT if the - // length is greater than 512. - Description *string `json:"description,omitempty" tf:"description,omitempty"` - - // (Output) - // Output only. The time when the policy was last updated. - // A timestamp in RFC3339 UTC "Zulu" format, with nanosecond - // resolution and up to nine fractional digits. - // Output only. The time when the policy was last updated. - // A timestamp in RFC3339 UTC "Zulu" format, with nanosecond - // resolution and up to nine fractional digits. - UpdateTime *string `json:"updateTime,omitempty" tf:"update_time,omitempty"` - - // Optional. Maintenance window that is applied to resources covered by this policy. - // Minimum 1. For the current version, the maximum number - // of weekly_window is expected to be one. - // Structure is documented below. - // Optional. Maintenance window that is applied to resources covered by this policy. - // Minimum 1. For the current version, the maximum number - // of weekly_window is expected to be one. - WeeklyMaintenanceWindow []WeeklyMaintenanceWindowObservation `json:"weeklyMaintenanceWindow,omitempty" tf:"weekly_maintenance_window,omitempty"` + +// (Output) +// Output only. The time when the policy was created. +// A timestamp in RFC3339 UTC "Zulu" format, with nanosecond +// resolution and up to nine fractional digits. +// Output only. The time when the policy was created. +// A timestamp in RFC3339 UTC "Zulu" format, with nanosecond +// resolution and up to nine fractional digits. +CreateTime *string `json:"createTime,omitempty" tf:"create_time,omitempty"` + +// Optional. Description of what this policy is for. +// Create/Update methods return INVALID_ARGUMENT if the +// length is greater than 512. +// Optional. Description of what this policy is for. +// Create/Update methods return INVALID_ARGUMENT if the +// length is greater than 512. +Description *string `json:"description,omitempty" tf:"description,omitempty"` + +// (Output) +// Output only. The time when the policy was last updated. +// A timestamp in RFC3339 UTC "Zulu" format, with nanosecond +// resolution and up to nine fractional digits. +// Output only. The time when the policy was last updated. +// A timestamp in RFC3339 UTC "Zulu" format, with nanosecond +// resolution and up to nine fractional digits. +UpdateTime *string `json:"updateTime,omitempty" tf:"update_time,omitempty"` + +// Optional. Maintenance window that is applied to resources covered by this policy. +// Minimum 1. For the current version, the maximum number +// of weekly_window is expected to be one. +// Structure is documented below. +// Optional. Maintenance window that is applied to resources covered by this policy. +// Minimum 1. For the current version, the maximum number +// of weekly_window is expected to be one. +WeeklyMaintenanceWindow []WeeklyMaintenanceWindowObservation `json:"weeklyMaintenanceWindow,omitempty" tf:"weekly_maintenance_window,omitempty"` } + type MaintenancePolicyParameters struct { - // Optional. Description of what this policy is for. - // Create/Update methods return INVALID_ARGUMENT if the - // length is greater than 512. - // Optional. Description of what this policy is for. - // Create/Update methods return INVALID_ARGUMENT if the - // length is greater than 512. - // +kubebuilder:validation:Optional - Description *string `json:"description,omitempty" tf:"description,omitempty"` - - // Optional. Maintenance window that is applied to resources covered by this policy. - // Minimum 1. For the current version, the maximum number - // of weekly_window is expected to be one. - // Structure is documented below. - // Optional. Maintenance window that is applied to resources covered by this policy. - // Minimum 1. For the current version, the maximum number - // of weekly_window is expected to be one. - // +kubebuilder:validation:Optional - WeeklyMaintenanceWindow []WeeklyMaintenanceWindowParameters `json:"weeklyMaintenanceWindow,omitempty" tf:"weekly_maintenance_window,omitempty"` + +// Optional. Description of what this policy is for. +// Create/Update methods return INVALID_ARGUMENT if the +// length is greater than 512. +// Optional. Description of what this policy is for. +// Create/Update methods return INVALID_ARGUMENT if the +// length is greater than 512. +// +kubebuilder:validation:Optional +Description *string `json:"description,omitempty" tf:"description,omitempty"` + +// Optional. Maintenance window that is applied to resources covered by this policy. +// Minimum 1. For the current version, the maximum number +// of weekly_window is expected to be one. +// Structure is documented below. +// Optional. Maintenance window that is applied to resources covered by this policy. +// Minimum 1. For the current version, the maximum number +// of weekly_window is expected to be one. +// +kubebuilder:validation:Optional +WeeklyMaintenanceWindow []WeeklyMaintenanceWindowParameters `json:"weeklyMaintenanceWindow,omitempty" tf:"weekly_maintenance_window,omitempty"` } + type MaintenanceScheduleInitParameters struct { + } + type MaintenanceScheduleObservation struct { - // (Output) - // Output only. The end time of any upcoming scheduled maintenance for this instance. - // A timestamp in RFC3339 UTC "Zulu" format, with nanosecond - // resolution and up to nine fractional digits. - // Output only. The end time of any upcoming scheduled maintenance for this instance. - // A timestamp in RFC3339 UTC "Zulu" format, with nanosecond - // resolution and up to nine fractional digits. - EndTime *string `json:"endTime,omitempty" tf:"end_time,omitempty"` - - // (Output) - // Output only. The deadline that the maintenance schedule start time - // can not go beyond, including reschedule. - // A timestamp in RFC3339 UTC "Zulu" format, with nanosecond - // resolution and up to nine fractional digits. - // Output only. The deadline that the maintenance schedule start time - // can not go beyond, including reschedule. - // A timestamp in RFC3339 UTC "Zulu" format, with nanosecond - // resolution and up to nine fractional digits. - ScheduleDeadlineTime *string `json:"scheduleDeadlineTime,omitempty" tf:"schedule_deadline_time,omitempty"` - - // (Output) - // Output only. The start time of any upcoming scheduled maintenance for this instance. - // A timestamp in RFC3339 UTC "Zulu" format, with nanosecond - // resolution and up to nine fractional digits. - // Output only. The start time of any upcoming scheduled maintenance for this instance. - // A timestamp in RFC3339 UTC "Zulu" format, with nanosecond - // resolution and up to nine fractional digits. - StartTime *string `json:"startTime,omitempty" tf:"start_time,omitempty"` + +// (Output) +// Output only. The end time of any upcoming scheduled maintenance for this instance. +// A timestamp in RFC3339 UTC "Zulu" format, with nanosecond +// resolution and up to nine fractional digits. +// Output only. The end time of any upcoming scheduled maintenance for this instance. +// A timestamp in RFC3339 UTC "Zulu" format, with nanosecond +// resolution and up to nine fractional digits. +EndTime *string `json:"endTime,omitempty" tf:"end_time,omitempty"` + +// (Output) +// Output only. The deadline that the maintenance schedule start time +// can not go beyond, including reschedule. +// A timestamp in RFC3339 UTC "Zulu" format, with nanosecond +// resolution and up to nine fractional digits. +// Output only. The deadline that the maintenance schedule start time +// can not go beyond, including reschedule. +// A timestamp in RFC3339 UTC "Zulu" format, with nanosecond +// resolution and up to nine fractional digits. +ScheduleDeadlineTime *string `json:"scheduleDeadlineTime,omitempty" tf:"schedule_deadline_time,omitempty"` + +// (Output) +// Output only. The start time of any upcoming scheduled maintenance for this instance. +// A timestamp in RFC3339 UTC "Zulu" format, with nanosecond +// resolution and up to nine fractional digits. +// Output only. The start time of any upcoming scheduled maintenance for this instance. +// A timestamp in RFC3339 UTC "Zulu" format, with nanosecond +// resolution and up to nine fractional digits. +StartTime *string `json:"startTime,omitempty" tf:"start_time,omitempty"` } + type MaintenanceScheduleParameters struct { + } + type NodesInitParameters struct { + } + type NodesObservation struct { - // (Output) - // Node identifying string. e.g. 'node-0', 'node-1' - ID *string `json:"id,omitempty" tf:"id,omitempty"` - // (Output) - // Location of the node. - Zone *string `json:"zone,omitempty" tf:"zone,omitempty"` +// (Output) +// Node identifying string. e.g. 'node-0', 'node-1' +ID *string `json:"id,omitempty" tf:"id,omitempty"` + +// (Output) +// Location of the node. +Zone *string `json:"zone,omitempty" tf:"zone,omitempty"` } + type NodesParameters struct { + } + type PersistenceConfigInitParameters struct { - // Optional. Controls whether Persistence features are enabled. If not provided, the existing value will be used. - // Optional. Controls whether Persistence features are enabled. If not provided, the existing value will be used. - // - // - DISABLED: Persistence is disabled for the instance, and any existing snapshots are deleted. - // - RDB: RDB based Persistence is enabled. Possible values: ["DISABLED", "RDB"] - PersistenceMode *string `json:"persistenceMode,omitempty" tf:"persistence_mode,omitempty"` - - // Optional. Available snapshot periods for scheduling. - // Optional. Available snapshot periods for scheduling. - // - // - ONE_HOUR: Snapshot every 1 hour. - // - SIX_HOURS: Snapshot every 6 hours. - // - TWELVE_HOURS: Snapshot every 12 hours. - // - TWENTY_FOUR_HOURS: Snapshot every 24 hours. Possible values: ["ONE_HOUR", "SIX_HOURS", "TWELVE_HOURS", "TWENTY_FOUR_HOURS"] - RdbSnapshotPeriod *string `json:"rdbSnapshotPeriod,omitempty" tf:"rdb_snapshot_period,omitempty"` - - // Optional. Date and time that the first snapshot was/will be attempted, - // and to which future snapshots will be aligned. If not provided, - // the current time will be used. - // A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution - // and up to nine fractional digits. - // Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". - // Optional. Date and time that the first snapshot was/will be attempted, - // and to which future snapshots will be aligned. If not provided, - // the current time will be used. - // A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution - // and up to nine fractional digits. - // Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". - RdbSnapshotStartTime *string `json:"rdbSnapshotStartTime,omitempty" tf:"rdb_snapshot_start_time,omitempty"` + +// Optional. Controls whether Persistence features are enabled. If not provided, the existing value will be used. +// Optional. Controls whether Persistence features are enabled. If not provided, the existing value will be used. +// +// - DISABLED: Persistence is disabled for the instance, and any existing snapshots are deleted. +// - RDB: RDB based Persistence is enabled. Possible values: ["DISABLED", "RDB"] +PersistenceMode *string `json:"persistenceMode,omitempty" tf:"persistence_mode,omitempty"` + +// Optional. Available snapshot periods for scheduling. +// Optional. Available snapshot periods for scheduling. +// +// - ONE_HOUR: Snapshot every 1 hour. +// - SIX_HOURS: Snapshot every 6 hours. +// - TWELVE_HOURS: Snapshot every 12 hours. +// - TWENTY_FOUR_HOURS: Snapshot every 24 hours. Possible values: ["ONE_HOUR", "SIX_HOURS", "TWELVE_HOURS", "TWENTY_FOUR_HOURS"] +RdbSnapshotPeriod *string `json:"rdbSnapshotPeriod,omitempty" tf:"rdb_snapshot_period,omitempty"` + +// Optional. Date and time that the first snapshot was/will be attempted, +// and to which future snapshots will be aligned. If not provided, +// the current time will be used. +// A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution +// and up to nine fractional digits. +// Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". +// Optional. Date and time that the first snapshot was/will be attempted, +// and to which future snapshots will be aligned. If not provided, +// the current time will be used. +// A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution +// and up to nine fractional digits. +// Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". +RdbSnapshotStartTime *string `json:"rdbSnapshotStartTime,omitempty" tf:"rdb_snapshot_start_time,omitempty"` } + type PersistenceConfigObservation struct { - // Optional. Controls whether Persistence features are enabled. If not provided, the existing value will be used. - // Optional. Controls whether Persistence features are enabled. If not provided, the existing value will be used. - // - // - DISABLED: Persistence is disabled for the instance, and any existing snapshots are deleted. - // - RDB: RDB based Persistence is enabled. Possible values: ["DISABLED", "RDB"] - PersistenceMode *string `json:"persistenceMode,omitempty" tf:"persistence_mode,omitempty"` - - // (Output) - // Output only. The next time that a snapshot attempt is scheduled to occur. - // A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up - // to nine fractional digits. - // Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". - // Output only. The next time that a snapshot attempt is scheduled to occur. - // A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up - // to nine fractional digits. - // Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". - RdbNextSnapshotTime *string `json:"rdbNextSnapshotTime,omitempty" tf:"rdb_next_snapshot_time,omitempty"` - - // Optional. Available snapshot periods for scheduling. - // Optional. Available snapshot periods for scheduling. - // - // - ONE_HOUR: Snapshot every 1 hour. - // - SIX_HOURS: Snapshot every 6 hours. - // - TWELVE_HOURS: Snapshot every 12 hours. - // - TWENTY_FOUR_HOURS: Snapshot every 24 hours. Possible values: ["ONE_HOUR", "SIX_HOURS", "TWELVE_HOURS", "TWENTY_FOUR_HOURS"] - RdbSnapshotPeriod *string `json:"rdbSnapshotPeriod,omitempty" tf:"rdb_snapshot_period,omitempty"` - - // Optional. Date and time that the first snapshot was/will be attempted, - // and to which future snapshots will be aligned. If not provided, - // the current time will be used. - // A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution - // and up to nine fractional digits. - // Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". - // Optional. Date and time that the first snapshot was/will be attempted, - // and to which future snapshots will be aligned. If not provided, - // the current time will be used. - // A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution - // and up to nine fractional digits. - // Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". - RdbSnapshotStartTime *string `json:"rdbSnapshotStartTime,omitempty" tf:"rdb_snapshot_start_time,omitempty"` + +// Optional. Controls whether Persistence features are enabled. If not provided, the existing value will be used. +// Optional. Controls whether Persistence features are enabled. If not provided, the existing value will be used. +// +// - DISABLED: Persistence is disabled for the instance, and any existing snapshots are deleted. +// - RDB: RDB based Persistence is enabled. Possible values: ["DISABLED", "RDB"] +PersistenceMode *string `json:"persistenceMode,omitempty" tf:"persistence_mode,omitempty"` + +// (Output) +// Output only. The next time that a snapshot attempt is scheduled to occur. +// A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up +// to nine fractional digits. +// Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". +// Output only. The next time that a snapshot attempt is scheduled to occur. +// A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution and up +// to nine fractional digits. +// Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". +RdbNextSnapshotTime *string `json:"rdbNextSnapshotTime,omitempty" tf:"rdb_next_snapshot_time,omitempty"` + +// Optional. Available snapshot periods for scheduling. +// Optional. Available snapshot periods for scheduling. +// +// - ONE_HOUR: Snapshot every 1 hour. +// - SIX_HOURS: Snapshot every 6 hours. +// - TWELVE_HOURS: Snapshot every 12 hours. +// - TWENTY_FOUR_HOURS: Snapshot every 24 hours. Possible values: ["ONE_HOUR", "SIX_HOURS", "TWELVE_HOURS", "TWENTY_FOUR_HOURS"] +RdbSnapshotPeriod *string `json:"rdbSnapshotPeriod,omitempty" tf:"rdb_snapshot_period,omitempty"` + +// Optional. Date and time that the first snapshot was/will be attempted, +// and to which future snapshots will be aligned. If not provided, +// the current time will be used. +// A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution +// and up to nine fractional digits. +// Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". +// Optional. Date and time that the first snapshot was/will be attempted, +// and to which future snapshots will be aligned. If not provided, +// the current time will be used. +// A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution +// and up to nine fractional digits. +// Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". +RdbSnapshotStartTime *string `json:"rdbSnapshotStartTime,omitempty" tf:"rdb_snapshot_start_time,omitempty"` } + type PersistenceConfigParameters struct { - // Optional. Controls whether Persistence features are enabled. If not provided, the existing value will be used. - // Optional. Controls whether Persistence features are enabled. If not provided, the existing value will be used. - // - // - DISABLED: Persistence is disabled for the instance, and any existing snapshots are deleted. - // - RDB: RDB based Persistence is enabled. Possible values: ["DISABLED", "RDB"] - // +kubebuilder:validation:Optional - PersistenceMode *string `json:"persistenceMode,omitempty" tf:"persistence_mode,omitempty"` - - // Optional. Available snapshot periods for scheduling. - // Optional. Available snapshot periods for scheduling. - // - // - ONE_HOUR: Snapshot every 1 hour. - // - SIX_HOURS: Snapshot every 6 hours. - // - TWELVE_HOURS: Snapshot every 12 hours. - // - TWENTY_FOUR_HOURS: Snapshot every 24 hours. Possible values: ["ONE_HOUR", "SIX_HOURS", "TWELVE_HOURS", "TWENTY_FOUR_HOURS"] - // +kubebuilder:validation:Optional - RdbSnapshotPeriod *string `json:"rdbSnapshotPeriod,omitempty" tf:"rdb_snapshot_period,omitempty"` - - // Optional. Date and time that the first snapshot was/will be attempted, - // and to which future snapshots will be aligned. If not provided, - // the current time will be used. - // A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution - // and up to nine fractional digits. - // Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". - // Optional. Date and time that the first snapshot was/will be attempted, - // and to which future snapshots will be aligned. If not provided, - // the current time will be used. - // A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution - // and up to nine fractional digits. - // Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". - // +kubebuilder:validation:Optional - RdbSnapshotStartTime *string `json:"rdbSnapshotStartTime,omitempty" tf:"rdb_snapshot_start_time,omitempty"` + +// Optional. Controls whether Persistence features are enabled. If not provided, the existing value will be used. +// Optional. Controls whether Persistence features are enabled. If not provided, the existing value will be used. +// +// - DISABLED: Persistence is disabled for the instance, and any existing snapshots are deleted. +// - RDB: RDB based Persistence is enabled. Possible values: ["DISABLED", "RDB"] +// +kubebuilder:validation:Optional +PersistenceMode *string `json:"persistenceMode,omitempty" tf:"persistence_mode,omitempty"` + +// Optional. Available snapshot periods for scheduling. +// Optional. Available snapshot periods for scheduling. +// +// - ONE_HOUR: Snapshot every 1 hour. +// - SIX_HOURS: Snapshot every 6 hours. +// - TWELVE_HOURS: Snapshot every 12 hours. +// - TWENTY_FOUR_HOURS: Snapshot every 24 hours. Possible values: ["ONE_HOUR", "SIX_HOURS", "TWELVE_HOURS", "TWENTY_FOUR_HOURS"] +// +kubebuilder:validation:Optional +RdbSnapshotPeriod *string `json:"rdbSnapshotPeriod,omitempty" tf:"rdb_snapshot_period,omitempty"` + +// Optional. Date and time that the first snapshot was/will be attempted, +// and to which future snapshots will be aligned. If not provided, +// the current time will be used. +// A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution +// and up to nine fractional digits. +// Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". +// Optional. Date and time that the first snapshot was/will be attempted, +// and to which future snapshots will be aligned. If not provided, +// the current time will be used. +// A timestamp in RFC3339 UTC "Zulu" format, with nanosecond resolution +// and up to nine fractional digits. +// Examples: "2014-10-02T15:01:23Z" and "2014-10-02T15:01:23.045123456Z". +// +kubebuilder:validation:Optional +RdbSnapshotStartTime *string `json:"rdbSnapshotStartTime,omitempty" tf:"rdb_snapshot_start_time,omitempty"` } + type ServerCACertsInitParameters struct { + } + type ServerCACertsObservation struct { - // (Output) - // The certificate data in PEM format. - Cert *string `json:"cert,omitempty" tf:"cert,omitempty"` - // (Output) - // The time when the certificate was created. - CreateTime *string `json:"createTime,omitempty" tf:"create_time,omitempty"` +// (Output) +// The certificate data in PEM format. +Cert *string `json:"cert,omitempty" tf:"cert,omitempty"` - // (Output) - // The time when the certificate expires. - ExpireTime *string `json:"expireTime,omitempty" tf:"expire_time,omitempty"` +// (Output) +// The time when the certificate was created. +CreateTime *string `json:"createTime,omitempty" tf:"create_time,omitempty"` - // (Output) - // Serial number, as extracted from the certificate. - SerialNumber *string `json:"serialNumber,omitempty" tf:"serial_number,omitempty"` +// (Output) +// The time when the certificate expires. +ExpireTime *string `json:"expireTime,omitempty" tf:"expire_time,omitempty"` - // (Output) - // Sha1 Fingerprint of the certificate. - Sha1Fingerprint *string `json:"sha1Fingerprint,omitempty" tf:"sha1_fingerprint,omitempty"` +// (Output) +// Serial number, as extracted from the certificate. +SerialNumber *string `json:"serialNumber,omitempty" tf:"serial_number,omitempty"` + +// (Output) +// Sha1 Fingerprint of the certificate. +Sha1Fingerprint *string `json:"sha1Fingerprint,omitempty" tf:"sha1_fingerprint,omitempty"` } + type ServerCACertsParameters struct { + } + type StartTimeInitParameters struct { - // Hours of day in 24 hour format. Should be from 0 to 23. - // An API may choose to allow the value "24:00:00" for scenarios like business closing time. - // Hours of day in 24 hour format. Should be from 0 to 23. - // An API may choose to allow the value "24:00:00" for scenarios like business closing time. - Hours *float64 `json:"hours,omitempty" tf:"hours,omitempty"` - - // Minutes of hour of day. Must be from 0 to 59. - // Minutes of hour of day. Must be from 0 to 59. - Minutes *float64 `json:"minutes,omitempty" tf:"minutes,omitempty"` - - // Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. - // Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. - Nanos *float64 `json:"nanos,omitempty" tf:"nanos,omitempty"` - - // Seconds of minutes of the time. Must normally be from 0 to 59. - // An API may allow the value 60 if it allows leap-seconds. - // Seconds of minutes of the time. Must normally be from 0 to 59. - // An API may allow the value 60 if it allows leap-seconds. - Seconds *float64 `json:"seconds,omitempty" tf:"seconds,omitempty"` + +// Hours of day in 24 hour format. Should be from 0 to 23. +// An API may choose to allow the value "24:00:00" for scenarios like business closing time. +// Hours of day in 24 hour format. Should be from 0 to 23. +// An API may choose to allow the value "24:00:00" for scenarios like business closing time. +Hours *float64 `json:"hours,omitempty" tf:"hours,omitempty"` + +// Minutes of hour of day. Must be from 0 to 59. +// Minutes of hour of day. Must be from 0 to 59. +Minutes *float64 `json:"minutes,omitempty" tf:"minutes,omitempty"` + +// Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. +// Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. +Nanos *float64 `json:"nanos,omitempty" tf:"nanos,omitempty"` + +// Seconds of minutes of the time. Must normally be from 0 to 59. +// An API may allow the value 60 if it allows leap-seconds. +// Seconds of minutes of the time. Must normally be from 0 to 59. +// An API may allow the value 60 if it allows leap-seconds. +Seconds *float64 `json:"seconds,omitempty" tf:"seconds,omitempty"` } + type StartTimeObservation struct { - // Hours of day in 24 hour format. Should be from 0 to 23. - // An API may choose to allow the value "24:00:00" for scenarios like business closing time. - // Hours of day in 24 hour format. Should be from 0 to 23. - // An API may choose to allow the value "24:00:00" for scenarios like business closing time. - Hours *float64 `json:"hours,omitempty" tf:"hours,omitempty"` - - // Minutes of hour of day. Must be from 0 to 59. - // Minutes of hour of day. Must be from 0 to 59. - Minutes *float64 `json:"minutes,omitempty" tf:"minutes,omitempty"` - - // Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. - // Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. - Nanos *float64 `json:"nanos,omitempty" tf:"nanos,omitempty"` - - // Seconds of minutes of the time. Must normally be from 0 to 59. - // An API may allow the value 60 if it allows leap-seconds. - // Seconds of minutes of the time. Must normally be from 0 to 59. - // An API may allow the value 60 if it allows leap-seconds. - Seconds *float64 `json:"seconds,omitempty" tf:"seconds,omitempty"` + +// Hours of day in 24 hour format. Should be from 0 to 23. +// An API may choose to allow the value "24:00:00" for scenarios like business closing time. +// Hours of day in 24 hour format. Should be from 0 to 23. +// An API may choose to allow the value "24:00:00" for scenarios like business closing time. +Hours *float64 `json:"hours,omitempty" tf:"hours,omitempty"` + +// Minutes of hour of day. Must be from 0 to 59. +// Minutes of hour of day. Must be from 0 to 59. +Minutes *float64 `json:"minutes,omitempty" tf:"minutes,omitempty"` + +// Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. +// Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. +Nanos *float64 `json:"nanos,omitempty" tf:"nanos,omitempty"` + +// Seconds of minutes of the time. Must normally be from 0 to 59. +// An API may allow the value 60 if it allows leap-seconds. +// Seconds of minutes of the time. Must normally be from 0 to 59. +// An API may allow the value 60 if it allows leap-seconds. +Seconds *float64 `json:"seconds,omitempty" tf:"seconds,omitempty"` } + type StartTimeParameters struct { - // Hours of day in 24 hour format. Should be from 0 to 23. - // An API may choose to allow the value "24:00:00" for scenarios like business closing time. - // Hours of day in 24 hour format. Should be from 0 to 23. - // An API may choose to allow the value "24:00:00" for scenarios like business closing time. - // +kubebuilder:validation:Optional - Hours *float64 `json:"hours,omitempty" tf:"hours,omitempty"` - - // Minutes of hour of day. Must be from 0 to 59. - // Minutes of hour of day. Must be from 0 to 59. - // +kubebuilder:validation:Optional - Minutes *float64 `json:"minutes,omitempty" tf:"minutes,omitempty"` - - // Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. - // Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. - // +kubebuilder:validation:Optional - Nanos *float64 `json:"nanos,omitempty" tf:"nanos,omitempty"` - - // Seconds of minutes of the time. Must normally be from 0 to 59. - // An API may allow the value 60 if it allows leap-seconds. - // Seconds of minutes of the time. Must normally be from 0 to 59. - // An API may allow the value 60 if it allows leap-seconds. - // +kubebuilder:validation:Optional - Seconds *float64 `json:"seconds,omitempty" tf:"seconds,omitempty"` + +// Hours of day in 24 hour format. Should be from 0 to 23. +// An API may choose to allow the value "24:00:00" for scenarios like business closing time. +// Hours of day in 24 hour format. Should be from 0 to 23. +// An API may choose to allow the value "24:00:00" for scenarios like business closing time. +// +kubebuilder:validation:Optional +Hours *float64 `json:"hours,omitempty" tf:"hours,omitempty"` + +// Minutes of hour of day. Must be from 0 to 59. +// Minutes of hour of day. Must be from 0 to 59. +// +kubebuilder:validation:Optional +Minutes *float64 `json:"minutes,omitempty" tf:"minutes,omitempty"` + +// Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. +// Fractions of seconds in nanoseconds. Must be from 0 to 999,999,999. +// +kubebuilder:validation:Optional +Nanos *float64 `json:"nanos,omitempty" tf:"nanos,omitempty"` + +// Seconds of minutes of the time. Must normally be from 0 to 59. +// An API may allow the value 60 if it allows leap-seconds. +// Seconds of minutes of the time. Must normally be from 0 to 59. +// An API may allow the value 60 if it allows leap-seconds. +// +kubebuilder:validation:Optional +Seconds *float64 `json:"seconds,omitempty" tf:"seconds,omitempty"` } + type WeeklyMaintenanceWindowInitParameters struct { - // Required. The day of week that maintenance updates occur. - // Required. The day of week that maintenance updates occur. - // - // - DAY_OF_WEEK_UNSPECIFIED: The day of the week is unspecified. - // - MONDAY: Monday - // - TUESDAY: Tuesday - // - WEDNESDAY: Wednesday - // - THURSDAY: Thursday - // - FRIDAY: Friday - // - SATURDAY: Saturday - // - SUNDAY: Sunday Possible values: ["DAY_OF_WEEK_UNSPECIFIED", "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY"] - Day *string `json:"day,omitempty" tf:"day,omitempty"` - - // Required. Start time of the window in UTC time. - // Structure is documented below. - // Required. Start time of the window in UTC time. - StartTime []StartTimeInitParameters `json:"startTime,omitempty" tf:"start_time,omitempty"` + +// Required. The day of week that maintenance updates occur. +// Required. The day of week that maintenance updates occur. +// +// - DAY_OF_WEEK_UNSPECIFIED: The day of the week is unspecified. +// - MONDAY: Monday +// - TUESDAY: Tuesday +// - WEDNESDAY: Wednesday +// - THURSDAY: Thursday +// - FRIDAY: Friday +// - SATURDAY: Saturday +// - SUNDAY: Sunday Possible values: ["DAY_OF_WEEK_UNSPECIFIED", "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY"] +Day *string `json:"day,omitempty" tf:"day,omitempty"` + +// Required. Start time of the window in UTC time. +// Structure is documented below. +// Required. Start time of the window in UTC time. +StartTime []StartTimeInitParameters `json:"startTime,omitempty" tf:"start_time,omitempty"` } + type WeeklyMaintenanceWindowObservation struct { - // Required. The day of week that maintenance updates occur. - // Required. The day of week that maintenance updates occur. - // - // - DAY_OF_WEEK_UNSPECIFIED: The day of the week is unspecified. - // - MONDAY: Monday - // - TUESDAY: Tuesday - // - WEDNESDAY: Wednesday - // - THURSDAY: Thursday - // - FRIDAY: Friday - // - SATURDAY: Saturday - // - SUNDAY: Sunday Possible values: ["DAY_OF_WEEK_UNSPECIFIED", "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY"] - Day *string `json:"day,omitempty" tf:"day,omitempty"` - - // (Output) - // Output only. Duration of the maintenance window. - // The current window is fixed at 1 hour. - // A duration in seconds with up to nine fractional digits, - // terminated by 's'. Example: "3.5s". - // Output only. Duration of the maintenance window. - // The current window is fixed at 1 hour. - // A duration in seconds with up to nine fractional digits, - // terminated by 's'. Example: "3.5s". - Duration *string `json:"duration,omitempty" tf:"duration,omitempty"` - - // Required. Start time of the window in UTC time. - // Structure is documented below. - // Required. Start time of the window in UTC time. - StartTime []StartTimeObservation `json:"startTime,omitempty" tf:"start_time,omitempty"` + +// Required. The day of week that maintenance updates occur. +// Required. The day of week that maintenance updates occur. +// +// - DAY_OF_WEEK_UNSPECIFIED: The day of the week is unspecified. +// - MONDAY: Monday +// - TUESDAY: Tuesday +// - WEDNESDAY: Wednesday +// - THURSDAY: Thursday +// - FRIDAY: Friday +// - SATURDAY: Saturday +// - SUNDAY: Sunday Possible values: ["DAY_OF_WEEK_UNSPECIFIED", "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY"] +Day *string `json:"day,omitempty" tf:"day,omitempty"` + +// (Output) +// Output only. Duration of the maintenance window. +// The current window is fixed at 1 hour. +// A duration in seconds with up to nine fractional digits, +// terminated by 's'. Example: "3.5s". +// Output only. Duration of the maintenance window. +// The current window is fixed at 1 hour. +// A duration in seconds with up to nine fractional digits, +// terminated by 's'. Example: "3.5s". +Duration *string `json:"duration,omitempty" tf:"duration,omitempty"` + +// Required. Start time of the window in UTC time. +// Structure is documented below. +// Required. Start time of the window in UTC time. +StartTime []StartTimeObservation `json:"startTime,omitempty" tf:"start_time,omitempty"` } + type WeeklyMaintenanceWindowParameters struct { - // Required. The day of week that maintenance updates occur. - // Required. The day of week that maintenance updates occur. - // - // - DAY_OF_WEEK_UNSPECIFIED: The day of the week is unspecified. - // - MONDAY: Monday - // - TUESDAY: Tuesday - // - WEDNESDAY: Wednesday - // - THURSDAY: Thursday - // - FRIDAY: Friday - // - SATURDAY: Saturday - // - SUNDAY: Sunday Possible values: ["DAY_OF_WEEK_UNSPECIFIED", "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY"] - // +kubebuilder:validation:Optional - Day *string `json:"day" tf:"day,omitempty"` - - // Required. Start time of the window in UTC time. - // Structure is documented below. - // Required. Start time of the window in UTC time. - // +kubebuilder:validation:Optional - StartTime []StartTimeParameters `json:"startTime" tf:"start_time,omitempty"` + +// Required. The day of week that maintenance updates occur. +// Required. The day of week that maintenance updates occur. +// +// - DAY_OF_WEEK_UNSPECIFIED: The day of the week is unspecified. +// - MONDAY: Monday +// - TUESDAY: Tuesday +// - WEDNESDAY: Wednesday +// - THURSDAY: Thursday +// - FRIDAY: Friday +// - SATURDAY: Saturday +// - SUNDAY: Sunday Possible values: ["DAY_OF_WEEK_UNSPECIFIED", "MONDAY", "TUESDAY", "WEDNESDAY", "THURSDAY", "FRIDAY", "SATURDAY", "SUNDAY"] +// +kubebuilder:validation:Optional +Day *string `json:"day" tf:"day,omitempty"` + +// Required. Start time of the window in UTC time. +// Structure is documented below. +// Required. Start time of the window in UTC time. +// +kubebuilder:validation:Optional +StartTime []StartTimeParameters `json:"startTime" tf:"start_time,omitempty"` } // InstanceSpec defines the desired state of Instance type InstanceSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider InstanceParameters `json:"forProvider"` + ForProvider InstanceParameters `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 @@ -1017,13 +1068,13 @@ type InstanceSpec 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 InstanceInitParameters `json:"initProvider,omitempty"` + InitProvider InstanceInitParameters `json:"initProvider,omitempty"` } // InstanceStatus defines the observed state of Instance. type InstanceStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider InstanceObservation `json:"atProvider,omitempty"` + AtProvider InstanceObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -1038,9 +1089,9 @@ type InstanceStatus struct { type Instance 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.memorySizeGb) || (has(self.initProvider) && has(self.initProvider.memorySizeGb))",message="spec.forProvider.memorySizeGb is a required parameter" - Spec InstanceSpec `json:"spec"` - Status InstanceStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.memorySizeGb) || (has(self.initProvider) && has(self.initProvider.memorySizeGb))",message="spec.forProvider.memorySizeGb is a required parameter" + Spec InstanceSpec `json:"spec"` + Status InstanceStatus `json:"status,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/spanner/v1alpha1/zz_database_types.go b/apis/spanner/v1alpha1/zz_database_types.go index de2e446..5ddcdd5 100755 --- a/apis/spanner/v1alpha1/zz_database_types.go +++ b/apis/spanner/v1alpha1/zz_database_types.go @@ -15,200 +15,215 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type DatabaseInitParameters struct { - // The dialect of the Cloud Spanner Database. - // If it is not provided, "GOOGLE_STANDARD_SQL" will be used. - // Possible values are: GOOGLE_STANDARD_SQL, POSTGRESQL. - // The dialect of the Cloud Spanner Database. - // If it is not provided, "GOOGLE_STANDARD_SQL" will be used. Possible values: ["GOOGLE_STANDARD_SQL", "POSTGRESQL"] - DatabaseDialect *string `json:"databaseDialect,omitempty" tf:"database_dialect,omitempty"` - - // An optional list of DDL statements to run inside the newly created - // database. Statements can create tables, indexes, etc. These statements - // execute atomically with the creation of the database: if there is an - // error in any statement, the database is not created. - // An optional list of DDL statements to run inside the newly created - // database. Statements can create tables, indexes, etc. These statements - // execute atomically with the creation of the database: if there is an - // error in any statement, the database is not created. - Ddl []*string `json:"ddl,omitempty" tf:"ddl,omitempty"` - - DeletionProtection *bool `json:"deletionProtection,omitempty" tf:"deletion_protection,omitempty"` - - // Encryption configuration for the database - // Structure is documented below. - // Encryption configuration for the database - EncryptionConfig []EncryptionConfigInitParameters `json:"encryptionConfig,omitempty" tf:"encryption_config,omitempty"` - - // The ID of the project in which the resource belongs. - // If it is not provided, the provider project is used. - Project *string `json:"project,omitempty" tf:"project,omitempty"` - - // The retention period for the database. The retention period must be between 1 hour - // and 7 days, and can be specified in days, hours, minutes, or seconds. For example, - // the values 1d, 24h, 1440m, and 86400s are equivalent. Default value is 1h. - // If this property is used, you must avoid adding new DDL statements to ddl that - // update the database's version_retention_period. - // The retention period for the database. The retention period must be between 1 hour - // and 7 days, and can be specified in days, hours, minutes, or seconds. For example, - // the values 1d, 24h, 1440m, and 86400s are equivalent. Default value is 1h. - // If this property is used, you must avoid adding new DDL statements to 'ddl' that - // update the database's version_retention_period. - VersionRetentionPeriod *string `json:"versionRetentionPeriod,omitempty" tf:"version_retention_period,omitempty"` + +// The dialect of the Cloud Spanner Database. +// If it is not provided, "GOOGLE_STANDARD_SQL" will be used. +// Possible values are: GOOGLE_STANDARD_SQL, POSTGRESQL. +// The dialect of the Cloud Spanner Database. +// If it is not provided, "GOOGLE_STANDARD_SQL" will be used. Possible values: ["GOOGLE_STANDARD_SQL", "POSTGRESQL"] +DatabaseDialect *string `json:"databaseDialect,omitempty" tf:"database_dialect,omitempty"` + +// An optional list of DDL statements to run inside the newly created +// database. Statements can create tables, indexes, etc. These statements +// execute atomically with the creation of the database: if there is an +// error in any statement, the database is not created. +// An optional list of DDL statements to run inside the newly created +// database. Statements can create tables, indexes, etc. These statements +// execute atomically with the creation of the database: if there is an +// error in any statement, the database is not created. +Ddl []*string `json:"ddl,omitempty" tf:"ddl,omitempty"` + +DeletionProtection *bool `json:"deletionProtection,omitempty" tf:"deletion_protection,omitempty"` + +// Encryption configuration for the database +// Structure is documented below. +// Encryption configuration for the database +EncryptionConfig []EncryptionConfigInitParameters `json:"encryptionConfig,omitempty" tf:"encryption_config,omitempty"` + +// The ID of the project in which the resource belongs. +// If it is not provided, the provider project is used. +Project *string `json:"project,omitempty" tf:"project,omitempty"` + +// The retention period for the database. The retention period must be between 1 hour +// and 7 days, and can be specified in days, hours, minutes, or seconds. For example, +// the values 1d, 24h, 1440m, and 86400s are equivalent. Default value is 1h. +// If this property is used, you must avoid adding new DDL statements to ddl that +// update the database's version_retention_period. +// The retention period for the database. The retention period must be between 1 hour +// and 7 days, and can be specified in days, hours, minutes, or seconds. For example, +// the values 1d, 24h, 1440m, and 86400s are equivalent. Default value is 1h. +// If this property is used, you must avoid adding new DDL statements to 'ddl' that +// update the database's version_retention_period. +VersionRetentionPeriod *string `json:"versionRetentionPeriod,omitempty" tf:"version_retention_period,omitempty"` } + type DatabaseObservation struct { - // The dialect of the Cloud Spanner Database. - // If it is not provided, "GOOGLE_STANDARD_SQL" will be used. - // Possible values are: GOOGLE_STANDARD_SQL, POSTGRESQL. - // The dialect of the Cloud Spanner Database. - // If it is not provided, "GOOGLE_STANDARD_SQL" will be used. Possible values: ["GOOGLE_STANDARD_SQL", "POSTGRESQL"] - DatabaseDialect *string `json:"databaseDialect,omitempty" tf:"database_dialect,omitempty"` - - // An optional list of DDL statements to run inside the newly created - // database. Statements can create tables, indexes, etc. These statements - // execute atomically with the creation of the database: if there is an - // error in any statement, the database is not created. - // An optional list of DDL statements to run inside the newly created - // database. Statements can create tables, indexes, etc. These statements - // execute atomically with the creation of the database: if there is an - // error in any statement, the database is not created. - Ddl []*string `json:"ddl,omitempty" tf:"ddl,omitempty"` - - DeletionProtection *bool `json:"deletionProtection,omitempty" tf:"deletion_protection,omitempty"` - - // Encryption configuration for the database - // Structure is documented below. - // Encryption configuration for the database - EncryptionConfig []EncryptionConfigObservation `json:"encryptionConfig,omitempty" tf:"encryption_config,omitempty"` - - // an identifier for the resource with format {{instance}}/{{name}} - ID *string `json:"id,omitempty" tf:"id,omitempty"` - - // The instance to create the database on. - // The instance to create the database on. - Instance *string `json:"instance,omitempty" tf:"instance,omitempty"` - - // The ID of the project in which the resource belongs. - // If it is not provided, the provider project is used. - Project *string `json:"project,omitempty" tf:"project,omitempty"` - - // An explanation of the status of the database. - // An explanation of the status of the database. - State *string `json:"state,omitempty" tf:"state,omitempty"` - - // The retention period for the database. The retention period must be between 1 hour - // and 7 days, and can be specified in days, hours, minutes, or seconds. For example, - // the values 1d, 24h, 1440m, and 86400s are equivalent. Default value is 1h. - // If this property is used, you must avoid adding new DDL statements to ddl that - // update the database's version_retention_period. - // The retention period for the database. The retention period must be between 1 hour - // and 7 days, and can be specified in days, hours, minutes, or seconds. For example, - // the values 1d, 24h, 1440m, and 86400s are equivalent. Default value is 1h. - // If this property is used, you must avoid adding new DDL statements to 'ddl' that - // update the database's version_retention_period. - VersionRetentionPeriod *string `json:"versionRetentionPeriod,omitempty" tf:"version_retention_period,omitempty"` + +// The dialect of the Cloud Spanner Database. +// If it is not provided, "GOOGLE_STANDARD_SQL" will be used. +// Possible values are: GOOGLE_STANDARD_SQL, POSTGRESQL. +// The dialect of the Cloud Spanner Database. +// If it is not provided, "GOOGLE_STANDARD_SQL" will be used. Possible values: ["GOOGLE_STANDARD_SQL", "POSTGRESQL"] +DatabaseDialect *string `json:"databaseDialect,omitempty" tf:"database_dialect,omitempty"` + +// An optional list of DDL statements to run inside the newly created +// database. Statements can create tables, indexes, etc. These statements +// execute atomically with the creation of the database: if there is an +// error in any statement, the database is not created. +// An optional list of DDL statements to run inside the newly created +// database. Statements can create tables, indexes, etc. These statements +// execute atomically with the creation of the database: if there is an +// error in any statement, the database is not created. +Ddl []*string `json:"ddl,omitempty" tf:"ddl,omitempty"` + +DeletionProtection *bool `json:"deletionProtection,omitempty" tf:"deletion_protection,omitempty"` + +// Encryption configuration for the database +// Structure is documented below. +// Encryption configuration for the database +EncryptionConfig []EncryptionConfigObservation `json:"encryptionConfig,omitempty" tf:"encryption_config,omitempty"` + +// an identifier for the resource with format {{instance}}/{{name}} +ID *string `json:"id,omitempty" tf:"id,omitempty"` + +// The instance to create the database on. +// The instance to create the database on. +Instance *string `json:"instance,omitempty" tf:"instance,omitempty"` + +// The ID of the project in which the resource belongs. +// If it is not provided, the provider project is used. +Project *string `json:"project,omitempty" tf:"project,omitempty"` + +// An explanation of the status of the database. +// An explanation of the status of the database. +State *string `json:"state,omitempty" tf:"state,omitempty"` + +// The retention period for the database. The retention period must be between 1 hour +// and 7 days, and can be specified in days, hours, minutes, or seconds. For example, +// the values 1d, 24h, 1440m, and 86400s are equivalent. Default value is 1h. +// If this property is used, you must avoid adding new DDL statements to ddl that +// update the database's version_retention_period. +// The retention period for the database. The retention period must be between 1 hour +// and 7 days, and can be specified in days, hours, minutes, or seconds. For example, +// the values 1d, 24h, 1440m, and 86400s are equivalent. Default value is 1h. +// If this property is used, you must avoid adding new DDL statements to 'ddl' that +// update the database's version_retention_period. +VersionRetentionPeriod *string `json:"versionRetentionPeriod,omitempty" tf:"version_retention_period,omitempty"` } + type DatabaseParameters struct { - // The dialect of the Cloud Spanner Database. - // If it is not provided, "GOOGLE_STANDARD_SQL" will be used. - // Possible values are: GOOGLE_STANDARD_SQL, POSTGRESQL. - // The dialect of the Cloud Spanner Database. - // If it is not provided, "GOOGLE_STANDARD_SQL" will be used. Possible values: ["GOOGLE_STANDARD_SQL", "POSTGRESQL"] - // +kubebuilder:validation:Optional - DatabaseDialect *string `json:"databaseDialect,omitempty" tf:"database_dialect,omitempty"` - - // An optional list of DDL statements to run inside the newly created - // database. Statements can create tables, indexes, etc. These statements - // execute atomically with the creation of the database: if there is an - // error in any statement, the database is not created. - // An optional list of DDL statements to run inside the newly created - // database. Statements can create tables, indexes, etc. These statements - // execute atomically with the creation of the database: if there is an - // error in any statement, the database is not created. - // +kubebuilder:validation:Optional - Ddl []*string `json:"ddl,omitempty" tf:"ddl,omitempty"` - - // +kubebuilder:validation:Optional - DeletionProtection *bool `json:"deletionProtection,omitempty" tf:"deletion_protection,omitempty"` - - // Encryption configuration for the database - // Structure is documented below. - // Encryption configuration for the database - // +kubebuilder:validation:Optional - EncryptionConfig []EncryptionConfigParameters `json:"encryptionConfig,omitempty" tf:"encryption_config,omitempty"` - - // The instance to create the database on. - // The instance to create the database on. - // +crossplane:generate:reference:type=kubedb.dev/provider-gcp/apis/spanner/v1alpha1.Instance - // +kubebuilder:validation:Optional - Instance *string `json:"instance,omitempty" tf:"instance,omitempty"` - - // Reference to a Instance in spanner to populate instance. - // +kubebuilder:validation:Optional - InstanceRef *v1.Reference `json:"instanceRef,omitempty" tf:"-"` - - // Selector for a Instance in spanner to populate instance. - // +kubebuilder:validation:Optional - InstanceSelector *v1.Selector `json:"instanceSelector,omitempty" tf:"-"` - - // The ID of the project in which the resource belongs. - // If it is not provided, the provider project is used. - // +kubebuilder:validation:Optional - Project *string `json:"project,omitempty" tf:"project,omitempty"` - - // The retention period for the database. The retention period must be between 1 hour - // and 7 days, and can be specified in days, hours, minutes, or seconds. For example, - // the values 1d, 24h, 1440m, and 86400s are equivalent. Default value is 1h. - // If this property is used, you must avoid adding new DDL statements to ddl that - // update the database's version_retention_period. - // The retention period for the database. The retention period must be between 1 hour - // and 7 days, and can be specified in days, hours, minutes, or seconds. For example, - // the values 1d, 24h, 1440m, and 86400s are equivalent. Default value is 1h. - // If this property is used, you must avoid adding new DDL statements to 'ddl' that - // update the database's version_retention_period. - // +kubebuilder:validation:Optional - VersionRetentionPeriod *string `json:"versionRetentionPeriod,omitempty" tf:"version_retention_period,omitempty"` + +// The dialect of the Cloud Spanner Database. +// If it is not provided, "GOOGLE_STANDARD_SQL" will be used. +// Possible values are: GOOGLE_STANDARD_SQL, POSTGRESQL. +// The dialect of the Cloud Spanner Database. +// If it is not provided, "GOOGLE_STANDARD_SQL" will be used. Possible values: ["GOOGLE_STANDARD_SQL", "POSTGRESQL"] +// +kubebuilder:validation:Optional +DatabaseDialect *string `json:"databaseDialect,omitempty" tf:"database_dialect,omitempty"` + +// An optional list of DDL statements to run inside the newly created +// database. Statements can create tables, indexes, etc. These statements +// execute atomically with the creation of the database: if there is an +// error in any statement, the database is not created. +// An optional list of DDL statements to run inside the newly created +// database. Statements can create tables, indexes, etc. These statements +// execute atomically with the creation of the database: if there is an +// error in any statement, the database is not created. +// +kubebuilder:validation:Optional +Ddl []*string `json:"ddl,omitempty" tf:"ddl,omitempty"` + +// +kubebuilder:validation:Optional +DeletionProtection *bool `json:"deletionProtection,omitempty" tf:"deletion_protection,omitempty"` + +// Encryption configuration for the database +// Structure is documented below. +// Encryption configuration for the database +// +kubebuilder:validation:Optional +EncryptionConfig []EncryptionConfigParameters `json:"encryptionConfig,omitempty" tf:"encryption_config,omitempty"` + +// The instance to create the database on. +// The instance to create the database on. +// +crossplane:generate:reference:type=kubedb.dev/provider-gcp/apis/spanner/v1alpha1.Instance +// +kubebuilder:validation:Optional +Instance *string `json:"instance,omitempty" tf:"instance,omitempty"` + +// Reference to a Instance in spanner to populate instance. +// +kubebuilder:validation:Optional +InstanceRef *v1.Reference `json:"instanceRef,omitempty" tf:"-"` + +// Selector for a Instance in spanner to populate instance. +// +kubebuilder:validation:Optional +InstanceSelector *v1.Selector `json:"instanceSelector,omitempty" tf:"-"` + +// The ID of the project in which the resource belongs. +// If it is not provided, the provider project is used. +// +kubebuilder:validation:Optional +Project *string `json:"project,omitempty" tf:"project,omitempty"` + +// The retention period for the database. The retention period must be between 1 hour +// and 7 days, and can be specified in days, hours, minutes, or seconds. For example, +// the values 1d, 24h, 1440m, and 86400s are equivalent. Default value is 1h. +// If this property is used, you must avoid adding new DDL statements to ddl that +// update the database's version_retention_period. +// The retention period for the database. The retention period must be between 1 hour +// and 7 days, and can be specified in days, hours, minutes, or seconds. For example, +// the values 1d, 24h, 1440m, and 86400s are equivalent. Default value is 1h. +// If this property is used, you must avoid adding new DDL statements to 'ddl' that +// update the database's version_retention_period. +// +kubebuilder:validation:Optional +VersionRetentionPeriod *string `json:"versionRetentionPeriod,omitempty" tf:"version_retention_period,omitempty"` } + type EncryptionConfigInitParameters struct { - // Fully qualified name of the KMS key to use to encrypt this database. This key must exist - // in the same location as the Spanner Database. - // Fully qualified name of the KMS key to use to encrypt this database. This key must exist - // in the same location as the Spanner Database. - KMSKeyName *string `json:"kmsKeyName,omitempty" tf:"kms_key_name,omitempty"` + +// Fully qualified name of the KMS key to use to encrypt this database. This key must exist +// in the same location as the Spanner Database. +// Fully qualified name of the KMS key to use to encrypt this database. This key must exist +// in the same location as the Spanner Database. +KMSKeyName *string `json:"kmsKeyName,omitempty" tf:"kms_key_name,omitempty"` } + type EncryptionConfigObservation struct { - // Fully qualified name of the KMS key to use to encrypt this database. This key must exist - // in the same location as the Spanner Database. - // Fully qualified name of the KMS key to use to encrypt this database. This key must exist - // in the same location as the Spanner Database. - KMSKeyName *string `json:"kmsKeyName,omitempty" tf:"kms_key_name,omitempty"` + +// Fully qualified name of the KMS key to use to encrypt this database. This key must exist +// in the same location as the Spanner Database. +// Fully qualified name of the KMS key to use to encrypt this database. This key must exist +// in the same location as the Spanner Database. +KMSKeyName *string `json:"kmsKeyName,omitempty" tf:"kms_key_name,omitempty"` } + type EncryptionConfigParameters struct { - // Fully qualified name of the KMS key to use to encrypt this database. This key must exist - // in the same location as the Spanner Database. - // Fully qualified name of the KMS key to use to encrypt this database. This key must exist - // in the same location as the Spanner Database. - // +kubebuilder:validation:Optional - KMSKeyName *string `json:"kmsKeyName" tf:"kms_key_name,omitempty"` + +// Fully qualified name of the KMS key to use to encrypt this database. This key must exist +// in the same location as the Spanner Database. +// Fully qualified name of the KMS key to use to encrypt this database. This key must exist +// in the same location as the Spanner Database. +// +kubebuilder:validation:Optional +KMSKeyName *string `json:"kmsKeyName" tf:"kms_key_name,omitempty"` } // 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 @@ -219,13 +234,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 diff --git a/apis/spanner/v1alpha1/zz_databaseiammember_types.go b/apis/spanner/v1alpha1/zz_databaseiammember_types.go index 52c6c65..a9c9384 100755 --- a/apis/spanner/v1alpha1/zz_databaseiammember_types.go +++ b/apis/spanner/v1alpha1/zz_databaseiammember_types.go @@ -15,109 +15,128 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type ConditionInitParameters struct { - Description *string `json:"description,omitempty" tf:"description,omitempty"` - Expression *string `json:"expression,omitempty" tf:"expression,omitempty"` - Title *string `json:"title,omitempty" tf:"title,omitempty"` +Description *string `json:"description,omitempty" tf:"description,omitempty"` + +Expression *string `json:"expression,omitempty" tf:"expression,omitempty"` + +Title *string `json:"title,omitempty" tf:"title,omitempty"` } + type ConditionObservation struct { - Description *string `json:"description,omitempty" tf:"description,omitempty"` - Expression *string `json:"expression,omitempty" tf:"expression,omitempty"` - Title *string `json:"title,omitempty" tf:"title,omitempty"` +Description *string `json:"description,omitempty" tf:"description,omitempty"` + +Expression *string `json:"expression,omitempty" tf:"expression,omitempty"` + +Title *string `json:"title,omitempty" tf:"title,omitempty"` } + type ConditionParameters struct { - // +kubebuilder:validation:Optional - Description *string `json:"description,omitempty" tf:"description,omitempty"` - // +kubebuilder:validation:Optional - Expression *string `json:"expression" tf:"expression,omitempty"` +// +kubebuilder:validation:Optional +Description *string `json:"description,omitempty" tf:"description,omitempty"` - // +kubebuilder:validation:Optional - Title *string `json:"title" tf:"title,omitempty"` +// +kubebuilder:validation:Optional +Expression *string `json:"expression" tf:"expression,omitempty"` + +// +kubebuilder:validation:Optional +Title *string `json:"title" tf:"title,omitempty"` } + type DatabaseIAMMemberInitParameters struct { - Condition []ConditionInitParameters `json:"condition,omitempty" tf:"condition,omitempty"` - Member *string `json:"member,omitempty" tf:"member,omitempty"` - Project *string `json:"project,omitempty" tf:"project,omitempty"` +Condition []ConditionInitParameters `json:"condition,omitempty" tf:"condition,omitempty"` + +Member *string `json:"member,omitempty" tf:"member,omitempty"` - Role *string `json:"role,omitempty" tf:"role,omitempty"` +Project *string `json:"project,omitempty" tf:"project,omitempty"` + +Role *string `json:"role,omitempty" tf:"role,omitempty"` } + type DatabaseIAMMemberObservation struct { - Condition []ConditionObservation `json:"condition,omitempty" tf:"condition,omitempty"` - Database *string `json:"database,omitempty" tf:"database,omitempty"` - Etag *string `json:"etag,omitempty" tf:"etag,omitempty"` +Condition []ConditionObservation `json:"condition,omitempty" tf:"condition,omitempty"` - ID *string `json:"id,omitempty" tf:"id,omitempty"` +Database *string `json:"database,omitempty" tf:"database,omitempty"` - Instance *string `json:"instance,omitempty" tf:"instance,omitempty"` +Etag *string `json:"etag,omitempty" tf:"etag,omitempty"` - Member *string `json:"member,omitempty" tf:"member,omitempty"` +ID *string `json:"id,omitempty" tf:"id,omitempty"` - Project *string `json:"project,omitempty" tf:"project,omitempty"` +Instance *string `json:"instance,omitempty" tf:"instance,omitempty"` - Role *string `json:"role,omitempty" tf:"role,omitempty"` +Member *string `json:"member,omitempty" tf:"member,omitempty"` + +Project *string `json:"project,omitempty" tf:"project,omitempty"` + +Role *string `json:"role,omitempty" tf:"role,omitempty"` } + type DatabaseIAMMemberParameters struct { - // +kubebuilder:validation:Optional - Condition []ConditionParameters `json:"condition,omitempty" tf:"condition,omitempty"` - // +crossplane:generate:reference:type=Database - // +crossplane:generate:reference:extractor=kubedb.dev/provider-gcp/config/common.ExtractResourceID() - // +kubebuilder:validation:Optional - Database *string `json:"database,omitempty" tf:"database,omitempty"` +// +kubebuilder:validation:Optional +Condition []ConditionParameters `json:"condition,omitempty" tf:"condition,omitempty"` + +// +crossplane:generate:reference:type=Database +// +crossplane:generate:reference:extractor=kubedb.dev/provider-gcp/config/common.ExtractResourceID() +// +kubebuilder:validation:Optional +Database *string `json:"database,omitempty" tf:"database,omitempty"` - // Reference to a Database to populate database. - // +kubebuilder:validation:Optional - DatabaseRef *v1.Reference `json:"databaseRef,omitempty" tf:"-"` +// Reference to a Database to populate database. +// +kubebuilder:validation:Optional +DatabaseRef *v1.Reference `json:"databaseRef,omitempty" tf:"-"` - // Selector for a Database to populate database. - // +kubebuilder:validation:Optional - DatabaseSelector *v1.Selector `json:"databaseSelector,omitempty" tf:"-"` +// Selector for a Database to populate database. +// +kubebuilder:validation:Optional +DatabaseSelector *v1.Selector `json:"databaseSelector,omitempty" tf:"-"` - // +crossplane:generate:reference:type=Instance - // +crossplane:generate:reference:extractor=kubedb.dev/provider-gcp/config/common.ExtractResourceID() - // +kubebuilder:validation:Optional - Instance *string `json:"instance,omitempty" tf:"instance,omitempty"` +// +crossplane:generate:reference:type=Instance +// +crossplane:generate:reference:extractor=kubedb.dev/provider-gcp/config/common.ExtractResourceID() +// +kubebuilder:validation:Optional +Instance *string `json:"instance,omitempty" tf:"instance,omitempty"` - // Reference to a Instance to populate instance. - // +kubebuilder:validation:Optional - InstanceRef *v1.Reference `json:"instanceRef,omitempty" tf:"-"` +// Reference to a Instance to populate instance. +// +kubebuilder:validation:Optional +InstanceRef *v1.Reference `json:"instanceRef,omitempty" tf:"-"` - // Selector for a Instance to populate instance. - // +kubebuilder:validation:Optional - InstanceSelector *v1.Selector `json:"instanceSelector,omitempty" tf:"-"` +// Selector for a Instance to populate instance. +// +kubebuilder:validation:Optional +InstanceSelector *v1.Selector `json:"instanceSelector,omitempty" tf:"-"` - // +kubebuilder:validation:Optional - Member *string `json:"member,omitempty" tf:"member,omitempty"` +// +kubebuilder:validation:Optional +Member *string `json:"member,omitempty" tf:"member,omitempty"` - // +kubebuilder:validation:Optional - Project *string `json:"project,omitempty" tf:"project,omitempty"` +// +kubebuilder:validation:Optional +Project *string `json:"project,omitempty" tf:"project,omitempty"` - // +kubebuilder:validation:Optional - Role *string `json:"role,omitempty" tf:"role,omitempty"` +// +kubebuilder:validation:Optional +Role *string `json:"role,omitempty" tf:"role,omitempty"` } // DatabaseIAMMemberSpec defines the desired state of DatabaseIAMMember type DatabaseIAMMemberSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider DatabaseIAMMemberParameters `json:"forProvider"` + ForProvider DatabaseIAMMemberParameters `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 @@ -128,13 +147,13 @@ type DatabaseIAMMemberSpec 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 DatabaseIAMMemberInitParameters `json:"initProvider,omitempty"` + InitProvider DatabaseIAMMemberInitParameters `json:"initProvider,omitempty"` } // DatabaseIAMMemberStatus defines the observed state of DatabaseIAMMember. type DatabaseIAMMemberStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider DatabaseIAMMemberObservation `json:"atProvider,omitempty"` + AtProvider DatabaseIAMMemberObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -149,10 +168,10 @@ type DatabaseIAMMemberStatus struct { type DatabaseIAMMember 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.member) || (has(self.initProvider) && has(self.initProvider.member))",message="spec.forProvider.member is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.role) || (has(self.initProvider) && has(self.initProvider.role))",message="spec.forProvider.role is a required parameter" - Spec DatabaseIAMMemberSpec `json:"spec"` - Status DatabaseIAMMemberStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.member) || (has(self.initProvider) && has(self.initProvider.member))",message="spec.forProvider.member is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.role) || (has(self.initProvider) && has(self.initProvider.role))",message="spec.forProvider.role is a required parameter" + Spec DatabaseIAMMemberSpec `json:"spec"` + Status DatabaseIAMMemberStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/spanner/v1alpha1/zz_instance_types.go b/apis/spanner/v1alpha1/zz_instance_types.go index fb3226a..b6e6d88 100755 --- a/apis/spanner/v1alpha1/zz_instance_types.go +++ b/apis/spanner/v1alpha1/zz_instance_types.go @@ -15,167 +15,176 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type InstanceInitParameters struct { - // The name of the instance's configuration (similar but not - // quite the same as a region) which defines the geographic placement and - // replication of your databases in this instance. It determines where your data - // is stored. Values are typically of the form regional-europe-west1 , us-central etc. - // In order to obtain a valid list please consult the - // Configuration section of the docs. - // The name of the instance's configuration (similar but not - // quite the same as a region) which defines the geographic placement and - // replication of your databases in this instance. It determines where your data - // is stored. Values are typically of the form 'regional-europe-west1' , 'us-central' etc. - // In order to obtain a valid list please consult the - // [Configuration section of the docs](https://cloud.google.com/spanner/docs/instances). - Config *string `json:"config,omitempty" tf:"config,omitempty"` - - // The descriptive name for this instance as it appears in UIs. Must be - // unique per project and between 4 and 30 characters in length. - // The descriptive name for this instance as it appears in UIs. Must be - // unique per project and between 4 and 30 characters in length. - DisplayName *string `json:"displayName,omitempty" tf:"display_name,omitempty"` - - // When deleting a spanner instance, this boolean option will delete all backups of this instance. - // This must be set to true if you created a backup manually in the console. - // When deleting a spanner instance, this boolean option will delete all backups of this instance. - // This must be set to true if you created a backup manually in the console. - ForceDestroy *bool `json:"forceDestroy,omitempty" tf:"force_destroy,omitempty"` - - // An object containing a list of "key": value pairs. - // Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. - // An object containing a list of "key": value pairs. - // Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. - Labels map[string]*string `json:"labels,omitempty" tf:"labels,omitempty"` - - // The number of nodes allocated to this instance. - // The number of nodes allocated to this instance. - NumNodes *float64 `json:"numNodes,omitempty" tf:"num_nodes,omitempty"` - - // The number of processing units allocated to this instance. - // The number of processing units allocated to this instance. - ProcessingUnits *float64 `json:"processingUnits,omitempty" tf:"processing_units,omitempty"` - - // The ID of the project in which the resource belongs. - // If it is not provided, the provider project is used. - Project *string `json:"project,omitempty" tf:"project,omitempty"` + +// The name of the instance's configuration (similar but not +// quite the same as a region) which defines the geographic placement and +// replication of your databases in this instance. It determines where your data +// is stored. Values are typically of the form regional-europe-west1 , us-central etc. +// In order to obtain a valid list please consult the +// Configuration section of the docs. +// The name of the instance's configuration (similar but not +// quite the same as a region) which defines the geographic placement and +// replication of your databases in this instance. It determines where your data +// is stored. Values are typically of the form 'regional-europe-west1' , 'us-central' etc. +// In order to obtain a valid list please consult the +// [Configuration section of the docs](https://cloud.google.com/spanner/docs/instances). +Config *string `json:"config,omitempty" tf:"config,omitempty"` + +// The descriptive name for this instance as it appears in UIs. Must be +// unique per project and between 4 and 30 characters in length. +// The descriptive name for this instance as it appears in UIs. Must be +// unique per project and between 4 and 30 characters in length. +DisplayName *string `json:"displayName,omitempty" tf:"display_name,omitempty"` + +// When deleting a spanner instance, this boolean option will delete all backups of this instance. +// This must be set to true if you created a backup manually in the console. +// When deleting a spanner instance, this boolean option will delete all backups of this instance. +// This must be set to true if you created a backup manually in the console. +ForceDestroy *bool `json:"forceDestroy,omitempty" tf:"force_destroy,omitempty"` + +// An object containing a list of "key": value pairs. +// Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. +// An object containing a list of "key": value pairs. +// Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. +Labels map[string]*string `json:"labels,omitempty" tf:"labels,omitempty"` + +// The number of nodes allocated to this instance. +// The number of nodes allocated to this instance. +NumNodes *float64 `json:"numNodes,omitempty" tf:"num_nodes,omitempty"` + +// The number of processing units allocated to this instance. +// The number of processing units allocated to this instance. +ProcessingUnits *float64 `json:"processingUnits,omitempty" tf:"processing_units,omitempty"` + +// The ID of the project in which the resource belongs. +// If it is not provided, the provider project is used. +Project *string `json:"project,omitempty" tf:"project,omitempty"` } + type InstanceObservation struct { - // The name of the instance's configuration (similar but not - // quite the same as a region) which defines the geographic placement and - // replication of your databases in this instance. It determines where your data - // is stored. Values are typically of the form regional-europe-west1 , us-central etc. - // In order to obtain a valid list please consult the - // Configuration section of the docs. - // The name of the instance's configuration (similar but not - // quite the same as a region) which defines the geographic placement and - // replication of your databases in this instance. It determines where your data - // is stored. Values are typically of the form 'regional-europe-west1' , 'us-central' etc. - // In order to obtain a valid list please consult the - // [Configuration section of the docs](https://cloud.google.com/spanner/docs/instances). - Config *string `json:"config,omitempty" tf:"config,omitempty"` - - // The descriptive name for this instance as it appears in UIs. Must be - // unique per project and between 4 and 30 characters in length. - // The descriptive name for this instance as it appears in UIs. Must be - // unique per project and between 4 and 30 characters in length. - DisplayName *string `json:"displayName,omitempty" tf:"display_name,omitempty"` - - // When deleting a spanner instance, this boolean option will delete all backups of this instance. - // This must be set to true if you created a backup manually in the console. - // When deleting a spanner instance, this boolean option will delete all backups of this instance. - // This must be set to true if you created a backup manually in the console. - ForceDestroy *bool `json:"forceDestroy,omitempty" tf:"force_destroy,omitempty"` - - // an identifier for the resource with format {{project}}/{{name}} - ID *string `json:"id,omitempty" tf:"id,omitempty"` - - // An object containing a list of "key": value pairs. - // Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. - // An object containing a list of "key": value pairs. - // Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. - Labels map[string]*string `json:"labels,omitempty" tf:"labels,omitempty"` - - // The number of nodes allocated to this instance. - // The number of nodes allocated to this instance. - NumNodes *float64 `json:"numNodes,omitempty" tf:"num_nodes,omitempty"` - - // The number of processing units allocated to this instance. - // The number of processing units allocated to this instance. - ProcessingUnits *float64 `json:"processingUnits,omitempty" tf:"processing_units,omitempty"` - - // The ID of the project in which the resource belongs. - // If it is not provided, the provider project is used. - Project *string `json:"project,omitempty" tf:"project,omitempty"` - - // Instance status: CREATING or READY. - // Instance status: 'CREATING' or 'READY'. - State *string `json:"state,omitempty" tf:"state,omitempty"` + +// The name of the instance's configuration (similar but not +// quite the same as a region) which defines the geographic placement and +// replication of your databases in this instance. It determines where your data +// is stored. Values are typically of the form regional-europe-west1 , us-central etc. +// In order to obtain a valid list please consult the +// Configuration section of the docs. +// The name of the instance's configuration (similar but not +// quite the same as a region) which defines the geographic placement and +// replication of your databases in this instance. It determines where your data +// is stored. Values are typically of the form 'regional-europe-west1' , 'us-central' etc. +// In order to obtain a valid list please consult the +// [Configuration section of the docs](https://cloud.google.com/spanner/docs/instances). +Config *string `json:"config,omitempty" tf:"config,omitempty"` + +// The descriptive name for this instance as it appears in UIs. Must be +// unique per project and between 4 and 30 characters in length. +// The descriptive name for this instance as it appears in UIs. Must be +// unique per project and between 4 and 30 characters in length. +DisplayName *string `json:"displayName,omitempty" tf:"display_name,omitempty"` + +// When deleting a spanner instance, this boolean option will delete all backups of this instance. +// This must be set to true if you created a backup manually in the console. +// When deleting a spanner instance, this boolean option will delete all backups of this instance. +// This must be set to true if you created a backup manually in the console. +ForceDestroy *bool `json:"forceDestroy,omitempty" tf:"force_destroy,omitempty"` + +// an identifier for the resource with format {{project}}/{{name}} +ID *string `json:"id,omitempty" tf:"id,omitempty"` + +// An object containing a list of "key": value pairs. +// Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. +// An object containing a list of "key": value pairs. +// Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. +Labels map[string]*string `json:"labels,omitempty" tf:"labels,omitempty"` + +// The number of nodes allocated to this instance. +// The number of nodes allocated to this instance. +NumNodes *float64 `json:"numNodes,omitempty" tf:"num_nodes,omitempty"` + +// The number of processing units allocated to this instance. +// The number of processing units allocated to this instance. +ProcessingUnits *float64 `json:"processingUnits,omitempty" tf:"processing_units,omitempty"` + +// The ID of the project in which the resource belongs. +// If it is not provided, the provider project is used. +Project *string `json:"project,omitempty" tf:"project,omitempty"` + +// Instance status: CREATING or READY. +// Instance status: 'CREATING' or 'READY'. +State *string `json:"state,omitempty" tf:"state,omitempty"` } + type InstanceParameters struct { - // The name of the instance's configuration (similar but not - // quite the same as a region) which defines the geographic placement and - // replication of your databases in this instance. It determines where your data - // is stored. Values are typically of the form regional-europe-west1 , us-central etc. - // In order to obtain a valid list please consult the - // Configuration section of the docs. - // The name of the instance's configuration (similar but not - // quite the same as a region) which defines the geographic placement and - // replication of your databases in this instance. It determines where your data - // is stored. Values are typically of the form 'regional-europe-west1' , 'us-central' etc. - // In order to obtain a valid list please consult the - // [Configuration section of the docs](https://cloud.google.com/spanner/docs/instances). - // +kubebuilder:validation:Optional - Config *string `json:"config,omitempty" tf:"config,omitempty"` - - // The descriptive name for this instance as it appears in UIs. Must be - // unique per project and between 4 and 30 characters in length. - // The descriptive name for this instance as it appears in UIs. Must be - // unique per project and between 4 and 30 characters in length. - // +kubebuilder:validation:Optional - DisplayName *string `json:"displayName,omitempty" tf:"display_name,omitempty"` - - // When deleting a spanner instance, this boolean option will delete all backups of this instance. - // This must be set to true if you created a backup manually in the console. - // When deleting a spanner instance, this boolean option will delete all backups of this instance. - // This must be set to true if you created a backup manually in the console. - // +kubebuilder:validation:Optional - ForceDestroy *bool `json:"forceDestroy,omitempty" tf:"force_destroy,omitempty"` - - // An object containing a list of "key": value pairs. - // Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. - // An object containing a list of "key": value pairs. - // Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. - // +kubebuilder:validation:Optional - Labels map[string]*string `json:"labels,omitempty" tf:"labels,omitempty"` - - // The number of nodes allocated to this instance. - // The number of nodes allocated to this instance. - // +kubebuilder:validation:Optional - NumNodes *float64 `json:"numNodes,omitempty" tf:"num_nodes,omitempty"` - - // The number of processing units allocated to this instance. - // The number of processing units allocated to this instance. - // +kubebuilder:validation:Optional - ProcessingUnits *float64 `json:"processingUnits,omitempty" tf:"processing_units,omitempty"` - - // The ID of the project in which the resource belongs. - // If it is not provided, the provider project is used. - // +kubebuilder:validation:Optional - Project *string `json:"project,omitempty" tf:"project,omitempty"` + +// The name of the instance's configuration (similar but not +// quite the same as a region) which defines the geographic placement and +// replication of your databases in this instance. It determines where your data +// is stored. Values are typically of the form regional-europe-west1 , us-central etc. +// In order to obtain a valid list please consult the +// Configuration section of the docs. +// The name of the instance's configuration (similar but not +// quite the same as a region) which defines the geographic placement and +// replication of your databases in this instance. It determines where your data +// is stored. Values are typically of the form 'regional-europe-west1' , 'us-central' etc. +// In order to obtain a valid list please consult the +// [Configuration section of the docs](https://cloud.google.com/spanner/docs/instances). +// +kubebuilder:validation:Optional +Config *string `json:"config,omitempty" tf:"config,omitempty"` + +// The descriptive name for this instance as it appears in UIs. Must be +// unique per project and between 4 and 30 characters in length. +// The descriptive name for this instance as it appears in UIs. Must be +// unique per project and between 4 and 30 characters in length. +// +kubebuilder:validation:Optional +DisplayName *string `json:"displayName,omitempty" tf:"display_name,omitempty"` + +// When deleting a spanner instance, this boolean option will delete all backups of this instance. +// This must be set to true if you created a backup manually in the console. +// When deleting a spanner instance, this boolean option will delete all backups of this instance. +// This must be set to true if you created a backup manually in the console. +// +kubebuilder:validation:Optional +ForceDestroy *bool `json:"forceDestroy,omitempty" tf:"force_destroy,omitempty"` + +// An object containing a list of "key": value pairs. +// Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. +// An object containing a list of "key": value pairs. +// Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }. +// +kubebuilder:validation:Optional +Labels map[string]*string `json:"labels,omitempty" tf:"labels,omitempty"` + +// The number of nodes allocated to this instance. +// The number of nodes allocated to this instance. +// +kubebuilder:validation:Optional +NumNodes *float64 `json:"numNodes,omitempty" tf:"num_nodes,omitempty"` + +// The number of processing units allocated to this instance. +// The number of processing units allocated to this instance. +// +kubebuilder:validation:Optional +ProcessingUnits *float64 `json:"processingUnits,omitempty" tf:"processing_units,omitempty"` + +// The ID of the project in which the resource belongs. +// If it is not provided, the provider project is used. +// +kubebuilder:validation:Optional +Project *string `json:"project,omitempty" tf:"project,omitempty"` } // InstanceSpec defines the desired state of Instance type InstanceSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider InstanceParameters `json:"forProvider"` + ForProvider InstanceParameters `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 @@ -186,13 +195,13 @@ type InstanceSpec 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 InstanceInitParameters `json:"initProvider,omitempty"` + InitProvider InstanceInitParameters `json:"initProvider,omitempty"` } // InstanceStatus defines the observed state of Instance. type InstanceStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider InstanceObservation `json:"atProvider,omitempty"` + AtProvider InstanceObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -207,10 +216,10 @@ type InstanceStatus struct { type Instance 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.config) || (has(self.initProvider) && has(self.initProvider.config))",message="spec.forProvider.config is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.displayName) || (has(self.initProvider) && has(self.initProvider.displayName))",message="spec.forProvider.displayName is a required parameter" - Spec InstanceSpec `json:"spec"` - Status InstanceStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.config) || (has(self.initProvider) && has(self.initProvider.config))",message="spec.forProvider.config is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.displayName) || (has(self.initProvider) && has(self.initProvider.displayName))",message="spec.forProvider.displayName is a required parameter" + Spec InstanceSpec `json:"spec"` + Status InstanceStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/spanner/v1alpha1/zz_instanceiammember_types.go b/apis/spanner/v1alpha1/zz_instanceiammember_types.go index 73b7a4f..9a3c38f 100755 --- a/apis/spanner/v1alpha1/zz_instanceiammember_types.go +++ b/apis/spanner/v1alpha1/zz_instanceiammember_types.go @@ -15,94 +15,113 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type InstanceIAMMemberConditionInitParameters struct { - Description *string `json:"description,omitempty" tf:"description,omitempty"` - Expression *string `json:"expression,omitempty" tf:"expression,omitempty"` - Title *string `json:"title,omitempty" tf:"title,omitempty"` +Description *string `json:"description,omitempty" tf:"description,omitempty"` + +Expression *string `json:"expression,omitempty" tf:"expression,omitempty"` + +Title *string `json:"title,omitempty" tf:"title,omitempty"` } + type InstanceIAMMemberConditionObservation struct { - Description *string `json:"description,omitempty" tf:"description,omitempty"` - Expression *string `json:"expression,omitempty" tf:"expression,omitempty"` - Title *string `json:"title,omitempty" tf:"title,omitempty"` +Description *string `json:"description,omitempty" tf:"description,omitempty"` + +Expression *string `json:"expression,omitempty" tf:"expression,omitempty"` + +Title *string `json:"title,omitempty" tf:"title,omitempty"` } + type InstanceIAMMemberConditionParameters struct { - // +kubebuilder:validation:Optional - Description *string `json:"description,omitempty" tf:"description,omitempty"` - // +kubebuilder:validation:Optional - Expression *string `json:"expression" tf:"expression,omitempty"` +// +kubebuilder:validation:Optional +Description *string `json:"description,omitempty" tf:"description,omitempty"` - // +kubebuilder:validation:Optional - Title *string `json:"title" tf:"title,omitempty"` +// +kubebuilder:validation:Optional +Expression *string `json:"expression" tf:"expression,omitempty"` + +// +kubebuilder:validation:Optional +Title *string `json:"title" tf:"title,omitempty"` } + type InstanceIAMMemberInitParameters struct { - Condition []InstanceIAMMemberConditionInitParameters `json:"condition,omitempty" tf:"condition,omitempty"` - Member *string `json:"member,omitempty" tf:"member,omitempty"` - Project *string `json:"project,omitempty" tf:"project,omitempty"` +Condition []InstanceIAMMemberConditionInitParameters `json:"condition,omitempty" tf:"condition,omitempty"` + +Member *string `json:"member,omitempty" tf:"member,omitempty"` - Role *string `json:"role,omitempty" tf:"role,omitempty"` +Project *string `json:"project,omitempty" tf:"project,omitempty"` + +Role *string `json:"role,omitempty" tf:"role,omitempty"` } + type InstanceIAMMemberObservation struct { - Condition []InstanceIAMMemberConditionObservation `json:"condition,omitempty" tf:"condition,omitempty"` - Etag *string `json:"etag,omitempty" tf:"etag,omitempty"` - ID *string `json:"id,omitempty" tf:"id,omitempty"` +Condition []InstanceIAMMemberConditionObservation `json:"condition,omitempty" tf:"condition,omitempty"` - Instance *string `json:"instance,omitempty" tf:"instance,omitempty"` +Etag *string `json:"etag,omitempty" tf:"etag,omitempty"` - Member *string `json:"member,omitempty" tf:"member,omitempty"` +ID *string `json:"id,omitempty" tf:"id,omitempty"` - Project *string `json:"project,omitempty" tf:"project,omitempty"` +Instance *string `json:"instance,omitempty" tf:"instance,omitempty"` - Role *string `json:"role,omitempty" tf:"role,omitempty"` +Member *string `json:"member,omitempty" tf:"member,omitempty"` + +Project *string `json:"project,omitempty" tf:"project,omitempty"` + +Role *string `json:"role,omitempty" tf:"role,omitempty"` } + type InstanceIAMMemberParameters struct { - // +kubebuilder:validation:Optional - Condition []InstanceIAMMemberConditionParameters `json:"condition,omitempty" tf:"condition,omitempty"` - // +crossplane:generate:reference:type=Instance - // +crossplane:generate:reference:extractor=kubedb.dev/provider-gcp/config/common.ExtractResourceID() - // +kubebuilder:validation:Optional - Instance *string `json:"instance,omitempty" tf:"instance,omitempty"` +// +kubebuilder:validation:Optional +Condition []InstanceIAMMemberConditionParameters `json:"condition,omitempty" tf:"condition,omitempty"` + +// +crossplane:generate:reference:type=Instance +// +crossplane:generate:reference:extractor=kubedb.dev/provider-gcp/config/common.ExtractResourceID() +// +kubebuilder:validation:Optional +Instance *string `json:"instance,omitempty" tf:"instance,omitempty"` - // Reference to a Instance to populate instance. - // +kubebuilder:validation:Optional - InstanceRef *v1.Reference `json:"instanceRef,omitempty" tf:"-"` +// Reference to a Instance to populate instance. +// +kubebuilder:validation:Optional +InstanceRef *v1.Reference `json:"instanceRef,omitempty" tf:"-"` - // Selector for a Instance to populate instance. - // +kubebuilder:validation:Optional - InstanceSelector *v1.Selector `json:"instanceSelector,omitempty" tf:"-"` +// Selector for a Instance to populate instance. +// +kubebuilder:validation:Optional +InstanceSelector *v1.Selector `json:"instanceSelector,omitempty" tf:"-"` - // +kubebuilder:validation:Optional - Member *string `json:"member,omitempty" tf:"member,omitempty"` +// +kubebuilder:validation:Optional +Member *string `json:"member,omitempty" tf:"member,omitempty"` - // +kubebuilder:validation:Optional - Project *string `json:"project,omitempty" tf:"project,omitempty"` +// +kubebuilder:validation:Optional +Project *string `json:"project,omitempty" tf:"project,omitempty"` - // +kubebuilder:validation:Optional - Role *string `json:"role,omitempty" tf:"role,omitempty"` +// +kubebuilder:validation:Optional +Role *string `json:"role,omitempty" tf:"role,omitempty"` } // InstanceIAMMemberSpec defines the desired state of InstanceIAMMember type InstanceIAMMemberSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider InstanceIAMMemberParameters `json:"forProvider"` + ForProvider InstanceIAMMemberParameters `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 @@ -113,13 +132,13 @@ type InstanceIAMMemberSpec 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 InstanceIAMMemberInitParameters `json:"initProvider,omitempty"` + InitProvider InstanceIAMMemberInitParameters `json:"initProvider,omitempty"` } // InstanceIAMMemberStatus defines the observed state of InstanceIAMMember. type InstanceIAMMemberStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider InstanceIAMMemberObservation `json:"atProvider,omitempty"` + AtProvider InstanceIAMMemberObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -134,10 +153,10 @@ type InstanceIAMMemberStatus struct { type InstanceIAMMember 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.member) || (has(self.initProvider) && has(self.initProvider.member))",message="spec.forProvider.member is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.role) || (has(self.initProvider) && has(self.initProvider.role))",message="spec.forProvider.role is a required parameter" - Spec InstanceIAMMemberSpec `json:"spec"` - Status InstanceIAMMemberStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.member) || (has(self.initProvider) && has(self.initProvider.member))",message="spec.forProvider.member is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.role) || (has(self.initProvider) && has(self.initProvider.role))",message="spec.forProvider.role is a required parameter" + Spec InstanceIAMMemberSpec `json:"spec"` + Status InstanceIAMMemberStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/sql/v1alpha1/zz_database_types.go b/apis/sql/v1alpha1/zz_database_types.go index 08f77e6..bcf0e86 100755 --- a/apis/sql/v1alpha1/zz_database_types.go +++ b/apis/sql/v1alpha1/zz_database_types.go @@ -15,167 +15,176 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type DatabaseInitParameters struct { - // The charset value. See MySQL's - // Supported Character Sets and Collations - // and Postgres' Character Set Support - // for more details and supported values. Postgres databases only support - // a value of UTF8 at creation time. - // The charset value. See MySQL's - // [Supported Character Sets and Collations](https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html) - // and Postgres' [Character Set Support](https://www.postgresql.org/docs/9.6/static/multibyte.html) - // for more details and supported values. Postgres databases only support - // a value of 'UTF8' at creation time. - Charset *string `json:"charset,omitempty" tf:"charset,omitempty"` - - // The collation value. See MySQL's - // Supported Character Sets and Collations - // and Postgres' Collation Support - // for more details and supported values. Postgres databases only support - // a value of en_US.UTF8 at creation time. - // The collation value. See MySQL's - // [Supported Character Sets and Collations](https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html) - // and Postgres' [Collation Support](https://www.postgresql.org/docs/9.6/static/collation.html) - // for more details and supported values. Postgres databases only support - // a value of 'en_US.UTF8' at creation time. - Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` - - // The deletion policy for the database. Setting ABANDON allows the resource - // to be abandoned rather than deleted. This is useful for Postgres, where databases cannot be - // deleted from the API if there are users other than cloudsqlsuperuser with access. Possible - // values are: "ABANDON", "DELETE". Defaults to "DELETE". - // The deletion policy for the database. Setting ABANDON allows the resource - // to be abandoned rather than deleted. This is useful for Postgres, where databases cannot be - // deleted from the API if there are users other than cloudsqlsuperuser with access. Possible - // values are: "ABANDON", "DELETE". Defaults to "DELETE". - DeletionPolicy *string `json:"deletionPolicy,omitempty" tf:"deletion_policy,omitempty"` - - // The ID of the project in which the resource belongs. - // If it is not provided, the provider project is used. - Project *string `json:"project,omitempty" tf:"project,omitempty"` + +// The charset value. See MySQL's +// Supported Character Sets and Collations +// and Postgres' Character Set Support +// for more details and supported values. Postgres databases only support +// a value of UTF8 at creation time. +// The charset value. See MySQL's +// [Supported Character Sets and Collations](https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html) +// and Postgres' [Character Set Support](https://www.postgresql.org/docs/9.6/static/multibyte.html) +// for more details and supported values. Postgres databases only support +// a value of 'UTF8' at creation time. +Charset *string `json:"charset,omitempty" tf:"charset,omitempty"` + +// The collation value. See MySQL's +// Supported Character Sets and Collations +// and Postgres' Collation Support +// for more details and supported values. Postgres databases only support +// a value of en_US.UTF8 at creation time. +// The collation value. See MySQL's +// [Supported Character Sets and Collations](https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html) +// and Postgres' [Collation Support](https://www.postgresql.org/docs/9.6/static/collation.html) +// for more details and supported values. Postgres databases only support +// a value of 'en_US.UTF8' at creation time. +Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` + +// The deletion policy for the database. Setting ABANDON allows the resource +// to be abandoned rather than deleted. This is useful for Postgres, where databases cannot be +// deleted from the API if there are users other than cloudsqlsuperuser with access. Possible +// values are: "ABANDON", "DELETE". Defaults to "DELETE". +// The deletion policy for the database. Setting ABANDON allows the resource +// to be abandoned rather than deleted. This is useful for Postgres, where databases cannot be +// deleted from the API if there are users other than cloudsqlsuperuser with access. Possible +// values are: "ABANDON", "DELETE". Defaults to "DELETE". +DeletionPolicy *string `json:"deletionPolicy,omitempty" tf:"deletion_policy,omitempty"` + +// The ID of the project in which the resource belongs. +// If it is not provided, the provider project is used. +Project *string `json:"project,omitempty" tf:"project,omitempty"` } + type DatabaseObservation struct { - // The charset value. See MySQL's - // Supported Character Sets and Collations - // and Postgres' Character Set Support - // for more details and supported values. Postgres databases only support - // a value of UTF8 at creation time. - // The charset value. See MySQL's - // [Supported Character Sets and Collations](https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html) - // and Postgres' [Character Set Support](https://www.postgresql.org/docs/9.6/static/multibyte.html) - // for more details and supported values. Postgres databases only support - // a value of 'UTF8' at creation time. - Charset *string `json:"charset,omitempty" tf:"charset,omitempty"` - - // The collation value. See MySQL's - // Supported Character Sets and Collations - // and Postgres' Collation Support - // for more details and supported values. Postgres databases only support - // a value of en_US.UTF8 at creation time. - // The collation value. See MySQL's - // [Supported Character Sets and Collations](https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html) - // and Postgres' [Collation Support](https://www.postgresql.org/docs/9.6/static/collation.html) - // for more details and supported values. Postgres databases only support - // a value of 'en_US.UTF8' at creation time. - Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` - - // The deletion policy for the database. Setting ABANDON allows the resource - // to be abandoned rather than deleted. This is useful for Postgres, where databases cannot be - // deleted from the API if there are users other than cloudsqlsuperuser with access. Possible - // values are: "ABANDON", "DELETE". Defaults to "DELETE". - // The deletion policy for the database. Setting ABANDON allows the resource - // to be abandoned rather than deleted. This is useful for Postgres, where databases cannot be - // deleted from the API if there are users other than cloudsqlsuperuser with access. Possible - // values are: "ABANDON", "DELETE". Defaults to "DELETE". - DeletionPolicy *string `json:"deletionPolicy,omitempty" tf:"deletion_policy,omitempty"` - - // an identifier for the resource with format projects/{{project}}/instances/{{instance}}/databases/{{name}} - ID *string `json:"id,omitempty" tf:"id,omitempty"` - - // The name of the Cloud SQL instance. This does not include the project - // ID. - // The name of the Cloud SQL instance. This does not include the project - // ID. - Instance *string `json:"instance,omitempty" tf:"instance,omitempty"` - - // The ID of the project in which the resource belongs. - // If it is not provided, the provider project is used. - Project *string `json:"project,omitempty" tf:"project,omitempty"` - - // The URI of the created resource. - SelfLink *string `json:"selfLink,omitempty" tf:"self_link,omitempty"` + +// The charset value. See MySQL's +// Supported Character Sets and Collations +// and Postgres' Character Set Support +// for more details and supported values. Postgres databases only support +// a value of UTF8 at creation time. +// The charset value. See MySQL's +// [Supported Character Sets and Collations](https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html) +// and Postgres' [Character Set Support](https://www.postgresql.org/docs/9.6/static/multibyte.html) +// for more details and supported values. Postgres databases only support +// a value of 'UTF8' at creation time. +Charset *string `json:"charset,omitempty" tf:"charset,omitempty"` + +// The collation value. See MySQL's +// Supported Character Sets and Collations +// and Postgres' Collation Support +// for more details and supported values. Postgres databases only support +// a value of en_US.UTF8 at creation time. +// The collation value. See MySQL's +// [Supported Character Sets and Collations](https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html) +// and Postgres' [Collation Support](https://www.postgresql.org/docs/9.6/static/collation.html) +// for more details and supported values. Postgres databases only support +// a value of 'en_US.UTF8' at creation time. +Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` + +// The deletion policy for the database. Setting ABANDON allows the resource +// to be abandoned rather than deleted. This is useful for Postgres, where databases cannot be +// deleted from the API if there are users other than cloudsqlsuperuser with access. Possible +// values are: "ABANDON", "DELETE". Defaults to "DELETE". +// The deletion policy for the database. Setting ABANDON allows the resource +// to be abandoned rather than deleted. This is useful for Postgres, where databases cannot be +// deleted from the API if there are users other than cloudsqlsuperuser with access. Possible +// values are: "ABANDON", "DELETE". Defaults to "DELETE". +DeletionPolicy *string `json:"deletionPolicy,omitempty" tf:"deletion_policy,omitempty"` + +// an identifier for the resource with format projects/{{project}}/instances/{{instance}}/databases/{{name}} +ID *string `json:"id,omitempty" tf:"id,omitempty"` + +// The name of the Cloud SQL instance. This does not include the project +// ID. +// The name of the Cloud SQL instance. This does not include the project +// ID. +Instance *string `json:"instance,omitempty" tf:"instance,omitempty"` + +// The ID of the project in which the resource belongs. +// If it is not provided, the provider project is used. +Project *string `json:"project,omitempty" tf:"project,omitempty"` + +// The URI of the created resource. +SelfLink *string `json:"selfLink,omitempty" tf:"self_link,omitempty"` } + type DatabaseParameters struct { - // The charset value. See MySQL's - // Supported Character Sets and Collations - // and Postgres' Character Set Support - // for more details and supported values. Postgres databases only support - // a value of UTF8 at creation time. - // The charset value. See MySQL's - // [Supported Character Sets and Collations](https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html) - // and Postgres' [Character Set Support](https://www.postgresql.org/docs/9.6/static/multibyte.html) - // for more details and supported values. Postgres databases only support - // a value of 'UTF8' at creation time. - // +kubebuilder:validation:Optional - Charset *string `json:"charset,omitempty" tf:"charset,omitempty"` - - // The collation value. See MySQL's - // Supported Character Sets and Collations - // and Postgres' Collation Support - // for more details and supported values. Postgres databases only support - // a value of en_US.UTF8 at creation time. - // The collation value. See MySQL's - // [Supported Character Sets and Collations](https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html) - // and Postgres' [Collation Support](https://www.postgresql.org/docs/9.6/static/collation.html) - // for more details and supported values. Postgres databases only support - // a value of 'en_US.UTF8' at creation time. - // +kubebuilder:validation:Optional - Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` - - // The deletion policy for the database. Setting ABANDON allows the resource - // to be abandoned rather than deleted. This is useful for Postgres, where databases cannot be - // deleted from the API if there are users other than cloudsqlsuperuser with access. Possible - // values are: "ABANDON", "DELETE". Defaults to "DELETE". - // The deletion policy for the database. Setting ABANDON allows the resource - // to be abandoned rather than deleted. This is useful for Postgres, where databases cannot be - // deleted from the API if there are users other than cloudsqlsuperuser with access. Possible - // values are: "ABANDON", "DELETE". Defaults to "DELETE". - // +kubebuilder:validation:Optional - DeletionPolicy *string `json:"deletionPolicy,omitempty" tf:"deletion_policy,omitempty"` - - // The name of the Cloud SQL instance. This does not include the project - // ID. - // The name of the Cloud SQL instance. This does not include the project - // ID. - // +crossplane:generate:reference:type=DatabaseInstance - // +kubebuilder:validation:Optional - Instance *string `json:"instance,omitempty" tf:"instance,omitempty"` - - // Reference to a DatabaseInstance to populate instance. - // +kubebuilder:validation:Optional - InstanceRef *v1.Reference `json:"instanceRef,omitempty" tf:"-"` - - // Selector for a DatabaseInstance to populate instance. - // +kubebuilder:validation:Optional - InstanceSelector *v1.Selector `json:"instanceSelector,omitempty" tf:"-"` - - // The ID of the project in which the resource belongs. - // If it is not provided, the provider project is used. - // +kubebuilder:validation:Optional - Project *string `json:"project,omitempty" tf:"project,omitempty"` + +// The charset value. See MySQL's +// Supported Character Sets and Collations +// and Postgres' Character Set Support +// for more details and supported values. Postgres databases only support +// a value of UTF8 at creation time. +// The charset value. See MySQL's +// [Supported Character Sets and Collations](https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html) +// and Postgres' [Character Set Support](https://www.postgresql.org/docs/9.6/static/multibyte.html) +// for more details and supported values. Postgres databases only support +// a value of 'UTF8' at creation time. +// +kubebuilder:validation:Optional +Charset *string `json:"charset,omitempty" tf:"charset,omitempty"` + +// The collation value. See MySQL's +// Supported Character Sets and Collations +// and Postgres' Collation Support +// for more details and supported values. Postgres databases only support +// a value of en_US.UTF8 at creation time. +// The collation value. See MySQL's +// [Supported Character Sets and Collations](https://dev.mysql.com/doc/refman/5.7/en/charset-charsets.html) +// and Postgres' [Collation Support](https://www.postgresql.org/docs/9.6/static/collation.html) +// for more details and supported values. Postgres databases only support +// a value of 'en_US.UTF8' at creation time. +// +kubebuilder:validation:Optional +Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` + +// The deletion policy for the database. Setting ABANDON allows the resource +// to be abandoned rather than deleted. This is useful for Postgres, where databases cannot be +// deleted from the API if there are users other than cloudsqlsuperuser with access. Possible +// values are: "ABANDON", "DELETE". Defaults to "DELETE". +// The deletion policy for the database. Setting ABANDON allows the resource +// to be abandoned rather than deleted. This is useful for Postgres, where databases cannot be +// deleted from the API if there are users other than cloudsqlsuperuser with access. Possible +// values are: "ABANDON", "DELETE". Defaults to "DELETE". +// +kubebuilder:validation:Optional +DeletionPolicy *string `json:"deletionPolicy,omitempty" tf:"deletion_policy,omitempty"` + +// The name of the Cloud SQL instance. This does not include the project +// ID. +// The name of the Cloud SQL instance. This does not include the project +// ID. +// +crossplane:generate:reference:type=DatabaseInstance +// +kubebuilder:validation:Optional +Instance *string `json:"instance,omitempty" tf:"instance,omitempty"` + +// Reference to a DatabaseInstance to populate instance. +// +kubebuilder:validation:Optional +InstanceRef *v1.Reference `json:"instanceRef,omitempty" tf:"-"` + +// Selector for a DatabaseInstance to populate instance. +// +kubebuilder:validation:Optional +InstanceSelector *v1.Selector `json:"instanceSelector,omitempty" tf:"-"` + +// The ID of the project in which the resource belongs. +// If it is not provided, the provider project is used. +// +kubebuilder:validation:Optional +Project *string `json:"project,omitempty" tf:"project,omitempty"` } // 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 @@ -186,13 +195,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 diff --git a/apis/sql/v1alpha1/zz_databaseinstance_types.go b/apis/sql/v1alpha1/zz_databaseinstance_types.go index 37ea4ad..daba9bf 100755 --- a/apis/sql/v1alpha1/zz_databaseinstance_types.go +++ b/apis/sql/v1alpha1/zz_databaseinstance_types.go @@ -15,1636 +15,1759 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type ActiveDirectoryConfigInitParameters struct { - // The domain name for the active directory (e.g., mydomain.com). - // Can only be used with SQL Server. - // Domain name of the Active Directory for SQL Server (e.g., mydomain.com). - Domain *string `json:"domain,omitempty" tf:"domain,omitempty"` + +// The domain name for the active directory (e.g., mydomain.com). +// Can only be used with SQL Server. +// Domain name of the Active Directory for SQL Server (e.g., mydomain.com). +Domain *string `json:"domain,omitempty" tf:"domain,omitempty"` } + type ActiveDirectoryConfigObservation struct { - // The domain name for the active directory (e.g., mydomain.com). - // Can only be used with SQL Server. - // Domain name of the Active Directory for SQL Server (e.g., mydomain.com). - Domain *string `json:"domain,omitempty" tf:"domain,omitempty"` + +// The domain name for the active directory (e.g., mydomain.com). +// Can only be used with SQL Server. +// Domain name of the Active Directory for SQL Server (e.g., mydomain.com). +Domain *string `json:"domain,omitempty" tf:"domain,omitempty"` } + type ActiveDirectoryConfigParameters struct { - // The domain name for the active directory (e.g., mydomain.com). - // Can only be used with SQL Server. - // Domain name of the Active Directory for SQL Server (e.g., mydomain.com). - // +kubebuilder:validation:Optional - Domain *string `json:"domain" tf:"domain,omitempty"` + +// The domain name for the active directory (e.g., mydomain.com). +// Can only be used with SQL Server. +// Domain name of the Active Directory for SQL Server (e.g., mydomain.com). +// +kubebuilder:validation:Optional +Domain *string `json:"domain" tf:"domain,omitempty"` } + type AdvancedMachineFeaturesInitParameters struct { - // The number of threads per core. The value of this flag can be 1 or 2. To disable SMT, set this flag to 1. Only available in Cloud SQL for SQL Server instances. See smt for more details. - // The number of threads per physical core. Can be 1 or 2. - ThreadsPerCore *float64 `json:"threadsPerCore,omitempty" tf:"threads_per_core,omitempty"` + +// The number of threads per core. The value of this flag can be 1 or 2. To disable SMT, set this flag to 1. Only available in Cloud SQL for SQL Server instances. See smt for more details. +// The number of threads per physical core. Can be 1 or 2. +ThreadsPerCore *float64 `json:"threadsPerCore,omitempty" tf:"threads_per_core,omitempty"` } + type AdvancedMachineFeaturesObservation struct { - // The number of threads per core. The value of this flag can be 1 or 2. To disable SMT, set this flag to 1. Only available in Cloud SQL for SQL Server instances. See smt for more details. - // The number of threads per physical core. Can be 1 or 2. - ThreadsPerCore *float64 `json:"threadsPerCore,omitempty" tf:"threads_per_core,omitempty"` + +// The number of threads per core. The value of this flag can be 1 or 2. To disable SMT, set this flag to 1. Only available in Cloud SQL for SQL Server instances. See smt for more details. +// The number of threads per physical core. Can be 1 or 2. +ThreadsPerCore *float64 `json:"threadsPerCore,omitempty" tf:"threads_per_core,omitempty"` } + type AdvancedMachineFeaturesParameters struct { - // The number of threads per core. The value of this flag can be 1 or 2. To disable SMT, set this flag to 1. Only available in Cloud SQL for SQL Server instances. See smt for more details. - // The number of threads per physical core. Can be 1 or 2. - // +kubebuilder:validation:Optional - ThreadsPerCore *float64 `json:"threadsPerCore,omitempty" tf:"threads_per_core,omitempty"` + +// The number of threads per core. The value of this flag can be 1 or 2. To disable SMT, set this flag to 1. Only available in Cloud SQL for SQL Server instances. See smt for more details. +// The number of threads per physical core. Can be 1 or 2. +// +kubebuilder:validation:Optional +ThreadsPerCore *float64 `json:"threadsPerCore,omitempty" tf:"threads_per_core,omitempty"` } + type AuthorizedNetworksInitParameters struct { - // The RFC 3339 - // formatted date time string indicating when this whitelist expires. - ExpirationTime *string `json:"expirationTime,omitempty" tf:"expiration_time,omitempty"` - // A name for this whitelist entry. - Name *string `json:"name,omitempty" tf:"name,omitempty"` +// The RFC 3339 +// formatted date time string indicating when this whitelist expires. +ExpirationTime *string `json:"expirationTime,omitempty" tf:"expiration_time,omitempty"` + +// A name for this whitelist entry. +Name *string `json:"name,omitempty" tf:"name,omitempty"` - // A CIDR notation IPv4 or IPv6 address that is allowed to - // access this instance. Must be set even if other two attributes are not for - // the whitelist to become active. - Value *string `json:"value,omitempty" tf:"value,omitempty"` +// A CIDR notation IPv4 or IPv6 address that is allowed to +// access this instance. Must be set even if other two attributes are not for +// the whitelist to become active. +Value *string `json:"value,omitempty" tf:"value,omitempty"` } + type AuthorizedNetworksObservation struct { - // The RFC 3339 - // formatted date time string indicating when this whitelist expires. - ExpirationTime *string `json:"expirationTime,omitempty" tf:"expiration_time,omitempty"` - // A name for this whitelist entry. - Name *string `json:"name,omitempty" tf:"name,omitempty"` +// The RFC 3339 +// formatted date time string indicating when this whitelist expires. +ExpirationTime *string `json:"expirationTime,omitempty" tf:"expiration_time,omitempty"` + +// A name for this whitelist entry. +Name *string `json:"name,omitempty" tf:"name,omitempty"` - // A CIDR notation IPv4 or IPv6 address that is allowed to - // access this instance. Must be set even if other two attributes are not for - // the whitelist to become active. - Value *string `json:"value,omitempty" tf:"value,omitempty"` +// A CIDR notation IPv4 or IPv6 address that is allowed to +// access this instance. Must be set even if other two attributes are not for +// the whitelist to become active. +Value *string `json:"value,omitempty" tf:"value,omitempty"` } + type AuthorizedNetworksParameters struct { - // The RFC 3339 - // formatted date time string indicating when this whitelist expires. - // +kubebuilder:validation:Optional - ExpirationTime *string `json:"expirationTime,omitempty" tf:"expiration_time,omitempty"` - // A name for this whitelist entry. - // +kubebuilder:validation:Optional - Name *string `json:"name,omitempty" tf:"name,omitempty"` +// The RFC 3339 +// formatted date time string indicating when this whitelist expires. +// +kubebuilder:validation:Optional +ExpirationTime *string `json:"expirationTime,omitempty" tf:"expiration_time,omitempty"` + +// A name for this whitelist entry. +// +kubebuilder:validation:Optional +Name *string `json:"name,omitempty" tf:"name,omitempty"` - // A CIDR notation IPv4 or IPv6 address that is allowed to - // access this instance. Must be set even if other two attributes are not for - // the whitelist to become active. - // +kubebuilder:validation:Optional - Value *string `json:"value" tf:"value,omitempty"` +// A CIDR notation IPv4 or IPv6 address that is allowed to +// access this instance. Must be set even if other two attributes are not for +// the whitelist to become active. +// +kubebuilder:validation:Optional +Value *string `json:"value" tf:"value,omitempty"` } + type BackupConfigurationInitParameters struct { - // Backup retention settings. The configuration is detailed below. - BackupRetentionSettings []BackupRetentionSettingsInitParameters `json:"backupRetentionSettings,omitempty" tf:"backup_retention_settings,omitempty"` - // True if binary logging is enabled. - // Can only be used with MySQL. - // True if binary logging is enabled. If settings.backup_configuration.enabled is false, this must be as well. Can only be used with MySQL. - BinaryLogEnabled *bool `json:"binaryLogEnabled,omitempty" tf:"binary_log_enabled,omitempty"` +// Backup retention settings. The configuration is detailed below. +BackupRetentionSettings []BackupRetentionSettingsInitParameters `json:"backupRetentionSettings,omitempty" tf:"backup_retention_settings,omitempty"` + +// True if binary logging is enabled. +// Can only be used with MySQL. +// True if binary logging is enabled. If settings.backup_configuration.enabled is false, this must be as well. Can only be used with MySQL. +BinaryLogEnabled *bool `json:"binaryLogEnabled,omitempty" tf:"binary_log_enabled,omitempty"` - // True if backup configuration is enabled. - // True if backup configuration is enabled. - Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` +// True if backup configuration is enabled. +// True if backup configuration is enabled. +Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` - // The region where the backup will be stored - // Location of the backup configuration. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// The region where the backup will be stored +// Location of the backup configuration. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // True if Point-in-time recovery is enabled. Will restart database if enabled after instance creation. Valid only for PostgreSQL and SQL Server instances. - // True if Point-in-time recovery is enabled. - PointInTimeRecoveryEnabled *bool `json:"pointInTimeRecoveryEnabled,omitempty" tf:"point_in_time_recovery_enabled,omitempty"` +// True if Point-in-time recovery is enabled. Will restart database if enabled after instance creation. Valid only for PostgreSQL and SQL Server instances. +// True if Point-in-time recovery is enabled. +PointInTimeRecoveryEnabled *bool `json:"pointInTimeRecoveryEnabled,omitempty" tf:"point_in_time_recovery_enabled,omitempty"` - // HH:MM format time indicating when backup - // configuration starts. - // HH:MM format time indicating when backup configuration starts. - StartTime *string `json:"startTime,omitempty" tf:"start_time,omitempty"` +// HH:MM format time indicating when backup +// configuration starts. +// HH:MM format time indicating when backup configuration starts. +StartTime *string `json:"startTime,omitempty" tf:"start_time,omitempty"` - // The number of days of transaction logs we retain for point in time restore, from 1-7. - // The number of days of transaction logs we retain for point in time restore, from 1-7. - TransactionLogRetentionDays *float64 `json:"transactionLogRetentionDays,omitempty" tf:"transaction_log_retention_days,omitempty"` +// The number of days of transaction logs we retain for point in time restore, from 1-7. +// The number of days of transaction logs we retain for point in time restore, from 1-7. +TransactionLogRetentionDays *float64 `json:"transactionLogRetentionDays,omitempty" tf:"transaction_log_retention_days,omitempty"` } + type BackupConfigurationObservation struct { - // Backup retention settings. The configuration is detailed below. - BackupRetentionSettings []BackupRetentionSettingsObservation `json:"backupRetentionSettings,omitempty" tf:"backup_retention_settings,omitempty"` - // True if binary logging is enabled. - // Can only be used with MySQL. - // True if binary logging is enabled. If settings.backup_configuration.enabled is false, this must be as well. Can only be used with MySQL. - BinaryLogEnabled *bool `json:"binaryLogEnabled,omitempty" tf:"binary_log_enabled,omitempty"` +// Backup retention settings. The configuration is detailed below. +BackupRetentionSettings []BackupRetentionSettingsObservation `json:"backupRetentionSettings,omitempty" tf:"backup_retention_settings,omitempty"` + +// True if binary logging is enabled. +// Can only be used with MySQL. +// True if binary logging is enabled. If settings.backup_configuration.enabled is false, this must be as well. Can only be used with MySQL. +BinaryLogEnabled *bool `json:"binaryLogEnabled,omitempty" tf:"binary_log_enabled,omitempty"` - // True if backup configuration is enabled. - // True if backup configuration is enabled. - Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` +// True if backup configuration is enabled. +// True if backup configuration is enabled. +Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` - // The region where the backup will be stored - // Location of the backup configuration. - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// The region where the backup will be stored +// Location of the backup configuration. +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // True if Point-in-time recovery is enabled. Will restart database if enabled after instance creation. Valid only for PostgreSQL and SQL Server instances. - // True if Point-in-time recovery is enabled. - PointInTimeRecoveryEnabled *bool `json:"pointInTimeRecoveryEnabled,omitempty" tf:"point_in_time_recovery_enabled,omitempty"` +// True if Point-in-time recovery is enabled. Will restart database if enabled after instance creation. Valid only for PostgreSQL and SQL Server instances. +// True if Point-in-time recovery is enabled. +PointInTimeRecoveryEnabled *bool `json:"pointInTimeRecoveryEnabled,omitempty" tf:"point_in_time_recovery_enabled,omitempty"` - // HH:MM format time indicating when backup - // configuration starts. - // HH:MM format time indicating when backup configuration starts. - StartTime *string `json:"startTime,omitempty" tf:"start_time,omitempty"` +// HH:MM format time indicating when backup +// configuration starts. +// HH:MM format time indicating when backup configuration starts. +StartTime *string `json:"startTime,omitempty" tf:"start_time,omitempty"` - // The number of days of transaction logs we retain for point in time restore, from 1-7. - // The number of days of transaction logs we retain for point in time restore, from 1-7. - TransactionLogRetentionDays *float64 `json:"transactionLogRetentionDays,omitempty" tf:"transaction_log_retention_days,omitempty"` +// The number of days of transaction logs we retain for point in time restore, from 1-7. +// The number of days of transaction logs we retain for point in time restore, from 1-7. +TransactionLogRetentionDays *float64 `json:"transactionLogRetentionDays,omitempty" tf:"transaction_log_retention_days,omitempty"` } + type BackupConfigurationParameters struct { - // Backup retention settings. The configuration is detailed below. - // +kubebuilder:validation:Optional - BackupRetentionSettings []BackupRetentionSettingsParameters `json:"backupRetentionSettings,omitempty" tf:"backup_retention_settings,omitempty"` - // True if binary logging is enabled. - // Can only be used with MySQL. - // True if binary logging is enabled. If settings.backup_configuration.enabled is false, this must be as well. Can only be used with MySQL. - // +kubebuilder:validation:Optional - BinaryLogEnabled *bool `json:"binaryLogEnabled,omitempty" tf:"binary_log_enabled,omitempty"` +// Backup retention settings. The configuration is detailed below. +// +kubebuilder:validation:Optional +BackupRetentionSettings []BackupRetentionSettingsParameters `json:"backupRetentionSettings,omitempty" tf:"backup_retention_settings,omitempty"` + +// True if binary logging is enabled. +// Can only be used with MySQL. +// True if binary logging is enabled. If settings.backup_configuration.enabled is false, this must be as well. Can only be used with MySQL. +// +kubebuilder:validation:Optional +BinaryLogEnabled *bool `json:"binaryLogEnabled,omitempty" tf:"binary_log_enabled,omitempty"` - // True if backup configuration is enabled. - // True if backup configuration is enabled. - // +kubebuilder:validation:Optional - Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` +// True if backup configuration is enabled. +// True if backup configuration is enabled. +// +kubebuilder:validation:Optional +Enabled *bool `json:"enabled,omitempty" tf:"enabled,omitempty"` - // The region where the backup will be stored - // Location of the backup configuration. - // +kubebuilder:validation:Optional - Location *string `json:"location,omitempty" tf:"location,omitempty"` +// The region where the backup will be stored +// Location of the backup configuration. +// +kubebuilder:validation:Optional +Location *string `json:"location,omitempty" tf:"location,omitempty"` - // True if Point-in-time recovery is enabled. Will restart database if enabled after instance creation. Valid only for PostgreSQL and SQL Server instances. - // True if Point-in-time recovery is enabled. - // +kubebuilder:validation:Optional - PointInTimeRecoveryEnabled *bool `json:"pointInTimeRecoveryEnabled,omitempty" tf:"point_in_time_recovery_enabled,omitempty"` +// True if Point-in-time recovery is enabled. Will restart database if enabled after instance creation. Valid only for PostgreSQL and SQL Server instances. +// True if Point-in-time recovery is enabled. +// +kubebuilder:validation:Optional +PointInTimeRecoveryEnabled *bool `json:"pointInTimeRecoveryEnabled,omitempty" tf:"point_in_time_recovery_enabled,omitempty"` - // HH:MM format time indicating when backup - // configuration starts. - // HH:MM format time indicating when backup configuration starts. - // +kubebuilder:validation:Optional - StartTime *string `json:"startTime,omitempty" tf:"start_time,omitempty"` +// HH:MM format time indicating when backup +// configuration starts. +// HH:MM format time indicating when backup configuration starts. +// +kubebuilder:validation:Optional +StartTime *string `json:"startTime,omitempty" tf:"start_time,omitempty"` - // The number of days of transaction logs we retain for point in time restore, from 1-7. - // The number of days of transaction logs we retain for point in time restore, from 1-7. - // +kubebuilder:validation:Optional - TransactionLogRetentionDays *float64 `json:"transactionLogRetentionDays,omitempty" tf:"transaction_log_retention_days,omitempty"` +// The number of days of transaction logs we retain for point in time restore, from 1-7. +// The number of days of transaction logs we retain for point in time restore, from 1-7. +// +kubebuilder:validation:Optional +TransactionLogRetentionDays *float64 `json:"transactionLogRetentionDays,omitempty" tf:"transaction_log_retention_days,omitempty"` } + type BackupRetentionSettingsInitParameters struct { - // Depending on the value of retention_unit, this is used to determine if a backup needs to be deleted. If retention_unit - // is 'COUNT', we will retain this many backups. - // Number of backups to retain. - RetainedBackups *float64 `json:"retainedBackups,omitempty" tf:"retained_backups,omitempty"` - // The unit that 'retained_backups' represents. Defaults to COUNT. - // The unit that 'retainedBackups' represents. Defaults to COUNT - RetentionUnit *string `json:"retentionUnit,omitempty" tf:"retention_unit,omitempty"` +// Depending on the value of retention_unit, this is used to determine if a backup needs to be deleted. If retention_unit +// is 'COUNT', we will retain this many backups. +// Number of backups to retain. +RetainedBackups *float64 `json:"retainedBackups,omitempty" tf:"retained_backups,omitempty"` + +// The unit that 'retained_backups' represents. Defaults to COUNT. +// The unit that 'retainedBackups' represents. Defaults to COUNT +RetentionUnit *string `json:"retentionUnit,omitempty" tf:"retention_unit,omitempty"` } + type BackupRetentionSettingsObservation struct { - // Depending on the value of retention_unit, this is used to determine if a backup needs to be deleted. If retention_unit - // is 'COUNT', we will retain this many backups. - // Number of backups to retain. - RetainedBackups *float64 `json:"retainedBackups,omitempty" tf:"retained_backups,omitempty"` - // The unit that 'retained_backups' represents. Defaults to COUNT. - // The unit that 'retainedBackups' represents. Defaults to COUNT - RetentionUnit *string `json:"retentionUnit,omitempty" tf:"retention_unit,omitempty"` +// Depending on the value of retention_unit, this is used to determine if a backup needs to be deleted. If retention_unit +// is 'COUNT', we will retain this many backups. +// Number of backups to retain. +RetainedBackups *float64 `json:"retainedBackups,omitempty" tf:"retained_backups,omitempty"` + +// The unit that 'retained_backups' represents. Defaults to COUNT. +// The unit that 'retainedBackups' represents. Defaults to COUNT +RetentionUnit *string `json:"retentionUnit,omitempty" tf:"retention_unit,omitempty"` } + type BackupRetentionSettingsParameters struct { - // Depending on the value of retention_unit, this is used to determine if a backup needs to be deleted. If retention_unit - // is 'COUNT', we will retain this many backups. - // Number of backups to retain. - // +kubebuilder:validation:Optional - RetainedBackups *float64 `json:"retainedBackups" tf:"retained_backups,omitempty"` - // The unit that 'retained_backups' represents. Defaults to COUNT. - // The unit that 'retainedBackups' represents. Defaults to COUNT - // +kubebuilder:validation:Optional - RetentionUnit *string `json:"retentionUnit,omitempty" tf:"retention_unit,omitempty"` +// Depending on the value of retention_unit, this is used to determine if a backup needs to be deleted. If retention_unit +// is 'COUNT', we will retain this many backups. +// Number of backups to retain. +// +kubebuilder:validation:Optional +RetainedBackups *float64 `json:"retainedBackups" tf:"retained_backups,omitempty"` + +// The unit that 'retained_backups' represents. Defaults to COUNT. +// The unit that 'retainedBackups' represents. Defaults to COUNT +// +kubebuilder:validation:Optional +RetentionUnit *string `json:"retentionUnit,omitempty" tf:"retention_unit,omitempty"` } + type CloneInitParameters struct { - // The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the cloned instance ip will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z?. - // The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the cloned instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. - AllocatedIPRange *string `json:"allocatedIpRange,omitempty" tf:"allocated_ip_range,omitempty"` - // (SQL Server only, use with point_in_time) Clone only the specified databases from the source instance. Clone all databases if empty. - // (SQL Server only, use with point_in_time) clone only the specified databases from the source instance. Clone all databases if empty. - DatabaseNames []*string `json:"databaseNames,omitempty" tf:"database_names,omitempty"` +// The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the cloned instance ip will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z?. +// The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the cloned instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. +AllocatedIPRange *string `json:"allocatedIpRange,omitempty" tf:"allocated_ip_range,omitempty"` + +// (SQL Server only, use with point_in_time) Clone only the specified databases from the source instance. Clone all databases if empty. +// (SQL Server only, use with point_in_time) clone only the specified databases from the source instance. Clone all databases if empty. +DatabaseNames []*string `json:"databaseNames,omitempty" tf:"database_names,omitempty"` - // The timestamp of the point in time that should be restored. - // The timestamp of the point in time that should be restored. - PointInTime *string `json:"pointInTime,omitempty" tf:"point_in_time,omitempty"` +// The timestamp of the point in time that should be restored. +// The timestamp of the point in time that should be restored. +PointInTime *string `json:"pointInTime,omitempty" tf:"point_in_time,omitempty"` - // Name of the source instance which will be cloned. - // The name of the instance from which the point in time should be restored. - SourceInstanceName *string `json:"sourceInstanceName,omitempty" tf:"source_instance_name,omitempty"` +// Name of the source instance which will be cloned. +// The name of the instance from which the point in time should be restored. +SourceInstanceName *string `json:"sourceInstanceName,omitempty" tf:"source_instance_name,omitempty"` } + type CloneObservation struct { - // The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the cloned instance ip will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z?. - // The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the cloned instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. - AllocatedIPRange *string `json:"allocatedIpRange,omitempty" tf:"allocated_ip_range,omitempty"` - // (SQL Server only, use with point_in_time) Clone only the specified databases from the source instance. Clone all databases if empty. - // (SQL Server only, use with point_in_time) clone only the specified databases from the source instance. Clone all databases if empty. - DatabaseNames []*string `json:"databaseNames,omitempty" tf:"database_names,omitempty"` +// The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the cloned instance ip will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z?. +// The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the cloned instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. +AllocatedIPRange *string `json:"allocatedIpRange,omitempty" tf:"allocated_ip_range,omitempty"` + +// (SQL Server only, use with point_in_time) Clone only the specified databases from the source instance. Clone all databases if empty. +// (SQL Server only, use with point_in_time) clone only the specified databases from the source instance. Clone all databases if empty. +DatabaseNames []*string `json:"databaseNames,omitempty" tf:"database_names,omitempty"` - // The timestamp of the point in time that should be restored. - // The timestamp of the point in time that should be restored. - PointInTime *string `json:"pointInTime,omitempty" tf:"point_in_time,omitempty"` +// The timestamp of the point in time that should be restored. +// The timestamp of the point in time that should be restored. +PointInTime *string `json:"pointInTime,omitempty" tf:"point_in_time,omitempty"` - // Name of the source instance which will be cloned. - // The name of the instance from which the point in time should be restored. - SourceInstanceName *string `json:"sourceInstanceName,omitempty" tf:"source_instance_name,omitempty"` +// Name of the source instance which will be cloned. +// The name of the instance from which the point in time should be restored. +SourceInstanceName *string `json:"sourceInstanceName,omitempty" tf:"source_instance_name,omitempty"` } + type CloneParameters struct { - // The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the cloned instance ip will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z?. - // The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the cloned instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. - // +kubebuilder:validation:Optional - AllocatedIPRange *string `json:"allocatedIpRange,omitempty" tf:"allocated_ip_range,omitempty"` - // (SQL Server only, use with point_in_time) Clone only the specified databases from the source instance. Clone all databases if empty. - // (SQL Server only, use with point_in_time) clone only the specified databases from the source instance. Clone all databases if empty. - // +kubebuilder:validation:Optional - DatabaseNames []*string `json:"databaseNames,omitempty" tf:"database_names,omitempty"` +// The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the cloned instance ip will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z?. +// The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the cloned instance ip will be created in the allocated range. The range name must comply with [RFC 1035](https://tools.ietf.org/html/rfc1035). Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. +// +kubebuilder:validation:Optional +AllocatedIPRange *string `json:"allocatedIpRange,omitempty" tf:"allocated_ip_range,omitempty"` + +// (SQL Server only, use with point_in_time) Clone only the specified databases from the source instance. Clone all databases if empty. +// (SQL Server only, use with point_in_time) clone only the specified databases from the source instance. Clone all databases if empty. +// +kubebuilder:validation:Optional +DatabaseNames []*string `json:"databaseNames,omitempty" tf:"database_names,omitempty"` - // The timestamp of the point in time that should be restored. - // The timestamp of the point in time that should be restored. - // +kubebuilder:validation:Optional - PointInTime *string `json:"pointInTime,omitempty" tf:"point_in_time,omitempty"` +// The timestamp of the point in time that should be restored. +// The timestamp of the point in time that should be restored. +// +kubebuilder:validation:Optional +PointInTime *string `json:"pointInTime,omitempty" tf:"point_in_time,omitempty"` - // Name of the source instance which will be cloned. - // The name of the instance from which the point in time should be restored. - // +kubebuilder:validation:Optional - SourceInstanceName *string `json:"sourceInstanceName" tf:"source_instance_name,omitempty"` +// Name of the source instance which will be cloned. +// The name of the instance from which the point in time should be restored. +// +kubebuilder:validation:Optional +SourceInstanceName *string `json:"sourceInstanceName" tf:"source_instance_name,omitempty"` } + type DatabaseFlagsInitParameters struct { - // A name for this whitelist entry. - // Name of the flag. - Name *string `json:"name,omitempty" tf:"name,omitempty"` - // A CIDR notation IPv4 or IPv6 address that is allowed to - // access this instance. Must be set even if other two attributes are not for - // the whitelist to become active. - // Value of the flag. - Value *string `json:"value,omitempty" tf:"value,omitempty"` +// A name for this whitelist entry. +// Name of the flag. +Name *string `json:"name,omitempty" tf:"name,omitempty"` + +// A CIDR notation IPv4 or IPv6 address that is allowed to +// access this instance. Must be set even if other two attributes are not for +// the whitelist to become active. +// Value of the flag. +Value *string `json:"value,omitempty" tf:"value,omitempty"` } + type DatabaseFlagsObservation struct { - // A name for this whitelist entry. - // Name of the flag. - Name *string `json:"name,omitempty" tf:"name,omitempty"` - // A CIDR notation IPv4 or IPv6 address that is allowed to - // access this instance. Must be set even if other two attributes are not for - // the whitelist to become active. - // Value of the flag. - Value *string `json:"value,omitempty" tf:"value,omitempty"` +// A name for this whitelist entry. +// Name of the flag. +Name *string `json:"name,omitempty" tf:"name,omitempty"` + +// A CIDR notation IPv4 or IPv6 address that is allowed to +// access this instance. Must be set even if other two attributes are not for +// the whitelist to become active. +// Value of the flag. +Value *string `json:"value,omitempty" tf:"value,omitempty"` } + type DatabaseFlagsParameters struct { - // A name for this whitelist entry. - // Name of the flag. - // +kubebuilder:validation:Optional - Name *string `json:"name" tf:"name,omitempty"` - // A CIDR notation IPv4 or IPv6 address that is allowed to - // access this instance. Must be set even if other two attributes are not for - // the whitelist to become active. - // Value of the flag. - // +kubebuilder:validation:Optional - Value *string `json:"value" tf:"value,omitempty"` +// A name for this whitelist entry. +// Name of the flag. +// +kubebuilder:validation:Optional +Name *string `json:"name" tf:"name,omitempty"` + +// A CIDR notation IPv4 or IPv6 address that is allowed to +// access this instance. Must be set even if other two attributes are not for +// the whitelist to become active. +// Value of the flag. +// +kubebuilder:validation:Optional +Value *string `json:"value" tf:"value,omitempty"` } + type DatabaseInstanceInitParameters struct { - // The context needed to create this instance as a clone of another instance. The - // configuration is detailed below. - // Configuration for creating a new instance as a clone of another instance. - Clone []CloneInitParameters `json:"clone,omitempty" tf:"clone,omitempty"` - - // The MySQL, PostgreSQL or - // SQL Server version to use. Supported values include MYSQL_5_6, - // MYSQL_5_7, MYSQL_8_0, POSTGRES_9_6,POSTGRES_10, POSTGRES_11, - // POSTGRES_12, POSTGRES_13, POSTGRES_14, SQLSERVER_2017_STANDARD, - // SQLSERVER_2017_ENTERPRISE, SQLSERVER_2017_EXPRESS, SQLSERVER_2017_WEB. - // SQLSERVER_2019_STANDARD, SQLSERVER_2019_ENTERPRISE, SQLSERVER_2019_EXPRESS, - // SQLSERVER_2019_WEB. - // Database Version Policies - // includes an up-to-date reference of supported versions. - // The MySQL, PostgreSQL or SQL Server (beta) version to use. Supported values include MYSQL_5_6, MYSQL_5_7, MYSQL_8_0, POSTGRES_9_6, POSTGRES_10, POSTGRES_11, POSTGRES_12, POSTGRES_13, POSTGRES_14, SQLSERVER_2017_STANDARD, SQLSERVER_2017_ENTERPRISE, SQLSERVER_2017_EXPRESS, SQLSERVER_2017_WEB. Database Version Policies includes an up-to-date reference of supported versions. - DatabaseVersion *string `json:"databaseVersion,omitempty" tf:"database_version,omitempty"` - - // Defaults to true. Defaults to true. - DeletionProtection *bool `json:"deletionProtection,omitempty" tf:"deletion_protection,omitempty"` - - // The full path to the encryption key used for the CMEK disk encryption. - // The provided key must be in the same region as the SQL instance. In order - // to use this feature, a special kind of service account must be created and - // granted permission on this key. This step can currently only be done - // manually, please see this step. - // That service account needs the Cloud KMS > Cloud KMS CryptoKey Encrypter/Decrypter role on your - // key - please see this step. - EncryptionKeyName *string `json:"encryptionKeyName,omitempty" tf:"encryption_key_name,omitempty"` - - // The current software version on the instance. This attribute can not be set during creation. Refer to available_maintenance_versions attribute to see what maintenance_version are available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting a maintenance_version value that is older than the current one on the instance will be ignored. - // Maintenance version. - MaintenanceVersion *string `json:"maintenanceVersion,omitempty" tf:"maintenance_version,omitempty"` - - // The name of the existing instance that will - // act as the master in the replication setup. Note, this requires the master to - // have binary_log_enabled set, as well as existing backups. - // The name of the instance that will act as the master in the replication setup. Note, this requires the master to have binary_log_enabled set, as well as existing backups. - MasterInstanceName *string `json:"masterInstanceName,omitempty" tf:"master_instance_name,omitempty"` - - // The ID of the project in which the resource belongs. If it - // is not provided, the provider project is used. - // The ID of the project in which the resource belongs. If it is not provided, the provider project is used. - Project *string `json:"project,omitempty" tf:"project,omitempty"` - - // The region the instance will sit in. If a region is not provided in the resource definition, - // the provider region will be used instead. - // The region the instance will sit in. Note, Cloud SQL is not available in all regions. A valid region must be provided to use this resource. If a region is not provided in the resource definition, the provider region will be used instead, but this will be an apply-time error for instances if the provider region is not supported with Cloud SQL. If you choose not to provide the region argument for this resource, make sure you understand this. - Region *string `json:"region,omitempty" tf:"region,omitempty"` - - // The configuration for replication. The - // configuration is detailed below. Valid only for MySQL instances. - // The configuration for replication. - ReplicaConfiguration []ReplicaConfigurationInitParameters `json:"replicaConfiguration,omitempty" tf:"replica_configuration,omitempty"` - - // The context needed to restore the database to a backup run. The configuration is detailed below. Adding or modifying this - // block during resource creation/update will trigger the restore action after the resource is created/updated. - RestoreBackupContext []RestoreBackupContextInitParameters `json:"restoreBackupContext,omitempty" tf:"restore_backup_context,omitempty"` - - // The settings to use for the database. The - // configuration is detailed below. Required if clone is not set. - // The settings to use for the database. The configuration is detailed below. - Settings []SettingsInitParameters `json:"settings,omitempty" tf:"settings,omitempty"` + +// The context needed to create this instance as a clone of another instance. The +// configuration is detailed below. +// Configuration for creating a new instance as a clone of another instance. +Clone []CloneInitParameters `json:"clone,omitempty" tf:"clone,omitempty"` + +// The MySQL, PostgreSQL or +// SQL Server version to use. Supported values include MYSQL_5_6, +// MYSQL_5_7, MYSQL_8_0, POSTGRES_9_6,POSTGRES_10, POSTGRES_11, +// POSTGRES_12, POSTGRES_13, POSTGRES_14, SQLSERVER_2017_STANDARD, +// SQLSERVER_2017_ENTERPRISE, SQLSERVER_2017_EXPRESS, SQLSERVER_2017_WEB. +// SQLSERVER_2019_STANDARD, SQLSERVER_2019_ENTERPRISE, SQLSERVER_2019_EXPRESS, +// SQLSERVER_2019_WEB. +// Database Version Policies +// includes an up-to-date reference of supported versions. +// The MySQL, PostgreSQL or SQL Server (beta) version to use. Supported values include MYSQL_5_6, MYSQL_5_7, MYSQL_8_0, POSTGRES_9_6, POSTGRES_10, POSTGRES_11, POSTGRES_12, POSTGRES_13, POSTGRES_14, SQLSERVER_2017_STANDARD, SQLSERVER_2017_ENTERPRISE, SQLSERVER_2017_EXPRESS, SQLSERVER_2017_WEB. Database Version Policies includes an up-to-date reference of supported versions. +DatabaseVersion *string `json:"databaseVersion,omitempty" tf:"database_version,omitempty"` + +// Defaults to true. Defaults to true. +DeletionProtection *bool `json:"deletionProtection,omitempty" tf:"deletion_protection,omitempty"` + +// The full path to the encryption key used for the CMEK disk encryption. +// The provided key must be in the same region as the SQL instance. In order +// to use this feature, a special kind of service account must be created and +// granted permission on this key. This step can currently only be done +// manually, please see this step. +// That service account needs the Cloud KMS > Cloud KMS CryptoKey Encrypter/Decrypter role on your +// key - please see this step. +EncryptionKeyName *string `json:"encryptionKeyName,omitempty" tf:"encryption_key_name,omitempty"` + +// The current software version on the instance. This attribute can not be set during creation. Refer to available_maintenance_versions attribute to see what maintenance_version are available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting a maintenance_version value that is older than the current one on the instance will be ignored. +// Maintenance version. +MaintenanceVersion *string `json:"maintenanceVersion,omitempty" tf:"maintenance_version,omitempty"` + +// The name of the existing instance that will +// act as the master in the replication setup. Note, this requires the master to +// have binary_log_enabled set, as well as existing backups. +// The name of the instance that will act as the master in the replication setup. Note, this requires the master to have binary_log_enabled set, as well as existing backups. +MasterInstanceName *string `json:"masterInstanceName,omitempty" tf:"master_instance_name,omitempty"` + +// The ID of the project in which the resource belongs. If it +// is not provided, the provider project is used. +// The ID of the project in which the resource belongs. If it is not provided, the provider project is used. +Project *string `json:"project,omitempty" tf:"project,omitempty"` + +// The region the instance will sit in. If a region is not provided in the resource definition, +// the provider region will be used instead. +// The region the instance will sit in. Note, Cloud SQL is not available in all regions. A valid region must be provided to use this resource. If a region is not provided in the resource definition, the provider region will be used instead, but this will be an apply-time error for instances if the provider region is not supported with Cloud SQL. If you choose not to provide the region argument for this resource, make sure you understand this. +Region *string `json:"region,omitempty" tf:"region,omitempty"` + +// The configuration for replication. The +// configuration is detailed below. Valid only for MySQL instances. +// The configuration for replication. +ReplicaConfiguration []ReplicaConfigurationInitParameters `json:"replicaConfiguration,omitempty" tf:"replica_configuration,omitempty"` + +// The context needed to restore the database to a backup run. The configuration is detailed below. Adding or modifying this +// block during resource creation/update will trigger the restore action after the resource is created/updated. +RestoreBackupContext []RestoreBackupContextInitParameters `json:"restoreBackupContext,omitempty" tf:"restore_backup_context,omitempty"` + +// The settings to use for the database. The +// configuration is detailed below. Required if clone is not set. +// The settings to use for the database. The configuration is detailed below. +Settings []SettingsInitParameters `json:"settings,omitempty" tf:"settings,omitempty"` } + type DatabaseInstanceObservation struct { - // The list of all maintenance versions applicable on the instance. - // Available Maintenance versions. - AvailableMaintenanceVersions []*string `json:"availableMaintenanceVersions,omitempty" tf:"available_maintenance_versions,omitempty"` - - // The context needed to create this instance as a clone of another instance. The - // configuration is detailed below. - // Configuration for creating a new instance as a clone of another instance. - Clone []CloneObservation `json:"clone,omitempty" tf:"clone,omitempty"` - - // The connection name of the instance to be used in - // connection strings. For example, when connecting with Cloud SQL Proxy. - // The connection name of the instance to be used in connection strings. For example, when connecting with Cloud SQL Proxy. - ConnectionName *string `json:"connectionName,omitempty" tf:"connection_name,omitempty"` - - // The MySQL, PostgreSQL or - // SQL Server version to use. Supported values include MYSQL_5_6, - // MYSQL_5_7, MYSQL_8_0, POSTGRES_9_6,POSTGRES_10, POSTGRES_11, - // POSTGRES_12, POSTGRES_13, POSTGRES_14, SQLSERVER_2017_STANDARD, - // SQLSERVER_2017_ENTERPRISE, SQLSERVER_2017_EXPRESS, SQLSERVER_2017_WEB. - // SQLSERVER_2019_STANDARD, SQLSERVER_2019_ENTERPRISE, SQLSERVER_2019_EXPRESS, - // SQLSERVER_2019_WEB. - // Database Version Policies - // includes an up-to-date reference of supported versions. - // The MySQL, PostgreSQL or SQL Server (beta) version to use. Supported values include MYSQL_5_6, MYSQL_5_7, MYSQL_8_0, POSTGRES_9_6, POSTGRES_10, POSTGRES_11, POSTGRES_12, POSTGRES_13, POSTGRES_14, SQLSERVER_2017_STANDARD, SQLSERVER_2017_ENTERPRISE, SQLSERVER_2017_EXPRESS, SQLSERVER_2017_WEB. Database Version Policies includes an up-to-date reference of supported versions. - DatabaseVersion *string `json:"databaseVersion,omitempty" tf:"database_version,omitempty"` - - // Defaults to true. Defaults to true. - DeletionProtection *bool `json:"deletionProtection,omitempty" tf:"deletion_protection,omitempty"` - - // The full path to the encryption key used for the CMEK disk encryption. - // The provided key must be in the same region as the SQL instance. In order - // to use this feature, a special kind of service account must be created and - // granted permission on this key. This step can currently only be done - // manually, please see this step. - // That service account needs the Cloud KMS > Cloud KMS CryptoKey Encrypter/Decrypter role on your - // key - please see this step. - EncryptionKeyName *string `json:"encryptionKeyName,omitempty" tf:"encryption_key_name,omitempty"` - - // The first IPv4 address of any type assigned. - // The first IPv4 address of any type assigned. - FirstIPAddress *string `json:"firstIpAddress,omitempty" tf:"first_ip_address,omitempty"` - - ID *string `json:"id,omitempty" tf:"id,omitempty"` - - // The IPv4 address assigned. - IPAddress []IPAddressObservation `json:"ipAddress,omitempty" tf:"ip_address,omitempty"` - - // The type of the instance. The supported values are SQL_INSTANCE_TYPE_UNSPECIFIED, CLOUD_SQL_INSTANCE, ON_PREMISES_INSTANCE and READ_REPLICA_INSTANCE. - // The type of the instance. The valid values are:- 'SQL_INSTANCE_TYPE_UNSPECIFIED', 'CLOUD_SQL_INSTANCE', 'ON_PREMISES_INSTANCE' and 'READ_REPLICA_INSTANCE'. - InstanceType *string `json:"instanceType,omitempty" tf:"instance_type,omitempty"` - - // The current software version on the instance. This attribute can not be set during creation. Refer to available_maintenance_versions attribute to see what maintenance_version are available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting a maintenance_version value that is older than the current one on the instance will be ignored. - // Maintenance version. - MaintenanceVersion *string `json:"maintenanceVersion,omitempty" tf:"maintenance_version,omitempty"` - - // The name of the existing instance that will - // act as the master in the replication setup. Note, this requires the master to - // have binary_log_enabled set, as well as existing backups. - // The name of the instance that will act as the master in the replication setup. Note, this requires the master to have binary_log_enabled set, as well as existing backups. - MasterInstanceName *string `json:"masterInstanceName,omitempty" tf:"master_instance_name,omitempty"` - - // The first private (PRIVATE) IPv4 address assigned. - // IPv4 address assigned. - PrivateIPAddress *string `json:"privateIpAddress,omitempty" tf:"private_ip_address,omitempty"` - - // The ID of the project in which the resource belongs. If it - // is not provided, the provider project is used. - // The ID of the project in which the resource belongs. If it is not provided, the provider project is used. - Project *string `json:"project,omitempty" tf:"project,omitempty"` - - // The first public (PRIMARY) IPv4 address assigned. - // IPv4 address assigned. - PublicIPAddress *string `json:"publicIpAddress,omitempty" tf:"public_ip_address,omitempty"` - - // The region the instance will sit in. If a region is not provided in the resource definition, - // the provider region will be used instead. - // The region the instance will sit in. Note, Cloud SQL is not available in all regions. A valid region must be provided to use this resource. If a region is not provided in the resource definition, the provider region will be used instead, but this will be an apply-time error for instances if the provider region is not supported with Cloud SQL. If you choose not to provide the region argument for this resource, make sure you understand this. - Region *string `json:"region,omitempty" tf:"region,omitempty"` - - // The configuration for replication. The - // configuration is detailed below. Valid only for MySQL instances. - // The configuration for replication. - ReplicaConfiguration []ReplicaConfigurationObservation `json:"replicaConfiguration,omitempty" tf:"replica_configuration,omitempty"` - - // The context needed to restore the database to a backup run. The configuration is detailed below. Adding or modifying this - // block during resource creation/update will trigger the restore action after the resource is created/updated. - RestoreBackupContext []RestoreBackupContextObservation `json:"restoreBackupContext,omitempty" tf:"restore_backup_context,omitempty"` - - // The URI of the created resource. - // The URI of the created resource. - SelfLink *string `json:"selfLink,omitempty" tf:"self_link,omitempty"` - - ServerCACert []ServerCACertObservation `json:"serverCaCert,omitempty" tf:"server_ca_cert,omitempty"` - - // The service account email address assigned to the - // instance. - // The service account email address assigned to the instance. - ServiceAccountEmailAddress *string `json:"serviceAccountEmailAddress,omitempty" tf:"service_account_email_address,omitempty"` - - // The settings to use for the database. The - // configuration is detailed below. Required if clone is not set. - // The settings to use for the database. The configuration is detailed below. - Settings []SettingsObservation `json:"settings,omitempty" tf:"settings,omitempty"` + +// The list of all maintenance versions applicable on the instance. +// Available Maintenance versions. +AvailableMaintenanceVersions []*string `json:"availableMaintenanceVersions,omitempty" tf:"available_maintenance_versions,omitempty"` + +// The context needed to create this instance as a clone of another instance. The +// configuration is detailed below. +// Configuration for creating a new instance as a clone of another instance. +Clone []CloneObservation `json:"clone,omitempty" tf:"clone,omitempty"` + +// The connection name of the instance to be used in +// connection strings. For example, when connecting with Cloud SQL Proxy. +// The connection name of the instance to be used in connection strings. For example, when connecting with Cloud SQL Proxy. +ConnectionName *string `json:"connectionName,omitempty" tf:"connection_name,omitempty"` + +// The MySQL, PostgreSQL or +// SQL Server version to use. Supported values include MYSQL_5_6, +// MYSQL_5_7, MYSQL_8_0, POSTGRES_9_6,POSTGRES_10, POSTGRES_11, +// POSTGRES_12, POSTGRES_13, POSTGRES_14, SQLSERVER_2017_STANDARD, +// SQLSERVER_2017_ENTERPRISE, SQLSERVER_2017_EXPRESS, SQLSERVER_2017_WEB. +// SQLSERVER_2019_STANDARD, SQLSERVER_2019_ENTERPRISE, SQLSERVER_2019_EXPRESS, +// SQLSERVER_2019_WEB. +// Database Version Policies +// includes an up-to-date reference of supported versions. +// The MySQL, PostgreSQL or SQL Server (beta) version to use. Supported values include MYSQL_5_6, MYSQL_5_7, MYSQL_8_0, POSTGRES_9_6, POSTGRES_10, POSTGRES_11, POSTGRES_12, POSTGRES_13, POSTGRES_14, SQLSERVER_2017_STANDARD, SQLSERVER_2017_ENTERPRISE, SQLSERVER_2017_EXPRESS, SQLSERVER_2017_WEB. Database Version Policies includes an up-to-date reference of supported versions. +DatabaseVersion *string `json:"databaseVersion,omitempty" tf:"database_version,omitempty"` + +// Defaults to true. Defaults to true. +DeletionProtection *bool `json:"deletionProtection,omitempty" tf:"deletion_protection,omitempty"` + +// The full path to the encryption key used for the CMEK disk encryption. +// The provided key must be in the same region as the SQL instance. In order +// to use this feature, a special kind of service account must be created and +// granted permission on this key. This step can currently only be done +// manually, please see this step. +// That service account needs the Cloud KMS > Cloud KMS CryptoKey Encrypter/Decrypter role on your +// key - please see this step. +EncryptionKeyName *string `json:"encryptionKeyName,omitempty" tf:"encryption_key_name,omitempty"` + +// The first IPv4 address of any type assigned. +// The first IPv4 address of any type assigned. +FirstIPAddress *string `json:"firstIpAddress,omitempty" tf:"first_ip_address,omitempty"` + +ID *string `json:"id,omitempty" tf:"id,omitempty"` + +// The IPv4 address assigned. +IPAddress []IPAddressObservation `json:"ipAddress,omitempty" tf:"ip_address,omitempty"` + +// The type of the instance. The supported values are SQL_INSTANCE_TYPE_UNSPECIFIED, CLOUD_SQL_INSTANCE, ON_PREMISES_INSTANCE and READ_REPLICA_INSTANCE. +// The type of the instance. The valid values are:- 'SQL_INSTANCE_TYPE_UNSPECIFIED', 'CLOUD_SQL_INSTANCE', 'ON_PREMISES_INSTANCE' and 'READ_REPLICA_INSTANCE'. +InstanceType *string `json:"instanceType,omitempty" tf:"instance_type,omitempty"` + +// The current software version on the instance. This attribute can not be set during creation. Refer to available_maintenance_versions attribute to see what maintenance_version are available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting a maintenance_version value that is older than the current one on the instance will be ignored. +// Maintenance version. +MaintenanceVersion *string `json:"maintenanceVersion,omitempty" tf:"maintenance_version,omitempty"` + +// The name of the existing instance that will +// act as the master in the replication setup. Note, this requires the master to +// have binary_log_enabled set, as well as existing backups. +// The name of the instance that will act as the master in the replication setup. Note, this requires the master to have binary_log_enabled set, as well as existing backups. +MasterInstanceName *string `json:"masterInstanceName,omitempty" tf:"master_instance_name,omitempty"` + +// The first private (PRIVATE) IPv4 address assigned. +// IPv4 address assigned. +PrivateIPAddress *string `json:"privateIpAddress,omitempty" tf:"private_ip_address,omitempty"` + +// The ID of the project in which the resource belongs. If it +// is not provided, the provider project is used. +// The ID of the project in which the resource belongs. If it is not provided, the provider project is used. +Project *string `json:"project,omitempty" tf:"project,omitempty"` + +// The first public (PRIMARY) IPv4 address assigned. +// IPv4 address assigned. +PublicIPAddress *string `json:"publicIpAddress,omitempty" tf:"public_ip_address,omitempty"` + +// The region the instance will sit in. If a region is not provided in the resource definition, +// the provider region will be used instead. +// The region the instance will sit in. Note, Cloud SQL is not available in all regions. A valid region must be provided to use this resource. If a region is not provided in the resource definition, the provider region will be used instead, but this will be an apply-time error for instances if the provider region is not supported with Cloud SQL. If you choose not to provide the region argument for this resource, make sure you understand this. +Region *string `json:"region,omitempty" tf:"region,omitempty"` + +// The configuration for replication. The +// configuration is detailed below. Valid only for MySQL instances. +// The configuration for replication. +ReplicaConfiguration []ReplicaConfigurationObservation `json:"replicaConfiguration,omitempty" tf:"replica_configuration,omitempty"` + +// The context needed to restore the database to a backup run. The configuration is detailed below. Adding or modifying this +// block during resource creation/update will trigger the restore action after the resource is created/updated. +RestoreBackupContext []RestoreBackupContextObservation `json:"restoreBackupContext,omitempty" tf:"restore_backup_context,omitempty"` + +// The URI of the created resource. +// The URI of the created resource. +SelfLink *string `json:"selfLink,omitempty" tf:"self_link,omitempty"` + +ServerCACert []ServerCACertObservation `json:"serverCaCert,omitempty" tf:"server_ca_cert,omitempty"` + +// The service account email address assigned to the +// instance. +// The service account email address assigned to the instance. +ServiceAccountEmailAddress *string `json:"serviceAccountEmailAddress,omitempty" tf:"service_account_email_address,omitempty"` + +// The settings to use for the database. The +// configuration is detailed below. Required if clone is not set. +// The settings to use for the database. The configuration is detailed below. +Settings []SettingsObservation `json:"settings,omitempty" tf:"settings,omitempty"` } + type DatabaseInstanceParameters struct { - // The context needed to create this instance as a clone of another instance. The - // configuration is detailed below. - // Configuration for creating a new instance as a clone of another instance. - // +kubebuilder:validation:Optional - Clone []CloneParameters `json:"clone,omitempty" tf:"clone,omitempty"` - - // The MySQL, PostgreSQL or - // SQL Server version to use. Supported values include MYSQL_5_6, - // MYSQL_5_7, MYSQL_8_0, POSTGRES_9_6,POSTGRES_10, POSTGRES_11, - // POSTGRES_12, POSTGRES_13, POSTGRES_14, SQLSERVER_2017_STANDARD, - // SQLSERVER_2017_ENTERPRISE, SQLSERVER_2017_EXPRESS, SQLSERVER_2017_WEB. - // SQLSERVER_2019_STANDARD, SQLSERVER_2019_ENTERPRISE, SQLSERVER_2019_EXPRESS, - // SQLSERVER_2019_WEB. - // Database Version Policies - // includes an up-to-date reference of supported versions. - // The MySQL, PostgreSQL or SQL Server (beta) version to use. Supported values include MYSQL_5_6, MYSQL_5_7, MYSQL_8_0, POSTGRES_9_6, POSTGRES_10, POSTGRES_11, POSTGRES_12, POSTGRES_13, POSTGRES_14, SQLSERVER_2017_STANDARD, SQLSERVER_2017_ENTERPRISE, SQLSERVER_2017_EXPRESS, SQLSERVER_2017_WEB. Database Version Policies includes an up-to-date reference of supported versions. - // +kubebuilder:validation:Optional - DatabaseVersion *string `json:"databaseVersion,omitempty" tf:"database_version,omitempty"` - - // Defaults to true. Defaults to true. - // +kubebuilder:validation:Optional - DeletionProtection *bool `json:"deletionProtection,omitempty" tf:"deletion_protection,omitempty"` - - // The full path to the encryption key used for the CMEK disk encryption. - // The provided key must be in the same region as the SQL instance. In order - // to use this feature, a special kind of service account must be created and - // granted permission on this key. This step can currently only be done - // manually, please see this step. - // That service account needs the Cloud KMS > Cloud KMS CryptoKey Encrypter/Decrypter role on your - // key - please see this step. - // +kubebuilder:validation:Optional - EncryptionKeyName *string `json:"encryptionKeyName,omitempty" tf:"encryption_key_name,omitempty"` - - // The current software version on the instance. This attribute can not be set during creation. Refer to available_maintenance_versions attribute to see what maintenance_version are available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting a maintenance_version value that is older than the current one on the instance will be ignored. - // Maintenance version. - // +kubebuilder:validation:Optional - MaintenanceVersion *string `json:"maintenanceVersion,omitempty" tf:"maintenance_version,omitempty"` - - // The name of the existing instance that will - // act as the master in the replication setup. Note, this requires the master to - // have binary_log_enabled set, as well as existing backups. - // The name of the instance that will act as the master in the replication setup. Note, this requires the master to have binary_log_enabled set, as well as existing backups. - // +kubebuilder:validation:Optional - MasterInstanceName *string `json:"masterInstanceName,omitempty" tf:"master_instance_name,omitempty"` - - // The ID of the project in which the resource belongs. If it - // is not provided, the provider project is used. - // The ID of the project in which the resource belongs. If it is not provided, the provider project is used. - // +kubebuilder:validation:Optional - Project *string `json:"project,omitempty" tf:"project,omitempty"` - - // The region the instance will sit in. If a region is not provided in the resource definition, - // the provider region will be used instead. - // The region the instance will sit in. Note, Cloud SQL is not available in all regions. A valid region must be provided to use this resource. If a region is not provided in the resource definition, the provider region will be used instead, but this will be an apply-time error for instances if the provider region is not supported with Cloud SQL. If you choose not to provide the region argument for this resource, make sure you understand this. - // +kubebuilder:validation:Optional - Region *string `json:"region,omitempty" tf:"region,omitempty"` - - // The configuration for replication. The - // configuration is detailed below. Valid only for MySQL instances. - // The configuration for replication. - // +kubebuilder:validation:Optional - ReplicaConfiguration []ReplicaConfigurationParameters `json:"replicaConfiguration,omitempty" tf:"replica_configuration,omitempty"` - - // The context needed to restore the database to a backup run. The configuration is detailed below. Adding or modifying this - // block during resource creation/update will trigger the restore action after the resource is created/updated. - // +kubebuilder:validation:Optional - RestoreBackupContext []RestoreBackupContextParameters `json:"restoreBackupContext,omitempty" tf:"restore_backup_context,omitempty"` - - // Initial root password. Can be updated. Required for MS SQL Server. - // Initial root password. Required for MS SQL Server. - // +kubebuilder:validation:Optional - RootPasswordSecretRef *v1.SecretKeySelector `json:"rootPasswordSecretRef,omitempty" tf:"-"` - - // The settings to use for the database. The - // configuration is detailed below. Required if clone is not set. - // The settings to use for the database. The configuration is detailed below. - // +kubebuilder:validation:Optional - Settings []SettingsParameters `json:"settings,omitempty" tf:"settings,omitempty"` + +// The context needed to create this instance as a clone of another instance. The +// configuration is detailed below. +// Configuration for creating a new instance as a clone of another instance. +// +kubebuilder:validation:Optional +Clone []CloneParameters `json:"clone,omitempty" tf:"clone,omitempty"` + +// The MySQL, PostgreSQL or +// SQL Server version to use. Supported values include MYSQL_5_6, +// MYSQL_5_7, MYSQL_8_0, POSTGRES_9_6,POSTGRES_10, POSTGRES_11, +// POSTGRES_12, POSTGRES_13, POSTGRES_14, SQLSERVER_2017_STANDARD, +// SQLSERVER_2017_ENTERPRISE, SQLSERVER_2017_EXPRESS, SQLSERVER_2017_WEB. +// SQLSERVER_2019_STANDARD, SQLSERVER_2019_ENTERPRISE, SQLSERVER_2019_EXPRESS, +// SQLSERVER_2019_WEB. +// Database Version Policies +// includes an up-to-date reference of supported versions. +// The MySQL, PostgreSQL or SQL Server (beta) version to use. Supported values include MYSQL_5_6, MYSQL_5_7, MYSQL_8_0, POSTGRES_9_6, POSTGRES_10, POSTGRES_11, POSTGRES_12, POSTGRES_13, POSTGRES_14, SQLSERVER_2017_STANDARD, SQLSERVER_2017_ENTERPRISE, SQLSERVER_2017_EXPRESS, SQLSERVER_2017_WEB. Database Version Policies includes an up-to-date reference of supported versions. +// +kubebuilder:validation:Optional +DatabaseVersion *string `json:"databaseVersion,omitempty" tf:"database_version,omitempty"` + +// Defaults to true. Defaults to true. +// +kubebuilder:validation:Optional +DeletionProtection *bool `json:"deletionProtection,omitempty" tf:"deletion_protection,omitempty"` + +// The full path to the encryption key used for the CMEK disk encryption. +// The provided key must be in the same region as the SQL instance. In order +// to use this feature, a special kind of service account must be created and +// granted permission on this key. This step can currently only be done +// manually, please see this step. +// That service account needs the Cloud KMS > Cloud KMS CryptoKey Encrypter/Decrypter role on your +// key - please see this step. +// +kubebuilder:validation:Optional +EncryptionKeyName *string `json:"encryptionKeyName,omitempty" tf:"encryption_key_name,omitempty"` + +// The current software version on the instance. This attribute can not be set during creation. Refer to available_maintenance_versions attribute to see what maintenance_version are available for upgrade. When this attribute gets updated, it will cause an instance restart. Setting a maintenance_version value that is older than the current one on the instance will be ignored. +// Maintenance version. +// +kubebuilder:validation:Optional +MaintenanceVersion *string `json:"maintenanceVersion,omitempty" tf:"maintenance_version,omitempty"` + +// The name of the existing instance that will +// act as the master in the replication setup. Note, this requires the master to +// have binary_log_enabled set, as well as existing backups. +// The name of the instance that will act as the master in the replication setup. Note, this requires the master to have binary_log_enabled set, as well as existing backups. +// +kubebuilder:validation:Optional +MasterInstanceName *string `json:"masterInstanceName,omitempty" tf:"master_instance_name,omitempty"` + +// The ID of the project in which the resource belongs. If it +// is not provided, the provider project is used. +// The ID of the project in which the resource belongs. If it is not provided, the provider project is used. +// +kubebuilder:validation:Optional +Project *string `json:"project,omitempty" tf:"project,omitempty"` + +// The region the instance will sit in. If a region is not provided in the resource definition, +// the provider region will be used instead. +// The region the instance will sit in. Note, Cloud SQL is not available in all regions. A valid region must be provided to use this resource. If a region is not provided in the resource definition, the provider region will be used instead, but this will be an apply-time error for instances if the provider region is not supported with Cloud SQL. If you choose not to provide the region argument for this resource, make sure you understand this. +// +kubebuilder:validation:Optional +Region *string `json:"region,omitempty" tf:"region,omitempty"` + +// The configuration for replication. The +// configuration is detailed below. Valid only for MySQL instances. +// The configuration for replication. +// +kubebuilder:validation:Optional +ReplicaConfiguration []ReplicaConfigurationParameters `json:"replicaConfiguration,omitempty" tf:"replica_configuration,omitempty"` + +// The context needed to restore the database to a backup run. The configuration is detailed below. Adding or modifying this +// block during resource creation/update will trigger the restore action after the resource is created/updated. +// +kubebuilder:validation:Optional +RestoreBackupContext []RestoreBackupContextParameters `json:"restoreBackupContext,omitempty" tf:"restore_backup_context,omitempty"` + +// Initial root password. Can be updated. Required for MS SQL Server. +// Initial root password. Required for MS SQL Server. +// +kubebuilder:validation:Optional +RootPasswordSecretRef *v1.SecretKeySelector `json:"rootPasswordSecretRef,omitempty" tf:"-"` + +// The settings to use for the database. The +// configuration is detailed below. Required if clone is not set. +// The settings to use for the database. The configuration is detailed below. +// +kubebuilder:validation:Optional +Settings []SettingsParameters `json:"settings,omitempty" tf:"settings,omitempty"` } + type DenyMaintenancePeriodInitParameters struct { - // "deny maintenance period" end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the no maintenance interval recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 - // End date before which maintenance will not take place. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 - EndDate *string `json:"endDate,omitempty" tf:"end_date,omitempty"` - // "deny maintenance period" start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 - // Start date after which maintenance will not take place. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 - StartDate *string `json:"startDate,omitempty" tf:"start_date,omitempty"` +// "deny maintenance period" end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the no maintenance interval recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 +// End date before which maintenance will not take place. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 +EndDate *string `json:"endDate,omitempty" tf:"end_date,omitempty"` + +// "deny maintenance period" start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 +// Start date after which maintenance will not take place. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 +StartDate *string `json:"startDate,omitempty" tf:"start_date,omitempty"` - // Time in UTC when the "deny maintenance period" starts on startDate and ends on endDate. The time is in format: HH:mm:SS, i.e., 00:00:00 - // Time in UTC when the "deny maintenance period" starts on start_date and ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00 - Time *string `json:"time,omitempty" tf:"time,omitempty"` +// Time in UTC when the "deny maintenance period" starts on startDate and ends on endDate. The time is in format: HH:mm:SS, i.e., 00:00:00 +// Time in UTC when the "deny maintenance period" starts on start_date and ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00 +Time *string `json:"time,omitempty" tf:"time,omitempty"` } + type DenyMaintenancePeriodObservation struct { - // "deny maintenance period" end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the no maintenance interval recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 - // End date before which maintenance will not take place. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 - EndDate *string `json:"endDate,omitempty" tf:"end_date,omitempty"` - // "deny maintenance period" start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 - // Start date after which maintenance will not take place. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 - StartDate *string `json:"startDate,omitempty" tf:"start_date,omitempty"` +// "deny maintenance period" end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the no maintenance interval recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 +// End date before which maintenance will not take place. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 +EndDate *string `json:"endDate,omitempty" tf:"end_date,omitempty"` + +// "deny maintenance period" start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 +// Start date after which maintenance will not take place. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 +StartDate *string `json:"startDate,omitempty" tf:"start_date,omitempty"` - // Time in UTC when the "deny maintenance period" starts on startDate and ends on endDate. The time is in format: HH:mm:SS, i.e., 00:00:00 - // Time in UTC when the "deny maintenance period" starts on start_date and ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00 - Time *string `json:"time,omitempty" tf:"time,omitempty"` +// Time in UTC when the "deny maintenance period" starts on startDate and ends on endDate. The time is in format: HH:mm:SS, i.e., 00:00:00 +// Time in UTC when the "deny maintenance period" starts on start_date and ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00 +Time *string `json:"time,omitempty" tf:"time,omitempty"` } + type DenyMaintenancePeriodParameters struct { - // "deny maintenance period" end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the no maintenance interval recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 - // End date before which maintenance will not take place. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 - // +kubebuilder:validation:Optional - EndDate *string `json:"endDate" tf:"end_date,omitempty"` - // "deny maintenance period" start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 - // Start date after which maintenance will not take place. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 - // +kubebuilder:validation:Optional - StartDate *string `json:"startDate" tf:"start_date,omitempty"` +// "deny maintenance period" end date. If the year of the end date is empty, the year of the start date also must be empty. In this case, it means the no maintenance interval recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 +// End date before which maintenance will not take place. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 +// +kubebuilder:validation:Optional +EndDate *string `json:"endDate" tf:"end_date,omitempty"` + +// "deny maintenance period" start date. If the year of the start date is empty, the year of the end date also must be empty. In this case, it means the deny maintenance period recurs every year. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 +// Start date after which maintenance will not take place. The date is in format yyyy-mm-dd i.e., 2020-11-01, or mm-dd, i.e., 11-01 +// +kubebuilder:validation:Optional +StartDate *string `json:"startDate" tf:"start_date,omitempty"` - // Time in UTC when the "deny maintenance period" starts on startDate and ends on endDate. The time is in format: HH:mm:SS, i.e., 00:00:00 - // Time in UTC when the "deny maintenance period" starts on start_date and ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00 - // +kubebuilder:validation:Optional - Time *string `json:"time" tf:"time,omitempty"` +// Time in UTC when the "deny maintenance period" starts on startDate and ends on endDate. The time is in format: HH:mm:SS, i.e., 00:00:00 +// Time in UTC when the "deny maintenance period" starts on start_date and ends on end_date. The time is in format: HH:mm:SS, i.e., 00:00:00 +// +kubebuilder:validation:Optional +Time *string `json:"time" tf:"time,omitempty"` } + type IPAddressInitParameters struct { + } + type IPAddressObservation struct { - // The IPv4 address assigned. - IPAddress *string `json:"ipAddress,omitempty" tf:"ip_address,omitempty"` - // The time this IP address will be retired, in RFC - // 3339 format. - TimeToRetire *string `json:"timeToRetire,omitempty" tf:"time_to_retire,omitempty"` +// The IPv4 address assigned. +IPAddress *string `json:"ipAddress,omitempty" tf:"ip_address,omitempty"` + +// The time this IP address will be retired, in RFC +// 3339 format. +TimeToRetire *string `json:"timeToRetire,omitempty" tf:"time_to_retire,omitempty"` - // The type of this IP address. - Type *string `json:"type,omitempty" tf:"type,omitempty"` +// The type of this IP address. +Type *string `json:"type,omitempty" tf:"type,omitempty"` } + type IPAddressParameters struct { + } + type IPConfigurationInitParameters struct { - // The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the instance ip will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z?. - // The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the instance ip will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. - AllocatedIPRange *string `json:"allocatedIpRange,omitempty" tf:"allocated_ip_range,omitempty"` - AuthorizedNetworks []AuthorizedNetworksInitParameters `json:"authorizedNetworks,omitempty" tf:"authorized_networks,omitempty"` +// The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the instance ip will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z?. +// The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the instance ip will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. +AllocatedIPRange *string `json:"allocatedIpRange,omitempty" tf:"allocated_ip_range,omitempty"` + +AuthorizedNetworks []AuthorizedNetworksInitParameters `json:"authorizedNetworks,omitempty" tf:"authorized_networks,omitempty"` - // Whether Google Cloud services such as BigQuery are allowed to access data in this Cloud SQL instance over a private IP connection. SQLSERVER database type is not supported. - // Whether Google Cloud services such as BigQuery are allowed to access data in this Cloud SQL instance over a private IP connection. SQLSERVER database type is not supported. - EnablePrivatePathForGoogleCloudServices *bool `json:"enablePrivatePathForGoogleCloudServices,omitempty" tf:"enable_private_path_for_google_cloud_services,omitempty"` +// Whether Google Cloud services such as BigQuery are allowed to access data in this Cloud SQL instance over a private IP connection. SQLSERVER database type is not supported. +// Whether Google Cloud services such as BigQuery are allowed to access data in this Cloud SQL instance over a private IP connection. SQLSERVER database type is not supported. +EnablePrivatePathForGoogleCloudServices *bool `json:"enablePrivatePathForGoogleCloudServices,omitempty" tf:"enable_private_path_for_google_cloud_services,omitempty"` - // Whether this Cloud SQL instance should be assigned - // a public IPV4 address. At least ipv4_enabled must be enabled or a - // private_network must be configured. - // Whether this Cloud SQL instance should be assigned a public IPV4 address. At least ipv4_enabled must be enabled or a private_network must be configured. - IPv4Enabled *bool `json:"ipv4Enabled,omitempty" tf:"ipv4_enabled,omitempty"` +// Whether this Cloud SQL instance should be assigned +// a public IPV4 address. At least ipv4_enabled must be enabled or a +// private_network must be configured. +// Whether this Cloud SQL instance should be assigned a public IPV4 address. At least ipv4_enabled must be enabled or a private_network must be configured. +IPv4Enabled *bool `json:"ipv4Enabled,omitempty" tf:"ipv4_enabled,omitempty"` - // Whether SSL connections over IP are enforced or not. - RequireSSL *bool `json:"requireSsl,omitempty" tf:"require_ssl,omitempty"` +// Whether SSL connections over IP are enforced or not. +RequireSSL *bool `json:"requireSsl,omitempty" tf:"require_ssl,omitempty"` } + type IPConfigurationObservation struct { - // The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the instance ip will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z?. - // The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the instance ip will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. - AllocatedIPRange *string `json:"allocatedIpRange,omitempty" tf:"allocated_ip_range,omitempty"` - AuthorizedNetworks []AuthorizedNetworksObservation `json:"authorizedNetworks,omitempty" tf:"authorized_networks,omitempty"` +// The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the instance ip will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z?. +// The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the instance ip will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. +AllocatedIPRange *string `json:"allocatedIpRange,omitempty" tf:"allocated_ip_range,omitempty"` + +AuthorizedNetworks []AuthorizedNetworksObservation `json:"authorizedNetworks,omitempty" tf:"authorized_networks,omitempty"` - // Whether Google Cloud services such as BigQuery are allowed to access data in this Cloud SQL instance over a private IP connection. SQLSERVER database type is not supported. - // Whether Google Cloud services such as BigQuery are allowed to access data in this Cloud SQL instance over a private IP connection. SQLSERVER database type is not supported. - EnablePrivatePathForGoogleCloudServices *bool `json:"enablePrivatePathForGoogleCloudServices,omitempty" tf:"enable_private_path_for_google_cloud_services,omitempty"` +// Whether Google Cloud services such as BigQuery are allowed to access data in this Cloud SQL instance over a private IP connection. SQLSERVER database type is not supported. +// Whether Google Cloud services such as BigQuery are allowed to access data in this Cloud SQL instance over a private IP connection. SQLSERVER database type is not supported. +EnablePrivatePathForGoogleCloudServices *bool `json:"enablePrivatePathForGoogleCloudServices,omitempty" tf:"enable_private_path_for_google_cloud_services,omitempty"` - // Whether this Cloud SQL instance should be assigned - // a public IPV4 address. At least ipv4_enabled must be enabled or a - // private_network must be configured. - // Whether this Cloud SQL instance should be assigned a public IPV4 address. At least ipv4_enabled must be enabled or a private_network must be configured. - IPv4Enabled *bool `json:"ipv4Enabled,omitempty" tf:"ipv4_enabled,omitempty"` +// Whether this Cloud SQL instance should be assigned +// a public IPV4 address. At least ipv4_enabled must be enabled or a +// private_network must be configured. +// Whether this Cloud SQL instance should be assigned a public IPV4 address. At least ipv4_enabled must be enabled or a private_network must be configured. +IPv4Enabled *bool `json:"ipv4Enabled,omitempty" tf:"ipv4_enabled,omitempty"` - // The VPC network from which the Cloud SQL - // instance is accessible for private IP. For example, projects/myProject/global/networks/default. - // Specifying a network enables private IP. - // At least ipv4_enabled must be enabled or a private_network must be configured. - // This setting can be updated, but it cannot be removed after it is set. - // The VPC network from which the Cloud SQL instance is accessible for private IP. For example, projects/myProject/global/networks/default. Specifying a network enables private IP. At least ipv4_enabled must be enabled or a private_network must be configured. This setting can be updated, but it cannot be removed after it is set. - PrivateNetwork *string `json:"privateNetwork,omitempty" tf:"private_network,omitempty"` +// The VPC network from which the Cloud SQL +// instance is accessible for private IP. For example, projects/myProject/global/networks/default. +// Specifying a network enables private IP. +// At least ipv4_enabled must be enabled or a private_network must be configured. +// This setting can be updated, but it cannot be removed after it is set. +// The VPC network from which the Cloud SQL instance is accessible for private IP. For example, projects/myProject/global/networks/default. Specifying a network enables private IP. At least ipv4_enabled must be enabled or a private_network must be configured. This setting can be updated, but it cannot be removed after it is set. +PrivateNetwork *string `json:"privateNetwork,omitempty" tf:"private_network,omitempty"` - // Whether SSL connections over IP are enforced or not. - RequireSSL *bool `json:"requireSsl,omitempty" tf:"require_ssl,omitempty"` +// Whether SSL connections over IP are enforced or not. +RequireSSL *bool `json:"requireSsl,omitempty" tf:"require_ssl,omitempty"` } + type IPConfigurationParameters struct { - // The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the instance ip will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z?. - // The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the instance ip will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. - // +kubebuilder:validation:Optional - AllocatedIPRange *string `json:"allocatedIpRange,omitempty" tf:"allocated_ip_range,omitempty"` - - // +kubebuilder:validation:Optional - AuthorizedNetworks []AuthorizedNetworksParameters `json:"authorizedNetworks,omitempty" tf:"authorized_networks,omitempty"` - - // Whether Google Cloud services such as BigQuery are allowed to access data in this Cloud SQL instance over a private IP connection. SQLSERVER database type is not supported. - // Whether Google Cloud services such as BigQuery are allowed to access data in this Cloud SQL instance over a private IP connection. SQLSERVER database type is not supported. - // +kubebuilder:validation:Optional - EnablePrivatePathForGoogleCloudServices *bool `json:"enablePrivatePathForGoogleCloudServices,omitempty" tf:"enable_private_path_for_google_cloud_services,omitempty"` - - // Whether this Cloud SQL instance should be assigned - // a public IPV4 address. At least ipv4_enabled must be enabled or a - // private_network must be configured. - // Whether this Cloud SQL instance should be assigned a public IPV4 address. At least ipv4_enabled must be enabled or a private_network must be configured. - // +kubebuilder:validation:Optional - IPv4Enabled *bool `json:"ipv4Enabled,omitempty" tf:"ipv4_enabled,omitempty"` - - // The VPC network from which the Cloud SQL - // instance is accessible for private IP. For example, projects/myProject/global/networks/default. - // Specifying a network enables private IP. - // At least ipv4_enabled must be enabled or a private_network must be configured. - // This setting can be updated, but it cannot be removed after it is set. - // The VPC network from which the Cloud SQL instance is accessible for private IP. For example, projects/myProject/global/networks/default. Specifying a network enables private IP. At least ipv4_enabled must be enabled or a private_network must be configured. This setting can be updated, but it cannot be removed after it is set. - // +crossplane:generate:reference:type=kubedb.dev/provider-gcp/apis/compute/v1alpha1.Network - // +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() - // +kubebuilder:validation:Optional - PrivateNetwork *string `json:"privateNetwork,omitempty" tf:"private_network,omitempty"` - - // Reference to a Network in compute to populate privateNetwork. - // +kubebuilder:validation:Optional - PrivateNetworkRef *v1.Reference `json:"privateNetworkRef,omitempty" tf:"-"` - - // Selector for a Network in compute to populate privateNetwork. - // +kubebuilder:validation:Optional - PrivateNetworkSelector *v1.Selector `json:"privateNetworkSelector,omitempty" tf:"-"` - - // Whether SSL connections over IP are enforced or not. - // +kubebuilder:validation:Optional - RequireSSL *bool `json:"requireSsl,omitempty" tf:"require_ssl,omitempty"` + +// The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the instance ip will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression a-z?. +// The name of the allocated ip range for the private ip CloudSQL instance. For example: "google-managed-services-default". If set, the instance ip will be created in the allocated range. The range name must comply with RFC 1035. Specifically, the name must be 1-63 characters long and match the regular expression [a-z]([-a-z0-9]*[a-z0-9])?. +// +kubebuilder:validation:Optional +AllocatedIPRange *string `json:"allocatedIpRange,omitempty" tf:"allocated_ip_range,omitempty"` + +// +kubebuilder:validation:Optional +AuthorizedNetworks []AuthorizedNetworksParameters `json:"authorizedNetworks,omitempty" tf:"authorized_networks,omitempty"` + +// Whether Google Cloud services such as BigQuery are allowed to access data in this Cloud SQL instance over a private IP connection. SQLSERVER database type is not supported. +// Whether Google Cloud services such as BigQuery are allowed to access data in this Cloud SQL instance over a private IP connection. SQLSERVER database type is not supported. +// +kubebuilder:validation:Optional +EnablePrivatePathForGoogleCloudServices *bool `json:"enablePrivatePathForGoogleCloudServices,omitempty" tf:"enable_private_path_for_google_cloud_services,omitempty"` + +// Whether this Cloud SQL instance should be assigned +// a public IPV4 address. At least ipv4_enabled must be enabled or a +// private_network must be configured. +// Whether this Cloud SQL instance should be assigned a public IPV4 address. At least ipv4_enabled must be enabled or a private_network must be configured. +// +kubebuilder:validation:Optional +IPv4Enabled *bool `json:"ipv4Enabled,omitempty" tf:"ipv4_enabled,omitempty"` + +// The VPC network from which the Cloud SQL +// instance is accessible for private IP. For example, projects/myProject/global/networks/default. +// Specifying a network enables private IP. +// At least ipv4_enabled must be enabled or a private_network must be configured. +// This setting can be updated, but it cannot be removed after it is set. +// The VPC network from which the Cloud SQL instance is accessible for private IP. For example, projects/myProject/global/networks/default. Specifying a network enables private IP. At least ipv4_enabled must be enabled or a private_network must be configured. This setting can be updated, but it cannot be removed after it is set. +// +crossplane:generate:reference:type=kubedb.dev/provider-gcp/apis/compute/v1alpha1.Network +// +crossplane:generate:reference:extractor=github.com/crossplane/upjet/pkg/resource.ExtractResourceID() +// +kubebuilder:validation:Optional +PrivateNetwork *string `json:"privateNetwork,omitempty" tf:"private_network,omitempty"` + +// Reference to a Network in compute to populate privateNetwork. +// +kubebuilder:validation:Optional +PrivateNetworkRef *v1.Reference `json:"privateNetworkRef,omitempty" tf:"-"` + +// Selector for a Network in compute to populate privateNetwork. +// +kubebuilder:validation:Optional +PrivateNetworkSelector *v1.Selector `json:"privateNetworkSelector,omitempty" tf:"-"` + +// Whether SSL connections over IP are enforced or not. +// +kubebuilder:validation:Optional +RequireSSL *bool `json:"requireSsl,omitempty" tf:"require_ssl,omitempty"` } + type InsightsConfigInitParameters struct { - // True if Query Insights feature is enabled. - // True if Query Insights feature is enabled. - QueryInsightsEnabled *bool `json:"queryInsightsEnabled,omitempty" tf:"query_insights_enabled,omitempty"` - // Number of query execution plans captured by Insights per minute for all queries combined. Between 0 and 20. Default to 5. - // Number of query execution plans captured by Insights per minute for all queries combined. Between 0 and 20. Default to 5. - QueryPlansPerMinute *float64 `json:"queryPlansPerMinute,omitempty" tf:"query_plans_per_minute,omitempty"` +// True if Query Insights feature is enabled. +// True if Query Insights feature is enabled. +QueryInsightsEnabled *bool `json:"queryInsightsEnabled,omitempty" tf:"query_insights_enabled,omitempty"` + +// Number of query execution plans captured by Insights per minute for all queries combined. Between 0 and 20. Default to 5. +// Number of query execution plans captured by Insights per minute for all queries combined. Between 0 and 20. Default to 5. +QueryPlansPerMinute *float64 `json:"queryPlansPerMinute,omitempty" tf:"query_plans_per_minute,omitempty"` - // Maximum query length stored in bytes. Between 256 and 4500. Default to 1024. Higher query lengths are more useful for analytical queries, but they also require more memory. Changing the query length requires you to restart the instance. You can still add tags to queries that exceed the length limit. - // Maximum query length stored in bytes. Between 256 and 4500. Default to 1024. - QueryStringLength *float64 `json:"queryStringLength,omitempty" tf:"query_string_length,omitempty"` +// Maximum query length stored in bytes. Between 256 and 4500. Default to 1024. Higher query lengths are more useful for analytical queries, but they also require more memory. Changing the query length requires you to restart the instance. You can still add tags to queries that exceed the length limit. +// Maximum query length stored in bytes. Between 256 and 4500. Default to 1024. +QueryStringLength *float64 `json:"queryStringLength,omitempty" tf:"query_string_length,omitempty"` - // True if Query Insights will record application tags from query when enabled. - // True if Query Insights will record application tags from query when enabled. - RecordApplicationTags *bool `json:"recordApplicationTags,omitempty" tf:"record_application_tags,omitempty"` +// True if Query Insights will record application tags from query when enabled. +// True if Query Insights will record application tags from query when enabled. +RecordApplicationTags *bool `json:"recordApplicationTags,omitempty" tf:"record_application_tags,omitempty"` - // True if Query Insights will record client address when enabled. - // True if Query Insights will record client address when enabled. - RecordClientAddress *bool `json:"recordClientAddress,omitempty" tf:"record_client_address,omitempty"` +// True if Query Insights will record client address when enabled. +// True if Query Insights will record client address when enabled. +RecordClientAddress *bool `json:"recordClientAddress,omitempty" tf:"record_client_address,omitempty"` } + type InsightsConfigObservation struct { - // True if Query Insights feature is enabled. - // True if Query Insights feature is enabled. - QueryInsightsEnabled *bool `json:"queryInsightsEnabled,omitempty" tf:"query_insights_enabled,omitempty"` - // Number of query execution plans captured by Insights per minute for all queries combined. Between 0 and 20. Default to 5. - // Number of query execution plans captured by Insights per minute for all queries combined. Between 0 and 20. Default to 5. - QueryPlansPerMinute *float64 `json:"queryPlansPerMinute,omitempty" tf:"query_plans_per_minute,omitempty"` +// True if Query Insights feature is enabled. +// True if Query Insights feature is enabled. +QueryInsightsEnabled *bool `json:"queryInsightsEnabled,omitempty" tf:"query_insights_enabled,omitempty"` + +// Number of query execution plans captured by Insights per minute for all queries combined. Between 0 and 20. Default to 5. +// Number of query execution plans captured by Insights per minute for all queries combined. Between 0 and 20. Default to 5. +QueryPlansPerMinute *float64 `json:"queryPlansPerMinute,omitempty" tf:"query_plans_per_minute,omitempty"` - // Maximum query length stored in bytes. Between 256 and 4500. Default to 1024. Higher query lengths are more useful for analytical queries, but they also require more memory. Changing the query length requires you to restart the instance. You can still add tags to queries that exceed the length limit. - // Maximum query length stored in bytes. Between 256 and 4500. Default to 1024. - QueryStringLength *float64 `json:"queryStringLength,omitempty" tf:"query_string_length,omitempty"` +// Maximum query length stored in bytes. Between 256 and 4500. Default to 1024. Higher query lengths are more useful for analytical queries, but they also require more memory. Changing the query length requires you to restart the instance. You can still add tags to queries that exceed the length limit. +// Maximum query length stored in bytes. Between 256 and 4500. Default to 1024. +QueryStringLength *float64 `json:"queryStringLength,omitempty" tf:"query_string_length,omitempty"` - // True if Query Insights will record application tags from query when enabled. - // True if Query Insights will record application tags from query when enabled. - RecordApplicationTags *bool `json:"recordApplicationTags,omitempty" tf:"record_application_tags,omitempty"` +// True if Query Insights will record application tags from query when enabled. +// True if Query Insights will record application tags from query when enabled. +RecordApplicationTags *bool `json:"recordApplicationTags,omitempty" tf:"record_application_tags,omitempty"` - // True if Query Insights will record client address when enabled. - // True if Query Insights will record client address when enabled. - RecordClientAddress *bool `json:"recordClientAddress,omitempty" tf:"record_client_address,omitempty"` +// True if Query Insights will record client address when enabled. +// True if Query Insights will record client address when enabled. +RecordClientAddress *bool `json:"recordClientAddress,omitempty" tf:"record_client_address,omitempty"` } + type InsightsConfigParameters struct { - // True if Query Insights feature is enabled. - // True if Query Insights feature is enabled. - // +kubebuilder:validation:Optional - QueryInsightsEnabled *bool `json:"queryInsightsEnabled,omitempty" tf:"query_insights_enabled,omitempty"` - // Number of query execution plans captured by Insights per minute for all queries combined. Between 0 and 20. Default to 5. - // Number of query execution plans captured by Insights per minute for all queries combined. Between 0 and 20. Default to 5. - // +kubebuilder:validation:Optional - QueryPlansPerMinute *float64 `json:"queryPlansPerMinute,omitempty" tf:"query_plans_per_minute,omitempty"` +// True if Query Insights feature is enabled. +// True if Query Insights feature is enabled. +// +kubebuilder:validation:Optional +QueryInsightsEnabled *bool `json:"queryInsightsEnabled,omitempty" tf:"query_insights_enabled,omitempty"` + +// Number of query execution plans captured by Insights per minute for all queries combined. Between 0 and 20. Default to 5. +// Number of query execution plans captured by Insights per minute for all queries combined. Between 0 and 20. Default to 5. +// +kubebuilder:validation:Optional +QueryPlansPerMinute *float64 `json:"queryPlansPerMinute,omitempty" tf:"query_plans_per_minute,omitempty"` - // Maximum query length stored in bytes. Between 256 and 4500. Default to 1024. Higher query lengths are more useful for analytical queries, but they also require more memory. Changing the query length requires you to restart the instance. You can still add tags to queries that exceed the length limit. - // Maximum query length stored in bytes. Between 256 and 4500. Default to 1024. - // +kubebuilder:validation:Optional - QueryStringLength *float64 `json:"queryStringLength,omitempty" tf:"query_string_length,omitempty"` +// Maximum query length stored in bytes. Between 256 and 4500. Default to 1024. Higher query lengths are more useful for analytical queries, but they also require more memory. Changing the query length requires you to restart the instance. You can still add tags to queries that exceed the length limit. +// Maximum query length stored in bytes. Between 256 and 4500. Default to 1024. +// +kubebuilder:validation:Optional +QueryStringLength *float64 `json:"queryStringLength,omitempty" tf:"query_string_length,omitempty"` - // True if Query Insights will record application tags from query when enabled. - // True if Query Insights will record application tags from query when enabled. - // +kubebuilder:validation:Optional - RecordApplicationTags *bool `json:"recordApplicationTags,omitempty" tf:"record_application_tags,omitempty"` +// True if Query Insights will record application tags from query when enabled. +// True if Query Insights will record application tags from query when enabled. +// +kubebuilder:validation:Optional +RecordApplicationTags *bool `json:"recordApplicationTags,omitempty" tf:"record_application_tags,omitempty"` - // True if Query Insights will record client address when enabled. - // True if Query Insights will record client address when enabled. - // +kubebuilder:validation:Optional - RecordClientAddress *bool `json:"recordClientAddress,omitempty" tf:"record_client_address,omitempty"` +// True if Query Insights will record client address when enabled. +// True if Query Insights will record client address when enabled. +// +kubebuilder:validation:Optional +RecordClientAddress *bool `json:"recordClientAddress,omitempty" tf:"record_client_address,omitempty"` } + type LocationPreferenceInitParameters struct { - // A GAE application whose zone to remain - // in. Must be in the same region as this instance. - // A Google App Engine application whose zone to remain in. Must be in the same region as this instance. - FollowGaeApplication *string `json:"followGaeApplication,omitempty" tf:"follow_gae_application,omitempty"` - // The preferred Compute Engine zone for the secondary/failover. - // The preferred Compute Engine zone for the secondary/failover - SecondaryZone *string `json:"secondaryZone,omitempty" tf:"secondary_zone,omitempty"` +// A GAE application whose zone to remain +// in. Must be in the same region as this instance. +// A Google App Engine application whose zone to remain in. Must be in the same region as this instance. +FollowGaeApplication *string `json:"followGaeApplication,omitempty" tf:"follow_gae_application,omitempty"` + +// The preferred Compute Engine zone for the secondary/failover. +// The preferred Compute Engine zone for the secondary/failover +SecondaryZone *string `json:"secondaryZone,omitempty" tf:"secondary_zone,omitempty"` - // The preferred compute engine - // zone. - // The preferred compute engine zone. - Zone *string `json:"zone,omitempty" tf:"zone,omitempty"` +// The preferred compute engine +// zone. +// The preferred compute engine zone. +Zone *string `json:"zone,omitempty" tf:"zone,omitempty"` } + type LocationPreferenceObservation struct { - // A GAE application whose zone to remain - // in. Must be in the same region as this instance. - // A Google App Engine application whose zone to remain in. Must be in the same region as this instance. - FollowGaeApplication *string `json:"followGaeApplication,omitempty" tf:"follow_gae_application,omitempty"` - // The preferred Compute Engine zone for the secondary/failover. - // The preferred Compute Engine zone for the secondary/failover - SecondaryZone *string `json:"secondaryZone,omitempty" tf:"secondary_zone,omitempty"` +// A GAE application whose zone to remain +// in. Must be in the same region as this instance. +// A Google App Engine application whose zone to remain in. Must be in the same region as this instance. +FollowGaeApplication *string `json:"followGaeApplication,omitempty" tf:"follow_gae_application,omitempty"` + +// The preferred Compute Engine zone for the secondary/failover. +// The preferred Compute Engine zone for the secondary/failover +SecondaryZone *string `json:"secondaryZone,omitempty" tf:"secondary_zone,omitempty"` - // The preferred compute engine - // zone. - // The preferred compute engine zone. - Zone *string `json:"zone,omitempty" tf:"zone,omitempty"` +// The preferred compute engine +// zone. +// The preferred compute engine zone. +Zone *string `json:"zone,omitempty" tf:"zone,omitempty"` } + type LocationPreferenceParameters struct { - // A GAE application whose zone to remain - // in. Must be in the same region as this instance. - // A Google App Engine application whose zone to remain in. Must be in the same region as this instance. - // +kubebuilder:validation:Optional - FollowGaeApplication *string `json:"followGaeApplication,omitempty" tf:"follow_gae_application,omitempty"` - // The preferred Compute Engine zone for the secondary/failover. - // The preferred Compute Engine zone for the secondary/failover - // +kubebuilder:validation:Optional - SecondaryZone *string `json:"secondaryZone,omitempty" tf:"secondary_zone,omitempty"` +// A GAE application whose zone to remain +// in. Must be in the same region as this instance. +// A Google App Engine application whose zone to remain in. Must be in the same region as this instance. +// +kubebuilder:validation:Optional +FollowGaeApplication *string `json:"followGaeApplication,omitempty" tf:"follow_gae_application,omitempty"` + +// The preferred Compute Engine zone for the secondary/failover. +// The preferred Compute Engine zone for the secondary/failover +// +kubebuilder:validation:Optional +SecondaryZone *string `json:"secondaryZone,omitempty" tf:"secondary_zone,omitempty"` - // The preferred compute engine - // zone. - // The preferred compute engine zone. - // +kubebuilder:validation:Optional - Zone *string `json:"zone,omitempty" tf:"zone,omitempty"` +// The preferred compute engine +// zone. +// The preferred compute engine zone. +// +kubebuilder:validation:Optional +Zone *string `json:"zone,omitempty" tf:"zone,omitempty"` } + type MaintenanceWindowInitParameters struct { - // Day of week (1-7), starting on Monday - // Day of week (1-7), starting on Monday - Day *float64 `json:"day,omitempty" tf:"day,omitempty"` - // Hour of day (0-23), ignored if day not set - // Hour of day (0-23), ignored if day not set - Hour *float64 `json:"hour,omitempty" tf:"hour,omitempty"` +// Day of week (1-7), starting on Monday +// Day of week (1-7), starting on Monday +Day *float64 `json:"day,omitempty" tf:"day,omitempty"` + +// Hour of day (0-23), ignored if day not set +// Hour of day (0-23), ignored if day not set +Hour *float64 `json:"hour,omitempty" tf:"hour,omitempty"` - // Receive updates earlier (canary) or later - // (stable) - // Receive updates earlier (canary) or later (stable) - UpdateTrack *string `json:"updateTrack,omitempty" tf:"update_track,omitempty"` +// Receive updates earlier (canary) or later +// (stable) +// Receive updates earlier (canary) or later (stable) +UpdateTrack *string `json:"updateTrack,omitempty" tf:"update_track,omitempty"` } + type MaintenanceWindowObservation struct { - // Day of week (1-7), starting on Monday - // Day of week (1-7), starting on Monday - Day *float64 `json:"day,omitempty" tf:"day,omitempty"` - // Hour of day (0-23), ignored if day not set - // Hour of day (0-23), ignored if day not set - Hour *float64 `json:"hour,omitempty" tf:"hour,omitempty"` +// Day of week (1-7), starting on Monday +// Day of week (1-7), starting on Monday +Day *float64 `json:"day,omitempty" tf:"day,omitempty"` + +// Hour of day (0-23), ignored if day not set +// Hour of day (0-23), ignored if day not set +Hour *float64 `json:"hour,omitempty" tf:"hour,omitempty"` - // Receive updates earlier (canary) or later - // (stable) - // Receive updates earlier (canary) or later (stable) - UpdateTrack *string `json:"updateTrack,omitempty" tf:"update_track,omitempty"` +// Receive updates earlier (canary) or later +// (stable) +// Receive updates earlier (canary) or later (stable) +UpdateTrack *string `json:"updateTrack,omitempty" tf:"update_track,omitempty"` } + type MaintenanceWindowParameters struct { - // Day of week (1-7), starting on Monday - // Day of week (1-7), starting on Monday - // +kubebuilder:validation:Optional - Day *float64 `json:"day,omitempty" tf:"day,omitempty"` - // Hour of day (0-23), ignored if day not set - // Hour of day (0-23), ignored if day not set - // +kubebuilder:validation:Optional - Hour *float64 `json:"hour,omitempty" tf:"hour,omitempty"` +// Day of week (1-7), starting on Monday +// Day of week (1-7), starting on Monday +// +kubebuilder:validation:Optional +Day *float64 `json:"day,omitempty" tf:"day,omitempty"` + +// Hour of day (0-23), ignored if day not set +// Hour of day (0-23), ignored if day not set +// +kubebuilder:validation:Optional +Hour *float64 `json:"hour,omitempty" tf:"hour,omitempty"` - // Receive updates earlier (canary) or later - // (stable) - // Receive updates earlier (canary) or later (stable) - // +kubebuilder:validation:Optional - UpdateTrack *string `json:"updateTrack,omitempty" tf:"update_track,omitempty"` +// Receive updates earlier (canary) or later +// (stable) +// Receive updates earlier (canary) or later (stable) +// +kubebuilder:validation:Optional +UpdateTrack *string `json:"updateTrack,omitempty" tf:"update_track,omitempty"` } + type PasswordValidationPolicyInitParameters struct { - // Checks if the password is a combination of lowercase, uppercase, numeric, and non-alphanumeric characters. - // Password complexity. - Complexity *string `json:"complexity,omitempty" tf:"complexity,omitempty"` - // Prevents the use of the username in the password. - // Disallow username as a part of the password. - DisallowUsernameSubstring *bool `json:"disallowUsernameSubstring,omitempty" tf:"disallow_username_substring,omitempty"` +// Checks if the password is a combination of lowercase, uppercase, numeric, and non-alphanumeric characters. +// Password complexity. +Complexity *string `json:"complexity,omitempty" tf:"complexity,omitempty"` + +// Prevents the use of the username in the password. +// Disallow username as a part of the password. +DisallowUsernameSubstring *bool `json:"disallowUsernameSubstring,omitempty" tf:"disallow_username_substring,omitempty"` - // Enables or disable the password validation policy. - // Whether the password policy is enabled or not. - EnablePasswordPolicy *bool `json:"enablePasswordPolicy,omitempty" tf:"enable_password_policy,omitempty"` +// Enables or disable the password validation policy. +// Whether the password policy is enabled or not. +EnablePasswordPolicy *bool `json:"enablePasswordPolicy,omitempty" tf:"enable_password_policy,omitempty"` - // Specifies the minimum number of characters that the password must have. - // Minimum number of characters allowed. - MinLength *float64 `json:"minLength,omitempty" tf:"min_length,omitempty"` +// Specifies the minimum number of characters that the password must have. +// Minimum number of characters allowed. +MinLength *float64 `json:"minLength,omitempty" tf:"min_length,omitempty"` - // Specifies the minimum duration after which you can change the password. - // Minimum interval after which the password can be changed. This flag is only supported for PostgresSQL. - PasswordChangeInterval *string `json:"passwordChangeInterval,omitempty" tf:"password_change_interval,omitempty"` +// Specifies the minimum duration after which you can change the password. +// Minimum interval after which the password can be changed. This flag is only supported for PostgresSQL. +PasswordChangeInterval *string `json:"passwordChangeInterval,omitempty" tf:"password_change_interval,omitempty"` - // Specifies the number of previous passwords that you can't reuse. - // Number of previous passwords that cannot be reused. - ReuseInterval *float64 `json:"reuseInterval,omitempty" tf:"reuse_interval,omitempty"` +// Specifies the number of previous passwords that you can't reuse. +// Number of previous passwords that cannot be reused. +ReuseInterval *float64 `json:"reuseInterval,omitempty" tf:"reuse_interval,omitempty"` } + type PasswordValidationPolicyObservation struct { - // Checks if the password is a combination of lowercase, uppercase, numeric, and non-alphanumeric characters. - // Password complexity. - Complexity *string `json:"complexity,omitempty" tf:"complexity,omitempty"` - // Prevents the use of the username in the password. - // Disallow username as a part of the password. - DisallowUsernameSubstring *bool `json:"disallowUsernameSubstring,omitempty" tf:"disallow_username_substring,omitempty"` +// Checks if the password is a combination of lowercase, uppercase, numeric, and non-alphanumeric characters. +// Password complexity. +Complexity *string `json:"complexity,omitempty" tf:"complexity,omitempty"` + +// Prevents the use of the username in the password. +// Disallow username as a part of the password. +DisallowUsernameSubstring *bool `json:"disallowUsernameSubstring,omitempty" tf:"disallow_username_substring,omitempty"` - // Enables or disable the password validation policy. - // Whether the password policy is enabled or not. - EnablePasswordPolicy *bool `json:"enablePasswordPolicy,omitempty" tf:"enable_password_policy,omitempty"` +// Enables or disable the password validation policy. +// Whether the password policy is enabled or not. +EnablePasswordPolicy *bool `json:"enablePasswordPolicy,omitempty" tf:"enable_password_policy,omitempty"` - // Specifies the minimum number of characters that the password must have. - // Minimum number of characters allowed. - MinLength *float64 `json:"minLength,omitempty" tf:"min_length,omitempty"` +// Specifies the minimum number of characters that the password must have. +// Minimum number of characters allowed. +MinLength *float64 `json:"minLength,omitempty" tf:"min_length,omitempty"` - // Specifies the minimum duration after which you can change the password. - // Minimum interval after which the password can be changed. This flag is only supported for PostgresSQL. - PasswordChangeInterval *string `json:"passwordChangeInterval,omitempty" tf:"password_change_interval,omitempty"` +// Specifies the minimum duration after which you can change the password. +// Minimum interval after which the password can be changed. This flag is only supported for PostgresSQL. +PasswordChangeInterval *string `json:"passwordChangeInterval,omitempty" tf:"password_change_interval,omitempty"` - // Specifies the number of previous passwords that you can't reuse. - // Number of previous passwords that cannot be reused. - ReuseInterval *float64 `json:"reuseInterval,omitempty" tf:"reuse_interval,omitempty"` +// Specifies the number of previous passwords that you can't reuse. +// Number of previous passwords that cannot be reused. +ReuseInterval *float64 `json:"reuseInterval,omitempty" tf:"reuse_interval,omitempty"` } + type PasswordValidationPolicyParameters struct { - // Checks if the password is a combination of lowercase, uppercase, numeric, and non-alphanumeric characters. - // Password complexity. - // +kubebuilder:validation:Optional - Complexity *string `json:"complexity,omitempty" tf:"complexity,omitempty"` - // Prevents the use of the username in the password. - // Disallow username as a part of the password. - // +kubebuilder:validation:Optional - DisallowUsernameSubstring *bool `json:"disallowUsernameSubstring,omitempty" tf:"disallow_username_substring,omitempty"` +// Checks if the password is a combination of lowercase, uppercase, numeric, and non-alphanumeric characters. +// Password complexity. +// +kubebuilder:validation:Optional +Complexity *string `json:"complexity,omitempty" tf:"complexity,omitempty"` + +// Prevents the use of the username in the password. +// Disallow username as a part of the password. +// +kubebuilder:validation:Optional +DisallowUsernameSubstring *bool `json:"disallowUsernameSubstring,omitempty" tf:"disallow_username_substring,omitempty"` - // Enables or disable the password validation policy. - // Whether the password policy is enabled or not. - // +kubebuilder:validation:Optional - EnablePasswordPolicy *bool `json:"enablePasswordPolicy" tf:"enable_password_policy,omitempty"` +// Enables or disable the password validation policy. +// Whether the password policy is enabled or not. +// +kubebuilder:validation:Optional +EnablePasswordPolicy *bool `json:"enablePasswordPolicy" tf:"enable_password_policy,omitempty"` - // Specifies the minimum number of characters that the password must have. - // Minimum number of characters allowed. - // +kubebuilder:validation:Optional - MinLength *float64 `json:"minLength,omitempty" tf:"min_length,omitempty"` +// Specifies the minimum number of characters that the password must have. +// Minimum number of characters allowed. +// +kubebuilder:validation:Optional +MinLength *float64 `json:"minLength,omitempty" tf:"min_length,omitempty"` - // Specifies the minimum duration after which you can change the password. - // Minimum interval after which the password can be changed. This flag is only supported for PostgresSQL. - // +kubebuilder:validation:Optional - PasswordChangeInterval *string `json:"passwordChangeInterval,omitempty" tf:"password_change_interval,omitempty"` +// Specifies the minimum duration after which you can change the password. +// Minimum interval after which the password can be changed. This flag is only supported for PostgresSQL. +// +kubebuilder:validation:Optional +PasswordChangeInterval *string `json:"passwordChangeInterval,omitempty" tf:"password_change_interval,omitempty"` - // Specifies the number of previous passwords that you can't reuse. - // Number of previous passwords that cannot be reused. - // +kubebuilder:validation:Optional - ReuseInterval *float64 `json:"reuseInterval,omitempty" tf:"reuse_interval,omitempty"` +// Specifies the number of previous passwords that you can't reuse. +// Number of previous passwords that cannot be reused. +// +kubebuilder:validation:Optional +ReuseInterval *float64 `json:"reuseInterval,omitempty" tf:"reuse_interval,omitempty"` } + type ReplicaConfigurationInitParameters struct { - // PEM representation of the trusted CA's x509 - // certificate. - // PEM representation of the trusted CA's x509 certificate. - CACertificate *string `json:"caCertificate,omitempty" tf:"ca_certificate,omitempty"` - // PEM representation of the replica's x509 - // certificate. - // PEM representation of the replica's x509 certificate. - ClientCertificate *string `json:"clientCertificate,omitempty" tf:"client_certificate,omitempty"` +// PEM representation of the trusted CA's x509 +// certificate. +// PEM representation of the trusted CA's x509 certificate. +CACertificate *string `json:"caCertificate,omitempty" tf:"ca_certificate,omitempty"` + +// PEM representation of the replica's x509 +// certificate. +// PEM representation of the replica's x509 certificate. +ClientCertificate *string `json:"clientCertificate,omitempty" tf:"client_certificate,omitempty"` - // PEM representation of the replica's private key. The - // corresponding public key in encoded in the client_certificate. - // PEM representation of the replica's private key. The corresponding public key in encoded in the client_certificate. - ClientKey *string `json:"clientKey,omitempty" tf:"client_key,omitempty"` +// PEM representation of the replica's private key. The +// corresponding public key in encoded in the client_certificate. +// PEM representation of the replica's private key. The corresponding public key in encoded in the client_certificate. +ClientKey *string `json:"clientKey,omitempty" tf:"client_key,omitempty"` - // The number of seconds - // between connect retries. MySQL's default is 60 seconds. - // The number of seconds between connect retries. MySQL's default is 60 seconds. - ConnectRetryInterval *float64 `json:"connectRetryInterval,omitempty" tf:"connect_retry_interval,omitempty"` +// The number of seconds +// between connect retries. MySQL's default is 60 seconds. +// The number of seconds between connect retries. MySQL's default is 60 seconds. +ConnectRetryInterval *float64 `json:"connectRetryInterval,omitempty" tf:"connect_retry_interval,omitempty"` - // Path to a SQL file in GCS from which replica - // instances are created. Format is gs://bucket/filename. - // Path to a SQL file in Google Cloud Storage from which replica instances are created. Format is gs://bucket/filename. - DumpFilePath *string `json:"dumpFilePath,omitempty" tf:"dump_file_path,omitempty"` +// Path to a SQL file in GCS from which replica +// instances are created. Format is gs://bucket/filename. +// Path to a SQL file in Google Cloud Storage from which replica instances are created. Format is gs://bucket/filename. +DumpFilePath *string `json:"dumpFilePath,omitempty" tf:"dump_file_path,omitempty"` - // Specifies if the replica is the failover target. - // If the field is set to true the replica will be designated as a failover replica. - // If the master instance fails, the replica instance will be promoted as - // the new master instance. - // Specifies if the replica is the failover target. If the field is set to true the replica will be designated as a failover replica. If the master instance fails, the replica instance will be promoted as the new master instance. - FailoverTarget *bool `json:"failoverTarget,omitempty" tf:"failover_target,omitempty"` +// Specifies if the replica is the failover target. +// If the field is set to true the replica will be designated as a failover replica. +// If the master instance fails, the replica instance will be promoted as +// the new master instance. +// Specifies if the replica is the failover target. If the field is set to true the replica will be designated as a failover replica. If the master instance fails, the replica instance will be promoted as the new master instance. +FailoverTarget *bool `json:"failoverTarget,omitempty" tf:"failover_target,omitempty"` - // Time in ms between replication - // heartbeats. - // Time in ms between replication heartbeats. - MasterHeartbeatPeriod *float64 `json:"masterHeartbeatPeriod,omitempty" tf:"master_heartbeat_period,omitempty"` +// Time in ms between replication +// heartbeats. +// Time in ms between replication heartbeats. +MasterHeartbeatPeriod *float64 `json:"masterHeartbeatPeriod,omitempty" tf:"master_heartbeat_period,omitempty"` - // Permissible ciphers for use in SSL encryption. - SSLCipher *string `json:"sslCipher,omitempty" tf:"ssl_cipher,omitempty"` +// Permissible ciphers for use in SSL encryption. +SSLCipher *string `json:"sslCipher,omitempty" tf:"ssl_cipher,omitempty"` - // Username for replication connection. - // Username for replication connection. - Username *string `json:"username,omitempty" tf:"username,omitempty"` +// Username for replication connection. +// Username for replication connection. +Username *string `json:"username,omitempty" tf:"username,omitempty"` - // True if the master's common name - // value is checked during the SSL handshake. - // True if the master's common name value is checked during the SSL handshake. - VerifyServerCertificate *bool `json:"verifyServerCertificate,omitempty" tf:"verify_server_certificate,omitempty"` +// True if the master's common name +// value is checked during the SSL handshake. +// True if the master's common name value is checked during the SSL handshake. +VerifyServerCertificate *bool `json:"verifyServerCertificate,omitempty" tf:"verify_server_certificate,omitempty"` } + type ReplicaConfigurationObservation struct { - // PEM representation of the trusted CA's x509 - // certificate. - // PEM representation of the trusted CA's x509 certificate. - CACertificate *string `json:"caCertificate,omitempty" tf:"ca_certificate,omitempty"` - // PEM representation of the replica's x509 - // certificate. - // PEM representation of the replica's x509 certificate. - ClientCertificate *string `json:"clientCertificate,omitempty" tf:"client_certificate,omitempty"` +// PEM representation of the trusted CA's x509 +// certificate. +// PEM representation of the trusted CA's x509 certificate. +CACertificate *string `json:"caCertificate,omitempty" tf:"ca_certificate,omitempty"` + +// PEM representation of the replica's x509 +// certificate. +// PEM representation of the replica's x509 certificate. +ClientCertificate *string `json:"clientCertificate,omitempty" tf:"client_certificate,omitempty"` - // PEM representation of the replica's private key. The - // corresponding public key in encoded in the client_certificate. - // PEM representation of the replica's private key. The corresponding public key in encoded in the client_certificate. - ClientKey *string `json:"clientKey,omitempty" tf:"client_key,omitempty"` +// PEM representation of the replica's private key. The +// corresponding public key in encoded in the client_certificate. +// PEM representation of the replica's private key. The corresponding public key in encoded in the client_certificate. +ClientKey *string `json:"clientKey,omitempty" tf:"client_key,omitempty"` - // The number of seconds - // between connect retries. MySQL's default is 60 seconds. - // The number of seconds between connect retries. MySQL's default is 60 seconds. - ConnectRetryInterval *float64 `json:"connectRetryInterval,omitempty" tf:"connect_retry_interval,omitempty"` +// The number of seconds +// between connect retries. MySQL's default is 60 seconds. +// The number of seconds between connect retries. MySQL's default is 60 seconds. +ConnectRetryInterval *float64 `json:"connectRetryInterval,omitempty" tf:"connect_retry_interval,omitempty"` - // Path to a SQL file in GCS from which replica - // instances are created. Format is gs://bucket/filename. - // Path to a SQL file in Google Cloud Storage from which replica instances are created. Format is gs://bucket/filename. - DumpFilePath *string `json:"dumpFilePath,omitempty" tf:"dump_file_path,omitempty"` +// Path to a SQL file in GCS from which replica +// instances are created. Format is gs://bucket/filename. +// Path to a SQL file in Google Cloud Storage from which replica instances are created. Format is gs://bucket/filename. +DumpFilePath *string `json:"dumpFilePath,omitempty" tf:"dump_file_path,omitempty"` - // Specifies if the replica is the failover target. - // If the field is set to true the replica will be designated as a failover replica. - // If the master instance fails, the replica instance will be promoted as - // the new master instance. - // Specifies if the replica is the failover target. If the field is set to true the replica will be designated as a failover replica. If the master instance fails, the replica instance will be promoted as the new master instance. - FailoverTarget *bool `json:"failoverTarget,omitempty" tf:"failover_target,omitempty"` +// Specifies if the replica is the failover target. +// If the field is set to true the replica will be designated as a failover replica. +// If the master instance fails, the replica instance will be promoted as +// the new master instance. +// Specifies if the replica is the failover target. If the field is set to true the replica will be designated as a failover replica. If the master instance fails, the replica instance will be promoted as the new master instance. +FailoverTarget *bool `json:"failoverTarget,omitempty" tf:"failover_target,omitempty"` - // Time in ms between replication - // heartbeats. - // Time in ms between replication heartbeats. - MasterHeartbeatPeriod *float64 `json:"masterHeartbeatPeriod,omitempty" tf:"master_heartbeat_period,omitempty"` +// Time in ms between replication +// heartbeats. +// Time in ms between replication heartbeats. +MasterHeartbeatPeriod *float64 `json:"masterHeartbeatPeriod,omitempty" tf:"master_heartbeat_period,omitempty"` - // Permissible ciphers for use in SSL encryption. - SSLCipher *string `json:"sslCipher,omitempty" tf:"ssl_cipher,omitempty"` +// Permissible ciphers for use in SSL encryption. +SSLCipher *string `json:"sslCipher,omitempty" tf:"ssl_cipher,omitempty"` - // Username for replication connection. - // Username for replication connection. - Username *string `json:"username,omitempty" tf:"username,omitempty"` +// Username for replication connection. +// Username for replication connection. +Username *string `json:"username,omitempty" tf:"username,omitempty"` - // True if the master's common name - // value is checked during the SSL handshake. - // True if the master's common name value is checked during the SSL handshake. - VerifyServerCertificate *bool `json:"verifyServerCertificate,omitempty" tf:"verify_server_certificate,omitempty"` +// True if the master's common name +// value is checked during the SSL handshake. +// True if the master's common name value is checked during the SSL handshake. +VerifyServerCertificate *bool `json:"verifyServerCertificate,omitempty" tf:"verify_server_certificate,omitempty"` } + type ReplicaConfigurationParameters struct { - // PEM representation of the trusted CA's x509 - // certificate. - // PEM representation of the trusted CA's x509 certificate. - // +kubebuilder:validation:Optional - CACertificate *string `json:"caCertificate,omitempty" tf:"ca_certificate,omitempty"` - - // PEM representation of the replica's x509 - // certificate. - // PEM representation of the replica's x509 certificate. - // +kubebuilder:validation:Optional - ClientCertificate *string `json:"clientCertificate,omitempty" tf:"client_certificate,omitempty"` - - // PEM representation of the replica's private key. The - // corresponding public key in encoded in the client_certificate. - // PEM representation of the replica's private key. The corresponding public key in encoded in the client_certificate. - // +kubebuilder:validation:Optional - ClientKey *string `json:"clientKey,omitempty" tf:"client_key,omitempty"` - - // The number of seconds - // between connect retries. MySQL's default is 60 seconds. - // The number of seconds between connect retries. MySQL's default is 60 seconds. - // +kubebuilder:validation:Optional - ConnectRetryInterval *float64 `json:"connectRetryInterval,omitempty" tf:"connect_retry_interval,omitempty"` - - // Path to a SQL file in GCS from which replica - // instances are created. Format is gs://bucket/filename. - // Path to a SQL file in Google Cloud Storage from which replica instances are created. Format is gs://bucket/filename. - // +kubebuilder:validation:Optional - DumpFilePath *string `json:"dumpFilePath,omitempty" tf:"dump_file_path,omitempty"` - - // Specifies if the replica is the failover target. - // If the field is set to true the replica will be designated as a failover replica. - // If the master instance fails, the replica instance will be promoted as - // the new master instance. - // Specifies if the replica is the failover target. If the field is set to true the replica will be designated as a failover replica. If the master instance fails, the replica instance will be promoted as the new master instance. - // +kubebuilder:validation:Optional - FailoverTarget *bool `json:"failoverTarget,omitempty" tf:"failover_target,omitempty"` - - // Time in ms between replication - // heartbeats. - // Time in ms between replication heartbeats. - // +kubebuilder:validation:Optional - MasterHeartbeatPeriod *float64 `json:"masterHeartbeatPeriod,omitempty" tf:"master_heartbeat_period,omitempty"` - - // Password for the replication connection. - // Password for the replication connection. - // +kubebuilder:validation:Optional - PasswordSecretRef *v1.SecretKeySelector `json:"passwordSecretRef,omitempty" tf:"-"` - - // Permissible ciphers for use in SSL encryption. - // +kubebuilder:validation:Optional - SSLCipher *string `json:"sslCipher,omitempty" tf:"ssl_cipher,omitempty"` - - // Username for replication connection. - // Username for replication connection. - // +kubebuilder:validation:Optional - Username *string `json:"username,omitempty" tf:"username,omitempty"` - - // True if the master's common name - // value is checked during the SSL handshake. - // True if the master's common name value is checked during the SSL handshake. - // +kubebuilder:validation:Optional - VerifyServerCertificate *bool `json:"verifyServerCertificate,omitempty" tf:"verify_server_certificate,omitempty"` + +// PEM representation of the trusted CA's x509 +// certificate. +// PEM representation of the trusted CA's x509 certificate. +// +kubebuilder:validation:Optional +CACertificate *string `json:"caCertificate,omitempty" tf:"ca_certificate,omitempty"` + +// PEM representation of the replica's x509 +// certificate. +// PEM representation of the replica's x509 certificate. +// +kubebuilder:validation:Optional +ClientCertificate *string `json:"clientCertificate,omitempty" tf:"client_certificate,omitempty"` + +// PEM representation of the replica's private key. The +// corresponding public key in encoded in the client_certificate. +// PEM representation of the replica's private key. The corresponding public key in encoded in the client_certificate. +// +kubebuilder:validation:Optional +ClientKey *string `json:"clientKey,omitempty" tf:"client_key,omitempty"` + +// The number of seconds +// between connect retries. MySQL's default is 60 seconds. +// The number of seconds between connect retries. MySQL's default is 60 seconds. +// +kubebuilder:validation:Optional +ConnectRetryInterval *float64 `json:"connectRetryInterval,omitempty" tf:"connect_retry_interval,omitempty"` + +// Path to a SQL file in GCS from which replica +// instances are created. Format is gs://bucket/filename. +// Path to a SQL file in Google Cloud Storage from which replica instances are created. Format is gs://bucket/filename. +// +kubebuilder:validation:Optional +DumpFilePath *string `json:"dumpFilePath,omitempty" tf:"dump_file_path,omitempty"` + +// Specifies if the replica is the failover target. +// If the field is set to true the replica will be designated as a failover replica. +// If the master instance fails, the replica instance will be promoted as +// the new master instance. +// Specifies if the replica is the failover target. If the field is set to true the replica will be designated as a failover replica. If the master instance fails, the replica instance will be promoted as the new master instance. +// +kubebuilder:validation:Optional +FailoverTarget *bool `json:"failoverTarget,omitempty" tf:"failover_target,omitempty"` + +// Time in ms between replication +// heartbeats. +// Time in ms between replication heartbeats. +// +kubebuilder:validation:Optional +MasterHeartbeatPeriod *float64 `json:"masterHeartbeatPeriod,omitempty" tf:"master_heartbeat_period,omitempty"` + +// Password for the replication connection. +// Password for the replication connection. +// +kubebuilder:validation:Optional +PasswordSecretRef *v1.SecretKeySelector `json:"passwordSecretRef,omitempty" tf:"-"` + +// Permissible ciphers for use in SSL encryption. +// +kubebuilder:validation:Optional +SSLCipher *string `json:"sslCipher,omitempty" tf:"ssl_cipher,omitempty"` + +// Username for replication connection. +// Username for replication connection. +// +kubebuilder:validation:Optional +Username *string `json:"username,omitempty" tf:"username,omitempty"` + +// True if the master's common name +// value is checked during the SSL handshake. +// True if the master's common name value is checked during the SSL handshake. +// +kubebuilder:validation:Optional +VerifyServerCertificate *bool `json:"verifyServerCertificate,omitempty" tf:"verify_server_certificate,omitempty"` } + type RestoreBackupContextInitParameters struct { - // The ID of the backup run to restore from. - // The ID of the backup run to restore from. - BackupRunID *float64 `json:"backupRunId,omitempty" tf:"backup_run_id,omitempty"` - // The ID of the instance that the backup was taken from. If left empty, - // this instance's ID will be used. - // The ID of the instance that the backup was taken from. - InstanceID *string `json:"instanceId,omitempty" tf:"instance_id,omitempty"` +// The ID of the backup run to restore from. +// The ID of the backup run to restore from. +BackupRunID *float64 `json:"backupRunId,omitempty" tf:"backup_run_id,omitempty"` + +// The ID of the instance that the backup was taken from. If left empty, +// this instance's ID will be used. +// The ID of the instance that the backup was taken from. +InstanceID *string `json:"instanceId,omitempty" tf:"instance_id,omitempty"` - // The full project ID of the source instance.` - // The full project ID of the source instance. - Project *string `json:"project,omitempty" tf:"project,omitempty"` +// The full project ID of the source instance.` +// The full project ID of the source instance. +Project *string `json:"project,omitempty" tf:"project,omitempty"` } + type RestoreBackupContextObservation struct { - // The ID of the backup run to restore from. - // The ID of the backup run to restore from. - BackupRunID *float64 `json:"backupRunId,omitempty" tf:"backup_run_id,omitempty"` - // The ID of the instance that the backup was taken from. If left empty, - // this instance's ID will be used. - // The ID of the instance that the backup was taken from. - InstanceID *string `json:"instanceId,omitempty" tf:"instance_id,omitempty"` +// The ID of the backup run to restore from. +// The ID of the backup run to restore from. +BackupRunID *float64 `json:"backupRunId,omitempty" tf:"backup_run_id,omitempty"` + +// The ID of the instance that the backup was taken from. If left empty, +// this instance's ID will be used. +// The ID of the instance that the backup was taken from. +InstanceID *string `json:"instanceId,omitempty" tf:"instance_id,omitempty"` - // The full project ID of the source instance.` - // The full project ID of the source instance. - Project *string `json:"project,omitempty" tf:"project,omitempty"` +// The full project ID of the source instance.` +// The full project ID of the source instance. +Project *string `json:"project,omitempty" tf:"project,omitempty"` } + type RestoreBackupContextParameters struct { - // The ID of the backup run to restore from. - // The ID of the backup run to restore from. - // +kubebuilder:validation:Optional - BackupRunID *float64 `json:"backupRunId" tf:"backup_run_id,omitempty"` - // The ID of the instance that the backup was taken from. If left empty, - // this instance's ID will be used. - // The ID of the instance that the backup was taken from. - // +kubebuilder:validation:Optional - InstanceID *string `json:"instanceId,omitempty" tf:"instance_id,omitempty"` +// The ID of the backup run to restore from. +// The ID of the backup run to restore from. +// +kubebuilder:validation:Optional +BackupRunID *float64 `json:"backupRunId" tf:"backup_run_id,omitempty"` + +// The ID of the instance that the backup was taken from. If left empty, +// this instance's ID will be used. +// The ID of the instance that the backup was taken from. +// +kubebuilder:validation:Optional +InstanceID *string `json:"instanceId,omitempty" tf:"instance_id,omitempty"` - // The full project ID of the source instance.` - // The full project ID of the source instance. - // +kubebuilder:validation:Optional - Project *string `json:"project,omitempty" tf:"project,omitempty"` +// The full project ID of the source instance.` +// The full project ID of the source instance. +// +kubebuilder:validation:Optional +Project *string `json:"project,omitempty" tf:"project,omitempty"` } + type SQLServerAuditConfigInitParameters struct { - // The name of the destination bucket (e.g., gs://mybucket). - // The name of the destination bucket (e.g., gs://mybucket). - Bucket *string `json:"bucket,omitempty" tf:"bucket,omitempty"` - // How long to keep generated audit files. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". - // How long to keep generated audit files. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".. - RetentionInterval *string `json:"retentionInterval,omitempty" tf:"retention_interval,omitempty"` +// The name of the destination bucket (e.g., gs://mybucket). +// The name of the destination bucket (e.g., gs://mybucket). +Bucket *string `json:"bucket,omitempty" tf:"bucket,omitempty"` + +// How long to keep generated audit files. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". +// How long to keep generated audit files. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".. +RetentionInterval *string `json:"retentionInterval,omitempty" tf:"retention_interval,omitempty"` - // How often to upload generated audit files. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". - // How often to upload generated audit files. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". - UploadInterval *string `json:"uploadInterval,omitempty" tf:"upload_interval,omitempty"` +// How often to upload generated audit files. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". +// How often to upload generated audit files. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". +UploadInterval *string `json:"uploadInterval,omitempty" tf:"upload_interval,omitempty"` } + type SQLServerAuditConfigObservation struct { - // The name of the destination bucket (e.g., gs://mybucket). - // The name of the destination bucket (e.g., gs://mybucket). - Bucket *string `json:"bucket,omitempty" tf:"bucket,omitempty"` - // How long to keep generated audit files. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". - // How long to keep generated audit files. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".. - RetentionInterval *string `json:"retentionInterval,omitempty" tf:"retention_interval,omitempty"` +// The name of the destination bucket (e.g., gs://mybucket). +// The name of the destination bucket (e.g., gs://mybucket). +Bucket *string `json:"bucket,omitempty" tf:"bucket,omitempty"` + +// How long to keep generated audit files. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". +// How long to keep generated audit files. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".. +RetentionInterval *string `json:"retentionInterval,omitempty" tf:"retention_interval,omitempty"` - // How often to upload generated audit files. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". - // How often to upload generated audit files. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". - UploadInterval *string `json:"uploadInterval,omitempty" tf:"upload_interval,omitempty"` +// How often to upload generated audit files. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". +// How often to upload generated audit files. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". +UploadInterval *string `json:"uploadInterval,omitempty" tf:"upload_interval,omitempty"` } + type SQLServerAuditConfigParameters struct { - // The name of the destination bucket (e.g., gs://mybucket). - // The name of the destination bucket (e.g., gs://mybucket). - // +kubebuilder:validation:Optional - Bucket *string `json:"bucket,omitempty" tf:"bucket,omitempty"` - // How long to keep generated audit files. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". - // How long to keep generated audit files. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".. - // +kubebuilder:validation:Optional - RetentionInterval *string `json:"retentionInterval,omitempty" tf:"retention_interval,omitempty"` +// The name of the destination bucket (e.g., gs://mybucket). +// The name of the destination bucket (e.g., gs://mybucket). +// +kubebuilder:validation:Optional +Bucket *string `json:"bucket,omitempty" tf:"bucket,omitempty"` + +// How long to keep generated audit files. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". +// How long to keep generated audit files. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s".. +// +kubebuilder:validation:Optional +RetentionInterval *string `json:"retentionInterval,omitempty" tf:"retention_interval,omitempty"` - // How often to upload generated audit files. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". - // How often to upload generated audit files. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". - // +kubebuilder:validation:Optional - UploadInterval *string `json:"uploadInterval,omitempty" tf:"upload_interval,omitempty"` +// How often to upload generated audit files. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". +// How often to upload generated audit files. A duration in seconds with up to nine fractional digits, terminated by 's'. Example: "3.5s". +// +kubebuilder:validation:Optional +UploadInterval *string `json:"uploadInterval,omitempty" tf:"upload_interval,omitempty"` } + type ServerCACertInitParameters struct { + } + type ServerCACertObservation struct { - // The CA Certificate used to connect to the SQL Instance via SSL. - Cert *string `json:"cert,omitempty" tf:"cert,omitempty"` - // The CN valid for the CA Cert. - CommonName *string `json:"commonName,omitempty" tf:"common_name,omitempty"` +// The CA Certificate used to connect to the SQL Instance via SSL. +Cert *string `json:"cert,omitempty" tf:"cert,omitempty"` + +// The CN valid for the CA Cert. +CommonName *string `json:"commonName,omitempty" tf:"common_name,omitempty"` - // Creation time of the CA Cert. - CreateTime *string `json:"createTime,omitempty" tf:"create_time,omitempty"` +// Creation time of the CA Cert. +CreateTime *string `json:"createTime,omitempty" tf:"create_time,omitempty"` - // The RFC 3339 - // formatted date time string indicating when this whitelist expires. - ExpirationTime *string `json:"expirationTime,omitempty" tf:"expiration_time,omitempty"` +// The RFC 3339 +// formatted date time string indicating when this whitelist expires. +ExpirationTime *string `json:"expirationTime,omitempty" tf:"expiration_time,omitempty"` - // SHA Fingerprint of the CA Cert. - Sha1Fingerprint *string `json:"sha1Fingerprint,omitempty" tf:"sha1_fingerprint,omitempty"` +// SHA Fingerprint of the CA Cert. +Sha1Fingerprint *string `json:"sha1Fingerprint,omitempty" tf:"sha1_fingerprint,omitempty"` } + type ServerCACertParameters struct { + } + type SettingsInitParameters struct { - // This specifies when the instance should be - // active. Can be either ALWAYS, NEVER or ON_DEMAND. - // This specifies when the instance should be active. Can be either ALWAYS, NEVER or ON_DEMAND. - ActivationPolicy *string `json:"activationPolicy,omitempty" tf:"activation_policy,omitempty"` - ActiveDirectoryConfig []ActiveDirectoryConfigInitParameters `json:"activeDirectoryConfig,omitempty" tf:"active_directory_config,omitempty"` +// This specifies when the instance should be +// active. Can be either ALWAYS, NEVER or ON_DEMAND. +// This specifies when the instance should be active. Can be either ALWAYS, NEVER or ON_DEMAND. +ActivationPolicy *string `json:"activationPolicy,omitempty" tf:"activation_policy,omitempty"` + +ActiveDirectoryConfig []ActiveDirectoryConfigInitParameters `json:"activeDirectoryConfig,omitempty" tf:"active_directory_config,omitempty"` - AdvancedMachineFeatures []AdvancedMachineFeaturesInitParameters `json:"advancedMachineFeatures,omitempty" tf:"advanced_machine_features,omitempty"` +AdvancedMachineFeatures []AdvancedMachineFeaturesInitParameters `json:"advancedMachineFeatures,omitempty" tf:"advanced_machine_features,omitempty"` - // The availability type of the Cloud SQL - // instance, high availability (REGIONAL) or single zone (ZONAL).' For all instances, ensure that - // settings.backup_configuration.enabled is set to true. - // For MySQL instances, ensure that settings.backup_configuration.binary_log_enabled is set to true. - // For Postgres and SQL Server instances, ensure that settings.backup_configuration.point_in_time_recovery_enabled - // is set to true. Defaults to ZONAL. - // The availability type of the Cloud SQL instance, high availability - // (REGIONAL) or single zone (ZONAL). For all instances, ensure that - // settings.backup_configuration.enabled is set to true. - // For MySQL instances, ensure that settings.backup_configuration.binary_log_enabled is set to true. - // For Postgres instances, ensure that settings.backup_configuration.point_in_time_recovery_enabled - // is set to true. Defaults to ZONAL. - AvailabilityType *string `json:"availabilityType,omitempty" tf:"availability_type,omitempty"` +// The availability type of the Cloud SQL +// instance, high availability (REGIONAL) or single zone (ZONAL).' For all instances, ensure that +// settings.backup_configuration.enabled is set to true. +// For MySQL instances, ensure that settings.backup_configuration.binary_log_enabled is set to true. +// For Postgres and SQL Server instances, ensure that settings.backup_configuration.point_in_time_recovery_enabled +// is set to true. Defaults to ZONAL. +// The availability type of the Cloud SQL instance, high availability +// (REGIONAL) or single zone (ZONAL). For all instances, ensure that +// settings.backup_configuration.enabled is set to true. +// For MySQL instances, ensure that settings.backup_configuration.binary_log_enabled is set to true. +// For Postgres instances, ensure that settings.backup_configuration.point_in_time_recovery_enabled +// is set to true. Defaults to ZONAL. +AvailabilityType *string `json:"availabilityType,omitempty" tf:"availability_type,omitempty"` - BackupConfiguration []BackupConfigurationInitParameters `json:"backupConfiguration,omitempty" tf:"backup_configuration,omitempty"` +BackupConfiguration []BackupConfigurationInitParameters `json:"backupConfiguration,omitempty" tf:"backup_configuration,omitempty"` - // The name of server instance collation. - // The name of server instance collation. - Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` +// The name of server instance collation. +// The name of server instance collation. +Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` - // Specifies if connections must use Cloud SQL connectors. - // Specifies if connections must use Cloud SQL connectors. - ConnectorEnforcement *string `json:"connectorEnforcement,omitempty" tf:"connector_enforcement,omitempty"` +// Specifies if connections must use Cloud SQL connectors. +// Specifies if connections must use Cloud SQL connectors. +ConnectorEnforcement *string `json:"connectorEnforcement,omitempty" tf:"connector_enforcement,omitempty"` - DatabaseFlags []DatabaseFlagsInitParameters `json:"databaseFlags,omitempty" tf:"database_flags,omitempty"` +DatabaseFlags []DatabaseFlagsInitParameters `json:"databaseFlags,omitempty" tf:"database_flags,omitempty"` - // . - // Configuration to protect against accidental instance deletion. - DeletionProtectionEnabled *bool `json:"deletionProtectionEnabled,omitempty" tf:"deletion_protection_enabled,omitempty"` +// . +// Configuration to protect against accidental instance deletion. +DeletionProtectionEnabled *bool `json:"deletionProtectionEnabled,omitempty" tf:"deletion_protection_enabled,omitempty"` - DenyMaintenancePeriod []DenyMaintenancePeriodInitParameters `json:"denyMaintenancePeriod,omitempty" tf:"deny_maintenance_period,omitempty"` +DenyMaintenancePeriod []DenyMaintenancePeriodInitParameters `json:"denyMaintenancePeriod,omitempty" tf:"deny_maintenance_period,omitempty"` - // Enables auto-resizing of the storage size. Defaults to true. - // Enables auto-resizing of the storage size. Defaults to true. - DiskAutoresize *bool `json:"diskAutoresize,omitempty" tf:"disk_autoresize,omitempty"` +// Enables auto-resizing of the storage size. Defaults to true. +// Enables auto-resizing of the storage size. Defaults to true. +DiskAutoresize *bool `json:"diskAutoresize,omitempty" tf:"disk_autoresize,omitempty"` - // The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit. - // The maximum size, in GB, to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit. - DiskAutoresizeLimit *float64 `json:"diskAutoresizeLimit,omitempty" tf:"disk_autoresize_limit,omitempty"` +// The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit. +// The maximum size, in GB, to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit. +DiskAutoresizeLimit *float64 `json:"diskAutoresizeLimit,omitempty" tf:"disk_autoresize_limit,omitempty"` - // The size of data disk, in GB. Size of a running instance cannot be reduced but can be increased. The minimum value is 10GB. - // The size of data disk, in GB. Size of a running instance cannot be reduced but can be increased. The minimum value is 10GB. - DiskSize *float64 `json:"diskSize,omitempty" tf:"disk_size,omitempty"` +// The size of data disk, in GB. Size of a running instance cannot be reduced but can be increased. The minimum value is 10GB. +// The size of data disk, in GB. Size of a running instance cannot be reduced but can be increased. The minimum value is 10GB. +DiskSize *float64 `json:"diskSize,omitempty" tf:"disk_size,omitempty"` - // The type of data disk: PD_SSD or PD_HDD. Defaults to PD_SSD. - // The type of data disk: PD_SSD or PD_HDD. Defaults to PD_SSD. - DiskType *string `json:"diskType,omitempty" tf:"disk_type,omitempty"` +// The type of data disk: PD_SSD or PD_HDD. Defaults to PD_SSD. +// The type of data disk: PD_SSD or PD_HDD. Defaults to PD_SSD. +DiskType *string `json:"diskType,omitempty" tf:"disk_type,omitempty"` - IPConfiguration []IPConfigurationInitParameters `json:"ipConfiguration,omitempty" tf:"ip_configuration,omitempty"` +IPConfiguration []IPConfigurationInitParameters `json:"ipConfiguration,omitempty" tf:"ip_configuration,omitempty"` - // Configuration of Query Insights. - InsightsConfig []InsightsConfigInitParameters `json:"insightsConfig,omitempty" tf:"insights_config,omitempty"` +// Configuration of Query Insights. +InsightsConfig []InsightsConfigInitParameters `json:"insightsConfig,omitempty" tf:"insights_config,omitempty"` - LocationPreference []LocationPreferenceInitParameters `json:"locationPreference,omitempty" tf:"location_preference,omitempty"` +LocationPreference []LocationPreferenceInitParameters `json:"locationPreference,omitempty" tf:"location_preference,omitempty"` - // Declares a one-hour maintenance window when an Instance can automatically restart to apply updates. The maintenance window is specified in UTC time. - MaintenanceWindow []MaintenanceWindowInitParameters `json:"maintenanceWindow,omitempty" tf:"maintenance_window,omitempty"` +// Declares a one-hour maintenance window when an Instance can automatically restart to apply updates. The maintenance window is specified in UTC time. +MaintenanceWindow []MaintenanceWindowInitParameters `json:"maintenanceWindow,omitempty" tf:"maintenance_window,omitempty"` - PasswordValidationPolicy []PasswordValidationPolicyInitParameters `json:"passwordValidationPolicy,omitempty" tf:"password_validation_policy,omitempty"` +PasswordValidationPolicy []PasswordValidationPolicyInitParameters `json:"passwordValidationPolicy,omitempty" tf:"password_validation_policy,omitempty"` - // Pricing plan for this instance, can only be PER_USE. - // Pricing plan for this instance, can only be PER_USE. - PricingPlan *string `json:"pricingPlan,omitempty" tf:"pricing_plan,omitempty"` +// Pricing plan for this instance, can only be PER_USE. +// Pricing plan for this instance, can only be PER_USE. +PricingPlan *string `json:"pricingPlan,omitempty" tf:"pricing_plan,omitempty"` - SQLServerAuditConfig []SQLServerAuditConfigInitParameters `json:"sqlServerAuditConfig,omitempty" tf:"sql_server_audit_config,omitempty"` +SQLServerAuditConfig []SQLServerAuditConfigInitParameters `json:"sqlServerAuditConfig,omitempty" tf:"sql_server_audit_config,omitempty"` - // The machine type to use. See tiers - // for more details and supported versions. Postgres supports only shared-core machine types, - // and custom machine types such as db-custom-2-13312. See the Custom Machine Type Documentation to learn about specifying custom machine types. - // The machine type to use. See tiers for more details and supported versions. Postgres supports only shared-core machine types, and custom machine types such as db-custom-2-13312. See the Custom Machine Type Documentation to learn about specifying custom machine types. - Tier *string `json:"tier,omitempty" tf:"tier,omitempty"` +// The machine type to use. See tiers +// for more details and supported versions. Postgres supports only shared-core machine types, +// and custom machine types such as db-custom-2-13312. See the Custom Machine Type Documentation to learn about specifying custom machine types. +// The machine type to use. See tiers for more details and supported versions. Postgres supports only shared-core machine types, and custom machine types such as db-custom-2-13312. See the Custom Machine Type Documentation to learn about specifying custom machine types. +Tier *string `json:"tier,omitempty" tf:"tier,omitempty"` - // The time_zone to be used by the database engine (supported only for SQL Server), in SQL Server timezone format. - // The time_zone to be used by the database engine (supported only for SQL Server), in SQL Server timezone format. - TimeZone *string `json:"timeZone,omitempty" tf:"time_zone,omitempty"` +// The time_zone to be used by the database engine (supported only for SQL Server), in SQL Server timezone format. +// The time_zone to be used by the database engine (supported only for SQL Server), in SQL Server timezone format. +TimeZone *string `json:"timeZone,omitempty" tf:"time_zone,omitempty"` - // A set of key/value user label pairs to assign to the instance. - // A set of key/value user label pairs to assign to the instance. - UserLabels map[string]*string `json:"userLabels,omitempty" tf:"user_labels,omitempty"` +// A set of key/value user label pairs to assign to the instance. +// A set of key/value user label pairs to assign to the instance. +UserLabels map[string]*string `json:"userLabels,omitempty" tf:"user_labels,omitempty"` } + type SettingsObservation struct { - // This specifies when the instance should be - // active. Can be either ALWAYS, NEVER or ON_DEMAND. - // This specifies when the instance should be active. Can be either ALWAYS, NEVER or ON_DEMAND. - ActivationPolicy *string `json:"activationPolicy,omitempty" tf:"activation_policy,omitempty"` - ActiveDirectoryConfig []ActiveDirectoryConfigObservation `json:"activeDirectoryConfig,omitempty" tf:"active_directory_config,omitempty"` +// This specifies when the instance should be +// active. Can be either ALWAYS, NEVER or ON_DEMAND. +// This specifies when the instance should be active. Can be either ALWAYS, NEVER or ON_DEMAND. +ActivationPolicy *string `json:"activationPolicy,omitempty" tf:"activation_policy,omitempty"` + +ActiveDirectoryConfig []ActiveDirectoryConfigObservation `json:"activeDirectoryConfig,omitempty" tf:"active_directory_config,omitempty"` - AdvancedMachineFeatures []AdvancedMachineFeaturesObservation `json:"advancedMachineFeatures,omitempty" tf:"advanced_machine_features,omitempty"` +AdvancedMachineFeatures []AdvancedMachineFeaturesObservation `json:"advancedMachineFeatures,omitempty" tf:"advanced_machine_features,omitempty"` - // The availability type of the Cloud SQL - // instance, high availability (REGIONAL) or single zone (ZONAL).' For all instances, ensure that - // settings.backup_configuration.enabled is set to true. - // For MySQL instances, ensure that settings.backup_configuration.binary_log_enabled is set to true. - // For Postgres and SQL Server instances, ensure that settings.backup_configuration.point_in_time_recovery_enabled - // is set to true. Defaults to ZONAL. - // The availability type of the Cloud SQL instance, high availability - // (REGIONAL) or single zone (ZONAL). For all instances, ensure that - // settings.backup_configuration.enabled is set to true. - // For MySQL instances, ensure that settings.backup_configuration.binary_log_enabled is set to true. - // For Postgres instances, ensure that settings.backup_configuration.point_in_time_recovery_enabled - // is set to true. Defaults to ZONAL. - AvailabilityType *string `json:"availabilityType,omitempty" tf:"availability_type,omitempty"` +// The availability type of the Cloud SQL +// instance, high availability (REGIONAL) or single zone (ZONAL).' For all instances, ensure that +// settings.backup_configuration.enabled is set to true. +// For MySQL instances, ensure that settings.backup_configuration.binary_log_enabled is set to true. +// For Postgres and SQL Server instances, ensure that settings.backup_configuration.point_in_time_recovery_enabled +// is set to true. Defaults to ZONAL. +// The availability type of the Cloud SQL instance, high availability +// (REGIONAL) or single zone (ZONAL). For all instances, ensure that +// settings.backup_configuration.enabled is set to true. +// For MySQL instances, ensure that settings.backup_configuration.binary_log_enabled is set to true. +// For Postgres instances, ensure that settings.backup_configuration.point_in_time_recovery_enabled +// is set to true. Defaults to ZONAL. +AvailabilityType *string `json:"availabilityType,omitempty" tf:"availability_type,omitempty"` - BackupConfiguration []BackupConfigurationObservation `json:"backupConfiguration,omitempty" tf:"backup_configuration,omitempty"` +BackupConfiguration []BackupConfigurationObservation `json:"backupConfiguration,omitempty" tf:"backup_configuration,omitempty"` - // The name of server instance collation. - // The name of server instance collation. - Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` +// The name of server instance collation. +// The name of server instance collation. +Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` - // Specifies if connections must use Cloud SQL connectors. - // Specifies if connections must use Cloud SQL connectors. - ConnectorEnforcement *string `json:"connectorEnforcement,omitempty" tf:"connector_enforcement,omitempty"` +// Specifies if connections must use Cloud SQL connectors. +// Specifies if connections must use Cloud SQL connectors. +ConnectorEnforcement *string `json:"connectorEnforcement,omitempty" tf:"connector_enforcement,omitempty"` - DatabaseFlags []DatabaseFlagsObservation `json:"databaseFlags,omitempty" tf:"database_flags,omitempty"` +DatabaseFlags []DatabaseFlagsObservation `json:"databaseFlags,omitempty" tf:"database_flags,omitempty"` - // . - // Configuration to protect against accidental instance deletion. - DeletionProtectionEnabled *bool `json:"deletionProtectionEnabled,omitempty" tf:"deletion_protection_enabled,omitempty"` +// . +// Configuration to protect against accidental instance deletion. +DeletionProtectionEnabled *bool `json:"deletionProtectionEnabled,omitempty" tf:"deletion_protection_enabled,omitempty"` - DenyMaintenancePeriod []DenyMaintenancePeriodObservation `json:"denyMaintenancePeriod,omitempty" tf:"deny_maintenance_period,omitempty"` +DenyMaintenancePeriod []DenyMaintenancePeriodObservation `json:"denyMaintenancePeriod,omitempty" tf:"deny_maintenance_period,omitempty"` - // Enables auto-resizing of the storage size. Defaults to true. - // Enables auto-resizing of the storage size. Defaults to true. - DiskAutoresize *bool `json:"diskAutoresize,omitempty" tf:"disk_autoresize,omitempty"` +// Enables auto-resizing of the storage size. Defaults to true. +// Enables auto-resizing of the storage size. Defaults to true. +DiskAutoresize *bool `json:"diskAutoresize,omitempty" tf:"disk_autoresize,omitempty"` - // The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit. - // The maximum size, in GB, to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit. - DiskAutoresizeLimit *float64 `json:"diskAutoresizeLimit,omitempty" tf:"disk_autoresize_limit,omitempty"` +// The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit. +// The maximum size, in GB, to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit. +DiskAutoresizeLimit *float64 `json:"diskAutoresizeLimit,omitempty" tf:"disk_autoresize_limit,omitempty"` - // The size of data disk, in GB. Size of a running instance cannot be reduced but can be increased. The minimum value is 10GB. - // The size of data disk, in GB. Size of a running instance cannot be reduced but can be increased. The minimum value is 10GB. - DiskSize *float64 `json:"diskSize,omitempty" tf:"disk_size,omitempty"` +// The size of data disk, in GB. Size of a running instance cannot be reduced but can be increased. The minimum value is 10GB. +// The size of data disk, in GB. Size of a running instance cannot be reduced but can be increased. The minimum value is 10GB. +DiskSize *float64 `json:"diskSize,omitempty" tf:"disk_size,omitempty"` - // The type of data disk: PD_SSD or PD_HDD. Defaults to PD_SSD. - // The type of data disk: PD_SSD or PD_HDD. Defaults to PD_SSD. - DiskType *string `json:"diskType,omitempty" tf:"disk_type,omitempty"` +// The type of data disk: PD_SSD or PD_HDD. Defaults to PD_SSD. +// The type of data disk: PD_SSD or PD_HDD. Defaults to PD_SSD. +DiskType *string `json:"diskType,omitempty" tf:"disk_type,omitempty"` - IPConfiguration []IPConfigurationObservation `json:"ipConfiguration,omitempty" tf:"ip_configuration,omitempty"` +IPConfiguration []IPConfigurationObservation `json:"ipConfiguration,omitempty" tf:"ip_configuration,omitempty"` - // Configuration of Query Insights. - InsightsConfig []InsightsConfigObservation `json:"insightsConfig,omitempty" tf:"insights_config,omitempty"` +// Configuration of Query Insights. +InsightsConfig []InsightsConfigObservation `json:"insightsConfig,omitempty" tf:"insights_config,omitempty"` - LocationPreference []LocationPreferenceObservation `json:"locationPreference,omitempty" tf:"location_preference,omitempty"` +LocationPreference []LocationPreferenceObservation `json:"locationPreference,omitempty" tf:"location_preference,omitempty"` - // Declares a one-hour maintenance window when an Instance can automatically restart to apply updates. The maintenance window is specified in UTC time. - MaintenanceWindow []MaintenanceWindowObservation `json:"maintenanceWindow,omitempty" tf:"maintenance_window,omitempty"` +// Declares a one-hour maintenance window when an Instance can automatically restart to apply updates. The maintenance window is specified in UTC time. +MaintenanceWindow []MaintenanceWindowObservation `json:"maintenanceWindow,omitempty" tf:"maintenance_window,omitempty"` - PasswordValidationPolicy []PasswordValidationPolicyObservation `json:"passwordValidationPolicy,omitempty" tf:"password_validation_policy,omitempty"` +PasswordValidationPolicy []PasswordValidationPolicyObservation `json:"passwordValidationPolicy,omitempty" tf:"password_validation_policy,omitempty"` - // Pricing plan for this instance, can only be PER_USE. - // Pricing plan for this instance, can only be PER_USE. - PricingPlan *string `json:"pricingPlan,omitempty" tf:"pricing_plan,omitempty"` +// Pricing plan for this instance, can only be PER_USE. +// Pricing plan for this instance, can only be PER_USE. +PricingPlan *string `json:"pricingPlan,omitempty" tf:"pricing_plan,omitempty"` - SQLServerAuditConfig []SQLServerAuditConfigObservation `json:"sqlServerAuditConfig,omitempty" tf:"sql_server_audit_config,omitempty"` +SQLServerAuditConfig []SQLServerAuditConfigObservation `json:"sqlServerAuditConfig,omitempty" tf:"sql_server_audit_config,omitempty"` - // The machine type to use. See tiers - // for more details and supported versions. Postgres supports only shared-core machine types, - // and custom machine types such as db-custom-2-13312. See the Custom Machine Type Documentation to learn about specifying custom machine types. - // The machine type to use. See tiers for more details and supported versions. Postgres supports only shared-core machine types, and custom machine types such as db-custom-2-13312. See the Custom Machine Type Documentation to learn about specifying custom machine types. - Tier *string `json:"tier,omitempty" tf:"tier,omitempty"` +// The machine type to use. See tiers +// for more details and supported versions. Postgres supports only shared-core machine types, +// and custom machine types such as db-custom-2-13312. See the Custom Machine Type Documentation to learn about specifying custom machine types. +// The machine type to use. See tiers for more details and supported versions. Postgres supports only shared-core machine types, and custom machine types such as db-custom-2-13312. See the Custom Machine Type Documentation to learn about specifying custom machine types. +Tier *string `json:"tier,omitempty" tf:"tier,omitempty"` - // The time_zone to be used by the database engine (supported only for SQL Server), in SQL Server timezone format. - // The time_zone to be used by the database engine (supported only for SQL Server), in SQL Server timezone format. - TimeZone *string `json:"timeZone,omitempty" tf:"time_zone,omitempty"` +// The time_zone to be used by the database engine (supported only for SQL Server), in SQL Server timezone format. +// The time_zone to be used by the database engine (supported only for SQL Server), in SQL Server timezone format. +TimeZone *string `json:"timeZone,omitempty" tf:"time_zone,omitempty"` - // A set of key/value user label pairs to assign to the instance. - // A set of key/value user label pairs to assign to the instance. - UserLabels map[string]*string `json:"userLabels,omitempty" tf:"user_labels,omitempty"` +// A set of key/value user label pairs to assign to the instance. +// A set of key/value user label pairs to assign to the instance. +UserLabels map[string]*string `json:"userLabels,omitempty" tf:"user_labels,omitempty"` - // Used to make sure changes to the settings block are - // atomic. - // Used to make sure changes to the settings block are atomic. - Version *float64 `json:"version,omitempty" tf:"version,omitempty"` +// Used to make sure changes to the settings block are +// atomic. +// Used to make sure changes to the settings block are atomic. +Version *float64 `json:"version,omitempty" tf:"version,omitempty"` } + type SettingsParameters struct { - // This specifies when the instance should be - // active. Can be either ALWAYS, NEVER or ON_DEMAND. - // This specifies when the instance should be active. Can be either ALWAYS, NEVER or ON_DEMAND. - // +kubebuilder:validation:Optional - ActivationPolicy *string `json:"activationPolicy,omitempty" tf:"activation_policy,omitempty"` - - // +kubebuilder:validation:Optional - ActiveDirectoryConfig []ActiveDirectoryConfigParameters `json:"activeDirectoryConfig,omitempty" tf:"active_directory_config,omitempty"` - - // +kubebuilder:validation:Optional - AdvancedMachineFeatures []AdvancedMachineFeaturesParameters `json:"advancedMachineFeatures,omitempty" tf:"advanced_machine_features,omitempty"` - - // The availability type of the Cloud SQL - // instance, high availability (REGIONAL) or single zone (ZONAL).' For all instances, ensure that - // settings.backup_configuration.enabled is set to true. - // For MySQL instances, ensure that settings.backup_configuration.binary_log_enabled is set to true. - // For Postgres and SQL Server instances, ensure that settings.backup_configuration.point_in_time_recovery_enabled - // is set to true. Defaults to ZONAL. - // The availability type of the Cloud SQL instance, high availability - // (REGIONAL) or single zone (ZONAL). For all instances, ensure that - // settings.backup_configuration.enabled is set to true. - // For MySQL instances, ensure that settings.backup_configuration.binary_log_enabled is set to true. - // For Postgres instances, ensure that settings.backup_configuration.point_in_time_recovery_enabled - // is set to true. Defaults to ZONAL. - // +kubebuilder:validation:Optional - AvailabilityType *string `json:"availabilityType,omitempty" tf:"availability_type,omitempty"` - - // +kubebuilder:validation:Optional - BackupConfiguration []BackupConfigurationParameters `json:"backupConfiguration,omitempty" tf:"backup_configuration,omitempty"` - - // The name of server instance collation. - // The name of server instance collation. - // +kubebuilder:validation:Optional - Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` - - // Specifies if connections must use Cloud SQL connectors. - // Specifies if connections must use Cloud SQL connectors. - // +kubebuilder:validation:Optional - ConnectorEnforcement *string `json:"connectorEnforcement,omitempty" tf:"connector_enforcement,omitempty"` - - // +kubebuilder:validation:Optional - DatabaseFlags []DatabaseFlagsParameters `json:"databaseFlags,omitempty" tf:"database_flags,omitempty"` - - // . - // Configuration to protect against accidental instance deletion. - // +kubebuilder:validation:Optional - DeletionProtectionEnabled *bool `json:"deletionProtectionEnabled,omitempty" tf:"deletion_protection_enabled,omitempty"` - - // +kubebuilder:validation:Optional - DenyMaintenancePeriod []DenyMaintenancePeriodParameters `json:"denyMaintenancePeriod,omitempty" tf:"deny_maintenance_period,omitempty"` - - // Enables auto-resizing of the storage size. Defaults to true. - // Enables auto-resizing of the storage size. Defaults to true. - // +kubebuilder:validation:Optional - DiskAutoresize *bool `json:"diskAutoresize,omitempty" tf:"disk_autoresize,omitempty"` - - // The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit. - // The maximum size, in GB, to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit. - // +kubebuilder:validation:Optional - DiskAutoresizeLimit *float64 `json:"diskAutoresizeLimit,omitempty" tf:"disk_autoresize_limit,omitempty"` - - // The size of data disk, in GB. Size of a running instance cannot be reduced but can be increased. The minimum value is 10GB. - // The size of data disk, in GB. Size of a running instance cannot be reduced but can be increased. The minimum value is 10GB. - // +kubebuilder:validation:Optional - DiskSize *float64 `json:"diskSize,omitempty" tf:"disk_size,omitempty"` - - // The type of data disk: PD_SSD or PD_HDD. Defaults to PD_SSD. - // The type of data disk: PD_SSD or PD_HDD. Defaults to PD_SSD. - // +kubebuilder:validation:Optional - DiskType *string `json:"diskType,omitempty" tf:"disk_type,omitempty"` - - // +kubebuilder:validation:Optional - IPConfiguration []IPConfigurationParameters `json:"ipConfiguration,omitempty" tf:"ip_configuration,omitempty"` - - // Configuration of Query Insights. - // +kubebuilder:validation:Optional - InsightsConfig []InsightsConfigParameters `json:"insightsConfig,omitempty" tf:"insights_config,omitempty"` - - // +kubebuilder:validation:Optional - LocationPreference []LocationPreferenceParameters `json:"locationPreference,omitempty" tf:"location_preference,omitempty"` - - // Declares a one-hour maintenance window when an Instance can automatically restart to apply updates. The maintenance window is specified in UTC time. - // +kubebuilder:validation:Optional - MaintenanceWindow []MaintenanceWindowParameters `json:"maintenanceWindow,omitempty" tf:"maintenance_window,omitempty"` - - // +kubebuilder:validation:Optional - PasswordValidationPolicy []PasswordValidationPolicyParameters `json:"passwordValidationPolicy,omitempty" tf:"password_validation_policy,omitempty"` - - // Pricing plan for this instance, can only be PER_USE. - // Pricing plan for this instance, can only be PER_USE. - // +kubebuilder:validation:Optional - PricingPlan *string `json:"pricingPlan,omitempty" tf:"pricing_plan,omitempty"` - - // +kubebuilder:validation:Optional - SQLServerAuditConfig []SQLServerAuditConfigParameters `json:"sqlServerAuditConfig,omitempty" tf:"sql_server_audit_config,omitempty"` - - // The machine type to use. See tiers - // for more details and supported versions. Postgres supports only shared-core machine types, - // and custom machine types such as db-custom-2-13312. See the Custom Machine Type Documentation to learn about specifying custom machine types. - // The machine type to use. See tiers for more details and supported versions. Postgres supports only shared-core machine types, and custom machine types such as db-custom-2-13312. See the Custom Machine Type Documentation to learn about specifying custom machine types. - // +kubebuilder:validation:Optional - Tier *string `json:"tier" tf:"tier,omitempty"` - - // The time_zone to be used by the database engine (supported only for SQL Server), in SQL Server timezone format. - // The time_zone to be used by the database engine (supported only for SQL Server), in SQL Server timezone format. - // +kubebuilder:validation:Optional - TimeZone *string `json:"timeZone,omitempty" tf:"time_zone,omitempty"` - - // A set of key/value user label pairs to assign to the instance. - // A set of key/value user label pairs to assign to the instance. - // +kubebuilder:validation:Optional - UserLabels map[string]*string `json:"userLabels,omitempty" tf:"user_labels,omitempty"` + +// This specifies when the instance should be +// active. Can be either ALWAYS, NEVER or ON_DEMAND. +// This specifies when the instance should be active. Can be either ALWAYS, NEVER or ON_DEMAND. +// +kubebuilder:validation:Optional +ActivationPolicy *string `json:"activationPolicy,omitempty" tf:"activation_policy,omitempty"` + +// +kubebuilder:validation:Optional +ActiveDirectoryConfig []ActiveDirectoryConfigParameters `json:"activeDirectoryConfig,omitempty" tf:"active_directory_config,omitempty"` + +// +kubebuilder:validation:Optional +AdvancedMachineFeatures []AdvancedMachineFeaturesParameters `json:"advancedMachineFeatures,omitempty" tf:"advanced_machine_features,omitempty"` + +// The availability type of the Cloud SQL +// instance, high availability (REGIONAL) or single zone (ZONAL).' For all instances, ensure that +// settings.backup_configuration.enabled is set to true. +// For MySQL instances, ensure that settings.backup_configuration.binary_log_enabled is set to true. +// For Postgres and SQL Server instances, ensure that settings.backup_configuration.point_in_time_recovery_enabled +// is set to true. Defaults to ZONAL. +// The availability type of the Cloud SQL instance, high availability +// (REGIONAL) or single zone (ZONAL). For all instances, ensure that +// settings.backup_configuration.enabled is set to true. +// For MySQL instances, ensure that settings.backup_configuration.binary_log_enabled is set to true. +// For Postgres instances, ensure that settings.backup_configuration.point_in_time_recovery_enabled +// is set to true. Defaults to ZONAL. +// +kubebuilder:validation:Optional +AvailabilityType *string `json:"availabilityType,omitempty" tf:"availability_type,omitempty"` + +// +kubebuilder:validation:Optional +BackupConfiguration []BackupConfigurationParameters `json:"backupConfiguration,omitempty" tf:"backup_configuration,omitempty"` + +// The name of server instance collation. +// The name of server instance collation. +// +kubebuilder:validation:Optional +Collation *string `json:"collation,omitempty" tf:"collation,omitempty"` + +// Specifies if connections must use Cloud SQL connectors. +// Specifies if connections must use Cloud SQL connectors. +// +kubebuilder:validation:Optional +ConnectorEnforcement *string `json:"connectorEnforcement,omitempty" tf:"connector_enforcement,omitempty"` + +// +kubebuilder:validation:Optional +DatabaseFlags []DatabaseFlagsParameters `json:"databaseFlags,omitempty" tf:"database_flags,omitempty"` + +// . +// Configuration to protect against accidental instance deletion. +// +kubebuilder:validation:Optional +DeletionProtectionEnabled *bool `json:"deletionProtectionEnabled,omitempty" tf:"deletion_protection_enabled,omitempty"` + +// +kubebuilder:validation:Optional +DenyMaintenancePeriod []DenyMaintenancePeriodParameters `json:"denyMaintenancePeriod,omitempty" tf:"deny_maintenance_period,omitempty"` + +// Enables auto-resizing of the storage size. Defaults to true. +// Enables auto-resizing of the storage size. Defaults to true. +// +kubebuilder:validation:Optional +DiskAutoresize *bool `json:"diskAutoresize,omitempty" tf:"disk_autoresize,omitempty"` + +// The maximum size to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit. +// The maximum size, in GB, to which storage capacity can be automatically increased. The default value is 0, which specifies that there is no limit. +// +kubebuilder:validation:Optional +DiskAutoresizeLimit *float64 `json:"diskAutoresizeLimit,omitempty" tf:"disk_autoresize_limit,omitempty"` + +// The size of data disk, in GB. Size of a running instance cannot be reduced but can be increased. The minimum value is 10GB. +// The size of data disk, in GB. Size of a running instance cannot be reduced but can be increased. The minimum value is 10GB. +// +kubebuilder:validation:Optional +DiskSize *float64 `json:"diskSize,omitempty" tf:"disk_size,omitempty"` + +// The type of data disk: PD_SSD or PD_HDD. Defaults to PD_SSD. +// The type of data disk: PD_SSD or PD_HDD. Defaults to PD_SSD. +// +kubebuilder:validation:Optional +DiskType *string `json:"diskType,omitempty" tf:"disk_type,omitempty"` + +// +kubebuilder:validation:Optional +IPConfiguration []IPConfigurationParameters `json:"ipConfiguration,omitempty" tf:"ip_configuration,omitempty"` + +// Configuration of Query Insights. +// +kubebuilder:validation:Optional +InsightsConfig []InsightsConfigParameters `json:"insightsConfig,omitempty" tf:"insights_config,omitempty"` + +// +kubebuilder:validation:Optional +LocationPreference []LocationPreferenceParameters `json:"locationPreference,omitempty" tf:"location_preference,omitempty"` + +// Declares a one-hour maintenance window when an Instance can automatically restart to apply updates. The maintenance window is specified in UTC time. +// +kubebuilder:validation:Optional +MaintenanceWindow []MaintenanceWindowParameters `json:"maintenanceWindow,omitempty" tf:"maintenance_window,omitempty"` + +// +kubebuilder:validation:Optional +PasswordValidationPolicy []PasswordValidationPolicyParameters `json:"passwordValidationPolicy,omitempty" tf:"password_validation_policy,omitempty"` + +// Pricing plan for this instance, can only be PER_USE. +// Pricing plan for this instance, can only be PER_USE. +// +kubebuilder:validation:Optional +PricingPlan *string `json:"pricingPlan,omitempty" tf:"pricing_plan,omitempty"` + +// +kubebuilder:validation:Optional +SQLServerAuditConfig []SQLServerAuditConfigParameters `json:"sqlServerAuditConfig,omitempty" tf:"sql_server_audit_config,omitempty"` + +// The machine type to use. See tiers +// for more details and supported versions. Postgres supports only shared-core machine types, +// and custom machine types such as db-custom-2-13312. See the Custom Machine Type Documentation to learn about specifying custom machine types. +// The machine type to use. See tiers for more details and supported versions. Postgres supports only shared-core machine types, and custom machine types such as db-custom-2-13312. See the Custom Machine Type Documentation to learn about specifying custom machine types. +// +kubebuilder:validation:Optional +Tier *string `json:"tier" tf:"tier,omitempty"` + +// The time_zone to be used by the database engine (supported only for SQL Server), in SQL Server timezone format. +// The time_zone to be used by the database engine (supported only for SQL Server), in SQL Server timezone format. +// +kubebuilder:validation:Optional +TimeZone *string `json:"timeZone,omitempty" tf:"time_zone,omitempty"` + +// A set of key/value user label pairs to assign to the instance. +// A set of key/value user label pairs to assign to the instance. +// +kubebuilder:validation:Optional +UserLabels map[string]*string `json:"userLabels,omitempty" tf:"user_labels,omitempty"` } // DatabaseInstanceSpec defines the desired state of DatabaseInstance type DatabaseInstanceSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider DatabaseInstanceParameters `json:"forProvider"` + ForProvider DatabaseInstanceParameters `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 @@ -1655,13 +1778,13 @@ type DatabaseInstanceSpec 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 DatabaseInstanceInitParameters `json:"initProvider,omitempty"` + InitProvider DatabaseInstanceInitParameters `json:"initProvider,omitempty"` } // DatabaseInstanceStatus defines the observed state of DatabaseInstance. type DatabaseInstanceStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider DatabaseInstanceObservation `json:"atProvider,omitempty"` + AtProvider DatabaseInstanceObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -1676,9 +1799,9 @@ type DatabaseInstanceStatus struct { type DatabaseInstance 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.databaseVersion) || (has(self.initProvider) && has(self.initProvider.databaseVersion))",message="spec.forProvider.databaseVersion is a required parameter" - Spec DatabaseInstanceSpec `json:"spec"` - Status DatabaseInstanceStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.databaseVersion) || (has(self.initProvider) && has(self.initProvider.databaseVersion))",message="spec.forProvider.databaseVersion is a required parameter" + Spec DatabaseInstanceSpec `json:"spec"` + Status DatabaseInstanceStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/sql/v1alpha1/zz_sourcerepresentationinstance_types.go b/apis/sql/v1alpha1/zz_sourcerepresentationinstance_types.go index c7dce14..b35ea2c 100755 --- a/apis/sql/v1alpha1/zz_sourcerepresentationinstance_types.go +++ b/apis/sql/v1alpha1/zz_sourcerepresentationinstance_types.go @@ -15,175 +15,184 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type SourceRepresentationInstanceInitParameters struct { - // The CA certificate on the external server. Include only if SSL/TLS is used on the external server. - // The CA certificate on the external server. Include only if SSL/TLS is used on the external server. - CACertificate *string `json:"caCertificate,omitempty" tf:"ca_certificate,omitempty"` - - // The client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server. - // The client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server. - ClientCertificate *string `json:"clientCertificate,omitempty" tf:"client_certificate,omitempty"` - - // The private key file for the client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server. - // The private key file for the client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server. - ClientKey *string `json:"clientKey,omitempty" tf:"client_key,omitempty"` - - // The MySQL version running on your source database server. - // Possible values are: MYSQL_5_6, MYSQL_5_7, MYSQL_8_0, POSTGRES_9_6, POSTGRES_10, POSTGRES_11, POSTGRES_12, POSTGRES_13, POSTGRES_14. - // The MySQL version running on your source database server. Possible values: ["MYSQL_5_6", "MYSQL_5_7", "MYSQL_8_0", "POSTGRES_9_6", "POSTGRES_10", "POSTGRES_11", "POSTGRES_12", "POSTGRES_13", "POSTGRES_14"] - DatabaseVersion *string `json:"databaseVersion,omitempty" tf:"database_version,omitempty"` - - // A file in the bucket that contains the data from the external server. - // A file in the bucket that contains the data from the external server. - DumpFilePath *string `json:"dumpFilePath,omitempty" tf:"dump_file_path,omitempty"` - - // The externally accessible IPv4 address for the source database server. - // The externally accessible IPv4 address for the source database server. - Host *string `json:"host,omitempty" tf:"host,omitempty"` - - // The externally accessible port for the source database server. - // Defaults to 3306. - // The externally accessible port for the source database server. - // Defaults to 3306. - Port *float64 `json:"port,omitempty" tf:"port,omitempty"` - - // The ID of the project in which the resource belongs. - // If it is not provided, the provider project is used. - Project *string `json:"project,omitempty" tf:"project,omitempty"` - - // The Region in which the created instance should reside. - // If it is not provided, the provider region is used. - // The Region in which the created instance should reside. - // If it is not provided, the provider region is used. - Region *string `json:"region,omitempty" tf:"region,omitempty"` - - // The replication user account on the external server. - // The replication user account on the external server. - Username *string `json:"username,omitempty" tf:"username,omitempty"` + +// The CA certificate on the external server. Include only if SSL/TLS is used on the external server. +// The CA certificate on the external server. Include only if SSL/TLS is used on the external server. +CACertificate *string `json:"caCertificate,omitempty" tf:"ca_certificate,omitempty"` + +// The client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server. +// The client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server. +ClientCertificate *string `json:"clientCertificate,omitempty" tf:"client_certificate,omitempty"` + +// The private key file for the client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server. +// The private key file for the client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server. +ClientKey *string `json:"clientKey,omitempty" tf:"client_key,omitempty"` + +// The MySQL version running on your source database server. +// Possible values are: MYSQL_5_6, MYSQL_5_7, MYSQL_8_0, POSTGRES_9_6, POSTGRES_10, POSTGRES_11, POSTGRES_12, POSTGRES_13, POSTGRES_14. +// The MySQL version running on your source database server. Possible values: ["MYSQL_5_6", "MYSQL_5_7", "MYSQL_8_0", "POSTGRES_9_6", "POSTGRES_10", "POSTGRES_11", "POSTGRES_12", "POSTGRES_13", "POSTGRES_14"] +DatabaseVersion *string `json:"databaseVersion,omitempty" tf:"database_version,omitempty"` + +// A file in the bucket that contains the data from the external server. +// A file in the bucket that contains the data from the external server. +DumpFilePath *string `json:"dumpFilePath,omitempty" tf:"dump_file_path,omitempty"` + +// The externally accessible IPv4 address for the source database server. +// The externally accessible IPv4 address for the source database server. +Host *string `json:"host,omitempty" tf:"host,omitempty"` + +// The externally accessible port for the source database server. +// Defaults to 3306. +// The externally accessible port for the source database server. +// Defaults to 3306. +Port *float64 `json:"port,omitempty" tf:"port,omitempty"` + +// The ID of the project in which the resource belongs. +// If it is not provided, the provider project is used. +Project *string `json:"project,omitempty" tf:"project,omitempty"` + +// The Region in which the created instance should reside. +// If it is not provided, the provider region is used. +// The Region in which the created instance should reside. +// If it is not provided, the provider region is used. +Region *string `json:"region,omitempty" tf:"region,omitempty"` + +// The replication user account on the external server. +// The replication user account on the external server. +Username *string `json:"username,omitempty" tf:"username,omitempty"` } + type SourceRepresentationInstanceObservation struct { - // The CA certificate on the external server. Include only if SSL/TLS is used on the external server. - // The CA certificate on the external server. Include only if SSL/TLS is used on the external server. - CACertificate *string `json:"caCertificate,omitempty" tf:"ca_certificate,omitempty"` - - // The client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server. - // The client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server. - ClientCertificate *string `json:"clientCertificate,omitempty" tf:"client_certificate,omitempty"` - - // The private key file for the client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server. - // The private key file for the client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server. - ClientKey *string `json:"clientKey,omitempty" tf:"client_key,omitempty"` - - // The MySQL version running on your source database server. - // Possible values are: MYSQL_5_6, MYSQL_5_7, MYSQL_8_0, POSTGRES_9_6, POSTGRES_10, POSTGRES_11, POSTGRES_12, POSTGRES_13, POSTGRES_14. - // The MySQL version running on your source database server. Possible values: ["MYSQL_5_6", "MYSQL_5_7", "MYSQL_8_0", "POSTGRES_9_6", "POSTGRES_10", "POSTGRES_11", "POSTGRES_12", "POSTGRES_13", "POSTGRES_14"] - DatabaseVersion *string `json:"databaseVersion,omitempty" tf:"database_version,omitempty"` - - // A file in the bucket that contains the data from the external server. - // A file in the bucket that contains the data from the external server. - DumpFilePath *string `json:"dumpFilePath,omitempty" tf:"dump_file_path,omitempty"` - - // The externally accessible IPv4 address for the source database server. - // The externally accessible IPv4 address for the source database server. - Host *string `json:"host,omitempty" tf:"host,omitempty"` - - // an identifier for the resource with format projects/{{project}}/instances/{{name}} - ID *string `json:"id,omitempty" tf:"id,omitempty"` - - // The externally accessible port for the source database server. - // Defaults to 3306. - // The externally accessible port for the source database server. - // Defaults to 3306. - Port *float64 `json:"port,omitempty" tf:"port,omitempty"` - - // The ID of the project in which the resource belongs. - // If it is not provided, the provider project is used. - Project *string `json:"project,omitempty" tf:"project,omitempty"` - - // The Region in which the created instance should reside. - // If it is not provided, the provider region is used. - // The Region in which the created instance should reside. - // If it is not provided, the provider region is used. - Region *string `json:"region,omitempty" tf:"region,omitempty"` - - // The replication user account on the external server. - // The replication user account on the external server. - Username *string `json:"username,omitempty" tf:"username,omitempty"` + +// The CA certificate on the external server. Include only if SSL/TLS is used on the external server. +// The CA certificate on the external server. Include only if SSL/TLS is used on the external server. +CACertificate *string `json:"caCertificate,omitempty" tf:"ca_certificate,omitempty"` + +// The client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server. +// The client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server. +ClientCertificate *string `json:"clientCertificate,omitempty" tf:"client_certificate,omitempty"` + +// The private key file for the client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server. +// The private key file for the client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server. +ClientKey *string `json:"clientKey,omitempty" tf:"client_key,omitempty"` + +// The MySQL version running on your source database server. +// Possible values are: MYSQL_5_6, MYSQL_5_7, MYSQL_8_0, POSTGRES_9_6, POSTGRES_10, POSTGRES_11, POSTGRES_12, POSTGRES_13, POSTGRES_14. +// The MySQL version running on your source database server. Possible values: ["MYSQL_5_6", "MYSQL_5_7", "MYSQL_8_0", "POSTGRES_9_6", "POSTGRES_10", "POSTGRES_11", "POSTGRES_12", "POSTGRES_13", "POSTGRES_14"] +DatabaseVersion *string `json:"databaseVersion,omitempty" tf:"database_version,omitempty"` + +// A file in the bucket that contains the data from the external server. +// A file in the bucket that contains the data from the external server. +DumpFilePath *string `json:"dumpFilePath,omitempty" tf:"dump_file_path,omitempty"` + +// The externally accessible IPv4 address for the source database server. +// The externally accessible IPv4 address for the source database server. +Host *string `json:"host,omitempty" tf:"host,omitempty"` + +// an identifier for the resource with format projects/{{project}}/instances/{{name}} +ID *string `json:"id,omitempty" tf:"id,omitempty"` + +// The externally accessible port for the source database server. +// Defaults to 3306. +// The externally accessible port for the source database server. +// Defaults to 3306. +Port *float64 `json:"port,omitempty" tf:"port,omitempty"` + +// The ID of the project in which the resource belongs. +// If it is not provided, the provider project is used. +Project *string `json:"project,omitempty" tf:"project,omitempty"` + +// The Region in which the created instance should reside. +// If it is not provided, the provider region is used. +// The Region in which the created instance should reside. +// If it is not provided, the provider region is used. +Region *string `json:"region,omitempty" tf:"region,omitempty"` + +// The replication user account on the external server. +// The replication user account on the external server. +Username *string `json:"username,omitempty" tf:"username,omitempty"` } + type SourceRepresentationInstanceParameters struct { - // The CA certificate on the external server. Include only if SSL/TLS is used on the external server. - // The CA certificate on the external server. Include only if SSL/TLS is used on the external server. - // +kubebuilder:validation:Optional - CACertificate *string `json:"caCertificate,omitempty" tf:"ca_certificate,omitempty"` - - // The client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server. - // The client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server. - // +kubebuilder:validation:Optional - ClientCertificate *string `json:"clientCertificate,omitempty" tf:"client_certificate,omitempty"` - - // The private key file for the client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server. - // The private key file for the client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server. - // +kubebuilder:validation:Optional - ClientKey *string `json:"clientKey,omitempty" tf:"client_key,omitempty"` - - // The MySQL version running on your source database server. - // Possible values are: MYSQL_5_6, MYSQL_5_7, MYSQL_8_0, POSTGRES_9_6, POSTGRES_10, POSTGRES_11, POSTGRES_12, POSTGRES_13, POSTGRES_14. - // The MySQL version running on your source database server. Possible values: ["MYSQL_5_6", "MYSQL_5_7", "MYSQL_8_0", "POSTGRES_9_6", "POSTGRES_10", "POSTGRES_11", "POSTGRES_12", "POSTGRES_13", "POSTGRES_14"] - // +kubebuilder:validation:Optional - DatabaseVersion *string `json:"databaseVersion,omitempty" tf:"database_version,omitempty"` - - // A file in the bucket that contains the data from the external server. - // A file in the bucket that contains the data from the external server. - // +kubebuilder:validation:Optional - DumpFilePath *string `json:"dumpFilePath,omitempty" tf:"dump_file_path,omitempty"` - - // The externally accessible IPv4 address for the source database server. - // The externally accessible IPv4 address for the source database server. - // +kubebuilder:validation:Optional - Host *string `json:"host,omitempty" tf:"host,omitempty"` - - // The password for the replication user account. - // Note: This property is sensitive and will not be displayed in the plan. - // The password for the replication user account. - // +kubebuilder:validation:Optional - PasswordSecretRef *v1.SecretKeySelector `json:"passwordSecretRef,omitempty" tf:"-"` - - // The externally accessible port for the source database server. - // Defaults to 3306. - // The externally accessible port for the source database server. - // Defaults to 3306. - // +kubebuilder:validation:Optional - Port *float64 `json:"port,omitempty" tf:"port,omitempty"` - - // The ID of the project in which the resource belongs. - // If it is not provided, the provider project is used. - // +kubebuilder:validation:Optional - Project *string `json:"project,omitempty" tf:"project,omitempty"` - - // The Region in which the created instance should reside. - // If it is not provided, the provider region is used. - // The Region in which the created instance should reside. - // If it is not provided, the provider region is used. - // +kubebuilder:validation:Optional - Region *string `json:"region,omitempty" tf:"region,omitempty"` - - // The replication user account on the external server. - // The replication user account on the external server. - // +kubebuilder:validation:Optional - Username *string `json:"username,omitempty" tf:"username,omitempty"` + +// The CA certificate on the external server. Include only if SSL/TLS is used on the external server. +// The CA certificate on the external server. Include only if SSL/TLS is used on the external server. +// +kubebuilder:validation:Optional +CACertificate *string `json:"caCertificate,omitempty" tf:"ca_certificate,omitempty"` + +// The client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server. +// The client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server. +// +kubebuilder:validation:Optional +ClientCertificate *string `json:"clientCertificate,omitempty" tf:"client_certificate,omitempty"` + +// The private key file for the client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server. +// The private key file for the client certificate on the external server. Required only for server-client authentication. Include only if SSL/TLS is used on the external server. +// +kubebuilder:validation:Optional +ClientKey *string `json:"clientKey,omitempty" tf:"client_key,omitempty"` + +// The MySQL version running on your source database server. +// Possible values are: MYSQL_5_6, MYSQL_5_7, MYSQL_8_0, POSTGRES_9_6, POSTGRES_10, POSTGRES_11, POSTGRES_12, POSTGRES_13, POSTGRES_14. +// The MySQL version running on your source database server. Possible values: ["MYSQL_5_6", "MYSQL_5_7", "MYSQL_8_0", "POSTGRES_9_6", "POSTGRES_10", "POSTGRES_11", "POSTGRES_12", "POSTGRES_13", "POSTGRES_14"] +// +kubebuilder:validation:Optional +DatabaseVersion *string `json:"databaseVersion,omitempty" tf:"database_version,omitempty"` + +// A file in the bucket that contains the data from the external server. +// A file in the bucket that contains the data from the external server. +// +kubebuilder:validation:Optional +DumpFilePath *string `json:"dumpFilePath,omitempty" tf:"dump_file_path,omitempty"` + +// The externally accessible IPv4 address for the source database server. +// The externally accessible IPv4 address for the source database server. +// +kubebuilder:validation:Optional +Host *string `json:"host,omitempty" tf:"host,omitempty"` + +// The password for the replication user account. +// Note: This property is sensitive and will not be displayed in the plan. +// The password for the replication user account. +// +kubebuilder:validation:Optional +PasswordSecretRef *v1.SecretKeySelector `json:"passwordSecretRef,omitempty" tf:"-"` + +// The externally accessible port for the source database server. +// Defaults to 3306. +// The externally accessible port for the source database server. +// Defaults to 3306. +// +kubebuilder:validation:Optional +Port *float64 `json:"port,omitempty" tf:"port,omitempty"` + +// The ID of the project in which the resource belongs. +// If it is not provided, the provider project is used. +// +kubebuilder:validation:Optional +Project *string `json:"project,omitempty" tf:"project,omitempty"` + +// The Region in which the created instance should reside. +// If it is not provided, the provider region is used. +// The Region in which the created instance should reside. +// If it is not provided, the provider region is used. +// +kubebuilder:validation:Optional +Region *string `json:"region,omitempty" tf:"region,omitempty"` + +// The replication user account on the external server. +// The replication user account on the external server. +// +kubebuilder:validation:Optional +Username *string `json:"username,omitempty" tf:"username,omitempty"` } // SourceRepresentationInstanceSpec defines the desired state of SourceRepresentationInstance type SourceRepresentationInstanceSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider SourceRepresentationInstanceParameters `json:"forProvider"` + ForProvider SourceRepresentationInstanceParameters `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 @@ -194,13 +203,13 @@ type SourceRepresentationInstanceSpec 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 SourceRepresentationInstanceInitParameters `json:"initProvider,omitempty"` + InitProvider SourceRepresentationInstanceInitParameters `json:"initProvider,omitempty"` } // SourceRepresentationInstanceStatus defines the observed state of SourceRepresentationInstance. type SourceRepresentationInstanceStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider SourceRepresentationInstanceObservation `json:"atProvider,omitempty"` + AtProvider SourceRepresentationInstanceObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -215,10 +224,10 @@ type SourceRepresentationInstanceStatus struct { type SourceRepresentationInstance 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.databaseVersion) || (has(self.initProvider) && has(self.initProvider.databaseVersion))",message="spec.forProvider.databaseVersion is a required parameter" - // +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.host) || (has(self.initProvider) && has(self.initProvider.host))",message="spec.forProvider.host is a required parameter" - Spec SourceRepresentationInstanceSpec `json:"spec"` - Status SourceRepresentationInstanceStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.databaseVersion) || (has(self.initProvider) && has(self.initProvider.databaseVersion))",message="spec.forProvider.databaseVersion is a required parameter" +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.host) || (has(self.initProvider) && has(self.initProvider.host))",message="spec.forProvider.host is a required parameter" + Spec SourceRepresentationInstanceSpec `json:"spec"` + Status SourceRepresentationInstanceStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/sql/v1alpha1/zz_sslcert_types.go b/apis/sql/v1alpha1/zz_sslcert_types.go index c47a7c2..25ddefb 100755 --- a/apis/sql/v1alpha1/zz_sslcert_types.go +++ b/apis/sql/v1alpha1/zz_sslcert_types.go @@ -15,101 +15,110 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type SSLCertInitParameters struct { - // The common name to be used in the certificate to identify the - // client. Constrained to [a-zA-Z.-_ ]+. Changing this forces a new resource to be created. - // The common name to be used in the certificate to identify the client. Constrained to [a-zA-Z.-_ ]+. Changing this forces a new resource to be created. - CommonName *string `json:"commonName,omitempty" tf:"common_name,omitempty"` - // The ID of the project in which the resource belongs. If it - // is not provided, the provider project is used. - // The ID of the project in which the resource belongs. If it is not provided, the provider project is used. - Project *string `json:"project,omitempty" tf:"project,omitempty"` +// The common name to be used in the certificate to identify the +// client. Constrained to [a-zA-Z.-_ ]+. Changing this forces a new resource to be created. +// The common name to be used in the certificate to identify the client. Constrained to [a-zA-Z.-_ ]+. Changing this forces a new resource to be created. +CommonName *string `json:"commonName,omitempty" tf:"common_name,omitempty"` + +// The ID of the project in which the resource belongs. If it +// is not provided, the provider project is used. +// The ID of the project in which the resource belongs. If it is not provided, the provider project is used. +Project *string `json:"project,omitempty" tf:"project,omitempty"` } + type SSLCertObservation struct { - // The actual certificate data for this client certificate. - // The actual certificate data for this client certificate. - Cert *string `json:"cert,omitempty" tf:"cert,omitempty"` - // The serial number extracted from the certificate data. - // The serial number extracted from the certificate data. - CertSerialNumber *string `json:"certSerialNumber,omitempty" tf:"cert_serial_number,omitempty"` +// The actual certificate data for this client certificate. +// The actual certificate data for this client certificate. +Cert *string `json:"cert,omitempty" tf:"cert,omitempty"` + +// The serial number extracted from the certificate data. +// The serial number extracted from the certificate data. +CertSerialNumber *string `json:"certSerialNumber,omitempty" tf:"cert_serial_number,omitempty"` - // The common name to be used in the certificate to identify the - // client. Constrained to [a-zA-Z.-_ ]+. Changing this forces a new resource to be created. - // The common name to be used in the certificate to identify the client. Constrained to [a-zA-Z.-_ ]+. Changing this forces a new resource to be created. - CommonName *string `json:"commonName,omitempty" tf:"common_name,omitempty"` +// The common name to be used in the certificate to identify the +// client. Constrained to [a-zA-Z.-_ ]+. Changing this forces a new resource to be created. +// The common name to be used in the certificate to identify the client. Constrained to [a-zA-Z.-_ ]+. Changing this forces a new resource to be created. +CommonName *string `json:"commonName,omitempty" tf:"common_name,omitempty"` - // The time when the certificate was created in RFC 3339 format, - // for example 2012-11-15T16:19:00.094Z. - // The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. - CreateTime *string `json:"createTime,omitempty" tf:"create_time,omitempty"` +// The time when the certificate was created in RFC 3339 format, +// for example 2012-11-15T16:19:00.094Z. +// The time when the certificate was created in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. +CreateTime *string `json:"createTime,omitempty" tf:"create_time,omitempty"` - // The time when the certificate expires in RFC 3339 format, - // for example 2012-11-15T16:19:00.094Z. - // The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. - ExpirationTime *string `json:"expirationTime,omitempty" tf:"expiration_time,omitempty"` +// The time when the certificate expires in RFC 3339 format, +// for example 2012-11-15T16:19:00.094Z. +// The time when the certificate expires in RFC 3339 format, for example 2012-11-15T16:19:00.094Z. +ExpirationTime *string `json:"expirationTime,omitempty" tf:"expiration_time,omitempty"` - ID *string `json:"id,omitempty" tf:"id,omitempty"` +ID *string `json:"id,omitempty" tf:"id,omitempty"` - // The name of the Cloud SQL instance. Changing this - // forces a new resource to be created. - // The name of the Cloud SQL instance. Changing this forces a new resource to be created. - Instance *string `json:"instance,omitempty" tf:"instance,omitempty"` +// The name of the Cloud SQL instance. Changing this +// forces a new resource to be created. +// The name of the Cloud SQL instance. Changing this forces a new resource to be created. +Instance *string `json:"instance,omitempty" tf:"instance,omitempty"` - // The ID of the project in which the resource belongs. If it - // is not provided, the provider project is used. - // The ID of the project in which the resource belongs. If it is not provided, the provider project is used. - Project *string `json:"project,omitempty" tf:"project,omitempty"` +// The ID of the project in which the resource belongs. If it +// is not provided, the provider project is used. +// The ID of the project in which the resource belongs. If it is not provided, the provider project is used. +Project *string `json:"project,omitempty" tf:"project,omitempty"` - // The CA cert of the server this client cert was generated from. - // The CA cert of the server this client cert was generated from. - ServerCACert *string `json:"serverCaCert,omitempty" tf:"server_ca_cert,omitempty"` +// The CA cert of the server this client cert was generated from. +// The CA cert of the server this client cert was generated from. +ServerCACert *string `json:"serverCaCert,omitempty" tf:"server_ca_cert,omitempty"` - // The SHA1 Fingerprint of the certificate. - // The SHA1 Fingerprint of the certificate. - Sha1Fingerprint *string `json:"sha1Fingerprint,omitempty" tf:"sha1_fingerprint,omitempty"` +// The SHA1 Fingerprint of the certificate. +// The SHA1 Fingerprint of the certificate. +Sha1Fingerprint *string `json:"sha1Fingerprint,omitempty" tf:"sha1_fingerprint,omitempty"` } + type SSLCertParameters struct { - // The common name to be used in the certificate to identify the - // client. Constrained to [a-zA-Z.-_ ]+. Changing this forces a new resource to be created. - // The common name to be used in the certificate to identify the client. Constrained to [a-zA-Z.-_ ]+. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - CommonName *string `json:"commonName,omitempty" tf:"common_name,omitempty"` - - // The name of the Cloud SQL instance. Changing this - // forces a new resource to be created. - // The name of the Cloud SQL instance. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=DatabaseInstance - // +kubebuilder:validation:Optional - Instance *string `json:"instance,omitempty" tf:"instance,omitempty"` - - // Reference to a DatabaseInstance to populate instance. - // +kubebuilder:validation:Optional - InstanceRef *v1.Reference `json:"instanceRef,omitempty" tf:"-"` - - // Selector for a DatabaseInstance to populate instance. - // +kubebuilder:validation:Optional - InstanceSelector *v1.Selector `json:"instanceSelector,omitempty" tf:"-"` - - // The ID of the project in which the resource belongs. If it - // is not provided, the provider project is used. - // The ID of the project in which the resource belongs. If it is not provided, the provider project is used. - // +kubebuilder:validation:Optional - Project *string `json:"project,omitempty" tf:"project,omitempty"` + +// The common name to be used in the certificate to identify the +// client. Constrained to [a-zA-Z.-_ ]+. Changing this forces a new resource to be created. +// The common name to be used in the certificate to identify the client. Constrained to [a-zA-Z.-_ ]+. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +CommonName *string `json:"commonName,omitempty" tf:"common_name,omitempty"` + +// The name of the Cloud SQL instance. Changing this +// forces a new resource to be created. +// The name of the Cloud SQL instance. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=DatabaseInstance +// +kubebuilder:validation:Optional +Instance *string `json:"instance,omitempty" tf:"instance,omitempty"` + +// Reference to a DatabaseInstance to populate instance. +// +kubebuilder:validation:Optional +InstanceRef *v1.Reference `json:"instanceRef,omitempty" tf:"-"` + +// Selector for a DatabaseInstance to populate instance. +// +kubebuilder:validation:Optional +InstanceSelector *v1.Selector `json:"instanceSelector,omitempty" tf:"-"` + +// The ID of the project in which the resource belongs. If it +// is not provided, the provider project is used. +// The ID of the project in which the resource belongs. If it is not provided, the provider project is used. +// +kubebuilder:validation:Optional +Project *string `json:"project,omitempty" tf:"project,omitempty"` } // SSLCertSpec defines the desired state of SSLCert type SSLCertSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider SSLCertParameters `json:"forProvider"` + ForProvider SSLCertParameters `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 @@ -120,13 +129,13 @@ type SSLCertSpec 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 SSLCertInitParameters `json:"initProvider,omitempty"` + InitProvider SSLCertInitParameters `json:"initProvider,omitempty"` } // SSLCertStatus defines the observed state of SSLCert. type SSLCertStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider SSLCertObservation `json:"atProvider,omitempty"` + AtProvider SSLCertObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true @@ -141,9 +150,9 @@ type SSLCertStatus struct { type SSLCert 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.commonName) || (has(self.initProvider) && has(self.initProvider.commonName))",message="spec.forProvider.commonName is a required parameter" - Spec SSLCertSpec `json:"spec"` - Status SSLCertStatus `json:"status,omitempty"` +// +kubebuilder:validation:XValidation:rule="!('*' in self.managementPolicies || 'Create' in self.managementPolicies || 'Update' in self.managementPolicies) || has(self.forProvider.commonName) || (has(self.initProvider) && has(self.initProvider.commonName))",message="spec.forProvider.commonName is a required parameter" + Spec SSLCertSpec `json:"spec"` + Status SSLCertStatus `json:"status,omitempty"` } // +kubebuilder:object:root=true diff --git a/apis/sql/v1alpha1/zz_user_types.go b/apis/sql/v1alpha1/zz_user_types.go index d4d3207..fe65395 100755 --- a/apis/sql/v1alpha1/zz_user_types.go +++ b/apis/sql/v1alpha1/zz_user_types.go @@ -15,233 +15,261 @@ import ( "k8s.io/apimachinery/pkg/runtime/schema" v1 "github.com/crossplane/crossplane-runtime/apis/common/v1" + ) + + + type PasswordPolicyInitParameters struct { - // Number of failed attempts allowed before the user get locked. - // Number of failed attempts allowed before the user get locked. - AllowedFailedAttempts *float64 `json:"allowedFailedAttempts,omitempty" tf:"allowed_failed_attempts,omitempty"` - // If true, the check that will lock user after too many failed login attempts will be enabled. - // If true, the check that will lock user after too many failed login attempts will be enabled. - EnableFailedAttemptsCheck *bool `json:"enableFailedAttemptsCheck,omitempty" tf:"enable_failed_attempts_check,omitempty"` +// Number of failed attempts allowed before the user get locked. +// Number of failed attempts allowed before the user get locked. +AllowedFailedAttempts *float64 `json:"allowedFailedAttempts,omitempty" tf:"allowed_failed_attempts,omitempty"` + +// If true, the check that will lock user after too many failed login attempts will be enabled. +// If true, the check that will lock user after too many failed login attempts will be enabled. +EnableFailedAttemptsCheck *bool `json:"enableFailedAttemptsCheck,omitempty" tf:"enable_failed_attempts_check,omitempty"` - // If true, the user must specify the current password before changing the password. This flag is supported only for MySQL. - // If true, the user must specify the current password before changing the password. This flag is supported only for MySQL. - EnablePasswordVerification *bool `json:"enablePasswordVerification,omitempty" tf:"enable_password_verification,omitempty"` +// If true, the user must specify the current password before changing the password. This flag is supported only for MySQL. +// If true, the user must specify the current password before changing the password. This flag is supported only for MySQL. +EnablePasswordVerification *bool `json:"enablePasswordVerification,omitempty" tf:"enable_password_verification,omitempty"` - // Password expiration duration with one week grace period. - // Password expiration duration with one week grace period. - PasswordExpirationDuration *string `json:"passwordExpirationDuration,omitempty" tf:"password_expiration_duration,omitempty"` +// Password expiration duration with one week grace period. +// Password expiration duration with one week grace period. +PasswordExpirationDuration *string `json:"passwordExpirationDuration,omitempty" tf:"password_expiration_duration,omitempty"` } + type PasswordPolicyObservation struct { - // Number of failed attempts allowed before the user get locked. - // Number of failed attempts allowed before the user get locked. - AllowedFailedAttempts *float64 `json:"allowedFailedAttempts,omitempty" tf:"allowed_failed_attempts,omitempty"` - // If true, the check that will lock user after too many failed login attempts will be enabled. - // If true, the check that will lock user after too many failed login attempts will be enabled. - EnableFailedAttemptsCheck *bool `json:"enableFailedAttemptsCheck,omitempty" tf:"enable_failed_attempts_check,omitempty"` +// Number of failed attempts allowed before the user get locked. +// Number of failed attempts allowed before the user get locked. +AllowedFailedAttempts *float64 `json:"allowedFailedAttempts,omitempty" tf:"allowed_failed_attempts,omitempty"` + +// If true, the check that will lock user after too many failed login attempts will be enabled. +// If true, the check that will lock user after too many failed login attempts will be enabled. +EnableFailedAttemptsCheck *bool `json:"enableFailedAttemptsCheck,omitempty" tf:"enable_failed_attempts_check,omitempty"` - // If true, the user must specify the current password before changing the password. This flag is supported only for MySQL. - // If true, the user must specify the current password before changing the password. This flag is supported only for MySQL. - EnablePasswordVerification *bool `json:"enablePasswordVerification,omitempty" tf:"enable_password_verification,omitempty"` +// If true, the user must specify the current password before changing the password. This flag is supported only for MySQL. +// If true, the user must specify the current password before changing the password. This flag is supported only for MySQL. +EnablePasswordVerification *bool `json:"enablePasswordVerification,omitempty" tf:"enable_password_verification,omitempty"` - // Password expiration duration with one week grace period. - // Password expiration duration with one week grace period. - PasswordExpirationDuration *string `json:"passwordExpirationDuration,omitempty" tf:"password_expiration_duration,omitempty"` +// Password expiration duration with one week grace period. +// Password expiration duration with one week grace period. +PasswordExpirationDuration *string `json:"passwordExpirationDuration,omitempty" tf:"password_expiration_duration,omitempty"` - Status []StatusObservation `json:"status,omitempty" tf:"status,omitempty"` +Status []StatusObservation `json:"status,omitempty" tf:"status,omitempty"` } + type PasswordPolicyParameters struct { - // Number of failed attempts allowed before the user get locked. - // Number of failed attempts allowed before the user get locked. - // +kubebuilder:validation:Optional - AllowedFailedAttempts *float64 `json:"allowedFailedAttempts,omitempty" tf:"allowed_failed_attempts,omitempty"` - - // If true, the check that will lock user after too many failed login attempts will be enabled. - // If true, the check that will lock user after too many failed login attempts will be enabled. - // +kubebuilder:validation:Optional - EnableFailedAttemptsCheck *bool `json:"enableFailedAttemptsCheck,omitempty" tf:"enable_failed_attempts_check,omitempty"` - - // If true, the user must specify the current password before changing the password. This flag is supported only for MySQL. - // If true, the user must specify the current password before changing the password. This flag is supported only for MySQL. - // +kubebuilder:validation:Optional - EnablePasswordVerification *bool `json:"enablePasswordVerification,omitempty" tf:"enable_password_verification,omitempty"` - - // Password expiration duration with one week grace period. - // Password expiration duration with one week grace period. - // +kubebuilder:validation:Optional - PasswordExpirationDuration *string `json:"passwordExpirationDuration,omitempty" tf:"password_expiration_duration,omitempty"` + +// Number of failed attempts allowed before the user get locked. +// Number of failed attempts allowed before the user get locked. +// +kubebuilder:validation:Optional +AllowedFailedAttempts *float64 `json:"allowedFailedAttempts,omitempty" tf:"allowed_failed_attempts,omitempty"` + +// If true, the check that will lock user after too many failed login attempts will be enabled. +// If true, the check that will lock user after too many failed login attempts will be enabled. +// +kubebuilder:validation:Optional +EnableFailedAttemptsCheck *bool `json:"enableFailedAttemptsCheck,omitempty" tf:"enable_failed_attempts_check,omitempty"` + +// If true, the user must specify the current password before changing the password. This flag is supported only for MySQL. +// If true, the user must specify the current password before changing the password. This flag is supported only for MySQL. +// +kubebuilder:validation:Optional +EnablePasswordVerification *bool `json:"enablePasswordVerification,omitempty" tf:"enable_password_verification,omitempty"` + +// Password expiration duration with one week grace period. +// Password expiration duration with one week grace period. +// +kubebuilder:validation:Optional +PasswordExpirationDuration *string `json:"passwordExpirationDuration,omitempty" tf:"password_expiration_duration,omitempty"` } + type SQLServerUserDetailsInitParameters struct { + } + type SQLServerUserDetailsObservation struct { - Disabled *bool `json:"disabled,omitempty" tf:"disabled,omitempty"` - ServerRoles []*string `json:"serverRoles,omitempty" tf:"server_roles,omitempty"` + +Disabled *bool `json:"disabled,omitempty" tf:"disabled,omitempty"` + +ServerRoles []*string `json:"serverRoles,omitempty" tf:"server_roles,omitempty"` } + type SQLServerUserDetailsParameters struct { + } + type StatusInitParameters struct { + } + type StatusObservation struct { - // (read only) If true, user does not have login privileges. - Locked *bool `json:"locked,omitempty" tf:"locked,omitempty"` - // (read only) Password expiration duration with one week grace period. - PasswordExpirationTime *string `json:"passwordExpirationTime,omitempty" tf:"password_expiration_time,omitempty"` +// (read only) If true, user does not have login privileges. +Locked *bool `json:"locked,omitempty" tf:"locked,omitempty"` + +// (read only) Password expiration duration with one week grace period. +PasswordExpirationTime *string `json:"passwordExpirationTime,omitempty" tf:"password_expiration_time,omitempty"` } + type StatusParameters struct { + } + type UserInitParameters struct { - // The deletion policy for the user. - // Setting ABANDON allows the resource to be abandoned rather than deleted. This is useful - // for Postgres, where users cannot be deleted from the API if they have been granted SQL roles. - // The deletion policy for the user. Setting ABANDON allows the resource - // to be abandoned rather than deleted. This is useful for Postgres, where users cannot be deleted from the API if they - // have been granted SQL roles. Possible values are: "ABANDON". - DeletionPolicy *string `json:"deletionPolicy,omitempty" tf:"deletion_policy,omitempty"` - - // The host the user can connect from. This is only supported - // for BUILT_IN users in MySQL instances. Don't set this field for PostgreSQL and SQL Server instances. - // Can be an IP address. Changing this forces a new resource to be created. - // The host the user can connect from. This is only supported for MySQL instances. Don't set this field for PostgreSQL instances. Can be an IP address. Changing this forces a new resource to be created. - Host *string `json:"host,omitempty" tf:"host,omitempty"` - - PasswordPolicy []PasswordPolicyInitParameters `json:"passwordPolicy,omitempty" tf:"password_policy,omitempty"` - - // The ID of the project in which the resource belongs. If it - // is not provided, the provider project is used. - // The ID of the project in which the resource belongs. If it is not provided, the provider project is used. - Project *string `json:"project,omitempty" tf:"project,omitempty"` - - // The user type. It determines the method to authenticate the - // user during login. The default is the database's built-in user type. Flags - // include "BUILT_IN", "CLOUD_IAM_USER", or "CLOUD_IAM_SERVICE_ACCOUNT". - // The user type. It determines the method to authenticate the user during login. - // The default is the database's built-in user type. Flags include "BUILT_IN", "CLOUD_IAM_USER", or "CLOUD_IAM_SERVICE_ACCOUNT". - Type *string `json:"type,omitempty" tf:"type,omitempty"` + +// The deletion policy for the user. +// Setting ABANDON allows the resource to be abandoned rather than deleted. This is useful +// for Postgres, where users cannot be deleted from the API if they have been granted SQL roles. +// The deletion policy for the user. Setting ABANDON allows the resource +// to be abandoned rather than deleted. This is useful for Postgres, where users cannot be deleted from the API if they +// have been granted SQL roles. Possible values are: "ABANDON". +DeletionPolicy *string `json:"deletionPolicy,omitempty" tf:"deletion_policy,omitempty"` + +// The host the user can connect from. This is only supported +// for BUILT_IN users in MySQL instances. Don't set this field for PostgreSQL and SQL Server instances. +// Can be an IP address. Changing this forces a new resource to be created. +// The host the user can connect from. This is only supported for MySQL instances. Don't set this field for PostgreSQL instances. Can be an IP address. Changing this forces a new resource to be created. +Host *string `json:"host,omitempty" tf:"host,omitempty"` + +PasswordPolicy []PasswordPolicyInitParameters `json:"passwordPolicy,omitempty" tf:"password_policy,omitempty"` + +// The ID of the project in which the resource belongs. If it +// is not provided, the provider project is used. +// The ID of the project in which the resource belongs. If it is not provided, the provider project is used. +Project *string `json:"project,omitempty" tf:"project,omitempty"` + +// The user type. It determines the method to authenticate the +// user during login. The default is the database's built-in user type. Flags +// include "BUILT_IN", "CLOUD_IAM_USER", or "CLOUD_IAM_SERVICE_ACCOUNT". +// The user type. It determines the method to authenticate the user during login. +// The default is the database's built-in user type. Flags include "BUILT_IN", "CLOUD_IAM_USER", or "CLOUD_IAM_SERVICE_ACCOUNT". +Type *string `json:"type,omitempty" tf:"type,omitempty"` } + type UserObservation struct { - // The deletion policy for the user. - // Setting ABANDON allows the resource to be abandoned rather than deleted. This is useful - // for Postgres, where users cannot be deleted from the API if they have been granted SQL roles. - // The deletion policy for the user. Setting ABANDON allows the resource - // to be abandoned rather than deleted. This is useful for Postgres, where users cannot be deleted from the API if they - // have been granted SQL roles. Possible values are: "ABANDON". - DeletionPolicy *string `json:"deletionPolicy,omitempty" tf:"deletion_policy,omitempty"` - - // The host the user can connect from. This is only supported - // for BUILT_IN users in MySQL instances. Don't set this field for PostgreSQL and SQL Server instances. - // Can be an IP address. Changing this forces a new resource to be created. - // The host the user can connect from. This is only supported for MySQL instances. Don't set this field for PostgreSQL instances. Can be an IP address. Changing this forces a new resource to be created. - Host *string `json:"host,omitempty" tf:"host,omitempty"` - - ID *string `json:"id,omitempty" tf:"id,omitempty"` - - // The name of the Cloud SQL instance. Changing this - // forces a new resource to be created. - // The name of the Cloud SQL instance. Changing this forces a new resource to be created. - Instance *string `json:"instance,omitempty" tf:"instance,omitempty"` - - PasswordPolicy []PasswordPolicyObservation `json:"passwordPolicy,omitempty" tf:"password_policy,omitempty"` - - // The ID of the project in which the resource belongs. If it - // is not provided, the provider project is used. - // The ID of the project in which the resource belongs. If it is not provided, the provider project is used. - Project *string `json:"project,omitempty" tf:"project,omitempty"` - - SQLServerUserDetails []SQLServerUserDetailsObservation `json:"sqlServerUserDetails,omitempty" tf:"sql_server_user_details,omitempty"` - - // The user type. It determines the method to authenticate the - // user during login. The default is the database's built-in user type. Flags - // include "BUILT_IN", "CLOUD_IAM_USER", or "CLOUD_IAM_SERVICE_ACCOUNT". - // The user type. It determines the method to authenticate the user during login. - // The default is the database's built-in user type. Flags include "BUILT_IN", "CLOUD_IAM_USER", or "CLOUD_IAM_SERVICE_ACCOUNT". - Type *string `json:"type,omitempty" tf:"type,omitempty"` + +// The deletion policy for the user. +// Setting ABANDON allows the resource to be abandoned rather than deleted. This is useful +// for Postgres, where users cannot be deleted from the API if they have been granted SQL roles. +// The deletion policy for the user. Setting ABANDON allows the resource +// to be abandoned rather than deleted. This is useful for Postgres, where users cannot be deleted from the API if they +// have been granted SQL roles. Possible values are: "ABANDON". +DeletionPolicy *string `json:"deletionPolicy,omitempty" tf:"deletion_policy,omitempty"` + +// The host the user can connect from. This is only supported +// for BUILT_IN users in MySQL instances. Don't set this field for PostgreSQL and SQL Server instances. +// Can be an IP address. Changing this forces a new resource to be created. +// The host the user can connect from. This is only supported for MySQL instances. Don't set this field for PostgreSQL instances. Can be an IP address. Changing this forces a new resource to be created. +Host *string `json:"host,omitempty" tf:"host,omitempty"` + +ID *string `json:"id,omitempty" tf:"id,omitempty"` + +// The name of the Cloud SQL instance. Changing this +// forces a new resource to be created. +// The name of the Cloud SQL instance. Changing this forces a new resource to be created. +Instance *string `json:"instance,omitempty" tf:"instance,omitempty"` + +PasswordPolicy []PasswordPolicyObservation `json:"passwordPolicy,omitempty" tf:"password_policy,omitempty"` + +// The ID of the project in which the resource belongs. If it +// is not provided, the provider project is used. +// The ID of the project in which the resource belongs. If it is not provided, the provider project is used. +Project *string `json:"project,omitempty" tf:"project,omitempty"` + +SQLServerUserDetails []SQLServerUserDetailsObservation `json:"sqlServerUserDetails,omitempty" tf:"sql_server_user_details,omitempty"` + +// The user type. It determines the method to authenticate the +// user during login. The default is the database's built-in user type. Flags +// include "BUILT_IN", "CLOUD_IAM_USER", or "CLOUD_IAM_SERVICE_ACCOUNT". +// The user type. It determines the method to authenticate the user during login. +// The default is the database's built-in user type. Flags include "BUILT_IN", "CLOUD_IAM_USER", or "CLOUD_IAM_SERVICE_ACCOUNT". +Type *string `json:"type,omitempty" tf:"type,omitempty"` } + type UserParameters struct { - // The deletion policy for the user. - // Setting ABANDON allows the resource to be abandoned rather than deleted. This is useful - // for Postgres, where users cannot be deleted from the API if they have been granted SQL roles. - // The deletion policy for the user. Setting ABANDON allows the resource - // to be abandoned rather than deleted. This is useful for Postgres, where users cannot be deleted from the API if they - // have been granted SQL roles. Possible values are: "ABANDON". - // +kubebuilder:validation:Optional - DeletionPolicy *string `json:"deletionPolicy,omitempty" tf:"deletion_policy,omitempty"` - - // The host the user can connect from. This is only supported - // for BUILT_IN users in MySQL instances. Don't set this field for PostgreSQL and SQL Server instances. - // Can be an IP address. Changing this forces a new resource to be created. - // The host the user can connect from. This is only supported for MySQL instances. Don't set this field for PostgreSQL instances. Can be an IP address. Changing this forces a new resource to be created. - // +kubebuilder:validation:Optional - Host *string `json:"host,omitempty" tf:"host,omitempty"` - - // The name of the Cloud SQL instance. Changing this - // forces a new resource to be created. - // The name of the Cloud SQL instance. Changing this forces a new resource to be created. - // +crossplane:generate:reference:type=DatabaseInstance - // +kubebuilder:validation:Optional - Instance *string `json:"instance,omitempty" tf:"instance,omitempty"` - - // Reference to a DatabaseInstance to populate instance. - // +kubebuilder:validation:Optional - InstanceRef *v1.Reference `json:"instanceRef,omitempty" tf:"-"` - - // Selector for a DatabaseInstance to populate instance. - // +kubebuilder:validation:Optional - InstanceSelector *v1.Selector `json:"instanceSelector,omitempty" tf:"-"` - - // +kubebuilder:validation:Optional - PasswordPolicy []PasswordPolicyParameters `json:"passwordPolicy,omitempty" tf:"password_policy,omitempty"` - - // The password for the user. Can be updated. For Postgres - // instances this is a Required field, unless type is set to either CLOUD_IAM_USER - // or CLOUD_IAM_SERVICE_ACCOUNT. Don't set this field for CLOUD_IAM_USER - // and CLOUD_IAM_SERVICE_ACCOUNT user types for any Cloud SQL instance. - // The password for the user. Can be updated. For Postgres instances this is a Required field, unless type is set to - // either CLOUD_IAM_USER or CLOUD_IAM_SERVICE_ACCOUNT. - // +kubebuilder:validation:Optional - PasswordSecretRef *v1.SecretKeySelector `json:"passwordSecretRef,omitempty" tf:"-"` - - // The ID of the project in which the resource belongs. If it - // is not provided, the provider project is used. - // The ID of the project in which the resource belongs. If it is not provided, the provider project is used. - // +kubebuilder:validation:Optional - Project *string `json:"project,omitempty" tf:"project,omitempty"` - - // The user type. It determines the method to authenticate the - // user during login. The default is the database's built-in user type. Flags - // include "BUILT_IN", "CLOUD_IAM_USER", or "CLOUD_IAM_SERVICE_ACCOUNT". - // The user type. It determines the method to authenticate the user during login. - // The default is the database's built-in user type. Flags include "BUILT_IN", "CLOUD_IAM_USER", or "CLOUD_IAM_SERVICE_ACCOUNT". - // +kubebuilder:validation:Optional - Type *string `json:"type,omitempty" tf:"type,omitempty"` + +// The deletion policy for the user. +// Setting ABANDON allows the resource to be abandoned rather than deleted. This is useful +// for Postgres, where users cannot be deleted from the API if they have been granted SQL roles. +// The deletion policy for the user. Setting ABANDON allows the resource +// to be abandoned rather than deleted. This is useful for Postgres, where users cannot be deleted from the API if they +// have been granted SQL roles. Possible values are: "ABANDON". +// +kubebuilder:validation:Optional +DeletionPolicy *string `json:"deletionPolicy,omitempty" tf:"deletion_policy,omitempty"` + +// The host the user can connect from. This is only supported +// for BUILT_IN users in MySQL instances. Don't set this field for PostgreSQL and SQL Server instances. +// Can be an IP address. Changing this forces a new resource to be created. +// The host the user can connect from. This is only supported for MySQL instances. Don't set this field for PostgreSQL instances. Can be an IP address. Changing this forces a new resource to be created. +// +kubebuilder:validation:Optional +Host *string `json:"host,omitempty" tf:"host,omitempty"` + +// The name of the Cloud SQL instance. Changing this +// forces a new resource to be created. +// The name of the Cloud SQL instance. Changing this forces a new resource to be created. +// +crossplane:generate:reference:type=DatabaseInstance +// +kubebuilder:validation:Optional +Instance *string `json:"instance,omitempty" tf:"instance,omitempty"` + +// Reference to a DatabaseInstance to populate instance. +// +kubebuilder:validation:Optional +InstanceRef *v1.Reference `json:"instanceRef,omitempty" tf:"-"` + +// Selector for a DatabaseInstance to populate instance. +// +kubebuilder:validation:Optional +InstanceSelector *v1.Selector `json:"instanceSelector,omitempty" tf:"-"` + +// +kubebuilder:validation:Optional +PasswordPolicy []PasswordPolicyParameters `json:"passwordPolicy,omitempty" tf:"password_policy,omitempty"` + +// The password for the user. Can be updated. For Postgres +// instances this is a Required field, unless type is set to either CLOUD_IAM_USER +// or CLOUD_IAM_SERVICE_ACCOUNT. Don't set this field for CLOUD_IAM_USER +// and CLOUD_IAM_SERVICE_ACCOUNT user types for any Cloud SQL instance. +// The password for the user. Can be updated. For Postgres instances this is a Required field, unless type is set to +// either CLOUD_IAM_USER or CLOUD_IAM_SERVICE_ACCOUNT. +// +kubebuilder:validation:Optional +PasswordSecretRef *v1.SecretKeySelector `json:"passwordSecretRef,omitempty" tf:"-"` + +// The ID of the project in which the resource belongs. If it +// is not provided, the provider project is used. +// The ID of the project in which the resource belongs. If it is not provided, the provider project is used. +// +kubebuilder:validation:Optional +Project *string `json:"project,omitempty" tf:"project,omitempty"` + +// The user type. It determines the method to authenticate the +// user during login. The default is the database's built-in user type. Flags +// include "BUILT_IN", "CLOUD_IAM_USER", or "CLOUD_IAM_SERVICE_ACCOUNT". +// The user type. It determines the method to authenticate the user during login. +// The default is the database's built-in user type. Flags include "BUILT_IN", "CLOUD_IAM_USER", or "CLOUD_IAM_SERVICE_ACCOUNT". +// +kubebuilder:validation:Optional +Type *string `json:"type,omitempty" tf:"type,omitempty"` } // UserSpec defines the desired state of User type UserSpec struct { v1.ResourceSpec `json:",inline"` - ForProvider UserParameters `json:"forProvider"` + ForProvider UserParameters `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 @@ -252,13 +280,13 @@ type UserSpec 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 UserInitParameters `json:"initProvider,omitempty"` + InitProvider UserInitParameters `json:"initProvider,omitempty"` } // UserStatus defines the observed state of User. type UserStatus struct { v1.ResourceStatus `json:",inline"` - AtProvider UserObservation `json:"atProvider,omitempty"` + AtProvider UserObservation `json:"atProvider,omitempty"` } // +kubebuilder:object:root=true 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 a1facef..7747eb7 100644 --- a/cmd/generator/main.go +++ b/cmd/generator/main.go @@ -6,12 +6,13 @@ package main import ( "fmt" + dynamic_controller "kubedb.dev/provider-gcp/cmd/dynamic-controller" "os" "path/filepath" "github.com/crossplane/upjet/pkg/pipeline" - "kubedb.dev/provider-gcp/config" + pconfig "kubedb.dev/provider-gcp/config" ) func main() { @@ -23,5 +24,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 9076ed0..86476c8 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 GCP APIs to scheme") + kingpin.FatalIfError(apis.AddToSchemeCrd(mgr.GetScheme()), "Cannot add Azure APIs to scheme") o := tjcontroller.Options{ Options: xpcontroller.Options{ Logger: log, @@ -114,7 +116,10 @@ func main() { o.Features.Enable(features.EnableBetaManagementPolicies) log.Info("Alpha feature enabled", "flag", features.EnableBetaManagementPolicies) } - - kingpin.FatalIfError(controller.Setup(mgr, o), "Cannot setup GCP 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 GCP controllers") kingpin.FatalIfError(mgr.Start(ctrl.SetupSignalHandler()), "Cannot start controller manager") } diff --git a/examples/providerconfig/provider-config.yaml b/examples/providerconfig/provider-config.yaml index 032e4c4..ee4c873 100644 --- a/examples/providerconfig/provider-config.yaml +++ b/examples/providerconfig/provider-config.yaml @@ -3,11 +3,11 @@ kind: ProviderConfig metadata: name: default spec: - projectID: appscode-testing + projectID: credentials: source: Secret secretRef: namespace: crossplane-system name: gcp-secret key: creds ---- +# kubectl create secret generic gcp-secret -n crossplane-system --from-file=creds=./appscode-testing.json diff --git a/go.mod b/go.mod index 0b2c9cc..f1b720f 100644 --- a/go.mod +++ b/go.mod @@ -7,10 +7,13 @@ require ( github.com/crossplane/crossplane-runtime v1.14.1 github.com/crossplane/crossplane-tools v0.0.0-20230925130601-628280f8bf79 github.com/crossplane/upjet v1.0.0 + github.com/muvaf/typewriter v0.0.0-20220131201631-921e94e8e8d7 github.com/pkg/errors v0.9.1 gopkg.in/alecthomas/kingpin.v2 v2.2.6 + k8s.io/apiextensions-apiserver v0.28.3 k8s.io/apimachinery v0.28.4 k8s.io/client-go v0.28.4 + k8s.io/klog/v2 v2.100.1 sigs.k8s.io/controller-runtime v0.16.3 sigs.k8s.io/controller-tools v0.13.0 ) @@ -75,7 +78,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-20220131201631-921e94e8e8d7 // 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 @@ -110,9 +112,7 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect k8s.io/api v0.28.4 // indirect - k8s.io/apiextensions-apiserver v0.28.3 // indirect k8s.io/component-base v0.28.3 // 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/internal/controller/zz_dynamic_crd_controller.go b/internal/controller/zz_dynamic_crd_controller.go new file mode 100644 index 0000000..6b03e62 --- /dev/null +++ b/internal/controller/zz_dynamic_crd_controller.go @@ -0,0 +1,94 @@ +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" + firewall "kubedb.dev/provider-gcp/internal/controller/compute/firewall" + network "kubedb.dev/provider-gcp/internal/controller/compute/network" + networkpeering "kubedb.dev/provider-gcp/internal/controller/compute/networkpeering" + providerconfig "kubedb.dev/provider-gcp/internal/controller/providerconfig" + instance "kubedb.dev/provider-gcp/internal/controller/redis/instance" + database "kubedb.dev/provider-gcp/internal/controller/spanner/database" + databaseiammember "kubedb.dev/provider-gcp/internal/controller/spanner/databaseiammember" + instancespanner "kubedb.dev/provider-gcp/internal/controller/spanner/instance" + instanceiammember "kubedb.dev/provider-gcp/internal/controller/spanner/instanceiammember" + databasesql "kubedb.dev/provider-gcp/internal/controller/sql/database" + databaseinstance "kubedb.dev/provider-gcp/internal/controller/sql/databaseinstance" + sourcerepresentationinstance "kubedb.dev/provider-gcp/internal/controller/sql/sourcerepresentationinstance" + sslcert "kubedb.dev/provider-gcp/internal/controller/sql/sslcert" + user "kubedb.dev/provider-gcp/internal/controller/sql/user" + 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{"compute.gcp.kubedb.com", "Firewall"}: firewall.Setup, + schema.GroupKind{"compute.gcp.kubedb.com", "Network"}: network.Setup, + schema.GroupKind{"compute.gcp.kubedb.com", "NetworkPeering"}: networkpeering.Setup, + schema.GroupKind{"providerconfig.gcp.kubedb.com", ""}: providerconfig.Setup, + schema.GroupKind{"redis.gcp.kubedb.com", "Instance"}: instance.Setup, + schema.GroupKind{"spanner.gcp.kubedb.com", "Database"}: database.Setup, + schema.GroupKind{"spanner.gcp.kubedb.com", "DatabaseIAMMember"}: databaseiammember.Setup, + schema.GroupKind{"spanner.gcp.kubedb.com", "Instance"}: instancespanner.Setup, + schema.GroupKind{"spanner.gcp.kubedb.com", "InstanceIAMMember"}: instanceiammember.Setup, + schema.GroupKind{"sql.gcp.kubedb.com", "Database"}: databasesql.Setup, + schema.GroupKind{"sql.gcp.kubedb.com", "DatabaseInstance"}: databaseinstance.Setup, + schema.GroupKind{"sql.gcp.kubedb.com", "SourceRepresentationInstance"}: sourcerepresentationinstance.Setup, + schema.GroupKind{"sql.gcp.kubedb.com", "SSLCert"}: sslcert.Setup, + schema.GroupKind{"sql.gcp.kubedb.com", "User"}: user.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) +}